Skip to content

[issues/569] Add CMD_BIND_TO_CUSTOM_AI_BY_ID for programmatic custom AI binding#597

Open
couimet wants to merge 3 commits into
mainfrom
issues/569
Open

[issues/569] Add CMD_BIND_TO_CUSTOM_AI_BY_ID for programmatic custom AI binding#597
couimet wants to merge 3 commits into
mainfrom
issues/569

Conversation

@couimet
Copy link
Copy Markdown
Owner

@couimet couimet commented May 21, 2026

Summary

Adds rangelink.bindToCustomAiById command accepting { extensionId: string } to programmatically bind custom AI assistants. Eliminates the picker step, enabling fully automated integration tests for all custom AI paste flows. Previously 6 custom AI tests required human-in-the-loop for binding and manual paste verification.

Changes

  • New createBindToCustomAiByIdCommand.ts — resolves extensionId to destination kind via resolveKindByExtensionId() and delegates to PasteDestinationManager.bind()
  • resolveKindByExtensionId() in destinationBuilders.ts maps extension IDs to built-in or custom AI kinds
  • Wiring through wireSubscriptions.ts, createWiringServices.ts, commandIds.ts, package.json
  • 11 unit tests covering undefined/null/string/array args, missing/empty/number extensionId, unknown extensionId, built-in bind, custom bind, bind error passthrough
  • 6 custom AI integration tests converted from [assisted] to fully automated using the new command
  • 2 manual-paste tests (Tier 3, fallback) now verify toast, clipboard state, and logs without requiring human Cmd+V
  • QA YAML: 6 entries updated from automated: assisted to automated: true
  • Contract tests updated for new command and command-palette entry counts
  • Documentation: CHANGELOG not needed (dev-facing infrastructure); README not needed (no user-facing changes)

Test Plan

  • All 1947 unit tests pass
  • 154/156 automated integration tests pass (2 pre-existing Cursor-specific clipboard-preservation timeouts)
  • 11 new unit tests for createBindToCustomAiByIdCommand
  • 6 integration tests reworked from human-in-the-loop to fully automated

Related

Summary by CodeRabbit

  • New Features

    • Added a new "Bind to Custom AI by ID" command (registered but hidden from the command palette) to enable binding to a custom AI assistant by extension ID.
  • Tests

    • Added/expanded tests for the new bind-by-ID command, custom-AI resolution, and wiring/registration.
    • Converted several custom-AI QA scenarios to fully automated.
    • Added clipboard-preservation test helpers and updated integration tests to assert preservation behavior.

Review Change Stack

…m AI binding

## Summary

Adds `rangelink.bindToCustomAiById` command accepting `{ extensionId: string }` to programmatically bind custom AI assistants. Eliminates the picker step, enabling fully automated integration tests for all custom AI paste flows. Previously 6 custom AI tests required human-in-the-loop for binding and manual paste verification.

## Changes

- New `createBindToCustomAiByIdCommand.ts` — resolves extensionId to destination kind via `resolveKindByExtensionId()` and delegates to `PasteDestinationManager.bind()`
- `resolveKindByExtensionId()` in `destinationBuilders.ts` maps extension IDs to built-in or custom AI kinds
- Wiring through `wireSubscriptions.ts`, `createWiringServices.ts`, `commandIds.ts`, `package.json`
- 11 unit tests covering undefined/null/string/array args, missing/empty/number extensionId, unknown extensionId, built-in bind, custom bind, bind error passthrough
- 6 custom AI integration tests converted from `[assisted]` to fully automated using the new command
- 2 manual-paste tests (Tier 3, fallback) now verify toast, clipboard state, and logs without requiring human Cmd+V
- QA YAML: 6 entries updated from `automated: assisted` to `automated: true`
- Contract tests updated for new command and command-palette entry counts
- Documentation: CHANGELOG not needed (dev-facing infrastructure); README not needed (no user-facing changes)

## Test Plan

