Summary
No test covers the scenario: (1) approve plan in session A, (2) simulate SessionStart token rotation, (3) call restore_approval.sh, (4) verify it finds the plan. This is the exact failure mode identified in SEP-012.
Motivation
test_hooks.sh has extensive scenario coverage but doesn't test cross-session state persistence for standalone scripts. The token rotation bug (SEP-012) would have been caught if this test existed.
Proposed Change
Add test cases to test_hooks.sh (or a new test file) covering:
- Approve plan in session A
- Simulate SessionStart token rotation (write new token to MEMORY.md)
- Call
restore_approval.sh and verify it finds the plan from session A
- Call
accept_outcome.sh and verify it can complete the workflow
Acceptance Criteria
- Test exists that covers cross-session state persistence
- Test fails if SEP-012 bug is present (regression test)
- Test passes after SEP-012 fix is applied
Related
Summary
No test covers the scenario: (1) approve plan in session A, (2) simulate SessionStart token rotation, (3) call
restore_approval.sh, (4) verify it finds the plan. This is the exact failure mode identified in SEP-012.Motivation
test_hooks.shhas extensive scenario coverage but doesn't test cross-session state persistence for standalone scripts. The token rotation bug (SEP-012) would have been caught if this test existed.Proposed Change
Add test cases to
test_hooks.sh(or a new test file) covering:restore_approval.shand verify it finds the plan from session Aaccept_outcome.shand verify it can complete the workflowAcceptance Criteria
Related