instar 1.3.903 → 1.3.905

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.
@@ -0,0 +1,82 @@
1
+ # Side-Effects Review — Live throughput deliverable loop
2
+
3
+ **Version / slug:** `throughput-deliverable-loop`
4
+ **Date:** `2026-07-21`
5
+ **Author:** `instar-codey`
6
+ **Second-pass reviewer:** `not required`
7
+
8
+ ## Summary of the change
9
+
10
+ `BlockerLifecycleService` now schedules the next bounded 64-commitment reconciliation slice immediately until a complete sweep, then restores the existing five-minute cadence. The schema-v2 trend adds live window, current-day, and cumulative completion counts. `server/routes.ts` validates every relayed live row and recomputes its arithmetic. Tests prove a delivered commitment beyond the first slice appears promptly and that real delivery events make the reading climb.
11
+
12
+ ## Decision-point inventory
13
+
14
+ - Reconciliation scheduling — modify — chooses zero-delay continuation after an incomplete successful slice and the existing five-minute delay after a complete successful sweep.
15
+ - Pool response structural validation — modify — rejects malformed or arithmetically inconsistent peer metric data at the existing trust boundary.
16
+ - Commitment delivery authority — pass-through — remains exclusively owned by `CommitmentTracker.deliver()`.
17
+
18
+ ## 1. Over-block
19
+
20
+ The only rejection surface is schema validation for peer trend responses. A schema-v2 peer that sends a cumulative series with a skipped/duplicated date, inconsistent running total, incorrect complete flag, or final count different from `currentDayCount` is rejected as `invalid-body`. Those shapes cannot truthfully represent the declared schema. Local commitment delivery is never rejected or delayed by this metric path.
21
+
22
+ ## 2. Under-block
23
+
24
+ The metric still cannot infer real-world completion when no concrete commitment was registered and delivered; doing so would be dishonest. A SQLite failure can delay visibility until reconciliation succeeds, and an origin that has not upgraded remains explicitly unsupported. These are surfaced degradation states, not invented zeroes.
25
+
26
+ ## 3. Level-of-abstraction fit
27
+
28
+ The fix stays at the existing derived-metric layer. `CommitmentTracker` remains the durable delivery authority, `BlockerLifecycleLedger` remains the sole measure-only store, and `BlockerLifecycleService` remains the event consumer/reconciler. No higher-level drive, session, git, or chat heuristic was added and no lower-level storage primitive was duplicated.
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 change has no block/allow surface over user or agent behavior.
35
+
36
+ Completion counts are observations. They cannot choose work, rank people, impose a target, notify, grade, block a merge, gate a route, or mutate a commitment. Peer structural validation is a hard schema invariant at an authenticated boundary, explicitly allowed by the principle; it does not judge meaning or intent.
37
+
38
+ ## 4b. Judgment-point check
39
+
40
+ No static heuristic is added at a competing-signals decision point. The only deterministic choices are enumerable invariants: bounded slice completion, consecutive UTC dates, nonnegative integer counts, and exact cumulative arithmetic.
41
+
42
+ ## 5. Interactions
43
+
44
+ - **Shadowing:** no new producer shadows delivery; both live events and reconciliation use the same opaque completion identity and ledger unique key.
45
+ - **Double-fire:** a live event and a reconciliation pass may both attempt the same row, but existing idempotent dedupe admits it once.
46
+ - **Races:** each pass still processes at most 64 commitments synchronously. A zero-delay timer yields to the event loop before the next slice. Close clears the scheduled timer through the existing service lifecycle.
47
+ - **Feedback loops:** no metric consumer feeds back into commitment delivery or reconciliation scheduling.
48
+
49
+ ## 6. External surfaces
50
+
51
+ The authenticated `/blocker-lifecycle/trend` schema-v2 response gains additive `windowTotal`, `currentDayCount`, and `cumulativeDays` fields. Existing `days`, ratio, and direction retain complete-day semantics. No new external call, notice, endpoint, table, identifier, prose field, or operator action is introduced. Timing changes only during successful incomplete reconciliation sweeps.
52
+
53
+ ## 6b. Operator-surface quality
54
+
55
+ No operator surface — not applicable.
56
+
57
+ ## 7. Multi-machine posture (Cross-Machine Coherence)
58
+
59
+ **Proxied-on-read.** Each origin's ledger remains machine-local because it measures that origin's authoritative commitments. The existing `?scope=pool` read returns per-origin values through authenticated bounded proxying, and the modified sanitizer validates the additive fields before exposure. No fleet aggregate is invented. The change emits no user-facing notices, creates no URLs, and does not strand commitment state on topic transfer because mutations continue to route to the commitment origin.
60
+
61
+ ## 8. Rollback cost
62
+
63
+ A hot-fix can revert the scheduling and additive response fields. No data migration or agent-state repair is required: existing commitment records and ledger rows stay valid and inert. During rollback propagation, upgraded readers may temporarily classify an older peer response as unsupported, which is the existing mixed-version behavior.
64
+
65
+ ## Conclusion
66
+
67
+ The review kept the fix inside the existing commitment-to-ledger loop, retained bounded event-loop work and failure brakes, preserved complete-day trend meaning, and tightened cross-machine semantic validation. It introduces no new behavioral authority or parallel state owner and is clear to ship.
68
+
69
+ ## Second-pass review
70
+
71
+ Not required: this change does not touch messaging, dispatch, session lifecycle, context recovery, trust, a sentinel, a guard, a gate, or a watchdog.
72
+
73
+ ## Evidence pointers
74
+
75
+ - `tests/unit/BlockerLifecycleService-throughput.test.ts` proves live 0 → 1 → 2 movement.
76
+ - `tests/integration/blocker-throughput-reconciliation.test.ts` proves prompt second-slice recovery and restart idempotency.
77
+ - `tests/integration/blocker-throughput-pool-routes.test.ts` proves hostile cumulative arithmetic is rejected.
78
+ - `tests/e2e/blocker-throughput-count-alive.test.ts` proves real-server route output.
79
+
80
+ ## Class-Closure Declaration (display-only mirror)
81
+
82
+ No agent-authored-artifact defect and no self-triggered action controller — not applicable. Reconciliation is a measure-only derived-state repair loop and never restarts, swaps, respawns, spawns, notifies, re-drives external work, kills, or otherwise acts on the agent.