instar 1.3.1221 → 1.3.1222

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. package/dist/core/CodexDeliveryObserver.d.ts.map +1 -1
  2. package/dist/core/CodexDeliveryObserver.js +8 -8
  3. package/dist/core/CodexDeliveryObserver.js.map +1 -1
  4. package/dist/core/InboundDeliveryStore.d.ts.map +1 -1
  5. package/dist/core/InboundDeliveryStore.js +10 -2
  6. package/dist/core/InboundDeliveryStore.js.map +1 -1
  7. package/dist/core/PostUpdateMigrator.d.ts.map +1 -1
  8. package/dist/core/PostUpdateMigrator.js +5 -0
  9. package/dist/core/PostUpdateMigrator.js.map +1 -1
  10. package/dist/core/SessionManager.d.ts.map +1 -1
  11. package/dist/core/SessionManager.js +13 -0
  12. package/dist/core/SessionManager.js.map +1 -1
  13. package/dist/core/StuckInputSentinel.d.ts.map +1 -1
  14. package/dist/core/StuckInputSentinel.js +16 -3
  15. package/dist/core/StuckInputSentinel.js.map +1 -1
  16. package/dist/data/codexStageBReleaseEvidence.d.ts.map +1 -1
  17. package/dist/data/codexStageBReleaseEvidence.js +13 -12
  18. package/dist/data/codexStageBReleaseEvidence.js.map +1 -1
  19. package/dist/data/stageBCertifiedSet.d.ts +7 -7
  20. package/dist/data/stageBCertifiedSet.js +7 -7
  21. package/dist/data/stageBCertifiedSet.js.map +1 -1
  22. package/dist/data/standards-guard-index.json +1 -1
  23. package/dist/data/standards-guard-index.meta.json +2 -2
  24. package/dist/data/standards-registry.meta.json +1 -1
  25. package/dist/lifeline/MessageQueue.d.ts +3 -0
  26. package/dist/lifeline/MessageQueue.d.ts.map +1 -1
  27. package/dist/lifeline/MessageQueue.js.map +1 -1
  28. package/dist/lifeline/TelegramLifeline.d.ts.map +1 -1
  29. package/dist/lifeline/TelegramLifeline.js +34 -14
  30. package/dist/lifeline/TelegramLifeline.js.map +1 -1
  31. package/dist/lifeline/queueDeliveryNotice.d.ts +14 -0
  32. package/dist/lifeline/queueDeliveryNotice.d.ts.map +1 -0
  33. package/dist/lifeline/queueDeliveryNotice.js +31 -0
  34. package/dist/lifeline/queueDeliveryNotice.js.map +1 -0
  35. package/dist/monitoring/SessionWatchdog.d.ts +24 -1
  36. package/dist/monitoring/SessionWatchdog.d.ts.map +1 -1
  37. package/dist/monitoring/SessionWatchdog.js +107 -19
  38. package/dist/monitoring/SessionWatchdog.js.map +1 -1
  39. package/dist/scaffold/templates.js +1 -1
  40. package/package.json +1 -1
  41. package/src/data/builtin-manifest.json +21 -21
  42. package/src/data/codexStageBReleaseEvidence.ts +13 -12
  43. package/src/data/stageBCertifiedSet.ts +7 -7
  44. package/src/data/standards-guard-index.json +1 -1
  45. package/src/data/standards-guard-index.meta.json +2 -2
  46. package/src/data/standards-registry.meta.json +1 -1
  47. package/src/scaffold/templates.ts +1 -1
  48. package/upgrades/1.3.1222.md +72 -0
  49. package/upgrades/inbound-delivery-unknown-terminalization.eli16.md +36 -0
  50. package/upgrades/side-effects/codex-observer-bounded-backlog.md +84 -0
  51. package/upgrades/side-effects/codex-test-worker-control-plane.md +86 -0
  52. package/upgrades/side-effects/inbound-delivery-unknown-terminalization.md +82 -0
  53. package/upgrades/side-effects/stage-b-evidence-code-binding.md +1 -0
