Repository navigation
Add shared active-run input admission and true steering - #220
sambitcreate wants to merge 7 commits into
Conversation
There was a problem hiding this comment.
sambitcreate has reached the 50-credit limit for trial accounts. To continue receiving code reviews, upgrade your plan.
There was a problem hiding this comment.
sambitcreate has reached the 50-credit limit for trial accounts. To continue receiving code reviews, upgrade your plan.
…nput-admission # Conflicts: # .memory/hermes-bot-run-controls.md # main/services/telegram/telegram-service-core.test.ts
There was a problem hiding this comment.
sambitcreate has reached the 50-credit limit for trial accounts. To continue receiving code reviews, upgrade your plan.
…nput-admission # Conflicts: # main/services/telegram/telegram-service-core.ts
There was a problem hiding this comment.
sambitcreate has reached the 50-credit limit for trial accounts. To continue receiving code reviews, upgrade your plan.
There was a problem hiding this comment.
Important
Please address the pre-admission retry poisoning and synchronize the cross-platform Remote contract artifacts before merging.
Reviewed changes
The full 36-file, two-commit change was reviewed across shared active-run admission, Pi durability, Remote routing and idempotency, Telegram/Desktop controls, and protocol/UI coverage.
- Host admission and Pi durability — Persists plain-text input before Pi injection, couples queued messages to visible-history markers, and handles terminal/cancellation races.
- Remote run-input endpoint — Adds feature-gated stream input admission, exact request identity, durable receipt replay, and current chat authorization checks.
- Desktop and Telegram consumers — Adds true desktop steering with uncertain-delivery retention and Telegram
/steerwithout stopping the active response. - Protocol and test coverage — Adds the OpenAPI/Remote route, shared parser, renderer queue state, and focused runtime, Remote, Telegram, and E2E regressions.
⚠️ Cross-platform contract artifacts remain stale
The documented contract process requires additive changes to update the shared fixtures and increment contractRevision. This PR adds a new advertised feature and route but leaves revision 11 and the canonical TypeScript/Swift/Android fixture coverage unchanged, so the new endpoint vocabulary is not covered by the cross-platform contract; update the coordinated mobile acceptance before enabling this as a releasable feature.
Technical details
# Contract synchronization
## Affected sites
- `protocol/aiden-remote/v1/openapi.json:1878-1923` and `main/services/aiden-remote-router.ts:1218` add and advertise `chat-run-input-v1`.
- `protocol/aiden-remote/v1/fixtures/contract.json:2` and `android/app/src/test/resources/contract.json:2` remain at `contractRevision` 11; the iOS and TypeScript fixture tests still assert the old revision.
- The native clients have no run-input DTO, request path, or uncertain-delivery draft flow yet; the PR plan itself marks that coordination as a merge gate.
## Required outcome
- Increment the additive contract revision and update the shared fixture, Android copy, Swift/TypeScript fixture tests, and coordinated native acceptance before treating the advertised route as shipped.GPT Luna | 𝕏
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
The incremental delta was reviewed for Remote retry safety, evicted-stream receipt replay, unknown host outcomes, and the run-input validation contract.
- Separated authorization from admission — Kept pre-admission authorization failures retryable while retaining indefinite protection after the host callback begins.
- Added read-only receipt replay — Replayed exact receipts after stream eviction without reserving or executing a new operation, with current chat authorization rechecked.
- Aligned validation contracts — Declared nonblank text and the required UTF-8 byte limit in OpenAPI and added Unicode boundary regressions.
GPT Luna | 𝕏
very-hermes-bot
left a comment
There was a problem hiding this comment.
Inline review — 3 finding(s) anchored to the diff. See the pinned summary comment for the overview.
| @@ -622,7 +630,7 @@ export function createTelegramServiceCore(deps: TelegramServiceDeps) { | |||
| }).catch(() => undefined); | |||
There was a problem hiding this comment.
[P2 · logic] Telegram /steer command edits bypass deduplication and emit false delivery failure errors
Confidence: 0.92
Omission of /steer from the update.edited_message command list causes edited steer messages to fall through to handleCommand with identical request UUIDs and modified text, triggering fingerprint conflict exceptions that report false delivery failure errors.
Repair: Include /steer in the command edit check array at line 625.
| </ol> | ||
| <p className="px-1 pt-1 text-small text-tertiary"> | ||
| Unsent messages stay in this window until it closes. Open this chat to continue its queue. | ||
| {state.uncertainIds?.length ? "Delivery is uncertain. Check delivery before resuming; your message is preserved." : "Unsent messages stay in this window until it closes. Open this chat to continue its queue."} |
There was a problem hiding this comment.
[P2 · logic] Deleting an uncertain queued message leaves a persistent delivery warning banner
Confidence: 0.9
ChatMessageQueue.remove does not remove deleted message IDs from snapshot.uncertainIds, causing the warning banner condition state.uncertainIds?.length to remain true across any remaining queued messages.
Repair: Check whether any uncertain ID matches an active message in state.messages when rendering the banner, and prune uncertainIds in ChatMessageQueue.remove.
| {state.uncertainIds?.length ? "Delivery is uncertain. Check delivery before resuming; your message is preserved." : "Unsent messages stay in this window until it closes. Open this chat to continue its queue."} | |
| {state.uncertainIds?.some((id) => state.messages.some((message) => message.id === id)) ? "Delivery is uncertain. Check delivery before resuming; your message is preserved." : "Unsent messages stay in this window until it closes. Open this chat to continue its queue."} |
| aria-label={`Steer with queued message ${index + 1}`} | ||
| title="Stop the current response, wait for it to save, then send this message next" | ||
| title="Add this text at the active response's next steering boundary" | ||
| > | ||
| <CornerDownRight aria-hidden="true" /> | ||
| Steer | ||
| {uncertainIds.has(message.id) ? "Check delivery" : "Steer"} |
There was a problem hiding this comment.
[P2 · logic] Accessible label for queued message "Check delivery" button remains hardcoded to "Steer"
Confidence: 0.88
When an item enters the uncertain state, the visible label updates to 'Check delivery' but aria-label remains 'Steer with queued message X' and title remains the steering description, violating WCAG 2.5.3.
Repair: Make aria-label and title conditional on whether uncertainIds.has(message.id) is true.
Hermes Review BotConfidence: 5 Engine: SummaryThis change implements host-owned active-run input admission and true steering across desktop, Telegram, and Aiden Remote. User input is validated, assigned an idempotent request identity, persisted to the host chat store, and recorded with an atomic journal marker before being injected into Pi's steering queue at the next execution boundary. Stop and cancellation prevent continued inference without discarding committed history, while uncertain delivery locks re-sending until confirmed by the user. Maintainers should double-check that deleting an uncertain queued item properly clears its ID from the queue snapshot so subsequent items do not display a lingering delivery warning banner. Confidence Score: 5/5Fully traced and verified across the host admission lifecycle, Pi queue draining, Remote idempotency ledger, Telegram polling offset barriers, and Electron queue state. 📁 Important Files Changed
Findings
Sequence DiagramsequenceDiagram
autonumber
participant Client as Client (Desktop / Telegram / Remote)
participant Admission as Host Admission (createChatRunInputAdmission)
participant Store as Chat Store (chatStore.appendMessage)
participant Harness as Pi Harness (PiAgentRuntimeHarness)
participant Agent as Pi Agent (@earendil-works/pi-agent-core)
Client->>Admission: submitRunInput(streamId, input)
Admission->>Harness: queuePersistedInput(message, mode, persist)
Harness->>Store: persist(messageId, text)
Store-->>Harness: message appended & chats:changed
Harness->>Agent: steer(message)
Harness-->>Admission: { accepted: true, queue: "steer" }
Admission-->>Client: ChatRunInputReceipt (accepted: true, queued, messageId)
Agent->>Harness: message_start (user)
Harness->>Store: appendPiMessages (message + AIDEN_CHAT_MESSAGE_MARKER)
[
{
"file": "renderer/components/queued-messages.tsx",
"start_line": 156,
"end_line": 156,
"severity": "P2",
"comment_type": "logic",
"confidence": 0.95,
"title": "Deleting an uncertain queued message leaves a stale warning banner in the queue list",
"mechanism": "ChatMessageQueue.remove(id) does not filter uncertainIds when deleting a message, and line 156 checks state.uncertainIds?.length unconditionally, permanently showing the delivery uncertainty notice after an uncertain item is removed while other messages remain.",
"repair": "Check whether any current message in state.messages is present in uncertainIds before rendering the delivery warning banner, and prune uncertainIds on queue.remove(id).",
"suggestion": " {state.messages.some((m) => uncertainIds.has(m.id)) ? \"Delivery is uncertain. Check delivery before resuming; your message is preserved.\" : \"Unsent messages stay in this window until it closes. Open this chat to continue its queue.\"}",
"id": "9f9fd3fec93a5174"
}
]
|
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Run failed. View the logs →
|
very-hermes-bot
left a comment
There was a problem hiding this comment.
Inline review — 1 finding(s) anchored to the diff. See the pinned summary comment for the overview.
| </ol> | ||
| <p className="px-1 pt-1 text-small text-tertiary"> | ||
| Unsent messages stay in this window until it closes. Open this chat to continue its queue. | ||
| {state.uncertainIds?.length ? "Delivery is uncertain. Check delivery before resuming; your message is preserved." : "Unsent messages stay in this window until it closes. Open this chat to continue its queue."} |
There was a problem hiding this comment.
[P2 · logic] Deleting an uncertain queued message leaves a stale warning banner in the queue list
Confidence: 0.95
ChatMessageQueue.remove(id) does not filter uncertainIds when deleting a message, and line 156 checks state.uncertainIds?.length unconditionally, permanently showing the delivery uncertainty notice after an uncertain item is removed while other messages remain.
Repair: Check whether any current message in state.messages is present in uncertainIds before rendering the delivery warning banner, and prune uncertainIds on queue.remove(id).
| {state.uncertainIds?.length ? "Delivery is uncertain. Check delivery before resuming; your message is preserved." : "Unsent messages stay in this window until it closes. Open this chat to continue its queue."} | |
| {state.messages.some((m) => uncertainIds.has(m.id)) ? "Delivery is uncertain. Check delivery before resuming; your message is preserved." : "Unsent messages stay in this window until it closes. Open this chat to continue its queue."} |
|
Closing as superseded by #251, which shipped steer/queue on main with its own receipt format under the same |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* docs(plans): refresh plan index and status for 0.51.0 Supersedes #274. Moves 22 completed plans into docs/plans/completed/, refreshes active plan status against main after 0.51.0, records unlinked shipped changes (#265, #275, #280), and updates .memory notes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * docs(plans): note #220/#223 superseded and Steer moved to #298 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * docs(plans): record desktop and Telegram Steer shipped in #298 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

