tests: split checkpoint-save-resume into context-save + context-restore E2Es

Renames the combined E2E test to match the new skill split:
- checkpoint-save-resume → context-save-writes-file
  Extracts the Save flow from context-save/SKILL.md, asserts a file
  gets written with valid YAML frontmatter.
- New: context-restore-loads-latest
  Seeds two saved-context files with different YYYYMMDD-HHMMSS
  prefixes AND scrambled filesystem mtimes (so mtime DISAGREES with
  filename order). Hand-feeds the restore flow and asserts the newer-
  by-filename file is loaded. Locks in the "newest by filename prefix,
  not mtime" guarantee.

touchfiles.ts: old 'checkpoint-save-resume' key removed from both
E2E_TOUCHFILES and E2E_TIERS maps; new keys added to both. Leaving a
key in one map but not the other silently breaks test selection.

Golden baselines (claude/codex/factory ship skill) regenerated to match
the new preamble routing rules from the previous commit.
This commit is contained in:
Garry Tan
2026-04-18 16:42:52 +08:00
parent b9ebc1f3f2
commit daaec21c2c
5 changed files with 143 additions and 41 deletions
+9 -7
View File
@@ -107,10 +107,11 @@ export const E2E_TOUCHFILES: Record<string, string[]> = {
// Learnings
'learnings-show': ['learn/**', 'bin/gstack-learnings-search', 'bin/gstack-learnings-log', 'scripts/resolvers/learnings.ts'],
// Session Intelligence (timeline, context recovery, checkpoint)
'timeline-event-flow': ['bin/gstack-timeline-log', 'bin/gstack-timeline-read'],
'context-recovery-artifacts': ['scripts/resolvers/preamble.ts', 'bin/gstack-timeline-log', 'bin/gstack-slug', 'learn/**'],
'checkpoint-save-resume': ['checkpoint/**', 'bin/gstack-slug'],
// Session Intelligence (timeline, context recovery, /context-save + /context-restore)
'timeline-event-flow': ['bin/gstack-timeline-log', 'bin/gstack-timeline-read'],
'context-recovery-artifacts': ['scripts/resolvers/preamble.ts', 'bin/gstack-timeline-log', 'bin/gstack-slug', 'learn/**'],
'context-save-writes-file': ['context-save/**', 'bin/gstack-slug'],
'context-restore-loads-latest': ['context-restore/**', 'bin/gstack-slug'],
// Document-release
'document-release': ['document-release/**'],
@@ -247,9 +248,10 @@ export const E2E_TIERS: Record<string, 'gate' | 'periodic'> = {
'codex-offered-eng-review': 'gate',
// Session Intelligence — gate for data flow, periodic for agent integration
'timeline-event-flow': 'gate', // Binary data flow (no LLM needed)
'context-recovery-artifacts': 'gate', // Preamble reads seeded artifacts
'checkpoint-save-resume': 'gate', // Checkpoint round-trip
'timeline-event-flow': 'gate', // Binary data flow (no LLM needed)
'context-recovery-artifacts': 'gate', // Preamble reads seeded artifacts
'context-save-writes-file': 'gate', // /context-save writes a file
'context-restore-loads-latest': 'gate', // Cross-branch newest-by-filename restore
// Ship — gate (end-to-end ship path)
'ship-base-branch': 'gate',