instar 1.3.892 → 1.3.894
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.
- package/dist/commands/server.d.ts.map +1 -1
- package/dist/commands/server.js +1 -0
- package/dist/commands/server.js.map +1 -1
- package/dist/config/ConfigDefaults.d.ts.map +1 -1
- package/dist/config/ConfigDefaults.js +5 -0
- package/dist/config/ConfigDefaults.js.map +1 -1
- package/dist/core/PostUpdateMigrator.js +1 -1
- package/dist/core/PostUpdateMigrator.js.map +1 -1
- package/dist/core/devGatedFeatures.d.ts.map +1 -1
- package/dist/core/devGatedFeatures.js +6 -0
- package/dist/core/devGatedFeatures.js.map +1 -1
- package/dist/core/types.d.ts +8 -0
- package/dist/core/types.d.ts.map +1 -1
- package/dist/core/types.js.map +1 -1
- package/dist/monitoring/BlockerLifecycleLedger.d.ts +47 -0
- package/dist/monitoring/BlockerLifecycleLedger.d.ts.map +1 -0
- package/dist/monitoring/BlockerLifecycleLedger.js +164 -0
- package/dist/monitoring/BlockerLifecycleLedger.js.map +1 -0
- package/dist/monitoring/BlockerLifecycleService.d.ts +28 -0
- package/dist/monitoring/BlockerLifecycleService.d.ts.map +1 -0
- package/dist/monitoring/BlockerLifecycleService.js +211 -0
- package/dist/monitoring/BlockerLifecycleService.js.map +1 -0
- package/dist/monitoring/CommitmentTracker.d.ts +50 -0
- package/dist/monitoring/CommitmentTracker.d.ts.map +1 -1
- package/dist/monitoring/CommitmentTracker.js +235 -28
- package/dist/monitoring/CommitmentTracker.js.map +1 -1
- package/dist/monitoring/SessionMonitor.d.ts.map +1 -1
- package/dist/monitoring/SessionMonitor.js +15 -4
- package/dist/monitoring/SessionMonitor.js.map +1 -1
- package/dist/monitoring/SessionRecovery.d.ts +9 -0
- package/dist/monitoring/SessionRecovery.d.ts.map +1 -1
- package/dist/monitoring/SessionRecovery.js +42 -5
- package/dist/monitoring/SessionRecovery.js.map +1 -1
- package/dist/monitoring/guardManifest.d.ts.map +1 -1
- package/dist/monitoring/guardManifest.js +10 -0
- package/dist/monitoring/guardManifest.js.map +1 -1
- package/dist/scaffold/templates.js +1 -1
- package/dist/server/AgentServer.d.ts +1 -0
- package/dist/server/AgentServer.d.ts.map +1 -1
- package/dist/server/AgentServer.js +23 -1
- package/dist/server/AgentServer.js.map +1 -1
- package/dist/server/CapabilityIndex.d.ts.map +1 -1
- package/dist/server/CapabilityIndex.js +3 -1
- package/dist/server/CapabilityIndex.js.map +1 -1
- package/dist/server/routes.d.ts +1 -0
- package/dist/server/routes.d.ts.map +1 -1
- package/dist/server/routes.js +189 -2
- package/dist/server/routes.js.map +1 -1
- package/package.json +1 -1
- package/src/data/builtin-manifest.json +64 -64
- package/src/scaffold/templates.ts +1 -1
- package/upgrades/1.3.893.md +27 -0
- package/upgrades/1.3.894.md +25 -0
- package/upgrades/side-effects/context-wedge-seen-latch.md +88 -0
- package/upgrades/side-effects/throughput-metrics.md +86 -0
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
# Side-Effects Review — Context-wedge seen latch
|
|
2
|
+
|
|
3
|
+
**Version / slug:** `context-wedge-seen-latch`
|
|
4
|
+
**Date:** `2026-07-21`
|
|
5
|
+
**Author:** `instar-codey`
|
|
6
|
+
**Second-pass reviewer:** `independent Codex agent /root/living_doc_canonicalization`
|
|
7
|
+
|
|
8
|
+
## Summary of the change
|
|
9
|
+
|
|
10
|
+
`SessionMonitor` records the existing detector's positive context-exhaustion result through a true-only per-topic latch owned and persisted by `SessionRecovery`. `SessionRecovery` may reuse that remembered observation after the banner scrolls away, while retaining its existing ownership, active-work, cooldown, attempt, compact, and respawn authority. Tests cover monitor presentation, persistence, reload, attempt-row preservation, success clear, and manual clear.
|
|
11
|
+
|
|
12
|
+
## Decision-point inventory
|
|
13
|
+
|
|
14
|
+
- `detectContextExhaustion` result — pass-through — unchanged detector is the only setter signal.
|
|
15
|
+
- `SessionMonitor` context presentation — modify — current detector match or remembered true signal enters the same existing call, still behind the existing monitor cooldown.
|
|
16
|
+
- `SessionRecovery` context branch — modify — consumes the remembered signal but retains every existing recovery guard and action decision.
|
|
17
|
+
- latch clear — add invariant — only existing `recovered:true` or explicit manual clear.
|
|
18
|
+
|
|
19
|
+
## 1. Over-block
|
|
20
|
+
|
|
21
|
+
No new block/allow surface. A deliberately recycled numeric topic id could inherit a stale true value unless the operator uses the explicit manual clear first; the final scope ruling rejects inferred mapping validation, and current topic ids are stable external conversation identities.
|
|
22
|
+
|
|
23
|
+
## 2. Under-block
|
|
24
|
+
|
|
25
|
+
The change remembers only context wedges already recognized by the existing patterns. It does not recognize new banner text, silent provider/network waits, or other terminal shapes. A persistence write failure degrades to in-memory behavior for that process, matching the existing recovery-state failure posture.
|
|
26
|
+
|
|
27
|
+
## 3. Level-of-abstraction fit
|
|
28
|
+
|
|
29
|
+
The latch is signal memory at the observer/action seam. It does not create a parallel detector or recovery controller. Persistence belongs to `SessionRecovery`, the existing single owner of recovery-state writes; the monitor receives only mechanical mark/read methods.
|
|
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 produces a signal consumed by an existing smart gate.
|
|
36
|
+
- [ ] No — this change has no block/allow surface.
|
|
37
|
+
- [ ] Yes — but the logic is a smart gate with full conversational context (LLM-backed with recent history or equivalent).
|
|
38
|
+
- [ ] ⚠️ Yes, with brittle logic — STOP.
|
|
39
|
+
|
|
40
|
+
The unchanged regex detector sets only a boolean. The existing deterministic SessionRecovery policy remains the only action authority and applies ownership, work, cooldown, attempt, compact-verification, and respawn rules.
|
|
41
|
+
|
|
42
|
+
## 4b. Judgment-point check
|
|
43
|
+
|
|
44
|
+
No new static heuristic at a competing-signals decision point. True-or-absent persistence is an invariant materialization of a detector result. Competing work/recovery signals remain with the existing SessionRecovery authority.
|
|
45
|
+
|
|
46
|
+
## 5. Interactions
|
|
47
|
+
|
|
48
|
+
- **Shadowing:** a current detector match remains preferred; the latch matters only when the current capture is negative.
|
|
49
|
+
- **Double-fire:** one monitor branch calls the one recovery instance at most once per existing monitor cooldown.
|
|
50
|
+
- **Races:** `SessionMonitor.poll()` is already serialized; latch mutations and whole-state writes occur synchronously through the one SessionRecovery instance.
|
|
51
|
+
- **Feedback loops:** failed/deferred recovery retains the boolean but creates no timer. Existing cooldown and attempt exhaustion bound later action.
|
|
52
|
+
|
|
53
|
+
## 6. External surfaces
|
|
54
|
+
|
|
55
|
+
The only durable surface is a `wedgedSeen` true-only object in `.instar/recovery-state.json`. No raw pane text, pattern, timestamp, confidence, or session metadata is stored. Users may observe recovery continuing after the original banner scrolls away. No new notification or external-service call is added. The manual-clear method is an internal recovery seam, not a new operator UI or API.
|
|
56
|
+
|
|
57
|
+
## 6b. Operator-surface quality
|
|
58
|
+
|
|
59
|
+
No operator surface — not applicable.
|
|
60
|
+
|
|
61
|
+
## 7. Multi-machine posture
|
|
62
|
+
|
|
63
|
+
Machine-local by design (`hardware-bound-resource`): the signal describes a tmux pane and SessionRecovery instance local to the machine owning that session. It emits no new user-facing notice, generates no URL, and creates no pool-wide authority. Topic transfer needs the existing recovery/ownership lifecycle or explicit manual clear; this increment intentionally adds no mapping policy.
|
|
64
|
+
|
|
65
|
+
## 8. Rollback cost
|
|
66
|
+
|
|
67
|
+
Revert the code and ship a patch. Old versions ignore the additive `wedgedSeen` field in the recovery-state JSON. No migration is required; the field can remain harmlessly or be manually removed.
|
|
68
|
+
|
|
69
|
+
## Conclusion
|
|
70
|
+
|
|
71
|
+
The change is intentionally narrower than the withdrawn expiring typed-latch design. The side-effect review confirms that it adds only durable detector memory, while all action authority and brakes remain in SessionRecovery. The required independent second pass concurred.
|
|
72
|
+
|
|
73
|
+
## Second-pass review (if required)
|
|
74
|
+
|
|
75
|
+
**Reviewer:** independent Codex agent `/root/living_doc_canonicalization`
|
|
76
|
+
**Independent read of the artifact:** concur
|
|
77
|
+
|
|
78
|
+
Concur with the review. The unchanged detector is the sole setter; persistence is true-or-absent with no metadata; SessionRecovery retains ownership, work, cooldown, attempt, compact, and respawn authority; monitor reuse stays behind the existing cooldown; and clear occurs only on `recovered:true` or the explicit manual seam. No new timer, pattern, mapping, retry owner, engine, or external side effect was introduced.
|
|
79
|
+
|
|
80
|
+
## Evidence pointers
|
|
81
|
+
|
|
82
|
+
- `tests/unit/context-exhaustion-recovery.test.ts`
|
|
83
|
+
- `tests/unit/SessionMonitor.test.ts`
|
|
84
|
+
- `docs/specs/reports/context-wedge-detection-completeness-convergence.md`
|
|
85
|
+
|
|
86
|
+
## Class-Closure Declaration (display-only mirror)
|
|
87
|
+
|
|
88
|
+
This modifies an existing self-triggered recovery path but adds no new control-loop edge or side effect. `defectClass: unbounded-self-action`; `closure: guard`; `guardEvidence: { enforcementType: ratchet, citation: tests/unit/context-exhaustion-recovery.test.ts, howCaught: the persistence/reload test forces the detector-positive banner to disappear, then proves the same bounded SessionRecovery path still receives the true-only signal while the existing cooldown and maximum-attempt brake remain authoritative }`. The unchanged steady-state brakes are SessionMonitor's poll/cooldown and SessionRecovery's per-session cooldown plus max-attempt cap; `tests/unit/self-action-convergence.test.ts` remains the standing controller ratchet.
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
# Side-Effects Review — Worker blocker lifecycle metrics
|
|
2
|
+
|
|
3
|
+
**Version / slug:** `throughput-metrics`
|
|
4
|
+
**Date:** 2026-07-21
|
|
5
|
+
**Author:** Instar-codey
|
|
6
|
+
**Second-pass reviewer:** metrics_second_pass
|
|
7
|
+
|
|
8
|
+
## Summary of the change
|
|
9
|
+
|
|
10
|
+
CommitmentTracker now acknowledges authoritative persistence and durably retains bounded blocker episodes. A non-authoritative SQLite service records two raw timing factors and exposes bounded local or proxied-per-origin reads. The feature is observe-only and development-agent gated.
|
|
11
|
+
|
|
12
|
+
## Decision-point inventory
|
|
13
|
+
|
|
14
|
+
- Commitment persistence — modified — mutations succeed only after atomic rename; failed writes roll back memory and return a typed failure.
|
|
15
|
+
- Blocker declaration — pass-through — the existing explicit transition remains the only declaration authority.
|
|
16
|
+
- Pool read admission — added — existing credential-safe peer URL allowlisting, schema validation, response limits, and deadlines bound reads.
|
|
17
|
+
|
|
18
|
+
## 1. Over-block
|
|
19
|
+
|
|
20
|
+
Persistence failure now rejects a transition that previously could appear successful despite not reaching disk. This is intentional verification of authoritative state. No user-message or work-selection block surface was added.
|
|
21
|
+
|
|
22
|
+
## 2. Under-block
|
|
23
|
+
|
|
24
|
+
Best-effort request timing can be lost on process death after commitment persistence and before ledger insertion; coverage reports that absence. A totally unavailable local SQLite ledger degrades telemetry without blocking commitments, by design.
|
|
25
|
+
|
|
26
|
+
## 3. Level-of-abstraction fit
|
|
27
|
+
|
|
28
|
+
CommitmentTracker owns authoritative mutation and episode state. The SQLite layer only derives measurements. It neither duplicates commitment authority nor feeds an action gate.
|
|
29
|
+
|
|
30
|
+
## 4. Signal vs authority compliance
|
|
31
|
+
|
|
32
|
+
Reference: [docs/signal-vs-authority.md](../../docs/signal-vs-authority.md)
|
|
33
|
+
|
|
34
|
+
- [x] No — this change has no block/allow surface beyond truthful persistence acknowledgement.
|
|
35
|
+
|
|
36
|
+
The measurements are raw nullable signals with no score, ranking, notification, work selection, or autonomous consumer.
|
|
37
|
+
|
|
38
|
+
## 4b. Judgment-point check
|
|
39
|
+
|
|
40
|
+
No new static heuristic at a competing-signals decision point. Persistence acknowledgement and response-size/schema bounds are enumerable invariants; trend summaries remain descriptive.
|
|
41
|
+
|
|
42
|
+
## 5. Interactions
|
|
43
|
+
|
|
44
|
+
- Shadowing: the existing transition validation runs before persistence; storage failure is distinguished as 503.
|
|
45
|
+
- Double-fire: at-least-once delivery is deduped by `(origin,factor,sourceEventId)`.
|
|
46
|
+
- Races: mutation snapshots roll back complete in-memory state; batch effects emit only after the committed flush.
|
|
47
|
+
- Feedback loops: none; metrics have no behavioral consumer.
|
|
48
|
+
|
|
49
|
+
## 6. External surfaces
|
|
50
|
+
|
|
51
|
+
Adds authenticated summary/trend routes and a machine-local SQLite file. Pool reads use credential-safe allowlisting, four-wide concurrency, per-peer and aggregate size caps, deadlines, a 60-second coalescing cache, and field allowlisting. No external service, notification, operator action, or URL is added.
|
|
52
|
+
|
|
53
|
+
## 6b. Operator-surface quality
|
|
54
|
+
|
|
55
|
+
No operator surface — not applicable.
|
|
56
|
+
|
|
57
|
+
## 7. Multi-machine posture
|
|
58
|
+
|
|
59
|
+
**Proxied-on-read:** each origin retains machine-local timing because clocks and persistence are origin-local; `scope=pool` returns bounded per-origin rows without inventing a fleet scalar. It emits no notices, strands no authoritative state, and generates no URLs.
|
|
60
|
+
|
|
61
|
+
## 8. Rollback cost
|
|
62
|
+
|
|
63
|
+
Disable the dev-gated feature or revert and ship a patch. The derived SQLite database may remain harmlessly and can be deleted without commitment repair. Episode fields are forward-compatible optional data.
|
|
64
|
+
|
|
65
|
+
## Conclusion
|
|
66
|
+
|
|
67
|
+
The review found and corrected persistence error classification, pool-response sanitization/capping/coalescing, and missing runtime guard registration. The feature is clear to ship after independent concurrence.
|
|
68
|
+
|
|
69
|
+
## Second-pass review
|
|
70
|
+
|
|
71
|
+
**Reviewer:** metrics_second_pass
|
|
72
|
+
**Independent read of the artifact:** concur.
|
|
73
|
+
|
|
74
|
+
Concur with the review. The corrected implementation fail-closes unavailable metric reads, bounds and closed-schema sanitizes pool responses, exposes live guard health, and remains strictly measure-only.
|
|
75
|
+
|
|
76
|
+
## Evidence pointers
|
|
77
|
+
|
|
78
|
+
- `tests/unit/CommitmentTracker-blocker-lifecycle.test.ts`
|
|
79
|
+
- `tests/unit/BlockerLifecycleLedger.test.ts`
|
|
80
|
+
- Build plus 192 targeted lifecycle/dev-gate wiring tests.
|
|
81
|
+
- The no-silent-fallback ratchet remains at its 494 baseline after explicit fail-soft annotations.
|
|
82
|
+
- Capability discoverability, dev-gate attribution, and SQLite registry wiring ratchets pass.
|
|
83
|
+
|
|
84
|
+
## Class-Closure Declaration (display-only mirror)
|
|
85
|
+
|
|
86
|
+
No agent-authored-artifact defect and no self-triggered action controller — not applicable. The reconciliation timer repairs measure-only telemetry and cannot retry or alter external work.
|