instar 1.3.287 → 1.3.289
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/core/PostUpdateMigrator.d.ts.map +1 -1
- package/dist/core/PostUpdateMigrator.js +17 -0
- package/dist/core/PostUpdateMigrator.js.map +1 -1
- package/dist/feedback-factory/cutoverReadiness.d.ts +45 -0
- package/dist/feedback-factory/cutoverReadiness.d.ts.map +1 -1
- package/dist/feedback-factory/cutoverReadiness.js +51 -0
- package/dist/feedback-factory/cutoverReadiness.js.map +1 -1
- package/dist/feedback-factory/dryrun/HttpParitySource.d.ts +14 -0
- package/dist/feedback-factory/dryrun/HttpParitySource.d.ts.map +1 -1
- package/dist/feedback-factory/dryrun/HttpParitySource.js +67 -4
- package/dist/feedback-factory/dryrun/HttpParitySource.js.map +1 -1
- package/dist/feedback-factory/migration/importRunner.d.ts +117 -0
- package/dist/feedback-factory/migration/importRunner.d.ts.map +1 -0
- package/dist/feedback-factory/migration/importRunner.js +162 -0
- package/dist/feedback-factory/migration/importRunner.js.map +1 -0
- package/dist/monitoring/QuotaExhaustionDetector.d.ts.map +1 -1
- package/dist/monitoring/QuotaExhaustionDetector.js +18 -0
- package/dist/monitoring/QuotaExhaustionDetector.js.map +1 -1
- package/dist/scaffold/templates.d.ts.map +1 -1
- package/dist/scaffold/templates.js +1 -0
- package/dist/scaffold/templates.js.map +1 -1
- package/dist/server/AgentServer.d.ts.map +1 -1
- package/dist/server/AgentServer.js +25 -0
- package/dist/server/AgentServer.js.map +1 -1
- package/dist/server/CapabilityIndex.d.ts.map +1 -1
- package/dist/server/CapabilityIndex.js +3 -1
- package/dist/server/CapabilityIndex.js.map +1 -1
- package/dist/server/middleware.d.ts.map +1 -1
- package/dist/server/middleware.js +3 -0
- package/dist/server/middleware.js.map +1 -1
- package/dist/server/routes.d.ts.map +1 -1
- package/dist/server/routes.js +35 -0
- package/dist/server/routes.js.map +1 -1
- package/package.json +1 -1
- package/src/data/builtin-manifest.json +64 -64
- package/src/scaffold/templates.ts +1 -0
- package/upgrades/1.3.288.md +26 -0
- package/upgrades/1.3.289.md +50 -0
- package/upgrades/side-effects/context-exhaustion-compaction-banner.md +37 -0
- package/upgrades/side-effects/import-runner.md +66 -0
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# Side-Effects Review - context exhaustion compaction banner exclusion
|
|
2
|
+
|
|
3
|
+
**Version / slug:** `context-exhaustion-compaction-banner`
|
|
4
|
+
**Date:** `2026-06-05`
|
|
5
|
+
**Author:** `instar-codey`
|
|
6
|
+
**Second-pass reviewer:** `not required`
|
|
7
|
+
|
|
8
|
+
## Summary
|
|
9
|
+
|
|
10
|
+
The live-session context-exhaustion detector now ignores normal compaction lifecycle banners unless the same output also contains explicit context-exhaustion failure text.
|
|
11
|
+
|
|
12
|
+
## Signal Versus Authority
|
|
13
|
+
|
|
14
|
+
This is a detector-layer fix. It changes one signal from "context exhausted" to "not context exhausted" for normal compaction/resume banners. It does not add a new notification path, recovery authority, session action, or user-facing emitter. PresenceProxy and future emission-gate work remain the authorities that decide what to do with detector outputs.
|
|
15
|
+
|
|
16
|
+
## Runtime Side Effects
|
|
17
|
+
|
|
18
|
+
- Normal compaction/resume banners no longer trigger context-exhaustion recovery as a false alarm.
|
|
19
|
+
- Real context-exhaustion errors still match when they contain explicit failure text such as conversation-too-long or the esc-twice instruction.
|
|
20
|
+
- The exclusion runs before broad context-limit matching, so lifecycle text with words like context and compaction does not trip the detector by accident.
|
|
21
|
+
|
|
22
|
+
## Non-Effects
|
|
23
|
+
|
|
24
|
+
- No change to quota exhaustion detection.
|
|
25
|
+
- No change to session death classification.
|
|
26
|
+
- No change to compaction recovery, PromptGate, rate-limit recovery, or Telegram delivery.
|
|
27
|
+
- No config, persistence, route, schema, or migration changes.
|
|
28
|
+
|
|
29
|
+
## Risk Review
|
|
30
|
+
|
|
31
|
+
Primary over-block risk: a real context-exhaustion error could be hidden if it appears next to a normal compaction banner. The implementation prevents that by checking explicit failure patterns before suppressing the match. The regression test covers a banner plus real failure text and expects high-confidence detection.
|
|
32
|
+
|
|
33
|
+
Primary under-block risk: a new normal compaction banner phrase not listed here may still false-positive. This patch covers the currently known lifecycle phrases without widening scope into a general notification gate.
|
|
34
|
+
|
|
35
|
+
## Rollback
|
|
36
|
+
|
|
37
|
+
Remove the normal-compaction lifecycle pattern list and the early return in `detectContextExhaustion`, then remove the regression tests. No state repair is needed.
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# Side-effects review — feedback import runner + dry-run rehearsal route
|
|
2
|
+
|
|
3
|
+
The cutover-readiness checker (G2.4) composes two conditions; one of them —
|
|
4
|
+
`integrity-gate-pass` — reads a persisted import IntegrityReport that NOTHING in
|
|
5
|
+
the codebase could produce: the integrity-gate core shipped as pure functions
|
|
6
|
+
(#778) with no end-to-end runner wired to live data. This builds the runner and a
|
|
7
|
+
zero-durable-writes REHEARSAL route, so the import pipeline is provable on real
|
|
8
|
+
production data today and the real import is one adapter away when the
|
|
9
|
+
creds-gated cloud DB (G1.4) lands.
|
|
10
|
+
|
|
11
|
+
## 1. The change
|
|
12
|
+
|
|
13
|
+
- `migration/importRunner.ts` (new): `runImport(source, target)` — pre-import
|
|
14
|
+
fingerprint-uniqueness scan (aborts BEFORE any write on a collision),
|
|
15
|
+
parent-before-child AS-IS import through the new `ImportTarget` seam, then the
|
|
16
|
+
full integrity gate over what the target READS BACK (intent is never trusted
|
|
17
|
+
over observation). `InMemoryImportTarget` (deep-copy isolation, duplicate-PK
|
|
18
|
+
refusal) is the dry-run/test implementation; the real Prisma adapter is a thin
|
|
19
|
+
future shim over the same seam. Status-equivalence checks CLUSTER statuses only
|
|
20
|
+
(feedback rows carry their own processing-state domain).
|
|
21
|
+
- `HttpParitySource`: opt-in `captureRaw` keeps cluster + feedback rows VERBATIM
|
|
22
|
+
for the import read (parity mode unchanged); plus a live-found classification
|
|
23
|
+
gap closed — an abort during the page BODY read now maps to the same classified
|
|
24
|
+
504 naming the page/budgets (was: raw "operation was aborted", observed live
|
|
25
|
+
2026-06-05 11:01Z).
|
|
26
|
+
- `CutoverReadiness`: `runImportDryRunPass()` persists the rehearsal envelope to
|
|
27
|
+
a SEPARATE `feedback-import-dryrun.json` path; `importDryRunStatus()` surfaces
|
|
28
|
+
it as `importDryRun` in `status()`. **Readiness honesty is structural**: the
|
|
29
|
+
constructor REFUSES wiring the dry-run path onto the canonical integrity path,
|
|
30
|
+
and `ready` composes integrity + parity only — a green rehearsal can never
|
|
31
|
+
green the gate.
|
|
32
|
+
- Routes: `POST /cutover-readiness/import-dryrun` (server computes, agent only
|
|
33
|
+
triggers — T7; same always-logged-outcome contract and same 360s per-path
|
|
34
|
+
timeout as parity-pass) + `GET /cutover-readiness/import-dryrun` (read-only).
|
|
35
|
+
- Awareness: CapabilityIndex, site reference/api.md, CLAUDE.md template + an
|
|
36
|
+
idempotent PostUpdateMigrator splice for agents already carrying the Cutover
|
|
37
|
+
Readiness section (Migration Parity Standard).
|
|
38
|
+
|
|
39
|
+
## 2. Blast radius
|
|
40
|
+
|
|
41
|
+
Additive. No existing route's behavior changes; `GET /cutover-readiness` gains
|
|
42
|
+
the informational `importDryRun` field. The rehearsal writes ONE new state file
|
|
43
|
+
(`state/feedback-import-dryrun.json`) and nothing else durable. The mandate
|
|
44
|
+
conditions (`integrity-gate-pass`, `parity-zero-divergence`) are untouched — the
|
|
45
|
+
rehearsal cannot reach either. No config migration needed (no new config keys;
|
|
46
|
+
the runner reuses `feedbackMigration.paritySource`). The real import stays
|
|
47
|
+
creds-gated and unbuilt at the adapter layer by design.
|
|
48
|
+
|
|
49
|
+
## 3. Test coverage
|
|
50
|
+
|
|
51
|
+
- Unit (18 new, import-runner.test.ts): AS-IS preservation incl. unknown fields,
|
|
52
|
+
collision abort writes NOTHING, mangling/dropping/inventing targets each caught
|
|
53
|
+
by the readback gate, dangling-FK, unknown-status divergence, full v1 legacy
|
|
54
|
+
vocabulary accepted, adapter-supplied schema honored, sequence planning,
|
|
55
|
+
duplicate-PK refusal, deep-copy isolation, snake_case ids.
|
|
56
|
+
- Unit (6 new, http-parity-source.test.ts): raw capture verbatim, cross-page
|
|
57
|
+
accumulation + dedup, raw reads refuse without captureRaw/prepare, body-read
|
|
58
|
+
abort → classified 504, non-abort body parse failure propagates.
|
|
59
|
+
- Unit (6 new, cutover-readiness.test.ts): dry-run records to the separate path
|
|
60
|
+
and `ready` stays false; failed check records nothing; no-source refusal;
|
|
61
|
+
pre-import abort surfaced; the same-path wiring REFUSED; torn envelope reads
|
|
62
|
+
never-ran.
|
|
63
|
+
- Integration (4 new): POST rehearsal over the full HTTP pipeline with a hostile
|
|
64
|
+
body contributing nothing; GET verdict; 409-records-nothing; 503 when absent.
|
|
65
|
+
- E2E (1 new): import-dryrun routes ALIVE on the production init path
|
|
66
|
+
(Bearer-gated, 409-not-404 without a source, composed status carries the leg).
|