[codex] Add delivery NO_REPLY runtime contracts#71039
[codex] Add delivery NO_REPLY runtime contracts#71039100yenadmin wants to merge 3 commits intoopenclaw:mainfrom
Conversation
Greptile SummaryThis is a test-only PR adding runtime contract tests for the delivery/NO_REPLY policy domain across two test targets: the followup runner and the Codex app-server adapter. No production code is modified; all new assertions are consistent with the existing Confidence Score: 5/5Safe to merge — test-only change with no production code modified. All three new test cases correctly reflect the production-code behavior (tokens.ts silent-reply matchers, event-projector text trimming). Assertions are tight and the contract fixture is well-scoped. No files require special attention. Reviews (1): Last reviewed commit: "test: add delivery no reply runtime cont..." | Re-trigger Greptile |
There was a problem hiding this comment.
Pull request overview
Adds test-only runtime contract coverage for Delivery/NO_REPLY behavior across the shared follow-up runner and the Codex app-server adapter, ensuring silent-terminal handling and routing fallback semantics are locked before any production refactors from RFC #71004.
Changes:
- Introduces a shared delivery
NO_REPLYcontract fixture used by both core and Codex tests. - Adds follow-up runner tests for
NO_REPLYsuppression (no origin/dispatcher delivery), media deliverability, and dispatcher fallback when origin routing is incomplete. - Adds Codex app-server adapter tests ensuring silent terminal text is preserved for shared suppression (exact/whitespace/JSON envelope).
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| test/helpers/agents/delivery-no-reply-runtime-contract.ts | Adds shared constants for delivery/NO_REPLY contract scenarios. |
| src/auto-reply/reply/followup-runner.test.ts | Adds contract tests covering follow-up NO_REPLY suppression, media deliverability, and dispatcher fallback behavior. |
| extensions/codex/src/app-server/delivery-no-reply-runtime-contract.test.ts | Adds Codex adapter contract test asserting silent terminal text is preserved and recognized as silent by shared token logic. |
Summary
Adds the delivery/NO_REPLY contract rung from RFC #71004. This is test-only: it locks currently-green follow-up delivery behavior for silent replies, dispatcher fallback, and Codex app-server preservation of silent terminal text. It also documents one known JSON-envelope delivery gap as a TODO for the later runtime-plan delivery migration.
No production delivery behavior changes in this PR.
Files Changed And Why
test/helpers/agents/delivery-no-reply-runtime-contract.tssrc/auto-reply/reply/followup-runner.test.tsextensions/codex/src/app-server/delivery-no-reply-runtime-contract.test.tsContract Matrix
NO_REPLYpayloads do not route to origin or dispatcher and still clean up typing state.NO_REPLYpayloads with media remain deliverable instead of being suppressed as silent text.NO_REPLYenvelope suppression is explicitly markedtodo.NO_REPLYterminal text is preserved for shared delivery suppression instead of adapter-specific handling.Known Red Row
NO_REPLYsuppression in follow-up deliveryAgentRuntimePlandelivery policy.How This Helps The RuntimePlan Work
Delivery is OpenClaw-owned policy. Codex should preserve terminal content and side-channel state; the shared delivery layer should decide whether output is visible, silent, routed to origin, or routed to dispatcher.
Reviewer Notes
NO_REPLYrow is intentionally TODO, not forgotten.Verification
node scripts/run-vitest.mjs run --config test/vitest/vitest.auto-reply-reply.config.ts src/auto-reply/reply/followup-runner.test.ts— 28 passed, 1 todonode scripts/run-vitest.mjs run --config test/vitest/vitest.extensions.config.ts extensions/codex/src/app-server/delivery-no-reply-runtime-contract.test.ts./node_modules/.bin/oxlint --tsconfig tsconfig.oxlint.core.json test/helpers/agents/delivery-no-reply-runtime-contract.ts src/auto-reply/reply/followup-runner.test.ts extensions/codex/src/app-server/delivery-no-reply-runtime-contract.test.tsgit diff --check -- test/helpers/agents/delivery-no-reply-runtime-contract.ts src/auto-reply/reply/followup-runner.test.ts extensions/codex/src/app-server/delivery-no-reply-runtime-contract.test.tsRefs #71004
Follows #71009
Follows #71029
Follows #71038