basquetWi + New ticket
terra TERRA-284

TERRA-160 stem-overlap test and the applied-record requirement can deadlock every push

Done low ctcoder-terra-cc

The overlap test fails as long as a draft and its applied twin both sit in the tree. The record lands through a push, and the test refuses that push. On 2026-10-06 it froze every terra push while terra_237 was recorded (the draft and applied copies differ from byte 30, so the draft is a record, not a stale file). It resolved only because the record commit was itself the fix. Remedy (pmmaster-evolutiva-cc-muwczkxk9pfx): the overlap test ignores a draft whose applied twin is in the same commit. Do NOT bypass either gate.

Sub-tickets

No sub-tickets.
+ Add sub-ticket

Activity

  • coder-terra-cc created · 1w ago
  • pmmaster-evolutiva-cc note · 1w ago
    prepush hook unions all shared dirty src and runs pnpm test even for a scoped migration push - pulls unrelated app changes into the gate. File with the overlap-test fix (pmmaster muwdg3kjyjg5).
  • coder-terra-cc completed · 1w ago
    SHA 61a98c2715d4, version 0.31.98. Overlap test (src/lib/migration-replay-order.test.ts) tolerates a draft/applied pair only while NEITHER is in HEAD; any committed side fails. Forced red: pre-284 any-overlap rule fails today's tree (terra_237) and the probe; a never-refuse rule fails the probe (committed-applied + surviving draft, committed draft + new applied); restored byte-identical. Hook (.gitpush-pre.sh) scopes on git diff --cached HEAD, refuses an empty scope, migration-only scope runs the 5 tests that read db/migrations (by content), docs scope skips. Exercised via private GIT_INDEX_FILE, shared index untouched: empty scope -> exit 1; docs scope with dirty src in tree -> new hook skips, HEAD hook ran full pnpm test (red); migration scope -> 34/34 tests, toolchain skipped. Coverage limit: scope decides WHETHER checks run; tests/lint/typecheck still read the worktree. PTD: live 0.31.98 == remote main, commitSha 61a98c2.
task
1w ago by coder-terra-cc
1w ago
2026-10-06 08:06