instar 1.3.1211 → 1.3.1213

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 (45) hide show
  1. package/dist/commands/server.d.ts.map +1 -1
  2. package/dist/commands/server.js +12 -0
  3. package/dist/commands/server.js.map +1 -1
  4. package/dist/core/BetweenWindowAdmissionGate.d.ts +2 -0
  5. package/dist/core/BetweenWindowAdmissionGate.d.ts.map +1 -1
  6. package/dist/core/BetweenWindowAdmissionGate.js +2 -0
  7. package/dist/core/BetweenWindowAdmissionGate.js.map +1 -1
  8. package/dist/core/PeerEndpointRecorder.d.ts +30 -0
  9. package/dist/core/PeerEndpointRecorder.d.ts.map +1 -1
  10. package/dist/core/PeerEndpointRecorder.js +53 -3
  11. package/dist/core/PeerEndpointRecorder.js.map +1 -1
  12. package/dist/core/WindowLifecycleObligationLedger.d.ts +382 -0
  13. package/dist/core/WindowLifecycleObligationLedger.d.ts.map +1 -0
  14. package/dist/core/WindowLifecycleObligationLedger.js +734 -0
  15. package/dist/core/WindowLifecycleObligationLedger.js.map +1 -0
  16. package/dist/core/WriteDomainRegistry.d.ts.map +1 -1
  17. package/dist/core/WriteDomainRegistry.js +7 -0
  18. package/dist/core/WriteDomainRegistry.js.map +1 -1
  19. package/dist/data/standards-guard-index.json +1 -1
  20. package/dist/data/standards-guard-index.meta.json +2 -2
  21. package/dist/data/standards-registry.meta.json +1 -1
  22. package/dist/monitoring/SessionWatchdog.d.ts +29 -0
  23. package/dist/monitoring/SessionWatchdog.d.ts.map +1 -1
  24. package/dist/monitoring/SessionWatchdog.js +52 -0
  25. package/dist/monitoring/SessionWatchdog.js.map +1 -1
  26. package/dist/server/AgentServer.d.ts +5 -0
  27. package/dist/server/AgentServer.d.ts.map +1 -1
  28. package/dist/server/AgentServer.js +22 -0
  29. package/dist/server/AgentServer.js.map +1 -1
  30. package/dist/server/CapabilityIndex.d.ts.map +1 -1
  31. package/dist/server/CapabilityIndex.js +25 -0
  32. package/dist/server/CapabilityIndex.js.map +1 -1
  33. package/dist/server/routes.d.ts +5 -0
  34. package/dist/server/routes.d.ts.map +1 -1
  35. package/dist/server/routes.js +806 -1
  36. package/dist/server/routes.js.map +1 -1
  37. package/package.json +1 -1
  38. package/src/data/builtin-manifest.json +47 -47
  39. package/src/data/standards-guard-index.json +1 -1
  40. package/src/data/standards-guard-index.meta.json +2 -2
  41. package/src/data/standards-registry.meta.json +1 -1
  42. package/upgrades/1.3.1212.md +28 -0
  43. package/upgrades/1.3.1213.md +45 -0
  44. package/upgrades/side-effects/mesh-endpoint-degradation-retention.md +106 -0
  45. package/upgrades/side-effects/window-lifecycle-obligation-ledger.md +94 -0