@@ -7,10 +7,12 @@ export const SHIPPED_CODEX_STAGE_B_RELEASE_EVIDENCE: unknown = {
7
7
  "echoPublicKeyPem": "-----BEGIN PUBLIC KEY-----\nMCowBQYDK2VwAyEAVfPs10C+igEwHX1QKxkuGv57xUnfEmLygjW+9comCtg=\n-----END PUBLIC KEY-----\n",
8
8
  "artifact": {
9
9
  "schemaVersion": 1,
10
+ "packageVersion": "1.3.1220",
11
+ "gitCommit": "cfe468dc5ef3f31ac71c28aed6bdc28a26131f49",
10
12
  "configSha256": "018d8e91978755abfb021968781d805098d98f9f2c64d70b728d2c18b205d5e8",
11
13
  "echoMachineId": "m_03b30f5b32c6ef3eb0afd3ca7054e252",
12
- "startedAt": 1788251493809,
13
- "endedAt": 1788259530838,
14
+ "startedAt": 1788576017942,
15
+ "endedAt": 1788583231083,
14
16
  "deliveryCount": 50,
15
17
  "caseCounts": {
16
18
  "identical": 2,
@@ -28,17 +30,16 @@ export const SHIPPED_CODEX_STAGE_B_RELEASE_EVIDENCE: unknown = {
28
30
  "staleOwnerAction": 0
29
31
  },
30
32
  "rawEvidenceDigests": [
31
- "ded4deaeb0c09f3911de5aa7086f4114d4e22b356605ff2669e655cde2e72891",
32
- "cc3484e4f834bd1e496123602322aea8950d44e2172878bac550b0a24e3726c2",
33
- "f11d401fcba94261f468b9c96a711b9955d59fd0d8b8c97494d8dd5bef96081a",
34
- "7ed4a2576c2547d930b8efb83ea55f732c466d9e7c330c98a502edc5bb5e960a",
35
- "d35c349bd787b7df74b467f1dd959ffd7cffa0075f1d38632d9dec23d2c3f4c4",
36
- "74b92e819f106582fe6c3c96fe118a2d890d2ff7c625cd4404b9e68732322349",
37
- "7dac92dbcd6b7f628f3f7ce22020283754c3fb527e39c3d600cb61f12474c491"
33
+ "8f451873786a8e7c48e64535d72d78d2e97cdae0f4287abcae3bc8b646195bb9",
34
+ "f2d07ef4046e49fed158732d90b5d0105f585ca2fa13732ac6d0e9a238b357c0",
35
+ "b7dda84ce9e43178c2fb84bdcd2e5c3ed30cf277067e7f415cdebbd8588f864e",
36
+ "37517e5f3dc66819f61f5a7bb8ace1921282415f10551d2defa5c3eb0985b570",
37
+ "263e662820f478f2a160a8cf5eb96086dc1442ee5fd18329b32c1ea2248fb569",
38
+ "f360834ee52fc22702d630d92ced062f2b8d9b83dd896ced22647de3234ae2ad",
39
+ "1b94aa70b163015ab1d4a10f0d170790ad73aa1fd241cb6a828191052b3628a1",
40
+ "9fcf5e1558ec0b700dabce0fcc93638683d9b211cb09cd15190bf984e9ef92c7"
38
41
  ],
39
42
  "reviewerDecision": "approved",
40
- "packageVersion": "1.3.1219",
41
- "gitCommit": "package:1.3.1219",
42
- "signature": "Ga8TIYdLoFz3FYKM56NTCjgPlQtSMYJ8lrkKqn0nlrhzsf9zLiZ9DzEkLBMPrVuqWOUbhqnUmU0CuNt2CVFlAw=="
43
+ "signature": "9CmBo9oVesfP8Kpi94L/paiK+9vNQskTVoY16450HwnsA3AYDjXpiv+Nwkf0vm4ltnEXdeoDhUMOS80npoWwDw=="
43
44
  }
44
45
  };
@@ -348,20 +348,20 @@ export const STAGE_B_CERTIFIED_SET = {
348
348
  "reason": "LLM-provider plumbing reached through a dynamic import in a certified module; shared across every internal LLM feature and certified by its own suites — binding it would re-freeze releases on unrelated provider churn"
349
349
  }
350
350
  ],
351
- "fingerprint": "6aafe889d2bf5e21aeb821348fdbc593e0ca34282de706d53a5eb44cd848ea4b",
352
- "artifactDigest": "7499d16a6ab0b986757121c3d1b3f97f93f7204d341e0a07aaecb360863c75eb",
351
+ "fingerprint": "f1aacb47b41db1f9385f30b67cd53dfe1febac2ea1e555dbd61f5002ac55512f",
352
+ "artifactDigest": "a2db23a95530681953ffa3002ab14e349ebf53d19be2a54c1f4afacc3aead997",
353
353
  "fileHashes": {
354
354
  "src/core/CodexComposerAdapter.ts": "8d4753c45f317092f3d1e8d6e5a73a875dbf046cbac20066220fa036b4f0e065",
355
- "src/core/CodexDeliveryObserver.ts": "7de40edfd2f64adfcef9e18bf6191acb4bdeb294886f0369895b948e1be345dd",
355
+ "src/core/CodexDeliveryObserver.ts": "0d70e29ef427af8ceda05a2434858639b48f120edc3490a439c90c26ab450fe3",
356
356
  "src/core/CodexLifecycleProductionComposition.ts": "a94897fbd317af61c5ea8d09da7484b2799b985ef44af2e2cc304f769fff62a4",
357
- "src/core/InboundDeliveryStore.ts": "93009f9b2cc2c4ee2124c09e8fe3f8ac30edf17b033c13864ff61b0e14ea0e88",
357
+ "src/core/InboundDeliveryStore.ts": "9a20293ef6cf10938718e64cae357d51c14605b17631d13c0001cb4710c1c9b2",
358
358
  "src/core/SessionRecoveryChannel.ts": "d38b8ebc6d073008ae2d9f9109a254019813499d5d327a3ff00e4b2a72272b65",
359
359
  "src/core/SessionRecoveryConsumer.ts": "6a00ca4993d188f1c95eaa7d156795804f00f7e10e600ea12fa2e8cd40423268",
360
360
  "src/core/StageBStartupReadiness.ts": "92275608368d44abc98802f9a445acc6419fd57bddb8c2e4935f32961d401183"
361
361
  },
