Cadence v1.3.1: tech-debt cycle (phases 1-4) #58

Merged
crenshawdev merged 63 commits from cadence/v1.3.1 into main 2026-07-27 17:03:13 +00:00
crenshawdev commented 2026-07-27 15:59:16 +00:00 (Migrated from github.com)

Tech-debt cycle for v1.3.1: four phases closing the issues filed in the post-v1.2.0 review sweep. 49 commits, 38 files, +4023/-232.

Draft deliberately. /cad-milestone's audit gate has not run, so nothing has yet checked requirement traceability for this cycle. Opened now to exercise the Node 22/24 CI matrix, which is the one phase-4 acceptance criterion that cannot be verified locally.

Phases

  • 1 - silent data-file failures
  • 2 - seam input validation
  • 3 - planning-files parser robustness
  • 4 - renumber & git-guard hardening (#37, #49, #50)

Phase 4 in detail

renumber leaves a decimal cursor alone (warning instead of desyncing it), refuses a destination it cannot legitimately take, and names the ops that completed when an apply dies partway. One unreadable .md no longer collapses a self-verify or weigh run. git-guard reads a backslash-continued git push as the push it is.

Five of the commits are review-driven fixes, and they are the reason this is worth reading closely rather than skimming:

  • Two silent-push regressions the phase itself introduced. Measured against a c4ab89f checkout, git add -A \\ + newline + git push origin main and a real push beside a " inside a single-quoted word both prompted before the phase and went silent after it. Backslash parity plus a single-pass alternating quote strip closed both.
  • A data-loss hint. The new partial-apply report told the caller to "re-run"; doing so returned ok:true having deleted a phase directory's uncommitted work.
  • git rm -r -q exits 0 while leaving untracked files, so the collision pre-flight's assumption that the rm frees phases/<at> was false - a real repo with one untracked file produced ok:true with the next phase nested inside the removed one. Now refused before any write, widened to cover modified tracked files too (git itself refuses those, and the rmSync fallback was overriding it).

Verification

  • 336/336 tests (314 at the branch point, 22 net-new)
  • node cadence-core/bin/self-verify.mjs - problems: []
  • npx tsc -p tsconfig.ci.json - clean
  • Every new test confirmed failing-capable against a real prior source state, checked by reverting individual hunks rather than taking the executors' word. The one test that passes both sides is labelled a regression guard in its own title.

Known gaps, recorded not hidden

  • weight.mjs under-reports an entire subtree when one descendant is unreadable (self-verify still goes red, so CI does not pass silently)
  • Six pre-existing git-guard rail-3 holes (git -C "my repo" push, & as separator, $(git push), subshells, escaped quotes, bash -c) - all silent before and after this cycle, and deliberately out of scope per D-16. They want one quote-state tokenizer, not more regex arms.

Closes

All thirteen bugs the post-v1.2.0 sweep filed, triaged and accepted for v1.3.1. No won't-fix.

Closes #37
Closes #39
Closes #40
Closes #41
Closes #42
Closes #43
Closes #44
Closes #45
Closes #46
Closes #47
Closes #48
Closes #49
Closes #50

Tech-debt cycle for v1.3.1: four phases closing the issues filed in the post-v1.2.0 review sweep. 49 commits, 38 files, +4023/-232. **Draft deliberately.** `/cad-milestone`'s audit gate has not run, so nothing has yet checked requirement traceability for this cycle. Opened now to exercise the Node 22/24 CI matrix, which is the one phase-4 acceptance criterion that cannot be verified locally. ## Phases - **1** - silent data-file failures - **2** - seam input validation - **3** - planning-files parser robustness - **4** - renumber & git-guard hardening (#37, #49, #50) ## Phase 4 in detail `renumber` leaves a decimal cursor alone (warning instead of desyncing it), refuses a destination it cannot legitimately take, and names the ops that completed when an apply dies partway. One unreadable `.md` no longer collapses a self-verify or weigh run. `git-guard` reads a backslash-continued `git push` as the push it is. Five of the commits are review-driven fixes, and they are the reason this is worth reading closely rather than skimming: - **Two silent-push regressions the phase itself introduced.** Measured against a `c4ab89f` checkout, `git add -A \\` + newline + `git push origin main` and a real push beside a `"` inside a single-quoted word both **prompted before the phase and went silent after it**. Backslash parity plus a single-pass alternating quote strip closed both. - **A data-loss hint.** The new partial-apply report told the caller to "re-run"; doing so returned `ok:true` having deleted a phase directory's uncommitted work. - **`git rm -r -q` exits 0 while leaving untracked files**, so the collision pre-flight's assumption that the rm frees `phases/<at>` was false - a real repo with one untracked file produced `ok:true` with the next phase nested inside the removed one. Now refused before any write, widened to cover modified tracked files too (git itself refuses those, and the `rmSync` fallback was overriding it). ## Verification - 336/336 tests (314 at the branch point, 22 net-new) - `node cadence-core/bin/self-verify.mjs` - `problems: []` - `npx tsc -p tsconfig.ci.json` - clean - Every new test confirmed failing-capable against a real prior source state, checked by reverting individual hunks rather than taking the executors' word. The one test that passes both sides is labelled a regression guard in its own title. ## Known gaps, recorded not hidden - `weight.mjs` under-reports an entire subtree when one descendant is unreadable (self-verify still goes red, so CI does not pass silently) - Six pre-existing `git-guard` rail-3 holes (`git -C "my repo" push`, `&` as separator, `$(git push)`, subshells, escaped quotes, `bash -c`) - all silent before and after this cycle, and deliberately out of scope per D-16. They want one quote-state tokenizer, not more regex arms. ## Closes All thirteen bugs the post-v1.2.0 sweep filed, triaged and accepted for v1.3.1. No won't-fix. Closes #37 Closes #39 Closes #40 Closes #41 Closes #42 Closes #43 Closes #44 Closes #45 Closes #46 Closes #47 Closes #48 Closes #49 Closes #50
Sign in to join this conversation.
No description provided.