- [x] All 1947 unit tests pass
- [x] 154/156 automated integration tests pass (2 pre-existing Cursor-specific clipboard-preservation timeouts)
- [x] 11 new unit tests for createBindToCustomAiByIdCommand
- [x] 6 integration tests reworked from human-in-the-loop to fully automated

## Related

- Closes #569
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 21, 2026

Warning

Rate limit exceeded

@couimet has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 51 minutes and 44 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 49d04ae8-8535-47d2-8610-68200c33bb9d

📥 Commits

Reviewing files that changed from the base of the PR and between f62b85e and 5c09fc5.

📒 Files selected for processing (1)
  • packages/rangelink-vscode-extension/src/__integration-tests__/helpers/clipboardHelpers.ts

Walkthrough

Adds rangelink.bindToCustomAiById: a hidden VS Code command that resolves extension IDs to built-in or custom assistant destination kinds, validates inputs, and delegates to the existing bind flow. Wiring, constants, and tests added; integration tests and QA YAML updated to replace picker-driven assisted flows with programmatic command invocation and log-based clipboard assertions.

Changes

Programmatic Custom AI Binding Command

Layer / File(s) Summary
Command contract, constants, and error codes
packages/rangelink-vscode-extension/package.json, src/constants/commandIds.ts, src/errors/RangeLinkExtensionErrorCodes.ts, src/__tests__/constants/packageJsonContracts.test.ts
New rangelink.bindToCustomAiById contributed to package.json with hidden command-palette entry; added CMD_BIND_TO_CUSTOM_AI_BY_ID constant and CUSTOM_AI_NOT_FOUND_BY_EXTENSION_ID error code; contract tests updated to assert presence and counts.
Extension ID → destination kind resolution
src/destinations/destinationBuilders.ts, src/__tests__/destinations/destinationBuilders.test.ts
Added resolveKindByExtensionId that checks built-in assistants first, then custom assistant configs; tests cover built-in mapping, custom mapping, built-in priority, and not-found cases.
Command factory, WiringServices, and unit tests
src/createWiringServices.ts, src/commands/createBindToCustomAiByIdCommand.ts, src/__tests__/commands/createBindToCustomAiByIdCommand.test.ts, src/__tests__/helpers/createMockWiringServices.ts
Adds createBindToCustomAiByIdCommand factory with argument validation, extensionId extraction, resolution, and delegation to destinationManager.bind; exposes customAssistants on WiringServices; unit tests validate invalid args, missing kind, built-in/custom success, and error propagation.
Command registration and wiring tests
src/wireSubscriptions.ts, src/__tests__/wireSubscriptions.test.ts, src/__tests__/extension.test.ts
Registers CMD_BIND_TO_CUSTOM_AI_BY_ID in wireSubscriptions, passing customAssistants, destinationManager, and logger to the handler; updated tests validate registration and that handler resolves kinds and calls bind.
Integration tests, clipboard helpers, and QA YAML
src/__integration-tests__/suite/*, src/__integration-tests__/helpers/clipboardHelpers.ts, packages/rangelink-vscode-extension/qa/qa-test-cases-v1.1.0.yaml
Replaces picker-based steps in custom-AI integration tests with direct executeCommand(CMD_BIND_TO_CUSTOM_AI_BY_ID, { extensionId }); adds log-based assertClipboardPreservationRan/DidNotRun helpers and updates multiple integration suites to assert clipboard-preservation behavior; marks several QA cases as automated: true.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Poem

🐰 I hopped in code to bind by id,
No picker pause, no human guide.
Extension keys now flip the switch,
Tests run green, the logs show which.
A happy rabbit sleeps in CI pride.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the main change: adding a new command CMD_BIND_TO_CUSTOM_AI_BY_ID for programmatic custom AI binding, which matches the primary focus of the changeset.
Linked Issues check ✅ Passed The PR fully implements the requirements from issue #569: new command with extensionId parameter, lookup order (built-in then custom), error handling, delegation to bind flow, and hidden command palette entry.
Out of Scope Changes check ✅ Passed All changes align with the #569 objective: new command implementation, wiring, tests, QA YAML updates for automated tests, and clipboard-preservation test assertions are all in-scope for enabling programmatic custom AI binding.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch issues/569

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 21, 2026

⚠️ QA Coverage Gap Detected

A new command 'Bind to Custom AI by ID' was added, which requires new test cases to verify its functionality.

Suggested test cases:

  • RangeLink Commands: Verify 'Bind to Custom AI by ID' command execution (automatable)
  • RangeLink Commands: Check if 'Bind to Custom AI by ID' command is listed in the command palette (manual — Requires user interaction to verify visibility in the command palette)

Generated by QA Gap Check (GPT-4o-mini via GitHub Models)

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 5

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
packages/rangelink-vscode-extension/src/__integration-tests__/suite/customAiAssistants.test.ts (1)

356-377: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Add at least one log assertion in this behavior test.

This test verifies behavior (clipboard preservation) but currently has no logger assertion, which weakens diagnosability when it fails.

As per coding guidelines, "Include logger assertions in tests that verify method behavior - logging provides critical visibility for debugging. Consolidate with behavior tests, do not create separate logging tests."

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@packages/rangelink-vscode-extension/src/__integration-tests__/suite/customAiAssistants.test.ts`
around lines 356 - 377, Add a logger assertion to this test: after calling
rangelink.copyLinkWithRelativePath and ss.settle(), use the existing
getLogCapture() marker "before-tier1-clip" to fetch logs produced since that
mark and assert that the expected diagnostic log entry appears (for example the
clipboard-preservation or copy action message emitted by the extension). Locate
getLogCapture() / logCapture.mark('before-tier1-clip') and add a single
assertion on logCapture.getEntriesSince(...) (or equivalent helper used
elsewhere in tests) to verify the expected log message is present before calling
assertClipboardRestored.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
`@packages/rangelink-vscode-extension/src/__integration-tests__/suite/customAiAssistants.test.ts`:
- Around line 268-270: The call to
vscode.commands.executeCommand(CMD_BIND_TO_CUSTOM_AI_BY_ID, {...}) ignores the
command's return value and can hide non-throwing error Results; update each
invocation (including the instances around lines 320-322, 360-362, 383-385,
438-440, 502-504) to capture the returned Result, assert that it indicates
success (or throw/assert with the contained error message when it indicates
failure) so the test fails on bind errors instead of silently succeeding due to
prior state.

In
`@packages/rangelink-vscode-extension/src/__tests__/commands/createBindToCustomAiByIdCommand.test.ts`:
- Around line 167-194: The test is missing assertions that the logger was called
for this new behavior path; update the test that uses
createBindToCustomAiByIdCommand (and the related handler/result) to assert
mockLogger was invoked with the appropriate messages when
destinationBuilders.resolveKindByExtensionId is called and when mockManager.bind
succeeds: add expectations against mockLogger (e.g., mockLogger.info/warn/error
or whichever methods your mock exposes) after calling handler({ extensionId })
to verify a resolve/log entry and a bind/success log entry, referencing
resolveKindByExtensionId and mockManager.bind in your assertions so the test
verifies both behavior and corresponding logs.
- Line 212: The test currently uses a generic expect(result).toBeErr(); —
replace this with the project's Result matcher to assert the actual error using
expect(result).toBeErrWith(...) so the test verifies the error payload; locate
the failing assertion on the "result" variable in
createBindToCustomAiByIdCommand.test.ts and assert the specific error value (or
construct/constant used elsewhere in the test) with toBeErrWith to conform to
the project's Result matcher contract.

In `@packages/rangelink-vscode-extension/src/__tests__/wireSubscriptions.test.ts`:
- Around line 360-371: Add an assertion that the logger was called for this
flow: spy on services.logger (e.g., jest.spyOn(services.logger, 'info') or the
appropriate log level used in the implementation) before invoking
registrar.getHandler(CMD_BIND_TO_CUSTOM_AI_BY_ID), then after the handler runs
assert that the logger was called with a message indicating the extension
resolution and/or bind action (referencing resolveKindByExtensionId,
CMD_BIND_TO_CUSTOM_AI_BY_ID, and destinationManager.bind) and that the
resolveSpy was called as already asserted; keep the logger assertion combined in
this same test rather than in a separate logging test.

In
`@packages/rangelink-vscode-extension/src/errors/RangeLinkExtensionErrorCodes.ts`:
- Line 22: The exported enum value CUSTOM_AI_NOT_FOUND_BY_EXTENSION_ID does not
match the required contract (CUSTOM_AI_NOT_FOUND); update the
RangeLinkExtensionErrorCodes export to use CUSTOM_AI_NOT_FOUND instead, or add
CUSTOM_AI_NOT_FOUND as a stable alias that maps to the same string while keeping
CUSTOM_AI_NOT_FOUND_BY_EXTENSION_ID for backward compatibility; modify the enum
entry in RangeLinkExtensionErrorCodes (and any related references) so consumers
see the canonical CUSTOM_AI_NOT_FOUND identifier.

---

Outside diff comments:
In
`@packages/rangelink-vscode-extension/src/__integration-tests__/suite/customAiAssistants.test.ts`:
- Around line 356-377: Add a logger assertion to this test: after calling
rangelink.copyLinkWithRelativePath and ss.settle(), use the existing
getLogCapture() marker "before-tier1-clip" to fetch logs produced since that
mark and assert that the expected diagnostic log entry appears (for example the
clipboard-preservation or copy action message emitted by the extension). Locate
getLogCapture() / logCapture.mark('before-tier1-clip') and add a single
assertion on logCapture.getEntriesSince(...) (or equivalent helper used
elsewhere in tests) to verify the expected log message is present before calling
assertClipboardRestored.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: d6e664d8-eeca-4678-a8df-03b340511b96

📥 Commits

Reviewing files that changed from the base of the PR and between b0121e9 and 7a0ebb5.

📒 Files selected for processing (15)
  • packages/rangelink-vscode-extension/package.json
  • packages/rangelink-vscode-extension/qa/qa-test-cases-v1.1.0.yaml
  • packages/rangelink-vscode-extension/src/__integration-tests__/suite/customAiAssistants.test.ts
  • packages/rangelink-vscode-extension/src/__tests__/commands/createBindToCustomAiByIdCommand.test.ts
  • packages/rangelink-vscode-extension/src/__tests__/constants/packageJsonContracts.test.ts
  • packages/rangelink-vscode-extension/src/__tests__/destinations/destinationBuilders.test.ts
  • packages/rangelink-vscode-extension/src/__tests__/extension.test.ts
  • packages/rangelink-vscode-extension/src/__tests__/helpers/createMockWiringServices.ts
  • packages/rangelink-vscode-extension/src/__tests__/wireSubscriptions.test.ts
  • packages/rangelink-vscode-extension/src/commands/createBindToCustomAiByIdCommand.ts
  • packages/rangelink-vscode-extension/src/constants/commandIds.ts
  • packages/rangelink-vscode-extension/src/createWiringServices.ts
  • packages/rangelink-vscode-extension/src/destinations/destinationBuilders.ts
  • packages/rangelink-vscode-extension/src/errors/RangeLinkExtensionErrorCodes.ts
  • packages/rangelink-vscode-extension/src/wireSubscriptions.ts

Comment on lines +268 to +270
await vscode.commands.executeCommand(CMD_BIND_TO_CUSTOM_AI_BY_ID, {
extensionId: 'rangelink.dummy-ai-extension',
});
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Assert bind command success explicitly in each test.

These executeCommand(CMD_BIND_TO_CUSTOM_AI_BY_ID, ...) calls ignore the command result. If binding returns an error Result (without throwing), a previously bound destination can mask failures and create false positives.

Also applies to: 320-322, 360-362, 383-385, 438-440, 502-504

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@packages/rangelink-vscode-extension/src/__integration-tests__/suite/customAiAssistants.test.ts`
around lines 268 - 270, The call to
vscode.commands.executeCommand(CMD_BIND_TO_CUSTOM_AI_BY_ID, {...}) ignores the
command's return value and can hide non-throwing error Results; update each
invocation (including the instances around lines 320-322, 360-362, 383-385,
438-440, 502-504) to capture the returned Result, assert that it indicates
success (or throw/assert with the contained error message when it indicates
failure) so the test fails on bind errors instead of silently succeeding due to
prior state.

BOOKMARK_NOT_FOUND = 'BOOKMARK_NOT_FOUND',
BOOKMARK_SAVE_FAILED = 'BOOKMARK_SAVE_FAILED',
BOOKMARK_STORE_NOT_AVAILABLE = 'BOOKMARK_STORE_NOT_AVAILABLE',
CUSTOM_AI_NOT_FOUND_BY_EXTENSION_ID = 'CUSTOM_AI_NOT_FOUND_BY_EXTENSION_ID',
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Use the required error-code contract name.

At Line 22, the new code is CUSTOM_AI_NOT_FOUND_BY_EXTENSION_ID, but the stated contract for this command is CUSTOM_AI_NOT_FOUND. This mismatch can break consumers that branch on the documented error code. Please align the enum/exported code to the required contract (or add a stable alias if backward compatibility is needed).

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@packages/rangelink-vscode-extension/src/errors/RangeLinkExtensionErrorCodes.ts`
at line 22, The exported enum value CUSTOM_AI_NOT_FOUND_BY_EXTENSION_ID does not
match the required contract (CUSTOM_AI_NOT_FOUND); update the
RangeLinkExtensionErrorCodes export to use CUSTOM_AI_NOT_FOUND instead, or add
CUSTOM_AI_NOT_FOUND as a stable alias that maps to the same string while keeping
CUSTOM_AI_NOT_FOUND_BY_EXTENSION_ID for backward compatibility; modify the enum
entry in RangeLinkExtensionErrorCodes (and any related references) so consumers
see the canonical CUSTOM_AI_NOT_FOUND identifier.

@github-actions
Copy link
Copy Markdown

✅ CI / Integration Tests (with extensions) — run summary

Duration 9m 31s
Unit tests Ran in Test & Validate job
Integration tests passing 157
QA TC IDs exercised clipboard-preservation-011, clipboard-preservation-012, custom-ai-assistant-003, claude-code-001, claude-code-006, claude-code-007, gemini-code-assist-001, gemini-code-assist-005, gemini-code-assist-006
Report View run & artifacts

@github-actions

This comment has been minimized.

Adds missing logger assertions to unit tests and clipboard preservation log assertions to 22 integration tests across four files. Replaces a bare toBeErr() with toBeRangeLinkExtensionErrorErr.

Benefits:
- Custom-kind bind test now verifies debug logging like its built-in counterpart
- Error passthrough test now asserts the specific error code, message, and functionName
- Wire delegation test now verifies the debug log emitted by createBindToCustomAiByIdCommand
- All 22 integration tests that call assertClipboardRestored now verify both "Clipboard saved" and "Clipboard restored" log entries, proving the full preservation pipeline ran
- clipboard-preservation-009 correctly asserts the NEGATIVE case (picker dismissed, no operation ran, so no preservation logs expected)

Ignored Feedback:
- Asserting executeCommand return values in integration tests: the suite verifies behaviour through log capture, not command return values. Adding return-value assertions would be inconsistent with every other executeCommand call in the test suite.
- Renaming CUSTOM_AI_NOT_FOUND_BY_EXTENSION_ID back to CUSTOM_AI_NOT_FOUND: the rename was intentional per prior review — the original name was too vague. This is a new error code on this branch with no existing consumers.

Ref: #597 (review)
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
`@packages/rangelink-vscode-extension/src/__integration-tests__/helpers/clipboardHelpers.ts`:
- Around line 37-44: The current assertClipboardPreservationRan checks only for
presence of "Clipboard saved" and "Clipboard restored" in lines from
logCapture.getLinesSince(markName); update it to also assert the restored entry
occurs after the saved entry by locating their indices in the lines array (use
lines.findIndex for the savedLine and restoredLine) and assert restoredIndex >
savedIndex, including operationLabel in the failure message; keep existing
presence checks (savedLine/restoredLine) but replace or augment them with the
index order check so assertClipboardPreservationRan verifies correct ordering.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: d4939dc1-7a71-4a2f-98a1-4156b80fa233

📥 Commits

Reviewing files that changed from the base of the PR and between 7a0ebb5 and f62b85e.

📒 Files selected for processing (7)
  • packages/rangelink-vscode-extension/src/__integration-tests__/helpers/clipboardHelpers.ts
  • packages/rangelink-vscode-extension/src/__integration-tests__/suite/builtInAiAssistants.test.ts
  • packages/rangelink-vscode-extension/src/__integration-tests__/suite/clipboardPreservation.test.ts
  • packages/rangelink-vscode-extension/src/__integration-tests__/suite/customAiAssistants.test.ts
  • packages/rangelink-vscode-extension/src/__integration-tests__/suite/dirtyBufferWarning.test.ts
  • packages/rangelink-vscode-extension/src/__tests__/commands/createBindToCustomAiByIdCommand.test.ts
  • packages/rangelink-vscode-extension/src/__tests__/wireSubscriptions.test.ts

`assertClipboardPreservationRan` now verifies "Clipboard restored" appears after "Clipboard saved" in the log, not just that both exist. Presence-only assertions could pass if a restored line from a prior operation lingered before the saved line from the current operation. The ordering check proves the save→restore sequence ran within the same operation window.

Ref: #597 (review)
@github-actions
Copy link
Copy Markdown

❌ CI / Integration Tests (with extensions) — run summary

Duration 9m 39s
Unit tests Ran in Test & Validate job
Integration tests passing 156
Integration tests failed 1
QA TC IDs exercised clipboard-preservation-011, clipboard-preservation-012, custom-ai-assistant-003, claude-code-001, claude-code-006, claude-code-007, gemini-code-assist-001, gemini-code-assist-005, gemini-code-assist-006
Report View run & artifacts

To re-run failed tests:

./scripts/run-integration-tests.sh --exclude-label "cursor" --exclude-assisted --with-extensions --grep "clipboard-preservation-012"
/home/runner/work/rangeLink/rangeLink/packages/rangelink-vscode-extension:
 ERR_PNPM_RECURSIVE_RUN_FIRST_FAIL  rangelink-vscode-extension@1.0.0 test:release:with-extensions: `./scripts/run-integration-tests.sh --with-extensions --exclude-assisted --exclude-label cursor`
Exit status 1
 ELIFECYCLE  Command failed with exit code 1.

@github-actions

This comment has been minimized.

@github-actions
Copy link
Copy Markdown

❌ CI / Integration Tests (with extensions) — run summary

Duration 9m 23s
Unit tests Ran in Test & Validate job
Integration tests passing 156
Integration tests failed 1
QA TC IDs exercised clipboard-preservation-011, clipboard-preservation-012, custom-ai-assistant-003, claude-code-001, claude-code-006, claude-code-007, gemini-code-assist-001, gemini-code-assist-005, gemini-code-assist-006
Report View run & artifacts

To re-run failed tests:

./scripts/run-integration-tests.sh --exclude-label "cursor" --exclude-assisted --with-extensions --grep "clipboard-preservation-012"
/home/runner/work/rangeLink/rangeLink/packages/rangelink-vscode-extension:
 ERR_PNPM_RECURSIVE_RUN_FIRST_FAIL  rangelink-vscode-extension@1.0.0 test:release:with-extensions: `./scripts/run-integration-tests.sh --with-extensions --exclude-assisted --exclude-label cursor`
Exit status 1
 ELIFECYCLE  Command failed with exit code 1.

@github-actions
Copy link
Copy Markdown

✅ CI / Test & Validate — run summary

Duration 10m 4s
Unit tests passed 1979 / 1979
Integration tests passing 148
QA TC IDs exercised status-bar-menu-002, status-bar-menu-003, status-bar-menu-005, status-bar-menu-006, bind-to-destination-010, bind-to-destination-013, terminal-picker-001, terminal-picker-002, terminal-picker-003, terminal-picker-004, terminal-picker-005, terminal-picker-007, terminal-picker-008, terminal-picker-011, terminal-picker-012, terminal-picker-013, terminal-picker-014, terminal-picker-015, terminal-picker-016, file-picker-001, file-picker-002, file-picker-003, file-picker-004, file-picker-005, file-picker-009, file-picker-011, file-picker-012, clipboard-preservation-001, clipboard-preservation-002, clipboard-preservation-003, clipboard-preservation-005, clipboard-preservation-006, clipboard-preservation-007, clipboard-preservation-008, clipboard-preservation-009, clipboard-preservation-013, clipboard-preservation-014, clipboard-preservation-015, clipboard-preservation-016, send-file-path-001, send-file-path-002, send-file-path-004, send-file-path-005, send-file-path-006, send-file-path-007, send-file-path-008, send-file-path-010, send-file-path-011, send-file-path-012, dirty-buffer-warning-004, dirty-buffer-warning-006, dirty-buffer-warning-007, dirty-buffer-warning-019, send-terminal-selection-003, send-terminal-selection-006, send-terminal-selection-007, go-to-link-001, unbind-001, unbind-003, unbind-004, editor-binding-validation-004, full-line-navigation-001, full-line-navigation-002, char-navigation-001, char-navigation-002, full-line-link-generation-001, wrapped-link-navigation-001, wrapped-link-navigation-002, wrapped-link-navigation-003, wrapped-link-navigation-004, markdown-link-navigation-001, url-exclusion-001, stale-viewcolumn-001, hidden-tab-paste-001, hidden-tab-paste-002, full-line-selection-validation-001, core-send-commands-r-l-001, core-send-commands-r-l-002, core-send-commands-r-c-001, core-send-commands-r-l-004, core-send-commands-r-c-002, core-send-commands-r-l-005, core-send-commands-r-p-001, core-send-commands-r-v-001, clickable-file-paths-001, clickable-file-paths-002, clickable-file-paths-003, clickable-file-paths-004, clickable-file-paths-005, clickable-file-paths-006, clickable-file-paths-007, clickable-file-paths-008, clickable-file-paths-009, clickable-file-paths-010, clickable-file-paths-011, clickable-file-paths-012, smart-padding-001, smart-padding-003, smart-padding-005, smart-padding-006, smart-padding-007, smart-padding-008, smart-padding-011, duplicate-tab-group-001, duplicate-tab-group-002, duplicate-tab-group-003, duplicate-tab-group-004, langswitch-binding-001, langswitch-binding-002, navigation-clamping-001, navigation-clamping-002, navigation-clamping-003, navigation-clamping-004, untitled-navigation-001, untitled-navigation-002, untitled-navigation-003, untitled-navigation-004, untitled-navigation-005, untitled-navigation-006, navigation-toast-settings-001, navigation-toast-settings-002, navigation-toast-settings-003, filename-fallback-navigation-001, filename-fallback-navigation-002, filename-fallback-navigation-003, filename-fallback-navigation-004, custom-ai-assistant-001, custom-ai-assistant-002, custom-ai-assistant-004, custom-ai-assistant-005, custom-ai-assistant-006, custom-ai-assistant-007, custom-ai-assistant-008, custom-ai-assistant-009, custom-ai-assistant-010, custom-ai-assistant-011, custom-ai-assistant-012, custom-ai-assistant-013, custom-ai-assistant-014, custom-ai-assistant-015, custom-ai-assistant-016, custom-ai-assistant-017, github-copilot-chat-001, release-notifier-001, release-notifier-002, status-bar-appearance-001, status-bar-appearance-002
Report View run & artifacts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CMD_BIND_TO_CUSTOM_AI_BY_ID — new command to bind custom AI assistants by ID

1 participant