instar 1.3.973 → 1.3.975

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,137 @@
1
+ # Side-Effects Review — Guard load-bearing inspectability summary
2
+
3
+ **Version / slug:** `guard-uninspectable-summary`
4
+ **Date:** `2026-07-25`
5
+ **Author:** `Instar Agent (instar-codey)`
6
+ **Second-pass reviewer:** `guard_uninspectable_review`
7
+
8
+ ## Summary of the change
9
+
10
+ `src/monitoring/guardPostureView.ts` adds one field to `GuardsSummary`: `loadBearingUninspectableKeys`. `buildGuardInventory` fills it when a load-bearing row retains one of four existing effective postures: `missing`, `errored`, `on-stale`, or `off-runtime-divergent`. The existing row classification, `loadBearingGap` flag, `loadBearingGapKeys`, heartbeat projection, and `GuardPostureProbe` anomaly logic are unchanged. Because `GET /guards` returns `inventory.summary` directly, the additive field reaches the authenticated local and pool read surfaces without a route-specific copy step.
11
+
12
+ ## Decision-point inventory
13
+
14
+ No block/allow or actuation decision point is added or modified. The change adds a read-only projection over already-derived guard rows. Existing guard classification and probe alert decisions are passed through unchanged.
15
+
16
+ - `buildGuardInventory` summary assembly — **modify** — adds an orthogonal completeness list from the closed effective-state vocabulary.
17
+ - `GuardPostureProbe` — **pass-through** — consumes guard rows exactly as before; it does not consume the new summary field.
18
+
19
+ ---
20
+
21
+ ## 1. Over-block
22
+
23
+ **What legitimate inputs does this change reject that it shouldn't?**
24
+
25
+ No block/allow surface — over-block not applicable. Every existing request and guard posture remains accepted and classified as before.
26
+
27
+ ---
28
+
29
+ ## 2. Under-block
30
+
31
+ **What failure modes does this still miss?**
32
+
33
+ The requested `GET /guards` surface is complete for the named load-bearing inspectability classes. The compact heartbeat posture is a second rendering of the earlier shape: it carries `loadBearingGapKeys` and aggregate loud-class counts, but not keyed load-bearing inspectability. It remains unchanged by instruction; this finding was reported directly to Echo and was neither fixed nor filed.
34
+
35
+ The new list also deliberately excludes `diverged-pending-restart`, `on-unverified`, and non-load-bearing rows because the requested closed set is exactly `missing`, `errored`, `on-stale`, and `off-runtime-divergent`.
36
+
37
+ ---
38
+
39
+ ## 3. Level-of-abstraction fit
40
+
41
+ **Is this at the right layer?**
42
+
43
+ Yes. `buildGuardInventory` already owns the canonical `GuardsSummary` derived from the complete row inventory. Computing the list there avoids re-deriving state in `routes.ts`, keeps local and pool responses aligned, and leaves the probe's separate anomaly authority untouched. The membership check is a projection over a closed enum, not a new detector or competing classifier.
44
+
45
+ ---
46
+
47
+ ## 4. Signal vs authority compliance
48
+
49
+ **Required reference:** [docs/signal-vs-authority.md](../../docs/signal-vs-authority.md)
50
+
51
+ **Does this change hold blocking authority with brittle logic?**
52
+
53
+ - [ ] No — this change produces a signal consumed by an existing smart gate.
54
+ - [x] No — this change has no block/allow surface.
55
+ - [ ] Yes — but the logic is a smart gate with full conversational context (LLM-backed with recent history or equivalent).
56
+ - [ ] ⚠️ Yes, with brittle logic — STOP. Reshape the design.
57
+
58
+ The new field is an additive observation on a read surface. It cannot enable, disable, classify, alert, suppress, or authorize anything. `GuardPostureProbe` remains the anomaly consumer and sees the same rows it saw before.
59
+
60
+ ---
61
+
62
+ ## 4b. Judgment-point check (Judgment Within Floors standard)
63
+
64
+ No new static heuristic is added at a competing-signals decision point. The four-member set is the request's closed structural definition of "load-bearing but uninspectable"; it does not resolve conflicting evidence or make a behavioral decision. The normative effective-state precedence table remains unchanged.
65
+
66
+ ---
67
+
68
+ ## 5. Interactions
69
+
70
+ **Does this interact with existing checks, recovery paths, or infrastructure?**
71
+
72
+ - **Shadowing:** none. The field is assembled after each row has already been classified.
73
+ - **Double-fire:** structurally prevented by leaving `GuardPostureProbe` unchanged. The required errored-row test produces one acute `errored` item and no `guard-posture-loadbearing` item.
74
+ - **Races:** none. `buildGuardInventory` is pure over the caller's one-read snapshot and synchronous registry reads.
75
+ - **Feedback loops:** none. `GET /guards` does not feed the field back into classification or actuation.
76
+ - **Compatibility:** additive JSON field. Consumers that do not know it ignore it; consumers that need completeness can read it.
77
+
78
+ ---
79
+
80
+ ## 6. External surfaces
81
+
82
+ **Does this change anything visible outside the immediate code path?**
83
+
84
+ Yes: authenticated callers of `GET /guards` and `GET /guards?scope=pool` see `summary.loadBearingUninspectableKeys`. No row fields, response status codes, authentication rules, persistent files, notices, or external-service calls change. The route's timing remains one linear pass over the existing guard rows.
85
+
86
+ No operator-facing action is added. This is a read-only diagnostic field; there is no new grant, approval, destructive operation, or phone-only workflow.
87
+
88
+ ---
89
+
90
+ ## 6b. Operator-surface quality (Operator-Surface Quality standard)
91
+
92
+ No dashboard renderer, approval page, or operator action surface is changed — not applicable. The API field is machine-readable supporting data, not primary dashboard content.
93
+
94
+ ---
95
+
96
+ ## 7. Multi-machine posture (Cross-Machine Coherence)
97
+
98
+ **Posture: proxied-on-read.** Each machine derives its own guard truth from machine-local configuration and runtime getters. `GET /guards?scope=pool` already fetches each known peer's plain `GET /guards` response, so the new summary list travels with that peer's full response and remains attributed to the machine that observed it.
99
+
100
+ The change emits no user-facing notices, holds no durable state, and generates no URLs. Topic transfer cannot strand it because it is recomputed on every read.
101
+
102
+ The compact heartbeat posture does not gain this keyed list; that separate rendering was reported to Echo without alteration.
103
+
104
+ ---
105
+
106
+ ## 8. Rollback cost
107
+
108
+ Pure additive code change. Revert the summary interface member, state set, initializer, and push line, then ship a patch. There is no data migration, persistent state cleanup, agent reset, or user-facing repair. During rollback, callers return to the earlier incomplete summary shape.
109
+
110
+ ---
111
+
112
+ ## Conclusion
113
+
114
+ The change is narrow and correctly layered: it makes the read model honest without perturbing the classifications and alarms that already own these failure states. Refusal-first coverage pins the absent-field defect, all four exact uninspectable classes, no double-alarm behavior, the real authenticated route, and the live HTTP lifecycle. The heartbeat rendering remains an explicitly reported, unchanged finding under Echo's filing authority.
115
+
116
+ ---
117
+
118
+ ## Second-pass review (if required)
119
+
120
+ **Reviewer:** `guard_uninspectable_review`
121
+ **Independent read of the artifact:** Concur with the review — the only runtime change is an additive summary projection over load-bearing rows in exactly `{missing, errored, on-stale, off-runtime-divergent}`; the precedence/classification and `GuardPostureProbe` code are untouched, the errored case yields one existing acute item and no load-bearing-gap item, and all 54 focused unit/integration/E2E tests pass with no threshold or authority changes.
122
+
123
+ ---
124
+
125
+ ## Evidence pointers
126
+
127
+ - Refusal evidence: before implementation, `tests/unit/monitoring/guard-posture-probe-loadbearing.test.ts` failed because `loadBearingUninspectableKeys` was absent.
128
+ - Unit: 32/32 across `guard-posture-loadbearing` and `guard-posture-probe-loadbearing`; the broader focused unit run was 62/62.
129
+ - Integration: 18/18 in `tests/integration/guards-route.test.ts`.
130
+ - E2E: 24/24 across `guards-loadbearing-lifecycle` and `guards-endpoint-lifecycle`.
131
+ - Static/build: `npm run lint` and `npm run build` passed.
132
+
133
+ ---
134
+
135
+ ## Class-Closure Declaration (display-only mirror)
136
+
137
+ No agent-authored-artifact defect and no self-triggered controller change — not applicable.
@@ -0,0 +1,147 @@
1
+ # Side-Effects Review — honest denominators, part two: the standards-enforcement audit
2
+
3
+ ## Summary of the change
4
+
5
+ Five honesty defects in ONE instrument — the standards enforcement-coverage audit — all found by
6
+ the convergence-towards-coherence audit (2026-07-25) while measuring the instrument that measures
7
+ our constitution. Live evidence: `GET /conformance/coverage/health` on this machine returned
8
+ `{converged: true, total: 22, enforcedRatio: 0.0455}` while `docs/STANDARDS-REGISTRY.md` in the
9
+ source repo carries **81** article headings. Re-run over the real registry: `total: 80`,
10
+ `enforcedRatio: 0.5375`. The reported figure was 12× more alarming than reality and was quoted to
11
+ the operator as fact.
12
+
13
+ **A. `enforcedRatio` fabricated a ratio with no denominator.** `total === 0 ? 0 : …` returned `0`
14
+ — "0% of standards enforced", a measurement nobody had taken. Now `number | null`, with the type
15
+ telling callers not to coerce.
16
+
17
+ **B. Family detection was a hardcoded five-name allowlist**
18
+ (`The Root|The Substrate|Building|Shipping|Interaction`). The registry has SIX standards families;
19
+ every article under `## The Fractal — the framework that develops itself` was silently dropped
20
+ (currently the Self-Hosting standard). Replaced with structural detection: a `##` section is a
21
+ family iff ≥1 `###` under it carries a `**Rule.**`. The prose sections (Why this exists, Genesis,
22
+ Two layers, How a new standard joins, The Stakes) carry no rule lines and are excluded
23
+ automatically — same exclusion the allowlist achieved, with no list to maintain.
24
+
25
+ **C. The parse canary's floor could not detect a fourfold collapse.**
26
+ `MIN_EXPECTED_ARTICLES = 15`, commented "far below the real ~21", never moved as the registry grew
27
+ to 81 — so it would pass while 65 of 81 articles vanished. Added a completeness check:
28
+ `droppedHeadings` (headings inside a detected family with no rule line) fails the canary and names
29
+ each loss. The floor is retained, documented as a coarse backstop only.
30
+
31
+ **D. `converged: true` sat bare beside the ratio.** It only ever meant "the deterministic pass is
32
+ stable on unchanged inputs". Added `convergedMeans` so the meaning travels with the field.
33
+
34
+ **E. An unreadable registry hashed identically to an empty one** in `computeInputHash`
35
+ (`catch { registry = '' }`) — absence and emptiness sharing a cache slot, the same shape one layer
36
+ down. Now distinguishable via an explicit marker.
37
+
38
+ Supporting surface: `parseStandardsRegistryDetailed` / `loadStandardsRegistryDetailed` return
39
+ `RegistryParseDiagnostics`; `runRegistryCanary(articles, diagnostics?)` reports `articleHeadings`
40
+ and `completenessAssessed`; `CoverageSummary` gains `assessmentTrustworthy` + a `registry`
41
+ provenance block.
42
+
43
+ ## Decision-point inventory
44
+
45
+ - `computeCoverage` — an OBSERVE-ONLY reporter. Gates nothing, blocks nothing, has no authority
46
+ over any pipeline. The change alters what it *reports*, never what anything *does*.
47
+ - `runRegistryCanary` — a state-detector whose verdict is returned as DATA. Both call sites
48
+ (`specReviewRoutes` HTTP handler and `runConformanceCheck` for the CLI) attach it to the
49
+ response; neither throws on it. A stricter canary therefore cannot newly block anything.
50
+ - `parseStandardsRegistry` — pure function. Behaviour change: it now returns MORE articles
51
+ (the previously-dropped family).
52
+ - `GET /conformance/coverage/health` — read-only, dev-agent-gated, `X-Instar-Request` gated.
53
+ Response gains fields; `enforcedRatio` changes type.
54
+
55
+ No gate, hook, reaper, sentinel, or scheduler path is touched.
56
+
57
+ ## 1. Over-block
58
+
59
+ The audit has no blocking authority, so it cannot over-block. The two adjacent risks:
60
+
61
+ **The canary becoming stricter.** `runRegistryCanary` now fails when a heading inside a family
62
+ carries no `**Rule.**`. Verified against the REAL registry: 80 headings, 80 parsed, zero dropped —
63
+ so the live document passes. A future editor adding a non-article `###` inside a standards family
64
+ WOULD trip it. That is intended (the failure names the heading and is trivially resolved by adding
65
+ a rule or moving the subheading), and it is signal-only: the verdict rides in a response body,
66
+ where no consumer treats it as a block. Checked all call sites for a throw-on-canary — none.
67
+
68
+ **The conformance gate seeing more standards.** `StandardsConformanceReviewer` now receives the
69
+ previously-dropped family, so a spec review may raise findings against Self-Hosting that it
70
+ silently could not raise before. That is the defect being fixed, not a side effect to mitigate:
71
+ the article was always in the constitution. The reviewer is signal-only per its own spec.
72
+
73
+ ## 2. Under-block
74
+
75
+ **The stale-copy defect is NOT fixed here and is deliberately not bundled.** The running server
76
+ reads `<projectDir>/docs/STANDARDS-REGISTRY.md` — the agent-home snapshot — and
77
+ `PostUpdateMigrator.migrateFeatureMaturationGate` only overwrites that file when its hash is in a
78
+ known `prior` set. Our copy has drifted out of that set, so it is classified "customized — left
79
+ untouched" and stays frozen at 22 articles forever. Fixing it is install-base migration work with
80
+ a real risk (overwriting a genuinely customised registry on someone's machine) and deserves its
81
+ own review rather than riding along here.
82
+
83
+ What this change buys in the meantime is that the stale read is no longer SILENT: the same
84
+ 22-article read now returns `assessmentTrustworthy: false` with `registry.parsed: 22` and the
85
+ canary failures attached, instead of a bare confident `0.0455`.
86
+
87
+ Tracked, not deferred-and-forgotten: <!-- tracked: CMT-1035 --> (tier-one closeout commitment,
88
+ topic 29723) — the migration is the next item on the same tier and the completion condition of the
89
+ registered autonomous run `run-ms13zzrz-78576404` requires the LIVE figure to be computed over ≥80
90
+ standards, so this cannot be quietly dropped.
91
+
92
+ ## 3. Blast radius
93
+
94
+ `enforcedRatio: number → number | null` is the one breaking-shaped change. Every consumer in the
95
+ repo was checked:
96
+
97
+ - `src/server/routes.ts` — spreads `report.summary` into the response; no arithmetic.
98
+ - `tests/unit/standards-enforcement-auditor.test.ts`, `tests/e2e/standards-coverage-lifecycle.test.ts`
99
+ — assert on real (non-empty) registries where the value stays a number; both still pass.
100
+ - `grep -rn "enforcedRatio"` across `src/`, `scripts/`, `tests/` — no other reader, no CI ratchet,
101
+ no dashboard tile consumes it.
102
+ - `docs/`/CLAUDE.md prose mentions it descriptively only.
103
+
104
+ `family` string values are unchanged for the five pre-existing families: the new
105
+ `familyName()` truncates at the first dash separator, so `## The Substrate — the model-level
106
+ truths …` still yields `The Substrate` (asserted in the updated unit test). `The Fractal` is
107
+ additive.
108
+
109
+ ## 4. Rollback plan
110
+
111
+ Single-commit revert; no state migration, no persisted artifact, no config key. The audit is
112
+ recomputed from disk on every request behind an `inputHash` cache that lives in a route-local
113
+ variable, so a revert takes effect on the next server start with nothing to clean up. No dark flag
114
+ is needed: the change makes a read-only report more honest and cannot alter behaviour.
115
+
116
+ ## 5. Test coverage (all three tiers, per the Testing Integrity Standard)
117
+
118
+ - **Unit** — `tests/unit/standards-conformance-gate.test.ts` (+4 cases): structural family
119
+ detection incl. an invented family and `The Fractal` present; canary reports its denominator and
120
+ says `completenessAssessed: false` when it cannot check; the silent-drop case that the old floor
121
+ passed and the completeness check now names.
122
+ `tests/unit/standards-enforcement-auditor.test.ts` (+3): `enforcedRatio` null over an empty
123
+ registry; provenance + trustworthiness on a real pass vs a truncated fragment; unreadable ≠
124
+ empty in `computeInputHash`.
125
+ - **Integration** — `tests/integration/conformance-dev-gate-route.test.ts` (+4): the HTTP response
126
+ returns `null` not `0`, carries the registry provenance, never presents `converged` bare, and
127
+ yields a real ratio with a visible denominator on a populated registry.
128
+ - **E2E** — `tests/e2e/standards-coverage-lifecycle.test.ts` (+2): the live route assesses the
129
+ WHOLE constitution (denominator equals the document's own heading count, families include
130
+ `The Fractal`), and a truncated registry cannot present itself as trustworthy.
131
+
132
+ Every one of the three "has it refused something?" demonstrations in the ELI16 is an assertion in
133
+ this set, not a manual check.
134
+
135
+ ## 6. Two mistakes made while building this, recorded rather than tidied away
136
+
137
+ **The test that was protecting the bug.** `standards-conformance-gate.test.ts` asserted that every
138
+ parsed family is one of exactly five names. It failed the moment `The Fractal` started parsing —
139
+ the test existed to confirm the exclusion of prose sections, but it had frozen the bug in place as
140
+ a specification. Rewritten to assert the prose sections are excluded (the real intent) plus a
141
+ regression guard for the dropped family. This is the second time in one day a passing test was
142
+ found protecting the defect it sat next to.
143
+
144
+ **The alarming number was passed on unchecked.** Every other instrument found in this audit failed
145
+ by *flattering* us; this one failed by *damning* us, and it was relayed to the operator without
146
+ checking its denominator. A frightening figure is the one least likely to be questioned — which is
147
+ why the denominator now travels with the number rather than being available on request.