Repository navigation
Conversation
…nvelope oracle Add tests/oracles/agentMessageEnvelope.oracle.ts with the ten approved envelope laws (Decision by Thomas Kosiewski (GitHub ThomasK33), 2026-12-05) and fix the five bug classes it finds on main: - a damaged peer payload row reached the request labelled as the model's own reply or the user's text, and still showed a peer card; - the same-turn pass relabelled a damaged family row's quoted text; - unsigned reasoning kept the exact wrapper in both passes; - capTitle could split a surrogate pair; - format wrote an empty title that parse drops. The provider pass and the transcript now share one authenticity rule (getAuthenticAgentPeerPayload). The four owned files join ORACLE_SOURCES. --- _Generated with `xum` • Model: `anthropic:claude-opus-5-5` • Thinking: `xhigh` • Cost: `$26.27`_ <!-- mux-attribution: model=anthropic:claude-opus-5-5 thinking=xhigh costs=26.27 -->
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Oracle evidence on unchanged
|
|
@codex review |
|
Codex Review: Didn't find any major issues. 🚀 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
🟢 e2e stories (Haiku): 14 passed21 agent steps · 6 replayed from cache · 15 model calls · 47.5k tokens (23% cached) All 14 tests in 9 files
e2e 0.20.0 · 1m 14s · web · run artifacts 🟢 e2e Electron stories (Haiku): 3 passed3 agent steps · 3 model calls · 7.9k tokens (22% cached) All 3 tests in 3 files
e2e 0.20.0 · 19.2s · electron · run artifacts 🟢 e2e agent repros (Haiku): no tests selectedSpend: $0.00 of the $1.00 cap (proxy ledger) e2e 0.20.0 · 6.5s · 2 targets (web, phone) · run artifacts |
🛡️ Codex Security Review · Automatically triggeredSecurity review completed. No security issues were found in this pull request. Reviewed commit: Only the user who started this review can view the report in Codex. ℹ️ About Codex security reviews in GitHubThis is an experimental Codex feature. Security reviews are triggered when:
Once complete, Codex will leave suggestions, or a comment if no findings are found. |
…fix test CodeQL read the round-trip law's "closed once at its end" check (indexOf === length - CLOSE.length) as an incorrect suffix check. The endsWith test before it already rules out -1, so the check was right, but "no close tag before the final one" says the same thing without the pattern. --- _Generated with `xum` • Model: `anthropic:claude-opus-5-5` • Thinking: `xhigh` • Cost: `$26.27`_ <!-- mux-attribution: model=anthropic:claude-opus-5-5 thinking=xhigh costs=26.27 -->
|
@codex review |
|
Codex Review: Didn't find any major issues. Can't wait for the next one! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
🛡️ Codex Security Review · Automatically triggeredSecurity review completed. No security issues were found in this pull request. Reviewed commit: Only the user who started this review can view the report in Codex. ℹ️ About Codex security reviews in GitHubThis is an experimental Codex feature. Security reviews are triggered when:
Once complete, Codex will leave suggestions, or a comment if no findings are found. |
Why
The agent peer-message envelope had no oracle. An
@tanstack/oraclesoracle with the ten laws Thomas Kosiewski approved on 2026-12-05 fails onmainin 81 of 462 tests, in five bug classes. This PR fixes all five:mux_agent_messagewrapper in both passes (11.7%). Google sends unsigned reasoning in the request.capTitlecut a title by UTF-16 unit and could split a surrogate pair (found by the constructed histories).formatAgentMessageEnvelopewrote an empty title, which parse drops, so the envelope did not round-trip (2.3%).What changed
tests/oracles/agentMessageEnvelope.oracle.ts: ten laws (round trip, labels name the writer, no exact wrapper, one delivery per payload row, the notification holds no sender text, the same-turn pass changes nothing, untouched parts keep identity, well-formed titles, no throw, transcript and request agree), each with its authority, limits, constructed histories and calibrations. The four owned files joinORACLE_SOURCES.agentMessageEnvelope.ts:getAuthenticAgentPeerPayloadis the one authenticity rule for the provider pass and the transcript card.neutralizeAgentEnvelopeLookalikesInOwnTextrenames the wrapper and the user label in the model's own text and keeps the self and quoted labels.formatomits an empty title.neutralizeAgentEnvelopeLookalikesForProvider.ts: a synthetic row that an agent-message send wrote is labelled quoted however damaged it is. The history pass relabels unsigned reasoning. The same-turn pass uses the own-text rename for text and unsigned reasoning. Signed reasoning keeps its bytes.displayedMessageBuilder.tsuses the shared rule.agentPeerMessageBroker.tscapTitlekeeps whole characters. Two stale comments now say that no exact wrapper reaches the provider.Scope
Laws L1 to L10 as approved, and no other law. Near spellings, signed reasoning, plan-review tags and a family title that imitates the server header are stated limits. 19 mutants stay open because only a law the SPEC does not hold would see them (see Verification).
Tradeoffs
neutralizeAgentEnvelopeLookalikeslost itsincludesfast path, whose mutants no law can tell apart. It costs about 0.7 ms per MB of<-heavy text and nothing for plain text.Blast Radius
Provider request building for every chat, and the peer card in the transcript. A valid peer or family delivery is byte-identical. Only damaged rows, unsigned reasoning that holds a reserved tag, and titles over 256 units change.
Verification
main, 81 of 462 fail (L1 6, L2 22, L3 14, L6 8, L7 8, L8 10, L10 13).make test-oracles, seed 1): 102 gaps on the first run, 19 now. Each remaining gap needs a potential law (below).mainand pass here. 1,251 tests in the touched files and their dependents pass.make static-check(every step but hadolint, which this host lacks), ESLint on the changed files,make crap-check,make dry-check,make typecheck.Remaining gaps and the potential law each one needs
formatAgentMessageEnvelopeguard): P1, format refuses an envelope with an empty sender or message.getValidAgentPeerTriggerMeta,payloadMessageId): P2, the transcript marks a server trigger by its attribution.containsAgentMessageTag): P3, the transcript flags the agent's own forgery as the request labels it. It would also flag a reply that only closes the wrapper, which is not flagged today.seenset): P7, shared references and cycles. These mutants only repeat work or loop.prepareFamilyMessagekind and trigger label): P8, the notification names the send's kind.Generated with
xum• Model:anthropic:claude-opus-5-5• Thinking:xhigh• Cost:$26.27