362
- "boundAt": "2026-09-04",
363
- "boundBy": "echo (operator-approved rebinding, topic 52075, 2026-09-03)",
364
- "note": "Initial binding: certified sources verified byte-identical to the evidence commit (git diff 92a21075d..1b46533a7 over the certified set is empty), so the approved 2026-08-31 canary evidence remains the honest witness."
362
+ "boundAt": "2026-09-05",
363
+ "boundBy": "echo (fresh exact-candidate certification, topic 59199, 2026-09-04)",
364
+ "note": "Fresh binding after the first candidate correctly failed closed on three busy-session false-unknown outcomes. Candidate cfe468dc5 then passed 50/50 deliveries over 7,213,141 ms, the full required case matrix, 30/30 responsiveness samples, and zero forbidden outcomes; its signed evidence digest is bound here."
365
365
  } as const;
366
366
 
367
367
  export type StageBCertifiedSet = typeof STAGE_B_CERTIFIED_SET;
@@ -2,7 +2,7 @@
2
2
  "schemaVersion": 1,
3
3
  "generatedFrom": "source-tree",
4
4
  "registrySha256": "8e6606a6722433c5ffc15b3870402283c5406083a14cdbd0e18e735731e2aae2",
5
- "packageVersion": "1.3.1221",
5
+ "packageVersion": "1.3.1222",
6
6
  "guards": [
7
7
  {
8
8
  "ref": "docs/audits/phase-b/f10-triage.md",
@@ -1,5 +1,5 @@
1
1
  {
2
- "sha256": "5fa578c9e59c4db0835d48d02776497a23b3fbc74c2f0048192dd5ad9da9c679",
2
+ "sha256": "ddcd09ee7e0ee06c58100010dd6febb3f6916ea8cccf7a68a04bd24f55905f6f",
3
3
  "registrySha256": "8e6606a6722433c5ffc15b3870402283c5406083a14cdbd0e18e735731e2aae2",
4
- "packageVersion": "1.3.1221"
4
+ "packageVersion": "1.3.1222"
5
5
  }
@@ -2,5 +2,5 @@
2
2
  "sha256": "8e6606a6722433c5ffc15b3870402283c5406083a14cdbd0e18e735731e2aae2",
3
3
  "articleCount": 90,
4
4
  "generatedFrom": "docs/STANDARDS-REGISTRY.md",
5
- "packageVersion": "1.3.1221"
5
+ "packageVersion": "1.3.1222"
6
6
  }
@@ -1729,7 +1729,7 @@ instar test-as-self --slack # Slack permission demonstr
1729
1729
 
1730
1730
  Progress monitoring must not manufacture user-facing narration. These systems are signals, never gates, and every error path fails toward silence.
1731
1731
  - **Silent-freeze watchdog** (ActiveWorkSilenceSentinel): before claiming a session is stuck, it re-captures the LIVE frame and corroborates — if the frame still shows an active-work indicator (spinner / "esc to interrupt"), a sub-agent is live, or it's a clean idle prompt, it stays SILENT. It speaks only when genuinely wedged, and even then hedges ("…hasn't changed in N min and a nudge didn't wake it — it may be stuck, or on a long task I can't see into. Want me to check?"). Threshold raised 15m→30m; a 90m frozen-indicator backstop still surfaces a real mid-tool hang. Tune/disable: \`monitoring.activeWorkSilenceSentinel.enabled\` (off), \`.silenceThresholdMs\` (default 30m), \`.activeWorkMaxFrozenIndicatorMs\` (default 90m).
1732
- - **Command-watchdog attribution:** \`SessionWatchdog\` never interrupts the Codex framework host or known bounded external waiters (including safe-merge and GitHub watch commands). If it interrupts a genuinely stuck user command, its audit entry names \`principal: session-watchdog\` and \`operatorInitiated: false\`; Codex's generic "aborted by user" text is transport wording, not proof the operator acted. Continuation is owned by the canonical continuation/recovery funnel, never an independent watchdog prompt.
1732
+ - **Command-watchdog attribution:** \`SessionWatchdog\` never interrupts the Codex framework host, known bounded external waiters, or pinned long-lived test/compiler services such as Vitest's esbuild service. A selected descendant is signaled directly only after an action-time PID/parent/argv identity check; the watchdog never sends pane-wide Ctrl+C for a descendant helper. If it interrupts a genuinely stuck user command, its audit entry names \`principal: session-watchdog\` and \`operatorInitiated: false\`; Codex's generic "aborted by user" text is transport wording, not proof the operator acted. Continuation is owned by the canonical continuation/recovery funnel, never an independent watchdog prompt.
1733
1733
  - **Crash-safe inbound delivery:** Normal tmux injection and Codex stranded-draft key attempts use FULL-durable armed/started/terminal phases. A crash-open mutation becomes \`effect-unknown\` and is never blindly repeated. Diagnose privacy-safe counts at \`GET /sessions/inbound-delivery-status\`; no message body is exposed.
1734
1734
  - **PromiseBeacon is internal by default:** commitment cadence, detection, revival, and escalation bookkeeping continue, but PromiseBeacon produces no topic/Slack messages, close-outs, escalation statuses, or Attention items. User output requires an explicit deployment opt-in with \`promiseBeacon.userOutputEnabled: true\`; do not enable it merely to retain follow-through. Effectiveness remains measurable in \`logs/sentinel-events.jsonl\` and the per-feature LLM-metrics surface (feature keys \`active-work-silence\`, \`promise-beacon\`).
1735
1735
 
@@ -0,0 +1,72 @@
1
+ # Upgrade Guide — vNEXT
2
+
3
+ <!-- assembled-by: assemble-next-md -->
4
+ <!-- bump: patch -->
5
+
6
+ ## What Changed
7
+
8
+ The session watchdog now recognizes Vitest's long-lived esbuild service as
9
+ framework infrastructure and excludes it before stuck-command judgment. If a
10
+ genuine descendant process must be stopped, the watchdog revalidates the exact
11
+ process identity and session incarnation immediately before signaling that
12
+ process, then escalates through bounded targeted signals instead of sending a
13
+ pane-wide interrupt that can collapse the surrounding Codex turn.
14
+
15
+ Codex session discovery now uses the maintained state cache on asynchronous
16
+ control-plane paths, and quiet Codex panes are not synchronously probed unless
17
+ there is evidence of a stranded draft. This keeps test execution from starving
18
+ health and Telegram handling. Recovery notices also state their actual queue
19
+ reason so operators can distinguish a queued continuation from a delivered
20
+ one.
21
+
22
+ Inbound deliveries whose physical effect cannot be proven after bounded
23
+ observation now enter an explicit terminal effect-unknown state. They remain
24
+ auditable without occupying live-capacity slots forever, preventing an
25
+ ambiguous historical backlog from blocking new Telegram messages.
26
+
27
+ The release canary also found a second observer defect under real load: when a
28
+ busy Codex transcript grew by more than one read budget, a read ending partway
29
+ through the next JSONL record discarded the valid complete prefix as unknown.
30
+ The observer now durably advances through the last complete record and re-reads
31
+ the partial tail on its next bounded sweep. Truly oversized single records,
32
+ malformed JSON, schema drift, and identity mismatches still fail closed.
33
+
34
+ ## What to Tell Your User
35
+
36
+ Long-running Codex test work is protected from false watchdog interruptions,
37
+ and the agent's health and messaging paths remain responsive while those tests
38
+ run. Ambiguous old deliveries remain visible for investigation but no longer
39
+ crowd new messages out of the live queue.
40
+
41
+ ## Summary of New Capabilities
42
+
43
+ - Automatic protection for the exact Vitest esbuild service process.
44
+ - Process-targeted watchdog remediation with action-time identity checks.
45
+ - Responsive cached session discovery on asynchronous control-plane paths.
46
+ - An explicit terminal state for deliveries whose physical effect is unknown.
47
+ - Multi-pass observation of valid busy-session transcript backlogs without
48
+ false unknown outcomes at non-aligned byte boundaries.
49
+ - Clear queue-reason wording in Codex recovery notices.
50
+
51
+ ## Evidence
52
+
53
+ On topic 67366, the watchdog audit and live process tree showed the watchdog
54
+ selecting Vitest's persistent esbuild service and then issuing a pane-wide
55
+ interrupt; the surrounding test run collapsed while the local health endpoint
56
+ also stopped responding and Telegram retried the inbound message. The repaired
57
+ candidate's focused unit, HTTP integration, and production-lifecycle E2E gates
58
+ all pass, including a real long-running Vitest worker whose esbuild service
59
+ survives unchanged while the lifecycle suite completes. A backed-up copy of the
60
+ live inbound ledger contained 496 ambiguous rows consuming capacity; applying
61
+ the new terminal transition reduced the live count to four while retaining the
62
+ rows for audit, and normal inbound dispatch resumed.
63
+
64
+ The first exact-candidate two-hour/50-delivery canary correctly refused to sign
65
+ after finding three false unknowns on unrelated busy sessions. Their transcript
66
+ records proved the messages and responses existed beyond a non-aligned 256 KiB
67
+ scan boundary. The corrected scanner has unit, integration, and production-wired
68
+ E2E coverage for that exact multi-budget shape. The fresh corrected candidate
69
+ then passed 50/50 deliveries over 7,213,141 ms, all required special cases,
70
+ 30/30 responsiveness samples, and zero false-unknown, exhaustion, duplicate
71
+ ownership, lost-input, or stale-owner outcomes. Echo signed the resulting
72
+ evidence and the certified source manifest binds its exact digest and bytes.
@@ -0,0 +1,36 @@
1
+ # Inbound Delivery Capacity Recovery — Plain-English Overview
2
+
3
+ > The one-line version: delivery attempts whose observation window ended uncertain must stop occupying the finite live-message queue.
4
+
5
+ ## The problem in one breath
6
+
7
+ Instar safely refused to guess whether hundreds of older injected messages were consumed, marking them “unknown.” However, it left their transport state as “dispatched,” and the admission counter treats every dispatched row as live. Once 500 such rows accumulated, every new Telegram message was rejected with “Message could not be delivered to the session.”
8
+
9
+ ## What already exists
10
+
11
+ - **Durable inbound journal** — records each physical terminal injection before it happens so crashes cannot silently replay uncertain effects.
12
+ - **Codex delivery observer** — watches the composer and rollout transcript until it proves consumption/response or reaches a fixed observation deadline.
13
+ - **Admission ceilings** — prevent an unbounded number of live rows or bytes from exhausting the server.
14
+ - **Terminal evidence retention** — keeps consumed, failed, and effect-unknown evidence for audit, then garbage-collects it under bounded age/count rules.
15
+
16
+ ## What this adds
17
+
18
+ When the observer reaches its deadline without proof, the existing `markObservationUnknown` transition now records `effect-unknown` as the transport state as well as unknown transcript/composer eligibility. This does not claim that the message succeeded or failed. It only makes the already non-replayable uncertainty terminal, allowing the admission counter to release its slot while retaining the evidence for audit.
19
+
20
+ The status projection now reports these records as `effect-unknown` before considering their eligibility label, so uncertain-effect metrics remain honest. A regression test fills a one-row admission capacity, terminalizes the uncertain observation, verifies capacity returns, and verifies that a subsequent message can be prepared.
21
+
22
+ ## The safeguards
23
+
24
+ **No automatic replay.** Effect-unknown is explicitly non-replayable, preserving the core no-duplicate guarantee.
25
+
26
+ **No evidence deletion.** Rows are retained under the existing terminal evidence policy. This change is a state transition, not data erasure.
27
+
28
+ **Bounded authority.** Only dispatched rows that the observer already selected after its observation deadline can take this transition. Prepared or actively observed rows are untouched.
29
+
30
+ ## What ships when
31
+
32
+ The transition and status correction ship together. Existing stale rows on this machine are migrated with the identical narrow predicate after a complete SQLite backup; future rows self-terminalize through the observer.
33
+
34
+ ## What you actually need to decide
35
+
36
+ Should expired, already-uncertain delivery evidence become terminal so it cannot permanently block new Telegram messages?
@@ -0,0 +1,84 @@
1
+ # Side-Effects Review — Codex observer bounded backlog
2
+
3
+ **Version / slug:** `codex-observer-bounded-backlog`
4
+ **Date:** `2026-09-04`
5
+ **Author:** Codex
6
+ **Second-pass reviewer:** independent Codex reviewer
7
+
8
+ ## Summary of the change
9
+
10
+ The Codex delivery observer now advances every complete JSONL prefix inside its bounded read even when the byte budget ends partway through the next record. The incomplete tail is left unread and starts the next sweep. A single record with no newline inside the full budget remains typed `unknown`.
11
+
12
+ This was found by the exact-candidate Stage-B canary: all 50 dedicated rows converged, but three real messages in busy sessions generated more than 256 KiB between sweeps. The old scanner marked the entire valid backlog unknown solely because byte 262,144 was not a newline, even though hundreds of complete record boundaries preceded it. Transcript inspection proved the injected user events and assistant responses were present.
13
+
14
+ ## Decision-point inventory
15
+
16
+ - `scanSharedRollout` — modify — advances only through the last complete newline in a bounded read.
17
+ - `scanRollout` — modify — applies the same prefix rule to the compatibility scanner.
18
+
19
+ ## 1. Over-block
20
+
21
+ No new block is introduced. A record larger than the entire per-row budget still has no complete boundary and remains unknown; schema drift and malformed complete JSON remain unknown.
22
+
23
+ ## 2. Under-block
24
+
25
+ An incomplete tail is not parsed or trusted. It is re-read from its exact first byte on the next sweep. The cursor advances only to a verified newline, so no partial JSON can be skipped or treated as evidence.
26
+
27
+ ## 3. Level-of-abstraction fit
28
+
29
+ This is byte-framing behavior in the JSONL scanner, the layer that owns cursor advancement. It does not change delivery authority, replay policy, or message interpretation.
30
+
31
+ ## 4. Signal vs authority compliance
32
+
33
+ Required reference: [docs/signal-vs-authority.md](../../docs/signal-vs-authority.md).
34
+
35
+ - [x] No — this change has no block/allow judgment surface.
36
+
37
+ No new judgment is added. A complete newline is structural framing evidence; absence of any boundary at the hard budget remains the conservative uncertainty floor.
38
+
39
+ ## 4b. Judgment-point check
40
+
41
+ No new static heuristic is added at a competing-signals decision point. This is an enumerable JSONL framing invariant: only bytes through a complete newline may advance the durable cursor.
42
+
43
+ ## 5. Interactions
44
+
45
+ - **Races:** scans use the stat/read prefix already in place; bytes appended after the read wait for a later sweep.
46
+ - **Budgets:** each sweep still reads at most the configured per-row and aggregate limits.
47
+ - **Retries:** progress is durable in `inbound_rollout_cursor`; restart resumes from the last complete boundary.
48
+ - **Failure posture:** malformed complete JSON, unsupported events, identity mismatch, truncation, and an oversized single record still fail closed.
49
+
50
+ ## 6. External surfaces
51
+
52
+ Busy Codex sessions no longer show false unknown delivery outcomes or strand valid messages from observability merely because their transcript grew by more than one scan budget. No API shape or user-facing wording changes.
53
+
54
+ ## 6b. Operator-surface quality
55
+
56
+ No operator surface is changed — not applicable.
57
+
58
+ ## 7. Multi-machine posture
59
+
60
+ Machine-local by design: each observer reads the local transcript for the delivery effect performed on that machine. Ownership and transfer fencing are unchanged.
61
+
62
+ ## 8. Rollback cost
63
+
64
+ Pure scanner code; revert is mechanically simple but would restore demonstrated false-unknown outcomes under large valid transcript bursts.
65
+
66
+ ## Conclusion
67
+
68
+ The first canary correctly refused certification after exposing three false unknowns. The fix preserves every hard bound and uncertainty rule while distinguishing a safely resumable complete prefix from a truly boundary-free oversized record. Unit, integration, and production-wired E2E tests cover the non-aligned multi-budget case. The fresh exact candidate subsequently passed 50/50 deliveries over 7,213,141 ms, the complete case matrix, 30/30 responsiveness samples, and zero forbidden outcomes; its signed evidence is now bound to the certified sources.
69
+
70
+ ## Second-pass review
71
+
72
+ Concur. Cursor advancement is restricted to complete newline boundaries, partial bytes remain unread, and the next sweep revalidates them from the record start. The change cannot authorize delivery or replay and narrows false uncertainty without weakening malformed-input handling. The reviewer noted that the compatibility scanner needed the same direct regression assertion as the production shared path; that coverage was added before commit.
73
+
74
+ ## Evidence pointers
75
+
76
+ - `tests/unit/CodexDeliveryObserver.test.ts`
77
+ - `tests/integration/codex-observer-bounded-backlog.test.ts`
78
+ - `tests/e2e/codex-session-lifecycle-reliability.test.ts`
79
+ - First canary ledger: 50/50 dedicated rows responded; three candidate-window false unknowns on busy sessions identified at non-aligned >256 KiB backlogs.
80
+ - Corrected canary ledger: 50/50 rows consumed/cleared/responded; zero false unknown, exhaustion, duplicate ownership, lost inbound, or stale-owner outcomes; signed artifact digest `a2db23a95530681953ffa3002ab14e349ebf53d19be2a54c1f4afacc3aead997`.
81
+
82
+ ## Class-Closure Declaration
83
+
84
+ No agent-authored-artifact defect and no added or modified self-triggered controller — not applicable. The regression is nevertheless pinned at all three required test tiers by the evidence above.
@@ -0,0 +1,86 @@
1
+ # Side-Effects Review — Codex test-worker interruption and control-plane resilience
2
+
3
+ **Version / slug:** `codex-test-worker-control-plane`
4
+ **Date:** `2026-09-04`
5
+ **Author:** `Codex`
6
+ **Second-pass reviewer:** `Codex independent reviewer`
7
+
8
+ ## Summary of the change
9
+
10
+ This change protects exact esbuild service descendants before watchdog judgment, replaces pane-wide interruption with identity-fenced process signals, removes synchronous tmux probes from selected asynchronous server hot paths, and preserves honest durable lifeline replay reasons. It updates watchdog, session/input monitoring, lifeline, migration, scaffold awareness, and their unit/integration/E2E coverage.
11
+
12
+ ## Decision-point inventory
13
+
14
+ - `SessionWatchdog.checkSession` — modify — exact service-role evidence prevents a destructive action against infrastructure.
15
+ - `SessionWatchdog.signalIfIdentityMatches` — add — a deterministic safety fence revalidates the selected process before signaling.
16
+ - `SessionManager.listRunningSessions` — modify — asynchronous hot paths trust the state registry/cache rather than blocking on tmux.
17
+ - `StuckInputSentinel.tick` — modify — idle Codex sessions without durable stranded-draft evidence avoid synchronous pane probing.
18
+ - `TelegramLifeline` replay notice — modify — chooses wording from the durable queue cause.
19
+
20
+ ## 1. Over-block
21
+
22
+ An esbuild process with the exact `--service... --ping` contract is always protected even if that helper itself malfunctions. This is intentional: the owning test command remains observable, and killing its internal compiler helper is not a safe recovery action. One-shot esbuild invocations and shell commands merely mentioning those flags are not exempt.
23
+
24
+ ## 2. Under-block
25
+
26
+ Other long-lived compiler or language-server protocols are not automatically protected unless already covered by framework ownership/exclusions. The fix is deliberately exact to the observed process contract. A process that preserves PID, parent, and exact argv across an exec-like behavioral change could pass the identity fence; session-level termination still goes through ReapAuthority.
27
+
28
+ ## 3. Level-of-abstraction fit
29
+
30
+ Service classification is a low-level structural safety floor at the point that selects process targets. The contextual stuck-command authority still judges eligible user commands. Targeted signaling is the lower-level primitive the watchdog should use; final lifecycle authority remains centralized in ReapAuthority. Queue-cause formatting is a pure presentation helper over already-durable facts.
31
+
32
+ ## 4. Signal vs authority compliance
33
+
34
+ **Required reference:** [docs/signal-vs-authority.md](../../docs/signal-vs-authority.md)
35
+
36
+ - [x] No — the service classifier is a safety guard on an irreversible/disruptive action, an explicit exception allowed by the principle.
37
+
38
+ The exact argv classifier cannot authorize interruption; it can only refuse an unsafe target. Positive stuck judgments remain with the existing contextual authority or hard-ceiling policy, and final session death remains with ReapAuthority.
39
+
40
+ ## 4b. Judgment-point check (Judgment Within Floors standard)
41
+
42
+ The new heuristic is not a competing-signals judgment point. It is an enumerable process-protocol identity used solely as a no-kill safety floor; it never chooses to act. The existing contextual judge continues to resolve competing evidence for non-infrastructure commands.
43
+
44
+ ## 5. Interactions
45
+
46
+ - **Shadowing:** service protection runs before exclusions and the stuck judge; this intentionally prevents the judge from acquiring authority over the helper.
47
+ - **Double-fire:** targeted SIGINT replaces, rather than supplements, pane-wide Control-C. StuckInputSentinel remains independent and only submits a durable marked draft.
48
+ - **Races:** every descendant signal rechecks PID, parent, and exact argv; failed identity checks delete escalation state. Escalation also binds session id and start timestamp, then refuses a replacement incarnation even if it reuses the tmux name. ReapAuthority re-resolves that same live session.
49
+ - **Feedback loops:** a protected esbuild helper is reevaluated each poll but produces no intervention. Queue replay keeps stable delivery identity and cause.
50
+
51
+ ## 6. External surfaces
52
+
53
+ Codex users stop seeing false operator-interruption banners and test runs stop collapsing from killed esbuild services. Telegram users may see corrected wording that distinguishes a server outage from a forwarding failure. Queue records gain an optional cause field compatible with older records. Timing remains machine-load dependent, but the affected event-loop paths no longer execute synchronous tmux probes. No operator-facing action is added.
54
+
55
+ ## 6b. Operator-surface quality (Operator-Surface Quality standard)
56
+
57
+ No dashboard, approval, grant, revoke, or secret-entry surface is changed; not applicable.
58
+
59
+ ## 7. Multi-machine posture (Cross-Machine Coherence)
60
+
61
+ **Machine-local BY DESIGN:** process trees, tmux sessions, watchdog targets, and local server availability are machine-specific truths. Telegram queue notices use the existing one-voice lifeline path and stable message identity; no new notice producer is introduced. Durable queue state remains in the existing agent state path and this change does not alter topic-transfer ownership. No URLs are generated.
62
+
63
+ ## 8. Rollback cost
64
+
65
+ Pure code and backward-compatible record metadata: revert and ship a patch. No schema migration or state repair is required; old queue entries without a cause retain compatible fallback wording. Rolling back would re-expose false interruption and event-loop stalls during propagation.
66
+
67
+ ## Conclusion
68
+
69
+ The first independent pass found missing session-incarnation fencing, incomplete effect-scope audit fields, and mocked-only process evidence. The implementation now binds escalation to session id/start time, records parent/role/scope/incarnation, and includes an integration test that launches the installed esbuild binary and inspects the real host process table. The repair is at the correct layers and narrows destructive authority; it is clear to ship after the confirming second pass.
70
+
71
+ ## Second-pass review (if required)
72
+
73
+ **Reviewer:** Codex independent reviewer
74
+ **Independent read of the artifact:** concur — the revised implementation closes the session-replacement race, records target/effect attribution, and proves against a live esbuild process tree that service descendants stay outside interruption authority.
75
+
76
+ ## Evidence pointers
77
+
78
+ - `tests/unit/session-watchdog-attribution.test.ts`
79
+ - `tests/integration/session-watchdog-safe-wait.test.ts`
80
+ - `tests/integration/tmux-resilience-slow-stub.test.ts`
81
+ - `tests/e2e/session-watchdog-continuation-lifecycle.test.ts`
82
+ - `tests/e2e/lifeline-queue-notice-lifecycle.test.ts`
83
+
84
+ ## Class-Closure Declaration (display-only mirror)
85
+
86
+ `defectClass: unbounded-self-action`; `closure: guard`; `guardEvidence: { enforcementType: ratchet, citation: tests/unit/SessionWatchdog-pipeline.test.ts, howCaught: the tests require exact service descendants to remain outside judgment and require every descendant intervention to use the identity-fenced targeted signal path, preventing repeated pane-wide interruption while bounded escalation and ReapAuthority remain the settling brakes }`.
@@ -0,0 +1,82 @@
1
+ # Side-Effects Review — Inbound delivery unknown terminalization
2
+
3
+ **Version / slug:** `inbound-delivery-unknown-terminalization`
4
+ **Date:** `2026-09-04`
5
+ **Author:** `Codex`
6
+ **Second-pass reviewer:** `Codex independent reviewer`
7
+
8
+ ## Summary of the change
9
+
10
+ `InboundDeliveryStore.markObservationUnknown` and `markRolloutUnknown` now transition uncertain dispatched evidence to terminal `effect-unknown`, and status reporting prioritizes that transport state. This releases finite live-row capacity without replaying or deleting uncertain evidence. Unit regressions cover saturation, single-row and shared-rollout terminalization, metrics, and renewed admission.
11
+
12
+ ## Decision-point inventory
13
+
14
+ - `InboundDeliveryStore.markObservationUnknown` — modify — completes the observer's existing deadline decision with the correct terminal transport state.
15
+ - `InboundDeliveryStore.markRolloutUnknown` — modify — terminalizes every affected row when shared rollout parsing becomes uncertain.
16
+ - `InboundDeliveryStore.status` — modify — reports effect uncertainty from transport truth rather than shadowing it with eligibility.
17
+
18
+ ## 1. Over-block
19
+
20
+ No new rejection is introduced. A delivery is terminalized only where the existing observer already chose unknown, either at its fixed deadline or after a rollout-integrity failure. It cannot later be automatically recognized as consumed, but that was already true because unknown eligibility excluded further observation/recovery.
21
+
22
+ ## 2. Under-block
23
+
24
+ Stale `prepared` rows are not changed; four exist locally but remain well below capacity and may still be eligible for dispatch. Other nonterminal states continue to count as live by design.
25
+
26
+ ## 3. Level-of-abstraction fit
27
+
28
+ The store owns transport-state transitions and admission accounting, so it is the correct layer. The observer still owns when evidence becomes unknown; the store only makes that existing verdict internally consistent.
29
+
30
+ ## 4. Signal vs authority compliance
31
+
32
+ **Required reference:** [docs/signal-vs-authority.md](../../docs/signal-vs-authority.md)
33
+
34
+ - [x] No — this is mechanical state consistency after an existing authority decision.
35
+
36
+ No content or intent judgment is added. The deadline and observer already authorize the unknown result; this change ensures all state dimensions encode it consistently.
37
+
38
+ ## 4b. Judgment-point check (Judgment Within Floors standard)
39
+
40
+ No new heuristic or competing-signals decision point is added. This is an invariant: non-replayable observation-unknown evidence cannot simultaneously remain live for admission accounting.
41
+
42
+ ## 5. Interactions
43
+
44
+ - **Shadowing:** status now exposes transport uncertainty before eligibility labels, correcting the prior shadow.
45
+ - **Double-fire:** the guarded SQL transition only matches dispatched/open rows, so repeated observer calls are idempotent.
46
+ - **Races:** each SQLite update is atomic; the shared-rollout transition updates all matching rows in one statement, so concurrent admission cannot see a partially terminalized rollout.
47
+ - **Feedback loops:** terminal rows enter existing bounded GC; they cannot be replayed or re-observed.
48
+
49
+ ## 6. External surfaces
50
+
51
+ New Telegram messages can again enter sessions after prior evidence expires. Diagnostics report a larger honest uncertain-effect count. No message text, operator action, URL, or external API schema changes.
52
+
53
+ ## 6b. Operator-surface quality (Operator-Surface Quality standard)
54
+
55
+ No operator UI surface is changed; not applicable.
56
+
57
+ ## 7. Multi-machine posture (Cross-Machine Coherence)
58
+
59
+ **Machine-local BY DESIGN:** each machine's journal records physical terminal effects performed on that machine. Ownership transfer already fences/export-imports live rows; terminal unknown rows do not transfer or replay. No user-facing notice, durable topic-transfer obligation, or URL is added.
60
+
61
+ ## 8. Rollback cost
62
+
63
+ Revert and deploy a patch. The terminal state is safe and retained; no reverse migration is required. The one-time local repair has a complete SQLite backup at `.instar/state/inbound-delivery.pre-terminal-fix-20260904.sqlite`.
64
+
65
+ ## Conclusion
66
+
67
+ The first independent pass found that shared-rollout uncertainty had the same stranded-live defect. That path now terminalizes all matching rows atomically and has a multi-row capacity regression. The change restores capacity without weakening no-duplicate delivery semantics or deleting audit evidence; it is ready after confirming review.
68
+
69
+ ## Second-pass review (if required)
70
+
71
+ **Reviewer:** Codex independent reviewer
72
+ **Independent read of the artifact:** concur — both single-delivery and shared-rollout uncertainty now terminalize atomically, preserve no-replay evidence, and release live capacity without adding judgment authority.
73
+
74
+ ## Evidence pointers
75
+
76
+ - `tests/unit/InboundDeliveryStore.test.ts`
77
+ - Live diagnosis: 500/500 rows expired; 496 were dispatched+unknown but counted live.
78
+ - Local migration: 496 rows moved to effect-unknown; live count reduced from 500 to 4.
79
+
80
+ ## Class-Closure Declaration (display-only mirror)
81
+
82
+ No agent-authored-artifact defect and no self-triggered action added — not applicable.
@@ -87,6 +87,7 @@ The review moved the design three times: the digest became canonical (order-stab
87
87
  - `tests/unit/stage-b-evidence-code-binding.test.ts` (19 tests)
88
88
  - `tests/unit/StageBActivationGate.test.ts`, `StageBStartupReadiness.test.ts`, `MentorStageBForensics.test.ts`, `codex-stage-b-publish-gate.test.ts` (all green)
89
89
  - Live: `node scripts/verify-codex-stage-b-release-evidence.mjs` passes on this tree; `verifyBundledStageBReleaseEvidence("9.9.9999")` returns null.
90
+ - Fresh repair evidence: candidate `cfe468dc5` passed 50/50 deliveries over 7,213,141 ms, all required cases, 30/30 responsiveness samples, and zero forbidden outcomes; Echo signature verification and certified-set fingerprint check both pass for artifact digest `a2db23a95530681953ffa3002ab14e349ebf53d19be2a54c1f4afacc3aead997`.
90
91
 
91
92
  ## Class-Closure Declaration (display-only mirror)
92
93