instar 1.3.764 → 1.3.766

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,198 @@
1
+ # Side-Effects Review — Reviewer-Door Rewiring inc1 (Anthropic clean-door reviewer family)
2
+
3
+ **Version / slug:** `reviewer-door-rewiring-inc1`
4
+ **Date:** `2026-07-04`
5
+ **Author:** `echo (build hand)`
6
+ **Second-pass reviewer:** `not required (Tier-1: dark-on-fleet, config-reversible, no durable state / external side-effects; PR is the review surface)`
7
+
8
+ ## Summary of the change
9
+
10
+ inc1 of REVIEWER-DOOR-REWIRING adds a third spec-converge external reviewer family — the strongest
11
+ Anthropic model (`claude-fable-5`) read through the clean `claude -p` door, off the measured-penalized
12
+ `opus × coding-harness` pair. It ships **dark on the fleet / live on a development agent** via the
13
+ `specConverge.reviewers.anthropic.enabled` developmentAgent gate; absent config keeps today's exact
14
+ `[codex, gemini]` behavior byte-for-byte. The family is a clean-door SECOND READ (`crossFamily: false`)
15
+ that books into its own `clean-door-anthropic-review` disclosure field and can never launder the
16
+ `cross-model-review` flag. Files touched: `src/core/crossModelReviewer.ts` (detection, model
17
+ resolution, registry entry, config gate, crossFamily plumbing, baseline-predicate swap, aggregate
18
+ filter, hardening preflight), `src/core/ClaudeCliIntelligenceProvider.ts` (reviewer-hardening
19
+ invocation + exported arg/env builders), `src/core/types.ts` (`IntelligenceOptions.reviewerHardening`),
20
+ `scripts/model-registry-freshness.manifest.json` (reviewer pin), `skills/spec-converge/scripts/cross-model-review.mjs`
21
+ (config gate), `skills/spec-converge/SKILL.md` (family + D7 disclosure), `src/core/PostUpdateMigrator.ts`
22
+ (SKILL.md content migration), `docs/LLM-ROUTING-REGISTRY.md` (stale `report`→`strict` line), plus five
23
+ test files + the converged spec docs.
24
+
25
+ ## Decision-point inventory
26
+
27
+ - `SUPPORTED_REVIEWER_FRAMEWORKS` — **modify** — one new `claude-code` entry with REQUIRED `crossFamily: false`; codex remains the preference leader; existing ordering unchanged.
28
+ - `TRUSTED_REVIEWER_FRAMEWORKS` — **modify** — gains `claude-code`, COUPLED ATOMICALLY with the §5.4 baseline-predicate swap (`isTrustedReviewerFramework` → `isCrossFamilyReviewerFramework`).
29
+ - `ReviewerResult` / `CrossModelDetectionResult` — **modify** — gain a `crossFamily` field (populated from the registry; existing families byte-identical).
30
+ - `aggregateRoundOutcomes` / `detectCrossModelReviewer` / `detectAllCrossModelReviewers` / `wasNonClaudeFrameworkActiveWithin` — **modify** — gain `crossFamily` filtering (behavior for existing families byte-identical).
31
+ - `IntelligenceOptions.reviewerHardening` — **add** — the claude-provider inbound-safety lockdown option (other providers ignore it).
32
+ - `specConverge.reviewers.anthropic.{enabled,model}` config block — **add** — the developmentAgent gate + optional frontier-validated model override.
33
+ - No block/allow gate, no HTTP route, no scheduler job, no watcher is introduced or modified.
34
+
35
+ ---
36
+
37
+ ## 1. Over-block
38
+
39
+ **What legitimate inputs does this change reject that it shouldn't?**
40
+
41
+ No user-message block/allow surface — over-block not applicable. The one rejection path is the config
42
+ model-override validator: a concrete-but-non-frontier id (e.g. `claude-opus-4-8`) is rejected with
43
+ `override-not-frontier`. This is *intended* (it prevents re-pinning the reviewer to the penalized opus
44
+ door); a legitimate frontier id (`claude-fable-5`) is accepted, and the default pin needs no override.
45
+ The `--family claude-code` refusal on the fleet (`no-supported-framework`) is intended dark-gating,
46
+ not over-block.
47
+
48
+ ---
49
+
50
+ ## 2. Under-block
51
+
52
+ **What illegitimate inputs does this change let through that it shouldn't?**
53
+
54
+ The load-bearing under-block risk is the untrusted spec text reaching a tool/MCP execution path via the
55
+ `claude -p --setting-sources user` door (which loads user hooks + MCP servers and inherits full env).
56
+ §1.4 hardening closes this: empty allowed-tools + `--strict-mcp-config` + neutral scratch cwd + stdin
57
+ prompt + env allowlist, plus a fail-closed runtime preflight (`hardening-unsupported` → degrade, never
58
+ run unhardened). Verified by a STATE-level zero-tool-execution test against the real Claude CLI (a
59
+ benign tool-invoking payload creates NO file). The cross-model-honesty under-block (a claude-only run
60
+ masquerading as cross-model) is closed structurally by `crossFamily`-keyed filtering, fail-closed on an
61
+ unknown id, unit-locked.
62
+
63
+ ---
64
+
65
+ ## 3. Level-of-abstraction fit
66
+
67
+ **Is the change at the right layer?**
68
+
69
+ Yes. The reviewer family is a registry entry in the existing `SUPPORTED_REVIEWER_FRAMEWORKS` seam (the
70
+ established extension point); the hardening is invocation options on the existing
71
+ `ClaudeCliIntelligenceProvider` (no new adapter class, no `IntelligenceFramework` union change); the gate
72
+ rides the standard `resolveDevAgentGate` funnel; the anti-rot pin rides the existing freshness-lint
73
+ manifest. No new subsystem, no new abstraction — the change reuses every existing seam.
74
+
75
+ ---
76
+
77
+ ## 4. Signal vs authority compliance
78
+
79
+ **Does anything here gain blocking authority it shouldn't?**
80
+
81
+ No. Every reviewer (internal, external, clean-door) remains a SIGNAL into convergence synthesis; no
82
+ pass gains blocking authority; a degraded/unavailable family degrades loudly and convergence proceeds.
83
+ The config gate governs *availability of a signal source*, not any authority. The `crossFamily` guard
84
+ is a classification of what a signal COUNTS AS, not a block. The hardening preflight degrades (a signal
85
+ outcome), never blocks.
86
+
87
+ ---
88
+
89
+ ## 5. Interactions
90
+
91
+ **What existing features does this change interact with, and how?**
92
+
93
+ - **Freshness lint** (`scripts/lint-model-registry-freshness.mjs`) — the new `claude-clean-door-reviewer-default`
94
+ pin is checked under strict enforcement; verified green + non-vacuity-tested.
95
+ - **subscription pool / circuit breaker / spawn cap** — the claude reviewer rides `buildIntelligenceProvider`,
96
+ so it inherits the spawn-cap funnel + per-framework breaker; quota pressure surfaces as `degraded:
97
+ rate-limited`. Quota-correlation honesty: the claude family draws on the SAME Anthropic pool as the
98
+ authoring session (called out in the spec, degrades loudly).
99
+ - **7-day externals-mandatory baseline** — the predicate swap keeps the mandatory check keyed on
100
+ cross-model families only; a claude-only activation never satisfies it (unit-locked).
101
+ - **PostUpdateMigrator** — the SKILL.md content migration reaches already-installed agents.
102
+
103
+ ---
104
+
105
+ ## 6. External surfaces
106
+
107
+ **Does this change touch any external service, network call, filesystem path outside the project, or spawn?**
108
+
109
+ - **Egress:** the claude reviewer sends the spec text to Anthropic (or the operator's OWN configured
110
+ `ANTHROPIC_BASE_URL` proxy) — the SAME destination the authoring session already uses. ZERO new
111
+ egress destinations. No third-party aggregator (OpenRouter declined, §2).
112
+ - **Spawn:** one `claude -p` one-shot per round per available family (≤10 rounds), run in a neutral
113
+ mkdtemp scratch cwd with an allowlist env. The `--help` preflight is a cheap one-shot, cached
114
+ per-process.
115
+ - **Filesystem:** the reviewer pin adds a row to the in-repo freshness manifest. No paths outside the
116
+ project are written; the scratch cwd is under `os.tmpdir()`.
117
+
118
+ ---
119
+
120
+ ## 6b. Operator-surface quality (Operator-Surface Quality standard)
121
+
122
+ No new operator-facing surface (no HTTP route, no dashboard tab, no user-facing config the operator
123
+ edits conversationally). The `specConverge.reviewers.*` config is instar-developing-agent tooling set
124
+ per-machine by a maintainer, documented in the spec + SKILL.md + the release fragment. Not applicable
125
+ beyond that.
126
+
127
+ ---
128
+
129
+ ## 7. Multi-machine posture (Cross-Machine Coherence)
130
+
131
+ - **Reviewer availability (which families detect on this machine)** — machine-local BY DESIGN.
132
+ machine-local-justification: physical-credential-locality — each family's door is a per-disk CLI
133
+ login (claude OAuth config-home, `~/.codex/auth.json`, `~/.gemini/oauth_creds.json`); reachability
134
+ cannot replicate without replicating credentials, which is forbidden.
135
+ - **Config (`specConverge.reviewers.*`)** — machine-local.
136
+ machine-local-justification: physical-credential-locality — `.instar/config.json` has no replication
137
+ path in instar (not one of the stateSync stores), and the config selects which per-disk CLI door
138
+ (a machine-local credentialed login) the reviewer uses. Enabling the family on more than one machine
139
+ is a per-machine edit.
140
+ - **`state/framework-activation-history.jsonl`** — existing surface, unchanged; already machine-local
141
+ for the same reason (it records THIS machine's detections).
142
+ machine-local-justification: physical-credential-locality — a record of per-disk login availability.
143
+ - Convergence runs on one machine per run; no cross-machine notice, URL, or durable-topic surface is
144
+ added. No `unified` surface is infeasible-and-claimed (bidirectional check clear).
145
+
146
+ ---
147
+
148
+ ## 8. Rollback cost
149
+
150
+ **How hard is it to undo this change if it goes wrong?**
151
+
152
+ Trivial. The family ships dark on the fleet (absent config = byte-identical `[codex, gemini]`). Rollback
153
+ is a config flip (`specConverge.reviewers.anthropic.enabled: false`) or a revert of a docs/constants-only
154
+ change. No data migration, no durable state, no external side-effects. The freshness manifest `enforcement`
155
+ has its own documented `strict`→`report` rollback. The SKILL.md migration is idempotent + fingerprint-guarded
156
+ (a customized skill is never touched).
157
+
158
+ ---
159
+
160
+ ## Conclusion
161
+
162
+ **Ship / hold / needs second pass:** Ship (Tier-1). The change is dark-on-fleet, fully config-reversible,
163
+ adds no durable state or new external destination, and the two load-bearing risks (untrusted-text tool
164
+ execution; cross-model-flag laundering) are closed structurally and verified by tests — including a live
165
+ STATE-level zero-tool-execution proof against the real Claude CLI. Operator approval of the converged
166
+ spec (`approved: true`) is deliberately left to the operator per the run mandate.
167
+
168
+ ---
169
+
170
+ ## Second-pass review (if required)
171
+
172
+ Not required — Tier-1 (dark-on-fleet, config-reversible, no durable/external side-effects). The PR is the
173
+ review surface. Note for the operator: this increment implements a CONVERGED-but-not-yet-approved spec;
174
+ if a Tier-2 re-land is desired post-approval, the trace can be re-cut with `--spec` + the approved tag.
175
+
176
+ ---
177
+
178
+ ## Evidence pointers
179
+
180
+ - `tests/unit/crossModelReviewer-clean-door.test.ts` (28 tests) — detection, model resolution, §5
181
+ lockdown battery (a–e), required-crossFamily-field guard, per-family concrete-pin model-arg, config gate.
182
+ - `tests/unit/claude-reviewer-inbound-safety.test.ts` (7 tests, incl. live STATE) — hardened argv/env +
183
+ zero-tool-execution against the real Claude CLI.
184
+ - `tests/unit/model-registry-freshness-reviewer-pin.test.ts` (3 tests) — non-vacuity of the reviewer pin.
185
+ - `tests/integration/clean-door-reviewer-driver.test.ts` (7 tests) — driver `--family`/`--detect-only` paths.
186
+ - `tests/unit/PostUpdateMigrator-anthropicReviewerDisclosure.test.ts` (4 tests) — SKILL.md content migration.
187
+ - `node scripts/lint-model-registry-freshness.mjs` → PASS (strict). `node cross-model-review.mjs --detect-only`
188
+ → `[codex, gemini]` (fleet-absent config, dark).
189
+
190
+ ---
191
+
192
+ ## Class-Closure Declaration (display-only mirror)
193
+
194
+ This change closes ONE instance of a class (a per-provider clean-door reviewer). The generalization —
195
+ a structured `{ provider, door, signalKind }` reviewer descriptor replacing the `crossFamily` boolean —
196
+ is tracked as a deferral (spec §8.5) for when a future reviewer breaks the binary Claude/non-Claude
197
+ taxonomy or the one-door-per-framework assumption. The paid-Gemini-key door + the direct `claude -p`
198
+ bench are tracked deferrals (spec §8.1/§8.3), registered as an evolution action at merge.