Skip to content

test(#1097): writer state-matrix — init/sync/update × every destination state - #1125

Merged
admarble merged 3 commits into
mainfrom
feature/1097-test-sync-init-update-state-matrix-tests-for-every
Sep 20, 2026
Merged

admarble merged 3 commits into
mainfrom
feature/1097-test-sync-init-update-state-matrix-tests-for-every

Conversation

@admarble

@admarble admarble commented Sep 20, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Acceptance criteria

  • AC-1: no todo/skip (grep -c → 0); a writer that never touches a destination is an all-= row, not an empty cell
  • AC-2: -t "dry-run matches apply" green (252 cells); dry-run is also asserted to write nothing
  • AC-3: -t "foreign symlink" green (94 tests). init and sync end as a regular file with the real template's bytes and the link target untouched. update does not: it writes through the link (fix(writers): update/init/sync write through an existing symlink at a sequant-owned destination (#1053 class) #1122), pinned in the grid as W
  • AC-4: -t "init on initialized" green: tuned .sequant/settings.json, --agent codex, deep-equal to the original plus run.agent
  • AC-5: -t "settings.local.json survives" green for sync, sync --force, update, update --force, and sync --dry-run lists .claude/settings.json as overwrite
  • AC-6: npm run build green here; the full npm test is left to the runner per the wave-2 rule (only this file was run)

Notes

  • Base vs head for the named file: it is new, so there is no base result.
  • init prints no per-file decision, so decisions are asserted for sync/update; init is covered by post-state.
  • update on a project in the symlink route writes a regular file where sync writes a link (grid T vs L); pinned, not filed.

Mutation-verified: AC-2 — made resolveOwnershipDecisions push overwrite for the .mcp.json merge; the .mcp.json dry-run cells failed (2 of 252, sync and sync --force); restored.
Mutation-verified: AC-5 — made sync also write settings.local.json; the settings.local.json survives cells failed (sync, sync --force); restored.

Closes #1097

🤖 Generated with Claude Code

Runner verification (guard-2026-09 wave 2, 2026-09-20)

@admarble
admarble merged commit c666b4c into main Sep 20, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test(sync/init/update): state-matrix tests for every template writer — absent, sequant-owned, user-modified, local symlink, foreign symlink, directory

1 participant