instar 1.3.280 → 1.3.282
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/cli.js +19 -0
- package/dist/cli.js.map +1 -1
- package/dist/commands/devClaimCheck.d.ts +75 -0
- package/dist/commands/devClaimCheck.d.ts.map +1 -0
- package/dist/commands/devClaimCheck.js +181 -0
- package/dist/commands/devClaimCheck.js.map +1 -0
- package/dist/core/Config.d.ts.map +1 -1
- package/dist/core/Config.js +71 -3
- package/dist/core/Config.js.map +1 -1
- package/dist/core/GlobalSecretStore.d.ts +6 -1
- package/dist/core/GlobalSecretStore.d.ts.map +1 -1
- package/dist/core/GlobalSecretStore.js +26 -10
- package/dist/core/GlobalSecretStore.js.map +1 -1
- package/dist/core/SecretManager.d.ts +4 -0
- package/dist/core/SecretManager.d.ts.map +1 -1
- package/dist/core/SecretManager.js +23 -7
- package/dist/core/SecretManager.js.map +1 -1
- package/dist/core/SecretMigrator.d.ts.map +1 -1
- package/dist/core/SecretMigrator.js +6 -1
- package/dist/core/SecretMigrator.js.map +1 -1
- package/dist/scaffold/templates.d.ts.map +1 -1
- package/dist/scaffold/templates.js +2 -0
- package/dist/scaffold/templates.js.map +1 -1
- package/package.json +1 -1
- package/src/data/builtin-manifest.json +34 -34
- package/src/scaffold/templates.ts +2 -0
- package/upgrades/1.3.281.md +20 -0
- package/upgrades/1.3.282.md +18 -0
- package/upgrades/dev-claim-check.eli16.md +3 -0
- package/upgrades/keychain-per-agent-master-key.eli16.md +3 -0
- package/upgrades/side-effects/dev-claim-check.md +45 -0
- package/upgrades/side-effects/keychain-per-agent-master-key.md +50 -0
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# Side-Effects Review — Secrets boot guard + orphan-proof stores
|
|
2
|
+
|
|
3
|
+
**Version / slug:** `keychain-per-agent-master-key`
|
|
4
|
+
**Date:** `2026-06-05`
|
|
5
|
+
**Author:** `echo`
|
|
6
|
+
**Second-pass reviewer:** `codex gpt-5.5 adversarial spec review (SHIP-WITH-CHANGES, all 8 required changes applied); re-scoped after PR #810 landed the SecretStore layer in parallel — surviving sections were part of the converged design`
|
|
7
|
+
|
|
8
|
+
## Summary of the change
|
|
9
|
+
|
|
10
|
+
Closes the remaining layers of the 2026-06-05 keychain master-key poisoning incident (Echo boot crash-loop, ~25 min Telegram mute) that PR #810 (vault-key-coherence) did not cover: `loadConfig` reports merge failures via DegradationReporter and fails the boot fast when `{secret:true}` placeholders survive in boot-critical fields; `GlobalSecretStore.initWithKeychain` refuses to generate over existing ciphertext; `SecretManager` local-store catches report instead of silently returning null/{}; `migrateSecrets` drops the `forceFileKey` write/read asymmetry.
|
|
11
|
+
|
|
12
|
+
## Decision-point inventory
|
|
13
|
+
|
|
14
|
+
- `Config.loadConfig` — modified — merge catch reports via DegradationReporter; `assertNoCriticalSecretPlaceholders` fails boot on surviving placeholders in ENABLED adapters' required secret fields (telegram token/chatId, slack botToken/appToken) or authToken when binding non-loopback.
|
|
15
|
+
- `GlobalSecretStore.initWithKeychain` — modified — generation guard over existing ciphertext (report + stay locked, never orphan); injectable exec for hermetic tests.
|
|
16
|
+
- `SecretManager.get/set/getAllFromLocal` — modified — failures reported via `reportLocalStoreFailure`, behavior (degrade) unchanged.
|
|
17
|
+
- `SecretMigrator.migrateSecrets` — modified — drops `forceFileKey: true` (writes resolve through the same key resolution as reads).
|
|
18
|
+
|
|
19
|
+
## 1. Over-block
|
|
20
|
+
|
|
21
|
+
The boot guard could block a boot that previously "worked" in a degraded state (placeholders present but the adapter happened to be broken anyway). That is intentional: the previous behavior was a 2-minute zombie boot ending in `tokenHash(Object)`. Scope is narrowed to enabled adapters' required fields + conditional authToken; disabled adapters and unknown fields never block (codex review changes #5/#6). Verified by integration tests on both sides of each boundary.
|
|
22
|
+
|
|
23
|
+
## 2. Over-permit
|
|
24
|
+
|
|
25
|
+
None added. The generation guard strictly REMOVES a permissive path (fresh key over existing ciphertext). The boot guard never relaxes any existing check.
|
|
26
|
+
|
|
27
|
+
## 3. Interplay with the parallel fixes (#810, #802, #789)
|
|
28
|
+
|
|
29
|
+
- **#810 (vault-key-coherence)** owns SecretStore: per-agent accounts (`master-key:<stateDir>`), keyId header, dual-key fallback, convergence-on-write. Its named wrong-key error flows verbatim into this PR's actionable boot failure — the two compose: #810 makes most key divergence self-heal; when nothing decrypts, this PR makes the failure fast and precise instead of a placeholder leak.
|
|
30
|
+
- **#802** guards the CONSUMER side (TelegramAdapter string-shape checks). This PR guards the PRODUCER side (config load). #802's PR body names this spec as the owner of the config layer.
|
|
31
|
+
- **#789/#810's VITEST guard** keeps test runs file-key-only; this PR's tests never touch the real keychain (GlobalSecretStore tests use the injectable exec / password-mode seeding; the real-keychain generation test is darwin-scoped `skipIf`).
|
|
32
|
+
|
|
33
|
+
## 4. Failure modes
|
|
34
|
+
|
|
35
|
+
- No key decrypts a store → #810 throws its named error → merge catch reports → boot guard throws the actionable message naming fields (never silent placeholders).
|
|
36
|
+
- Secrets genuinely absent (fresh agent, no migration) → no placeholders in config → guard never fires → zero change.
|
|
37
|
+
- GlobalSecretStore keychain entry vanishes with data present → store stays LOCKED with a report instead of silently orphaning data behind a fresh key.
|
|
38
|
+
- Loopback-only agent with an authToken placeholder → degrade-with-report (boot proceeds) — matches the existing non-loopback-only criticality condition.
|
|
39
|
+
|
|
40
|
+
## 5. Migration parity
|
|
41
|
+
|
|
42
|
+
No installed-file/config-shape changes — `PostUpdateMigrator` untouched by design. The boot guard activates purely from existing on-disk state.
|
|
43
|
+
|
|
44
|
+
## 6. Token/cost impact
|
|
45
|
+
|
|
46
|
+
None. No LLM calls; one config-tree scan at boot (microseconds).
|
|
47
|
+
|
|
48
|
+
## 7. Rollback
|
|
49
|
+
|
|
50
|
+
Revert the commit. All four changes are behavior-narrowing or report-only; no data format changes, nothing re-encrypted. Old behavior (silent catch, generate-on-miss) returns exactly as before.
|