A running response can accept a plain-text instruction through one host-owned admission path. Desktop Steer and Telegram
/steerpreserve the active run; Interrupt keeps its stop-and-send behavior. The additivechat-run-input-v1Remote endpoint binds input to an authenticated owner, exact stream, request UUID and immutable payload.Admission reserves bounded Pi capacity and persists the user message before injection. An atomic journal marker prevents replay in a later ordinary turn. Accepted means persisted and queued; Stop or revocation can prevent consumption without erasing history. Desktop uncertain delivery retains its request identity and cannot become a new send automatically.
Remote authorization failures before admission leave the UUID retryable. Exceptions after entering the host callback retain an indefinite unknown outcome, including across expiry and restart. Evicted event streams use read-only receipt lookup, then recheck current chat/Bot access. OpenAPI requires nonblank text and the
x-aiden-max-utf8-bytes: 16384client validation extension.Telegram
/steercaptures its target and waits for a durable polling offset. Pending Telegram ingress is memory-only: a crash or bridge stop before admission can discard an unacknowledged command. An accepted acknowledgment follows host persistence.Stacked on #216, including its acknowledgment and command-edit fixes. Native consumers are published in #223 (stacked on #218), with independent reviews of marker and late-receipt fixes complete. The latest combined validation with this runtime head and the other native dependencies remains pending. No merge or release requested.
Validation:
Hosted verification, deterministic Electron E2E, and Pullfrog pass on 1c381bc; both actionable review threads are resolved. Greptile is unavailable due to its account trial-credit limit. Live Telegram/device acceptance has not been performed.