ECC/tests
Vishnu Pradeep b27551897d
fix(hooks): wrap SessionStart summary with stale-replay guard (#1536)
The SessionStart hook injects the most recent *-session.tmp as
additionalContext labelled only with 'Previous session summary:'.
After a /compact boundary, the model frequently re-executes stale
slash-skill invocations it finds inside that summary, re-running
ARGUMENTS-bearing skills (e.g. /fw-task-new, /fw-raise-pr) with the
last ARGUMENTS they saw.

Observed on claude-opus-4-7 with ECC v1.9.0 on a firmware project:
after compaction resume, the model spontaneously re-enters the prior
skill with stale ARGUMENTS, duplicating GitHub issues, Notion tasks,
and branches for work that is already merged.

ECC cannot fix Claude Code's skill-state replay across compactions,
but it can stop amplifying it. Wrap the injected summary in an
explicit HISTORICAL REFERENCE ONLY preamble with a STALE-BY-DEFAULT
contract and delimit the block with BEGIN/END markers so the model
treats everything inside as frozen reference material.

Tests: update the two hooks.test.js cases that asserted on the old
'Previous session summary' literal to assert on the new guard
preamble, the STALE-BY-DEFAULT contract, and both delimiters. 219/219
tests pass locally.

Tracked at: #1534
2026-04-21 18:02:19 -04:00
..
ci fix: block unsafe privileged workflow checkouts 2026-04-12 23:23:01 -07:00
docs fix: publish npm releases and clarify install identifiers 2026-04-14 20:42:28 -07:00
hooks fix(hooks): wrap SessionStart summary with stale-replay guard (#1536) 2026-04-21 18:02:19 -04:00
integration fix: consolidate bash hooks without fork storms 2026-04-14 21:23:57 -07:00
lib fix: unblock urgent install and gateguard regressions 2026-04-14 19:23:07 -07:00
scripts test: align hook install expectations with Claude schema 2026-04-15 19:33:34 -07:00
__init__.py Small changes 2026-04-12 12:34:45 +05:30
codex-config.test.js fix(codex): broaden context7 config checks 2026-03-29 00:26:16 -04:00
conftest.py Small changes 2026-04-12 12:34:45 +05:30
opencode-config.test.js fix: namespace opencode command agents 2026-04-05 14:21:57 -07:00
plugin-manifest.test.js fix: harden urgent install and gateguard patch 2026-04-14 19:44:08 -07:00
run-all.js fix: narrow unicode cleanup scope 2026-03-29 21:21:18 -04:00
test_builder.py fix: resolve git conflicts in LLM abstraction layer 2026-04-12 07:10:54 +00:00
test_executor.py Small changes 2026-04-12 12:34:45 +05:30
test_resolver.py Small changes 2026-04-12 12:34:45 +05:30
test_types.py Small changes 2026-04-12 12:34:45 +05:30