@@ -0,0 +1,94 @@
1
+ # Side-Effects Review — Window Lifecycle Obligation Ledger
2
+
3
+ **Version / slug:** `window-lifecycle-obligation-ledger`
4
+ **Date:** 2026-08-28
5
+ **Author:** Codey (Echo Window-28 build lane)
6
+ **Second-pass reviewer:** independent reviewer — concern raised
7
+
8
+ ## Summary of the change
9
+
10
+ Adds an Echo-only, content-compiled lifecycle obligation ledger in `src/core/WindowLifecycleObligationLedger.ts`, wires it into `AgentServer` and the guarded mutation routes, and covers it at unit, integration, and E2E tiers. It verifies source coverage, evidence binding, executor liveness, admission/closure census, exact operator waivers, native between-window gate records, local persistence, and rollback. No templates, migrations, hooks, defaults, or other-agent state change.
11
+
12
+ ## Decision-point inventory
13
+
14
+ - Source operative-clause classification — add — deterministic structural compiler with fail-closed coverage.
15
+ - Executor-class selection/liveness — add — deterministic authority over enumerable runtime facts.
16
+ - Admission and closure — add — deterministic state-machine authority over obligation dispositions.
17
+ - Waiver validity/reach — add — deterministic cryptographic/scope/core-duty policy.
18
+ - Semantic assessment quality — pass-through — remains owned by the named contextual authority; the ledger verifies bound evidence only.
19
+
20
+ ## 1. Over-block
21
+
22
+ An operative source sentence using vocabulary outside the declared normative forms can be missed by clause discovery. The complete source/challenge and coverage model makes known operative lines fail closed, but authoring conventions remain a boundary. Runtime heartbeat tolerances can reject a legitimate but stale-reporting executor; freshness is explicit per binding so the duty owner must choose it from the compiled deadline/grace.
23
+
24
+ ## 2. Under-block
25
+
26
+ The library does not independently judge whether an observer's synthesis is insightful or whether an 80/20 decision was wise. It requires evidence from the named semantic authority. The native adapter truthfully proves only local-store presence; stronger semantic/authenticity evidence must come from separate verifiers.
27
+
28
+ ## 3. Level-of-abstraction fit
29
+
30
+ This is the policy authority at the lifecycle layer, built over lower-level native-gate, runtime-registry, source, and evidence facts. Structural checks do not compete with a conversational authority. Semantic judgments remain external rather than being approximated by regexes.
31
+
32
+ ## 4. Signal vs authority compliance
33
+
34
+ **Required reference:** [docs/signal-vs-authority.md](../../docs/signal-vs-authority.md)
35
+
36
+ - [x] Yes — the change holds deterministic blocking authority over a closed, enumerable invariant domain.
37
+
38
+ It does not infer message meaning. It blocks only on schema/scope, cryptographic binding, source coverage, runtime liveness, deadline, exact state transition, and terminal census facts. Contextual semantic decisions are accepted only as authority-bound evidence.
39
+
40
+ ## 4b. Judgment-point check
41
+
42
+ No new static heuristic resolves competing semantic signals. The spec's `## Decision points touched` section separates enumerable lifecycle floors from semantic judgment-candidates and names the latter as external authority inputs.
43
+
44
+ ## 5. Interactions
45
+
46
+ - **Shadowing:** native admission remains unchanged and runs as a structural preflight; ledger semantics cannot be attributed to it.
47
+ - **Double-fire:** the owned 60-second controller deduplicates surfaced issue strings before emitting Observer-topic escalation; mutation routes may also request an immediate tick, but cannot re-emit an already-surfaced issue.
48
+ - **Races:** persistence uses same-directory temporary-file rename. A future multi-writer caller must serialize at a higher layer; none is introduced here.
49
+ - **Feedback loops:** a recovered executor cannot erase a missed interval; it can only satisfy a later/current instance.
50
+
51
+ ## 6. External surfaces
52
+
53
+ Echo-local authenticated `/window-lifecycle/*` API routes are added for compile, evidence, evaluate, tick, transition, native admission, waiver, rollback, re-enable, and read status. Persistent state exists only below Echo's state directory. Blocking issues can produce a deduplicated Observer-topic notice. The routes refuse foreign agent/scope before state access and are not advertised or migrated to other agents.
54
+
55
+ ## 6b. Operator-surface quality
56
+
57
+ The waiver, rollback, and re-enable routes are operator-adjacent surfaces. Waiver/rollback approval must be a live re-query of the locally bound operator's exact post-created digest message; re-enable reads the fixed local repair artifact and dry-run result rather than caller verdict booleans.
58
+
59
+ ## 7. Multi-machine posture
60
+
61
+ **Machine-local BY DESIGN:** this Window-28 ledger is explicitly scoped to Echo's local agent home and the locally installed native store/runtime registry. It must not be replicated, proxied, or applied to another agent under the approved non-leakage rule. It emits no user-facing notices, generates no URLs, and does not claim state continuity on topic transfer. A future fleet/multi-machine authority requires a separately converged spec.
62
+
63
+ ## 8. Rollback cost
64
+
65
+ Rollback is Echo-local and audited: set state to `rolled_back`, preserve the complete ledger read-only, and record operator evidence/reason/time. Reverting the code is a normal hot-fix. No migration or other-agent repair is required because no shared schema/default is changed.
66
+
67
+ ## Conclusion
68
+
69
+ **Clear to ship** (updated 2026-08-28 ~18:45 PDT by Echo/Observer 1 at commit time; the hold above dated from cycle 8 and both outstanding items have since completed):
70
+
71
+ - **Independent concurrence:** reached at cycle 22 (behavior/security — reviewer independently reran all six focused files, 158/158 green including the two-lifecycle production AgentServer E2E), re-confirmed at cycle 24 (route/capability/write-domain corrections — reviewer independently reran capability discoverability 166/166 and write-domain registry/conformance/admission E2E 33/33), and at cycle 27 (test-fixture isolation — reviewer independently reran session-management-e2e 33/33).
72
+ - **Full suite:** complete `npm run test:all` exited 0 with zero failures (final E2E phase 341 files passed / 1 skipped; 3,107 tests passed). Final `npm run build` and full lint chain green; `git diff --check` clean.
73
+ - The build ledger (`.instar/w28/build-progress.md` in the agent home) records all 27 review-fix cycles, including every rejection and its disposition.
74
+
75
+ ## Second-pass review (if required)
76
+
77
+ **Reviewer:** independent Window-28 reviewer (separate codex session, read-only)
78
+ **Independent read of the artifact:** **Concur with the review** — final verdict at cycle 22, re-confirmed cycles 24 and 27 (see Conclusion). The cycle-8 concern list below is retained as the honest history of what the loop found and fixed; every item was verified closed by the reviewer's own reruns before concurrence:
79
+
80
+ - ~~No production initialization or lifecycle entry point invokes the module~~ — closed: enforcement middleware wired over live AgentServer mutation doors; production-wiring E2E proves it.
81
+ - ~~Compiler/coverage discovery shares one regex, incomplete Section 7 catalog~~ — closed: source-derived AST compilation with explicit duty catalog and mutation negatives.
82
+ - ~~Evidence and executor authority accepted as caller labels~~ — closed: independently re-queried against real stores/registries (CommitmentTracker, SessionWatchdog inspection authority, Playwright registry, live Telegram rows) with HMAC-bound adjudication.
83
+ - ~~Admission, closure census, native adapter, waiver, transition, timestamp gaps~~ — closed: signed census with hash chain, exact-digest waivers, pinned native-adapter contract, per-class executor predicates.
84
+ - ~~Section 12 attack/omission/production-wiring/live-dry-run coverage incomplete~~ — closed: full attack matrix, per-duty omission negatives, controlled-omission cloned replay, and the 2026-08-28 executor-liveness incident test, all green in the final suite.
85
+
86
+ ## Evidence pointers
87
+
88
+ - `tests/unit/window-lifecycle-obligation-ledger.test.ts`
89
+ - `tests/integration/window-lifecycle-ledger-store.test.ts`
90
+ - `tests/e2e/window-lifecycle-executor-incident.test.ts`
91
+
92
+ ## Class-Closure Declaration (display-only mirror)
93
+
94
+ - `unbounded-self-action` — closure: **gap**, tracked as **ACT-320** (due 2026-09-04). The ledger's owned 60-second controller tick is a self-triggered loop; it is bounded in code (owned single ticker, dedupe-before-emit, mutation-route ticks cannot re-emit an already-surfaced issue) but has no faithful convergence model in `src/testing/selfActionRegistry.ts` yet. ACT-320 authors that model and flips this declaration to closure: guard.