instar 1.3.1219 → 1.3.1221

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.
Files changed (72) hide show
  1. package/dist/commands/server.d.ts.map +1 -1
  2. package/dist/commands/server.js +25 -2
  3. package/dist/commands/server.js.map +1 -1
  4. package/dist/core/AspAuthorshipJoin.d.ts +1 -0
  5. package/dist/core/AspAuthorshipJoin.d.ts.map +1 -1
  6. package/dist/core/AspAuthorshipJoin.js +9 -1
  7. package/dist/core/AspAuthorshipJoin.js.map +1 -1
  8. package/dist/core/AspInboundClassifier.d.ts +22 -0
  9. package/dist/core/AspInboundClassifier.d.ts.map +1 -1
  10. package/dist/core/AspInboundClassifier.js +33 -0
  11. package/dist/core/AspInboundClassifier.js.map +1 -1
  12. package/dist/core/ForwardedTopicContext.d.ts +3 -0
  13. package/dist/core/ForwardedTopicContext.d.ts.map +1 -1
  14. package/dist/core/ForwardedTopicContext.js +2 -1
  15. package/dist/core/ForwardedTopicContext.js.map +1 -1
  16. package/dist/core/MessagingToneGate.d.ts.map +1 -1
  17. package/dist/core/MessagingToneGate.js +5 -1
  18. package/dist/core/MessagingToneGate.js.map +1 -1
  19. package/dist/core/PostUpdateMigrator.d.ts +9 -1
  20. package/dist/core/PostUpdateMigrator.d.ts.map +1 -1
  21. package/dist/core/PostUpdateMigrator.js +37 -3
  22. package/dist/core/PostUpdateMigrator.js.map +1 -1
  23. package/dist/core/SessionManager.d.ts +7 -0
  24. package/dist/core/SessionManager.d.ts.map +1 -1
  25. package/dist/core/SessionManager.js +2 -2
  26. package/dist/core/SessionManager.js.map +1 -1
  27. package/dist/core/StageBActivationGate.d.ts +31 -1
  28. package/dist/core/StageBActivationGate.d.ts.map +1 -1
  29. package/dist/core/StageBActivationGate.js +69 -10
  30. package/dist/core/StageBActivationGate.js.map +1 -1
  31. package/dist/core/aspClassifierRef.d.ts +14 -0
  32. package/dist/core/aspClassifierRef.d.ts.map +1 -0
  33. package/dist/core/aspClassifierRef.js +8 -0
  34. package/dist/core/aspClassifierRef.js.map +1 -0
  35. package/dist/data/stageBCertifiedSet.d.ts +271 -0
  36. package/dist/data/stageBCertifiedSet.d.ts.map +1 -0
  37. package/dist/data/stageBCertifiedSet.js +366 -0
  38. package/dist/data/stageBCertifiedSet.js.map +1 -0
  39. package/dist/data/standards-guard-index.json +1 -1
  40. package/dist/data/standards-guard-index.meta.json +2 -2
  41. package/dist/data/standards-registry.meta.json +1 -1
  42. package/dist/messaging/TelegramAdapter.d.ts +2 -0
  43. package/dist/messaging/TelegramAdapter.d.ts.map +1 -1
  44. package/dist/messaging/TelegramAdapter.js.map +1 -1
  45. package/dist/messaging/shared/signedInbound.d.ts +59 -0
  46. package/dist/messaging/shared/signedInbound.d.ts.map +1 -0
  47. package/dist/messaging/shared/signedInbound.js +67 -0
  48. package/dist/messaging/shared/signedInbound.js.map +1 -0
  49. package/dist/server/AgentServer.d.ts.map +1 -1
  50. package/dist/server/AgentServer.js +2 -0
  51. package/dist/server/AgentServer.js.map +1 -1
  52. package/dist/server/routes.d.ts +2 -0
  53. package/dist/server/routes.d.ts.map +1 -1
  54. package/dist/server/routes.js +21 -8
  55. package/dist/server/routes.js.map +1 -1
  56. package/dist/types/pipeline.d.ts +1 -1
  57. package/dist/types/pipeline.d.ts.map +1 -1
  58. package/dist/types/pipeline.js +13 -10
  59. package/dist/types/pipeline.js.map +1 -1
  60. package/package.json +1 -1
  61. package/scripts/stage-b-certified-fingerprint.mjs +177 -0
  62. package/scripts/verify-codex-stage-b-release-evidence.mjs +9 -0
  63. package/src/data/builtin-manifest.json +65 -65
  64. package/src/data/stageBCertifiedSet.ts +367 -0
  65. package/src/data/standards-guard-index.json +1 -1
  66. package/src/data/standards-guard-index.meta.json +2 -2
  67. package/src/data/standards-registry.meta.json +1 -1
  68. package/upgrades/1.3.1220.md +87 -0
  69. package/upgrades/1.3.1221.md +24 -0
  70. package/upgrades/side-effects/asp-signed-inbound-label.md +117 -0
  71. package/upgrades/side-effects/file-path-advisory-default.md +82 -0
  72. package/upgrades/side-effects/stage-b-evidence-code-binding.md +93 -0
