Repository navigation
feat(shell): mention-time honesty — #891 surface 1 - #910
Merged
Merged
Conversation
The highest-coverage net for the first-mention dead-end: the moment a human composes a mention of an agent that cannot hear it, the shell says so. - GET /api/pods/:podId/agent-states — canViewPod-gated; derivation lives in agentStateService, pure and unit-tested. States are per runtime class, because the #891 review measured lastUsedAt lying for every class except the polling one: BYO installs derive listening/gone-dark/never-connected from the union of BOTH token stores (finding D); native and push-webhooks are reachable by construction; gateway/cloud classes are 'unknown' rather than guessed from a shared boot timestamp (finding A). fixCommand attaches only for the owner (decision 1's split key — an instruction addressed to someone who cannot perform it is the P1/P2 contradiction). - V2PodChat: the @-typeahead carries the state ("not connected, can't answer" / "hasn't checked in lately") so a dead mention is never offered silently, and a draft mentioning an unreachable agent gets a composer warning — certainty-matched copy (never-connected flat, gone-dark hedged, principle 6), owner gets the wake command, everyone else the explanation. Best-effort: a failed state read renders nothing rather than something wrong. en + zh-CN. Implemented interpretation of "send-time inline line": the warning renders at COMPOSE time, which covers typing, paste, and mobile before the silence happens; a persisted in-room system line post-send is the named follow-up. 9 unit tests on the derivation (run locally); 5 RTL tests on the composer (CI-verified — frontend jest cannot run in this environment, pre-existing). Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01XeUH4HVDsDHYPsHJthXjB8
- tokens from draft.match typed explicitly: the bare [] fallback inferred never[] under the CI tsc config (local `tsc -p .` missed it — the CI command is `npm run typecheck`; use that locally from now on). - agent-states gets the same 60/min limiter shape as the file's other reads (CodeQL js/missing-rate-limiting, same class as the tasks claim route). Composer polls at 60s per open pod — the ceiling is for runaway tabs, not the design load. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01XeUH4HVDsDHYPsHJthXjB8
…rtions The hook passes auth headers as a second argument; toHaveBeenCalledWith requires the full argument list, so all five waitFor gates failed in CI before any behavioral assertion ran. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01XeUH4HVDsDHYPsHJthXjB8
This was referenced Aug 13, 2026
Merged
lilyshen0722
added a commit
that referenced
this pull request
Aug 13, 2026
…obbered — every pod page crashed (#936) P0, caught live in post-deploy browser verification. #935's activity derivation was written as a NEW file at backend/services/agentStateService.ts — a path where the #891 mention-honesty service already lived. Its same-named test sat at the same test path, so the clobber also buried the suite that would have caught it, and CI stayed green. Live effect: the /:podId/agent-states route called MY deriveAgentState(lastActiveAt, runtimeType) with (installation, tokens, callerId), returned bare 'stale' strings, and the typeahead useMemo crashed the ENTIRE pod page on s.agentName.toLowerCase(). - restore agentStateService.ts + its test verbatim from #910 - re-add the activity pieces in the SAME file under non-colliding names: collectPodAgentActivity + deriveActivityBucket (tool + roster call sites updated); activity tests live in agentStateService.activity.test.js - V2PodChat: the honesty surface promises 'silence over a wrong dot' — that now includes malformed payloads; shape-guard the map so a bad backend degrades to no-dots, never an error boundary Claude-Session: https://claude.ai/code/session_01XeUH4HVDsDHYPsHJthXjB8 Co-authored-by: Claude Fable 5 <[email protected]>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What
Surface 1 of the ratified status-honesty spec (#891) — the net that catches every silence cause at the moment of failed expectation.
Backend:
GET /api/pods/:podId/agent-states(canViewPod-gated). The honesty rules live in a pure, unit-tested service: per-runtime-class derivation (BYO from the union of both token stores — finding D; native/push-webhook reachable by construction; gateway/cloud honestlyunknown— finding A), andfixCommandattached only for the owner (decision 1's split key).Frontend (V2PodChat):
commonly agent run <name>, everyone else sees the explanation with no un-performable instruction.Interpretation note: the spec's "send-time inline line" is implemented at compose time — it covers typing, paste, and mobile before the silence happens. A persisted in-room system line after send is the named follow-up, not silently dropped.
Tests
9 unit tests on the pure derivation (green locally); 5 RTL tests on the composer behavior — owner/peer copy split, hedged gone-dark copy, no warning for listening agents, typeahead state. Frontend jest cannot run in this environment (pre-existing, exit 194 before any test) — CI's Test & Coverage is the verification tier for those five.
Completes the onboarding funnel's net 2. Net 1 (#909, live connect verification) deployed earlier today.
🤖 Generated with Claude Code
https://claude.ai/code/session_01XeUH4HVDsDHYPsHJthXjB8