From c007116316dc81e78c7187d77865db5a93ad3d4a Mon Sep 17 00:00:00 2001 From: GRayHook Date: Thu, 18 Jun 2026 23:02:38 +0700 Subject: [PATCH] =?UTF-8?q?Phase=2015:=20B-003=20post-fix=20E2E=20notes=20?= =?UTF-8?q?=E2=80=94=20unit=20gate=20pass,=20RPC=20deferred?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Record b003-repro and npm test results; full two-compact RPC needs long session like production repro in lost-reinject.jsonl. Co-authored-by: Cursor --- docs/e2e-b003-post-fix.md | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 docs/e2e-b003-post-fix.md diff --git a/docs/e2e-b003-post-fix.md b/docs/e2e-b003-post-fix.md new file mode 100644 index 0000000..2326ad3 --- /dev/null +++ b/docs/e2e-b003-post-fix.md @@ -0,0 +1,33 @@ +# B-003 post-fix E2E notes (Phase 15) + +**Date:** 2026-06-18 +**Backlog:** B-003 — second auto compaction missed reinject; `last compaction: none` + +## Automated gate (this session) + +```bash +node scripts/b003-repro.mjs # 22 unit tests + lost-reinject.jsonl audit +npm test # 93 tests, all green +``` + +**Artifact audit:** `lost-reinject.jsonl` shows pre-fix signature — compaction #2 at `07:25:14` with `lastCompactionSource: null` after compaction #1 with `auto`. Post-fix: `ensureCompactionSourceMarked` on `session_compact` infers `auto`. + +## Fixes verified by unit tests + +| Area | Test file | +|------|-----------| +| Source fallback when `session_before_compact` skipped | `compaction-source-fallback.test.ts` | +| `skill-reinject:inject` counts in kept window | `kept-window.test.ts` | +| Mid-turn `sendMessage`/`steer` + dedup | `reinject-mid-turn.test.ts` | +| Each compact recalculates pending | `reinject-double-compact.test.ts` | + +## Full manual RPC E2E (deferred) + +Reproducing two compactions in one short RPC session (like production `gitlab-mr-review` + pi-auto-compact mid-turn) needs a long context fill or reduced `keepRecentTokens`. Checklist when LLM available: + +1. `/skill-reinject on` + `debug: true` in settings +2. `/skill:…` → session until two auto compactions (second mid-turn after tool use) +3. After each compact: skill in context **or** diag shows `deliveryBranch: "steer"` / `skipped-kept` +4. `/skill-reinject` → `last compaction: auto` (not `none`) + +**Status:** unit + artifact gate pass; full two-compact RPC not run in this session (same constraint as B-002 full compact path).