@@ -0,0 +1,82 @@
1
+ # Side-Effects Review — File-path feedback advisory by default
2
+
3
+ **Version / slug:** `file-path-advisory-default`
4
+ **Date:** `2026-09-04`
5
+ **Author:** `echo`
6
+ **Second-pass reviewer:** `Codex /root/rule2_side_effects_review`
7
+
8
+ ## Summary of the change
9
+
10
+ `MessagingToneGate` changes `B2_FILE_PATH` from blocking to advisory for every install, independent of the broader fleet-dark advisory-migration flag. `PostUpdateMigrator` replaces the prior CLAUDE.md advisory section idempotently and mirrors it into Codex/Gemini shadows. The Telegram route describes evidence recording honestly when the recorder is unavailable. Focused tests cover runtime disposition and override, fresh-install awareness, migration replacement, idempotency, shadow parity, and positioning.
11
+
12
+ ## Decision-point inventory
13
+
14
+ - `MessagingToneGate.RULE_DISPOSITIONS.B2_FILE_PATH` — modified — a contextual file-path judgment no longer has terminal blocking authority.
15
+ - `PostUpdateMigrator.migrateClaudeMd` — modified — existing installed awareness text is replaced or added idempotently.
16
+ - `PostUpdateMigrator.migrateFrameworkShadowCapabilities` — modified — the replacement section is copied into Codex/Gemini shadows after CLAUDE.md migration.
17
+ - `POST /telegram/reply` advisory instructions — modified — recording claims depend on a live decision reference and recorder.
18
+
19
+ ## 1. Over-block
20
+
21
+ The change removes the known over-block: a legitimate path needed to open, edit, or locate an artifact can no longer be an absolute wall. The first advisory response still withholds the send until the agent revises or supplies a reasoned override; that bounded nudge is intentional and preserves the opportunity to improve confusing prose.
22
+
23
+ ## 2. Under-block
24
+
25
+ An agent can override a genuinely confusing raw path with a poor reason. That is accepted because file-path clarity is a contextual writing judgment, not a safety invariant. Credential exposure remains independently non-overridable, and paths do not bypass that guard.
26
+
27
+ ## 3. Level-of-abstraction fit
28
+
29
+ This is at the existing authority layer: the LLM tone gate may still detect and cite `B2_FILE_PATH`, while the disposition map controls whether that contextual judgment is a wall or a nudge. No parallel detector or new decision path is introduced.
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 removes brittle terminal authority from an existing smart-gate verdict.
36
+
37
+ The change does not create a detector. It changes the disposition of the existing contextual verdict so a path-shaped observation cannot itself become terminal authority. The author retains final authority through the existing reasoned advisory override seam. Hard credential invariants remain separate.
38
+
39
+ ## 4b. Judgment-point check
40
+
41
+ No new static heuristic is added at a competing-signals decision point. The static disposition is a floor preventing a contextual prose judgment from becoming an absolute blocker; the existing LLM authority still decides whether to issue the nudge.
42
+
43
+ ## 5. Interactions
44
+
45
+ - **Shadowing:** Credential checks still execute independently and remain non-overridable; the B2 disposition cannot shadow them. The framework-shadow copier runs after CLAUDE.md migration and now searches for the replacement marker, preventing the migrated section from disappearing on Codex/Gemini.
46
+ - **Double-fire:** The existing advisory protocol is reused, so no second sender or parallel retry path exists.
47
+ - **Races:** The runtime map is immutable and process-local; migration is content-sniffed and idempotent.
48
+ - **Feedback loops:** Where decision recording is available, compliance and dissent continue feeding the existing quality meter. Where unavailable, B2 still remains overridable, avoiding a false hard wall.
49
+
50
+ ## 6. External surfaces
51
+
52
+ Agents on fresh and upgraded installs see revised guidance in CLAUDE.md and framework shadows. Telegram and other tone-gated outbound callers receive the existing advisory protocol; the explanation now says when decision-quality evidence cannot be recorded. No new operator action, database, URL, or external-service dependency is introduced.
53
+
54
+ ## 6b. Operator-surface quality
55
+
56
+ No dashboard or operator form surface — not applicable.
57
+
58
+ ## 7. Multi-machine posture
59
+
60
+ **Replicated:** the behavior ships in source and the awareness text is applied by the normal update migration to CLAUDE.md plus existing Codex/Gemini shadows on each machine. It emits no independent notice, holds no durable per-machine state, and generates no URLs. Topic transfer cannot strand an override because the decision is per-send and the base disposition is identical on every updated machine.
61
+
62
+ ## 8. Rollback cost
63
+
64
+ A hot-fix can revert the disposition and awareness migration in a later patch. No data migration or agent-state cleanup is required; an update would rewrite the owned awareness section again. During rollback propagation, machines could temporarily differ in whether B2 is a wall, which is visible and bounded to message composition.
65
+
66
+ ## Conclusion
67
+
68
+ The change is narrower than the broad advisory-migration program and directly implements the operator's September 3 decision. It removes inappropriate blocking authority without weakening credential safety. Focused tests pass; full-suite verification must be repeated after rebasing onto current main.
69
+
70
+ ## Second-pass review
71
+
72
+ **Reviewer:** `Codex /root/rule2_side_effects_review`
73
+ **Independent read of the artifact:** `concur`. The first pass identified framework-shadow marker drift, an unproven no-recorder override path, misleading recording claims, and incomplete authority/inventory wording. The corrected diff resolves all concerns; the reviewer independently verified the relevant code and the combined 193-test focused evidence.
74
+
75
+ ## Evidence pointers
76
+
77
+ - Focused suite: 5 files, 193 tests passed on 2026-09-04 after the independent-review corrections.
78
+ - Prior stale-base full suite: 50,956 passed, two failures; both require current-main reconciliation before release.
79
+
80
+ ## Class-Closure Declaration
81
+
82
+ `defectClass: brittle-keyword-authority`, `closure: guard`, `guardEvidence: {enforcementType: ratchet, citation: tests/unit/tone-gate-advisory-migration.test.ts, howCaught: the test asserts B2_FILE_PATH is advisory even when the broader migration and decision-quality recording are unavailable, so a future return to a hard wall fails the suite}`.
@@ -0,0 +1,93 @@
1
+ # Side-Effects Review — Stage-B evidence binds to the certified code, not the version number
2
+
3
+ **Version / slug:** `stage-b-evidence-code-binding`
4
+ **Date:** `2026-09-03`
5
+ **Author:** `Echo`
6
+ **Second-pass reviewer:** `Codex independent reviewer (see below)`
7
+
8
+ ## Summary of the change
9
+
10
+ The Stage-B publish gate's evidence binding compared the signed canary artifact's `packageVersion` to the current build, which can pass exactly once; publishing froze fleet-wide one release after the gate shipped, and the runtime fleet-activation path carried the same binding, so Stage B would have stayed silently dark on every later release. The change (spec `docs/specs/stage-b-evidence-code-binding.md`, conformance-checked; operator-approved direction, topic 52075, 2026-09-03) binds evidence to the certified code instead: a reviewed manifest (`src/data/stageBCertifiedSet.ts`) partitions the certified roots' transitive relative-import closure into certified (fingerprinted) and excluded-with-written-reason, fail-closed for new members; `verifyShippedStageBEvidence` (`src/core/StageBActivationGate.ts`) verifies shape, signature, thresholds, the REAL behavioral-config binding, and the canonical-digest linkage to that manifest; `scripts/stage-b-certified-fingerprint.mjs` checks source drift at publish (`scripts/verify-codex-stage-b-release-evidence.mjs`) and pre-push (`.husky/pre-push`), and its `--write` refuses to re-stamp old evidence onto changed code.
11
+
12
+ ## Decision-point inventory
13
+
14
+ - Stage-B publish gate (`verify-codex-stage-b-release-evidence.mjs` + `verifyBundledStageBReleaseEvidence`) — modify — binding predicate corrected from version equality to certified-code fingerprint + canonical digest linkage; blocking authority and fail direction unchanged.
15
+ - Runtime fleet activation (`resolveStageBProductionActivation`, shipped branch) — modify — same corrected binding; machine-LOCAL candidate path untouched.
16
+ - Pre-push hook — add (signal-to-developer) — surfaces drift at push time; publish remains the enforcing gate.
17
+
18
+ ---
19
+
20
+ ## 1. Over-block
21
+
22
+ A certified-source edit now blocks publishing until a fresh canary — intended, and narrower than today (today EVERYTHING is blocked). A tsc or dependency change does not block (fingerprint covers source bytes, not build output). A stale exclusion (file leaves the closure) fails the check until the manifest is tidied — deliberate, keeps the partition true. If the manifest and evidence ever disagree (digest mismatch), publishing blocks with a named message — the safe direction for a release gate.
23
+
24
+ ## 2. Under-block
25
+
26
+ A behavior change inside an EXCLUDED closure member (the shared types module, safe executors, tone gate, and 30 others, each with a written reason) does not force a canary — accepted, enumerated in the manifest, and stated in the spec's honest limits. A hand-rolled npm publish that bypasses lifecycle scripts bypasses this gate exactly as it bypasses today's — unchanged exposure, out of scope. The fingerprint has no adversarial value: everything is editable in one PR, same as the verifier it amends; review of the diff remains the defense at that layer.
27
+
28
+ ## 3. Level-of-abstraction fit
29
+
30
+ The binding is a deterministic invariant at the release-gate layer, exactly where the broken one lived; no new layer, no judgment added. The closure computation and partition live in one tool used by both the publish gate and pre-push, not re-implemented per consumer.
31
+
32
+ ---
33
+
34
+ ## 4. Signal vs authority compliance
35
+
36
+ **Required reference:** [docs/signal-vs-authority.md](../../docs/signal-vs-authority.md)
37
+
38
+ - [x] Yes — but the blocking logic is an exact-match deterministic check on an irreversible-release class action (ship/don't-ship), the ruled shape for structure deciding alone. No LLM, no heuristic; the predicate is byte equality against a reviewed manifest. The pre-push arm is a SIGNAL to the developer (publish is the authority).
39
+
40
+ ---
41
+
42
+ ## 4b. Judgment-point check (Judgment Within Floors standard)
43
+
44
+ No new static heuristic at a competing-signals decision point: "did the certified bytes change?" is enumerable and exact.
45
+
46
+ ---
47
+
48
+ ## 5. Interactions
49
+
50
+ - **Shadowing:** the fingerprint check runs AFTER the evidence verification inside the publish verifier; a failure of either blocks. The pre-push arm runs before the smoke tier and only when a built gate module exists (fresh clones without dist skip it; publish still enforces).
51
+ - **Double-fire:** none; one tool, two invocation points, both idempotent reads.
52
+ - **Races:** none; all reads of committed files.
53
+ - **Feedback loops:** none.
54
+ - **Migrator/init call sites:** `verifyBundledStageBReleaseEvidence` keeps its signature (version parameter documented unused), so `PostUpdateMigrator` and `init` behave identically except the verdict is now correct on later releases — which flips `releaseEvidenceValid` from a wrong `false` to a true verdict and lets the existing migration set pending activation as designed.
55
+ - **Test override seam:** the documented `shippedEvidence` injection keeps every shape/signature/threshold/config check; the manifest digest linkage applies only to the package-bundled path (every production caller).
56
+
57
+ ---
58
+
59
+ ## 6. External surfaces
60
+
61
+ - Install base: the next release publishes; fleet machines activate Stage B via the existing migration (pending-activation on restart) instead of staying silently dark — the shipped feature finally behaves as its own release notes said.
62
+ - External systems: none. Persistent state: none new (a src/data module compiled into dist). Timing: none. Operator surface: none.
63
+
64
+ ## 6b. Operator-surface quality
65
+
66
+ No operator surface — not applicable.
67
+
68
+ ## 7. Multi-machine posture (Cross-Machine Coherence)
69
+
70
+ **Replicated by the package**: the manifest and evidence ship in the npm package, identical on every machine; verification is pure and local. No user-facing notices, no durable per-machine state, no URLs.
71
+
72
+ ## 8. Rollback cost
73
+
74
+ Revert and ship a patch — but note the revert RESTORES the release freeze (the reverted gate rejects every version except 1.3.1219), so a rollback of this change must itself be published by temporarily bypassing the gate or re-binding; recorded here so nobody reverts casually. No data migration, no agent state repair.
75
+
76
+ ## Conclusion
77
+
78
+ The review moved the design three times: the digest became canonical (order-stable) instead of JSON.stringify; the runtime fleet path was discovered to carry the same freeze and fixed identically; the coverage cut became an enumerated fail-closed partition instead of a silent five-file list, with the rebind tool structurally refusing old-evidence re-stamping. Residue accepted and recorded: excluded utilities can change certified behavior without forcing a canary (per-file reasons in the manifest); publish-path bypass exposure unchanged from today. Clear to ship after the independent second pass and the full test gate.
79
+
80
+ ## Second-pass review (if required)
81
+
82
+ **Reviewer:** Codex independent reviewer (GPT-5.6, read-only, spec + implemented diff)
83
+ **Independent read of the artifact:** concern → concur over five bounded rounds. Round 1 (spec): eight findings — the --write rebind hole, same-PR mutability, five-file under-coverage, gate-exclusion soundness, the runtime path's identical version freeze, tautological config binding, publish-path TOCTOU, JSON.stringify digest instability — all folded into the design (fail-closed enumerated partition, canonical digest, runtime fix, real config binding, honest-limits section). Round 2 (implemented diff): three findings — silent pre-push skip, single-quote-only import matcher, unpinned override seam — all fixed; widening the matcher surfaced 47 further closure members through dynamic imports, each now excluded with a written reason. Rounds 3–5 tightened the seam pin to any token mention with an exact-path exemption; final verdict: concur.
84
+
85
+ ## Evidence pointers
86
+
87
+ - `tests/unit/stage-b-evidence-code-binding.test.ts` (19 tests)
88
+ - `tests/unit/StageBActivationGate.test.ts`, `StageBStartupReadiness.test.ts`, `MentorStageBForensics.test.ts`, `codex-stage-b-publish-gate.test.ts` (all green)
89
+ - Live: `node scripts/verify-codex-stage-b-release-evidence.mjs` passes on this tree; `verifyBundledStageBReleaseEvidence("9.9.9999")` returns null.
90
+
91
+ ## Class-Closure Declaration (display-only mirror)
92
+
93
+ `defectClass: symbol-for-state-verification`ish — the registry id is resolved at commit time; if no existing class fits ("a gate verified a proxy symbol that diverged from the state it stood for"), this ships `closure: guard` citing `tests/unit/stage-b-evidence-code-binding.test.ts` (the version-independence and drift tests fail on any reintroduction of a version-bound or manifest-less path). No self-triggered controller is added or modified — the gate blocks a human-invoked publish; nothing fires on its own.