You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(chat): settle image-only prompts by message ID - #488
Advertise the bundled runner's existing client-message correlation support in get_state, so outbox dispatch uses exact message IDs instead of legacy text matching.
Preserve correlated queue IDs in state snapshots for reconnecting consumers.
Add real runner-channel regressions for an image-only prompt negotiated through get_state and queue snapshot identity.
Root cause
The runner implemented correlation but never advertised supportsClientMessageIds. The outbox therefore sent image-only prompts without IDs and waited for the queue label [Image] to match an echoed message whose text is empty. The screenshot reached omp while its held thumbnail remained Delivering….
Verification
Both new regression cases failed before the fix (missing message ID and missing queue IDs).
bun test --parallel runner/test/channel.test.ts runner/test/correlation.test.ts lib/message-outbox-review.test.mjs lib/message-outbox.test.mjs: 114 passed, 0 failed.
No browser visual check or production deployment. Existing running runner processes need replacement to use the fix; this does not retrospectively identify previously uncorrelated messages.
Summary by CodeRabbit
Bug Fixes
Delivered screenshot prompts now settle against the correct message, and queued message IDs are retained in state snapshots after reconnects.
The runner state now reports client message ID support and includes queued client message IDs when available. Tests cover correlation for image-only prompts and queued messages during reconnect state.
Changes: Client message ID state reporting
Layer / File(s)
Summary
Report and validate client message IDs runner/src/commands/model.ts, runner/test/channel.test.ts, CHANGELOG.md
sessionState reports client message ID support and includes queued client message IDs when available. Tests cover image-only prompt correlation and queued message IDs in state snapshots. The changelog records these changes.
This update improves confirmation of image-only messages without adding a new access path or permission. No material new security, failure-containment, or rollback risk was identified in the inspected change.
Retained concerns
No architecture-level concerns identified.
Security review details
Security Blast Radius
inferred — The inspected change affects identity reporting and delivery confirmation within an existing session. It does not introduce another command, destination selector, or privileged operation. The HTTP state route forwards the existing session response, so the added queue metadata can also reach existing state consumers.
Trust Boundaries and Controls
observed — Host commands continue to dispatch through an own-property command-table lookup against the channel's captured session. The correlated message command uses the same session ID, owner, and advisor inputs as before; the newly advertised ID changes confirmation evidence, not those authority inputs.
Resilience and Maintainability Implications
observed — The activated path retains ordered runner admission, conditional single-delivery claiming, and explicit cleanup. Cancelled or failed unbound claims are released; locally consumed claims are resolved. Lost confirmation and interrupted delivery are represented as potentially sent failures rather than silently establishing delivery or automatically replaying an uncertain write.
Pre-merge checks: 4
Check name
Status
Explanation
Description Check
Check skipped - CodeRabbit’s high-level summary is enabled.
Title check
The title "fix(chat): settle image-only prompts by message ID" names the main change. The objectives say the runner did not advertise supportsClientMessageIds in get_state, so outbox dispatch fell bac…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Title check
Explanation
The title "fix(chat): settle image-only prompts by message ID" names the main change. The objectives say the runner did not advertise supportsClientMessageIds in get_state, so outbox dispatch fell back to text matching for image-only prompts and left thumbnails at Delivering. The changeset adds supportsClientMessageIds: true and clientMessageIds to queuedMessages in runner/src/commands/model.ts, a CHANGELOG entry, and regression tests for image-only prompts and queue correlation. The title is specific, concise, and follows the conventional-commit style. It does not mention the queue-ID snapshot fix, which is secondary.
Finishing Touches
Generate unit tests (beta)
Commit to this branch
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Warning
Some tools did not complete. Review the errors below.
ast-grep (0.51.1)
graphify-out/graph.json
ast-grep skipped this file: it is too large to scan (9375345 bytes)
Checkov (3.3.30)
graphify-out/graph.json
Checkov skipped this file: it is too large to scan (9375345 bytes)
Review coverage is incomplete: 1 file could not be fully reviewed. Findings from completed review steps are included; see review info for details.
This review exceeded your plan’s limits and used usage-based reviews—free during trial, billed after paid activation unless disabled. Manage usage-based reviews.
Recent review info
Run configuration
Source mode: Auto
Repository: Unavailable
Branch: Unavailable
File: No configuration file from this repository applied
Commit: Unavailable
Layers: defaults
Review profile: CHILL
Plan: Advanced
Run ID: 5f7bca86-d02b-4d45-9645-1f956763e480
Commits
Reviewing files that changed from the base of the PR and between cd88954 and 776de4c.
Files selected for processing: 4
CHANGELOG.md
graphify-out/graph.json
runner/src/commands/model.ts
runner/test/channel.test.ts
Files not reviewed because the changes were too large to process: 1
graphify-out/graph.json
Limit details: You’ve used all 10 included reviews currently available.
This branch has not been deployed
No deployments
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
get_state, so outbox dispatch uses exact message IDs instead of legacy text matching.get_stateand queue snapshot identity.Root cause
The runner implemented correlation but never advertised
supportsClientMessageIds. The outbox therefore sent image-only prompts without IDs and waited for the queue label[Image]to match an echoed message whose text is empty. The screenshot reached omp while its held thumbnail remainedDelivering….Verification
bun test --parallel runner/test/channel.test.ts runner/test/correlation.test.ts lib/message-outbox-review.test.mjs lib/message-outbox.test.mjs: 114 passed, 0 failed../node_modules/.bin/tsc --noEmit -p runner/test/tsconfig.json: passed../node_modules/.bin/eslint runner/src/commands/model.ts runner/test/channel.test.ts: passed.No browser visual check or production deployment. Existing running runner processes need replacement to use the fix; this does not retrospectively identify previously uncorrelated messages.
Summary by CodeRabbit