Files
pi-auto-reinject/docs/e2e-b003-post-fix.md
grayhook c007116316 Phase 15: B-003 post-fix E2E notes — unit gate pass, RPC deferred
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 <cursoragent@cursor.com>
2026-06-18 23:02:38 +07:00

1.6 KiB

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)

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-reinjectlast 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).