Repository navigation
fix(cmux-next): validate replies from immutable question inputs - #26837
Conversation
Source regressions precede the helper; native compilation and execution remain unverified under Swift HOLD26809. Agent-Session: https://cmux.com/deeplink/agent?id=aid-eb13e936fc1b3752c7c7
Pure validation and canonical intent only: no ledger, person proof, gesture ticket, or renderer binding authority. Agent-Session: https://cmux.com/deeplink/agent?id=aid-eb13e936fc1b3752c7c7
c7f297b to
74a1dfa
Compare
|
Bead |
|
Found 12 test failures on Blacksmith runners: Failures
...and 2 more test failures. View all on Blacksmith
|
Source-only regression under native Swift HOLD; execution is pending fleet verification. Agent-Session: https://cmux.com/deeplink/agent?id=aid-eb13e936fc1b3752c7c7
Match shared and web decoders for absent/null allowsOther while retaining explicit false restrictions and malformed flag refusal. Agent-Session: https://cmux.com/deeplink/agent?id=aid-eb13e936fc1b3752c7c7
Source-only native regression under Swift HOLD; JSON numeric zero/one must not decode as Bool. Agent-Session: https://cmux.com/deeplink/agent?id=aid-eb13e936fc1b3752c7c7
Validate the Foundation JSON type before reading boolValue to match strict shared/web decoding. Agent-Session: https://cmux.com/deeplink/agent?id=aid-eb13e936fc1b3752c7c7
Source-only regression under native Swift HOLD; malformed numeric and object flags cannot change answer shape. Agent-Session: https://cmux.com/deeplink/agent?id=aid-eb13e936fc1b3752c7c7
Absent/null flags use the shared defaults; explicit flags require JSON booleans for both answer permissions and multi-select shape. Agent-Session: https://cmux.com/deeplink/agent?id=aid-eb13e936fc1b3752c7c7
|
cmux status (one comment, edited in place; each line is updated by the job that owns it) Review App of this head (app.zip, kept 1 day)
red: cmux-next checks (god files, concurrency, crash safety, l10n); NEW: |
|
Owned by an agent session · took over from an earlier session · session |
…stion-validator-1028
…ption
Read the option as AcpmuxPermissionPrompt.onceOption does: a request that
offers two allow_once options is ambiguous and takes no reply. Note where the
validator deliberately matches acpmux check_answers/check_annotations (", "
multi-select split, any of the question's previews).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-f8805b2d0f3b1303441e
…nd the question card Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-f8805b2d0f3b1303441e
…acpmux does acpmux check_annotations reads annotations only for Claude Code's AskUserQuestion and drops them for any other question, so the pane check passes them too instead of refusing a reply acpmux takes. Name what the validator covers: question cards, not plain permission cards. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-f8805b2d0f3b1303441e
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-f8805b2d0f3b1303441e
…he relay take Its byte caps are a parse bound above the relay's own per-field limits, it reads only the allow-once option out of the request's options, and a Codex choice may repeat a label two options share (acpmux checks no Codex labels). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-f8805b2d0f3b1303441e
Skip non-object entries in the request's options and in rawInput's questions and their options, as acpmux does, instead of refusing the reply or skipping the preview check. Take the first allow_once option, the one the question card answers with. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-f8805b2d0f3b1303441e
…x do Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-f8805b2d0f3b1303441e
…nds, and empty Claude prompts Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-f8805b2d0f3b1303441e
…lized items Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-f8805b2d0f3b1303441e
|
Review (codex gpt-6-astra high, next-review): SHIP at df7c8bf No blocking findings. Review limited to the supplied diff and files; dependency reads were unavailable, and native compilation/tests were not run. |
|
Review (Codex gpt-6-astra high, fast; independent, via review-router): SHIP at df7c8bf No blocking findings. Answer shapes, option resolution (the question card's answerOption and acpmux check_reply), multi-select splitting, size bounds, annotations and the immutable request checks match acpmux and the relay for well-formed question cards. Three nits only affect malformed requests. |
|
Shipped in:
|
![Fix with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/fix-with-codesmith-light-3x.png)
Question-card Other answers need validation against the exact immutable native request before the trusted renderer proof can be spent. This prerequisite validates and canonicalizes a captured reply; it creates no person authority.
The standalone immutable Input contains sessionId, permissionId, requestJSON, and requestDigest. Validation checks the exact digest, current unique allow-once option, complete harness-specific answers, choice-only labels, duplicate JSON keys, original Claude AskUserQuestion previews, notes, and annotation absence/null semantics. Session and permission identity are never taken from the renderer reply. Omitted/null allowsOther defaults to true, matching AgentQuestion.Item and the web decoder; explicit false remains choice-only and malformed flags are refused. Both allowsOther and multiSelect require a JSON Boolean when present; numeric zero/one cannot coerce into flags. Omitted/null multiSelect defaults to false.
This pure helper has no ledger, connection, generation, nonce, person-proof, gesture-ticket, or renderer-binding APIs. The later integration must construct Input only from a captured native live Question and recheck that Question after renderer redemption and at ticket consumption. It does not repair Other Enter by itself.
Lawrence, via Leo:
Base: feat-cmux-next
8424d05bf9324f6f60a8f0c7c40b01f8a3e085b9.Head:
0812231ec3dae1b370726bbd530fb4a5b0f73b8a.Diff: 355 added lines in two files.
Validation:
git diff --checkandpython3 scripts/cmux-next/prepush-gate.pypass at this exact head.028cb98a0cfead717bd2fb180cdc6a3581f286b8and cover Claude/Chief/Codex with options present and exact answer preservation.54859174875and6669d37407b.0c7a29e9891; native compilation and tests are UNVERIFIED under the coordinator's Swift HOLD26809. No executed red/green result is claimed.swift test --package-path Packages/macOS/CmuxNext --filter AgentPaneQuestionReplyTests.The question_other_answer lane owns final verification with the root coordinator. This remains draft pending independent exact-head review and required native verification. No merge is requested.
Changelog
none
No capture: no UI change; this PR adds a pure Swift validator and its tests, with no rendered surface.
Agent session: agent session