instar 1.3.1221 → 1.3.1223

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 (67) 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/ModelTierEscalation.d.ts +1 -1
  8. package/dist/core/ModelTierEscalation.d.ts.map +1 -1
  9. package/dist/core/ModelTierEscalation.js +10 -2
  10. package/dist/core/ModelTierEscalation.js.map +1 -1
  11. package/dist/core/PostUpdateMigrator.d.ts.map +1 -1
  12. package/dist/core/PostUpdateMigrator.js +5 -0
  13. package/dist/core/PostUpdateMigrator.js.map +1 -1
  14. package/dist/core/SessionManager.d.ts.map +1 -1
  15. package/dist/core/SessionManager.js +13 -0
  16. package/dist/core/SessionManager.js.map +1 -1
  17. package/dist/core/StuckInputSentinel.d.ts.map +1 -1
  18. package/dist/core/StuckInputSentinel.js +16 -3
  19. package/dist/core/StuckInputSentinel.js.map +1 -1
  20. package/dist/core/topicProfileValidation.d.ts +2 -2
  21. package/dist/core/topicProfileValidation.js +3 -3
  22. package/dist/core/topicProfileValidation.js.map +1 -1
  23. package/dist/data/codexStageBReleaseEvidence.d.ts.map +1 -1
  24. package/dist/data/codexStageBReleaseEvidence.js +13 -12
  25. package/dist/data/codexStageBReleaseEvidence.js.map +1 -1
  26. package/dist/data/stageBCertifiedSet.d.ts +7 -7
  27. package/dist/data/stageBCertifiedSet.js +7 -7
  28. package/dist/data/stageBCertifiedSet.js.map +1 -1
  29. package/dist/data/standards-guard-index.json +1 -1
  30. package/dist/data/standards-guard-index.meta.json +2 -2
  31. package/dist/data/standards-registry.meta.json +1 -1
  32. package/dist/lifeline/MessageQueue.d.ts +3 -0
  33. package/dist/lifeline/MessageQueue.d.ts.map +1 -1
  34. package/dist/lifeline/MessageQueue.js.map +1 -1
  35. package/dist/lifeline/TelegramLifeline.d.ts.map +1 -1
  36. package/dist/lifeline/TelegramLifeline.js +34 -14
  37. package/dist/lifeline/TelegramLifeline.js.map +1 -1
  38. package/dist/lifeline/queueDeliveryNotice.d.ts +14 -0
  39. package/dist/lifeline/queueDeliveryNotice.d.ts.map +1 -0
  40. package/dist/lifeline/queueDeliveryNotice.js +31 -0
  41. package/dist/lifeline/queueDeliveryNotice.js.map +1 -0
  42. package/dist/monitoring/SessionWatchdog.d.ts +24 -1
  43. package/dist/monitoring/SessionWatchdog.d.ts.map +1 -1
  44. package/dist/monitoring/SessionWatchdog.js +107 -19
  45. package/dist/monitoring/SessionWatchdog.js.map +1 -1
  46. package/dist/scaffold/templates.js +1 -1
  47. package/dist/server/routes.d.ts +14 -0
  48. package/dist/server/routes.d.ts.map +1 -1
  49. package/dist/server/routes.js +33 -8
  50. package/dist/server/routes.js.map +1 -1
  51. package/package.json +1 -1
  52. package/scripts/model-registry-freshness.manifest.json +1 -1
  53. package/src/data/builtin-manifest.json +65 -65
  54. package/src/data/codexStageBReleaseEvidence.ts +13 -12
  55. package/src/data/stageBCertifiedSet.ts +7 -7
  56. package/src/data/standards-guard-index.json +1 -1
  57. package/src/data/standards-guard-index.meta.json +2 -2
  58. package/src/data/standards-registry.meta.json +1 -1
  59. package/src/scaffold/templates.ts +1 -1
  60. package/upgrades/1.3.1222.md +72 -0
  61. package/upgrades/1.3.1223.md +50 -0
  62. package/upgrades/inbound-delivery-unknown-terminalization.eli16.md +36 -0
  63. package/upgrades/side-effects/codex-gpt6-astra-allowlist.md +299 -0
  64. package/upgrades/side-effects/codex-observer-bounded-backlog.md +84 -0
  65. package/upgrades/side-effects/codex-test-worker-control-plane.md +86 -0
  66. package/upgrades/side-effects/inbound-delivery-unknown-terminalization.md +82 -0
  67. package/upgrades/side-effects/stage-b-evidence-code-binding.md +1 -0
@@ -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