diff --git a/changelog.d/no-base-review-diff-gates.fixed.md b/changelog.d/no-base-review-diff-gates.fixed.md new file mode 100644 index 00000000..ab8a74f8 --- /dev/null +++ b/changelog.d/no-base-review-diff-gates.fixed.md @@ -0,0 +1,12 @@ +- On the first push of a project to a new empty remote (no `origin/main`), the seeded review gate, `check-comments.sh` and `check-contract.sh` judge the whole pushed content against the empty tree instead of exiting on a missing base or judging nothing. `record-review.sh --prepare` writes the full diff with `base=empty-tree`; `check-comments.sh` judges every tracked source file; `check-contract.sh` skips only the changed-generator rule, which has nothing to compare. A base that may exist but is not here (upstream still set, other remote-tracking refs, shallow clone, CI) still fails, `BASE_REF` is refused on a first push, and `TC_REVIEW_BASE=empty-tree` is reserved. +- On a first push a file is left out of whole-content judging (the review diff and `check-comments.sh`) only when its path and sha256 equal a row of the generated seeded file table that `gate-ratchet.sh --seeded-table ` prints; the table lives in the hash-pinned ratchet script and `scripts/seeded-facts.sh --write` regenerates it. A clean FastAPI scaffold no longer fails its first push on the seeded `.mjs` helpers, and the first-push review diff of a template-only scaffold no longer carries every seeded file. An edited seeded file, a file with the project name filled in, a file not in the table, or a missing or unreadable table are judged or fail closed (exit 2). The gates print how many files were left out and how many judged. +- Behaviour change: `check-contract.sh` with no argument and no `GATE_BASE`, when `origin/main` is missing or has no merge base with HEAD and this is not a first push, exits 2 with the supported ways to name the base (the argument or `GATE_BASE`); before, the local run skipped the changed-generator rule. An explicit argument or `GATE_BASE` that does not resolve still skips locally. +- The review, comments, contract, mutation-diff, workarounds and ratchet gates resolve the default base through `refs/remotes/origin/...`, so a local branch or tag named `origin/main` is never taken for the remote base. Still not caught: a remote-tracking ref written by hand that points at an earlier commit of the same history (an intermediate commit, or an `origin/HEAD` symref that points at such a ref) cannot be told from a fetched one, so it narrows the diff to the commits after it. A hand-written ref at HEAD itself is caught: the comments gate judges the whole content outside CI, and the workarounds gate does so in CI and outside it, when the base, given by argument, by `BASE_REF` or found by default, stands at the pushed commit. +- The no-base failure messages name the supported ways to set the base (`TC_REVIEW_BASE`, the base argument, `GATE_BASE`). +- `check-change-size.sh`, `gate-ratchet.sh`, `gate-baseline.sh growth` and `check-comments.sh` now also read `origin/main` and `origin/master` as `refs/remotes/...` when they are given as an argument or default, so a tag or local branch of that name cannot stand in for the remote base and empty the measured change. +- `check-workarounds.sh` no longer takes a local branch `main` or `master` as its base: it resolves only `@{upstream}`, `refs/remotes/origin/HEAD`, `origin/main` and `origin/master` as remote-tracking refs, maps an explicit `origin/main` argument to `refs/remotes/...`, and judges the whole content when no base resolves. `check-comments.sh` drops the same local fallback. `check-shared-gates.sh`, `.claude/ci-gates.sh` and the three seeded CI files qualify the base as `refs/remotes/...`, so a tag or local branch cannot stand in for it. `check-review-record.sh --seeded-paths` reads the stack from the committed `.claude/harness.json` at HEAD, the same source the first-push judging uses. +- The seeded file table stores each path with a vertical bar for the slash and `fp_files` turns it back, so the guard scan, which reads path mentions in gate scripts, no longer takes a seeded stack rules file for a gate file that the manifest does not record. +- One closed allow-list of bases in `check-workarounds.sh`, `check-comments.sh`, `check-review-record.sh` and `.claude/ci-gates.sh`: a base counts only when it resolves as a fully qualified `refs/remotes/origin/` ref. Every `origin/` input, not only `origin/main` and `origin/master`, is mapped to that ref, so a tag named `origin/develop` cannot stand in for the base of a pull request that targets `develop`. A local branch, a tag, `HEAD`, a `refs/heads/...` name or a bare sha given as an argument is refused (exit 1 or 2), and `ci-gates.sh` passes the full `refs/remotes/...` ref to the gates. +- `check-comments.sh` no longer trusts `BASE_REF` outside CI: it must name an `origin/` remote-tracking ref, or the run is refused. `BASE_REF=HEAD` no longer gives an empty diff. A remote-tracking candidate that stands at HEAD is skipped as `check-workarounds.sh` does, and when every candidate stands at HEAD the whole content is judged. An explicit base (argument or `BASE_REF`) that stands at HEAD takes the same whole-content path outside CI. +- `check-workarounds.sh` takes `@{upstream}` only when it resolves to a `refs/remotes/origin/...` ref, so an upstream set to a local branch (`branch..remote` is `.`) is ignored and the whole content is judged. +- `check-workarounds.sh` takes a bare sha base only from its own `--pre-push` route, which marks the child call with its process id; a sha passed by hand, with or without a tip, is refused. An explicit `origin/` base that stands at the pushed commit judges the whole content instead of an empty diff. diff --git a/scripts/day-one.test.sh b/scripts/day-one.test.sh index 39327e63..7ab6c0c7 100755 --- a/scripts/day-one.test.sh +++ b/scripts/day-one.test.sh @@ -137,13 +137,15 @@ for ST in nestjs nextjs vite-react fastapi; do git -C "$P" add -A git -C "$P" -c user.name=t -c user.email=t@example.invalid -c commit.gpgsign=false commit -q -m "chore: scaffold" || bad "$ST/$HOST base commit failed" git -C "$P" checkout -q -b work + git -C "$P" update-ref refs/remotes/origin/main main + git -C "$P" update-ref refs/remotes/origin/root "$ROOT" gate harness bash .claude/verify-harness.sh gate docs bash scripts/check-docs.sh gate testbudget bash scripts/test-budget.sh gate nosonar bash .claude/ci-gates.sh nosonar - gate workarounds bash scripts/check-workarounds.sh main - gate workarounds-whole-scaffold bash scripts/check-workarounds.sh "$ROOT" + gate workarounds bash scripts/check-workarounds.sh origin/main + gate workarounds-whole-scaffold bash scripts/check-workarounds.sh origin/root gate ratchet bash scripts/gate-ratchet.sh auto gate ratchet-whole-scaffold bash scripts/gate-ratchet.sh "$ROOT" gate envexample bash scripts/check-env-example.sh diff --git a/scripts/seeded-boundaries.test.sh b/scripts/seeded-boundaries.test.sh index e69cc352..02f42b3d 100644 --- a/scripts/seeded-boundaries.test.sh +++ b/scripts/seeded-boundaries.test.sh @@ -696,7 +696,8 @@ workaround_probe() { # workaround_probe : an inline printf '%s\n' "$content" > "$dir/$file" git -C "$dir" add -A "${GIT[@]}" -C "$dir" commit -q -m probe - out=$(cd "$dir" && bash scripts/check-workarounds.sh main 2>&1) + git -C "$dir" update-ref refs/remotes/origin/main main + out=$(cd "$dir" && bash scripts/check-workarounds.sh origin/main 2>&1) rc=$? check 1 "$rc" "workaround detector flags: $name" has "$file:1" "$out" "workaround detector names the line: $name" diff --git a/scripts/seeded-change-size.test.sh b/scripts/seeded-change-size.test.sh index 02597d01..9fbdf280 100755 --- a/scripts/seeded-change-size.test.sh +++ b/scripts/seeded-change-size.test.sh @@ -860,5 +860,16 @@ check 1 "$EC" "real nextjs scaffold with a bulk edit fails" echo "real run bulk edit:" printf '%s\n' "$OUT" +# A tag named origin/main must not stand in for the remote-tracking branch: the budget is still measured against refs/remotes/origin/main. +repo tagbase +lines 900 "$D/big.txt" +commit_all +(cd "$D" && git update-ref refs/remotes/origin/main main && git tag origin/main HEAD) +run "$D" +check 1 "$EC" "a tag named origin/main is not the base: the 900 changed lines still fail ($OUT)" +has "900 changed lines (budget 800)" "$OUT" "a tag named origin/main: the count is measured" +run "$D" BASE_REF=origin/main +check 1 "$EC" "a tag named origin/main as BASE_REF: the 900 changed lines still fail ($OUT)" + echo "seeded-change-size.test: $PASS passed, $FAIL failed" [ "$FAIL" -eq 0 ] diff --git a/scripts/seeded-comments.test.sh b/scripts/seeded-comments.test.sh index 5d97770a..e2083ece 100644 --- a/scripts/seeded-comments.test.sh +++ b/scripts/seeded-comments.test.sh @@ -476,17 +476,118 @@ repo() { printf 'node_modules\n' > "$1/.gitignore" mkdir -p "$1/scripts" cp "$SHARED/template/scripts/check-comments."* "$1/scripts/" + cp "$SHARED/template/scripts/check-review-record.sh" "$SHARED/template/scripts/gate-ratchet.sh" "$1/scripts/" + mkdir -p "$1/.claude" + printf '{\n "stack": "%s"\n}\n' "${2:-nextjs}" > "$1/.claude/harness.json" } commit_all() { (cd "$1" && "${GIT[@]}" add -A && "${GIT[@]}" commit -q -m "$2"); } # gate_diff [args...] — runs the seeded copy with no CI markers; sets OUT and EC. gate_diff() { local d=$1 shift + # A local branch or HEAD is never a base: the old "main" and "HEAD" arguments become a remote-tracking origin/main set at that revision. + case "${1:-}" in + main | HEAD) + (cd "$d" && "${GIT[@]}" update-ref refs/remotes/origin/main "$1") || return 1 + set -- origin/main "${@:2}" + ;; + esac OUT=$(cd "$d" && "${CLEAN_ENV[@]}" bash scripts/check-comments.sh "$@" 2>&1) EC=$? } # diff scope: old violations are not flagged, new and changed lines are +# First push: no remote base, so the whole tracked content is judged, never nothing; a base that may exist but is not here still exits 2. +fpush() { # fpush [env assignments...] — runs with the CI markers cleared + local fd=$1 + shift + OUT=$(cd "$fd" && env -u CI -u GITHUB_ACTIONS -u TF_BUILD -u BASE_REF "$@" bash scripts/check-comments.sh 2>&1) + EC=$? +} +d=$T/fp-bad +repo "$d" +mkdir -p "$d/src" +(cd "$d" && "${GIT[@]}" init -q . && "${GIT[@]}" checkout -q -b main) +cp "$FIX/ts/trailing.bad.ts" "$d/src/a.ts" +commit_all "$d" first +fpush "$d" +check 1 "$EC" "first push: content that breaks the rules is refused ($OUT)" +has "first push, no base branch" "$OUT" "first push: the report names the route" +d=$T/fp-ok +repo "$d" +mkdir -p "$d/src" +(cd "$d" && "${GIT[@]}" init -q . && "${GIT[@]}" checkout -q -b main) +printf 'export const a = 1;\n' > "$d/src/a.ts" +commit_all "$d" first +fpush "$d" +check 0 "$EC" "first push: clean content passes (control) ($OUT)" +has "ok (" "$OUT" "first push: the clean file was judged" +# Seeded files on a first push: a Python-only project (no typescript package) holds the seeded .mjs helpers and passes; an edited seeded file, a file under another path and a planted violation are judged. +pyonly() { # pyonly : a fastapi-stack first-push project with no typescript package + repo "$1" fastapi + rm -f "$1/node_modules/typescript" + mkdir -p "$1/src" + (cd "$1" && "${GIT[@]}" init -q . && "${GIT[@]}" checkout -q -b main) + printf 'APP = 1\n' > "$1/src/app.py" +} +d=$T/fp-pyonly +pyonly "$d" +commit_all "$d" first +fpush "$d" +check 0 "$EC" "first push: a Python-only project with the seeded .mjs helpers passes ($OUT)" +has "equal their seeded copy and are left out" "$OUT" "first push: the left-out count is printed" +has "source files are judged" "$OUT" "first push: the judged count is printed" +lacks "typescript package is missing" "$OUT" "first push: the seeded helpers need no typescript" +d=$T/fp-pyedit +pyonly "$d" +printf ' ' >> "$d/scripts/check-comments.mjs" +commit_all "$d" first +fpush "$d" +check 2 "$EC" "first push: a seeded helper edited by one byte is judged ($OUT)" +has "typescript package is missing" "$OUT" "first push: the edited helper needed typescript" +d=$T/fp-pycopy +pyonly "$d" +cp "$d/scripts/check-comments.mjs" "$d/src/copy.mjs" +commit_all "$d" first +fpush "$d" +check 2 "$EC" "first push: the bytes of a seeded file under another path are judged ($OUT)" +d=$T/fp-pybad +pyonly "$d" +printf 'def f():\n return 1 # trailing note\n' > "$d/src/bad.py" +commit_all "$d" first +fpush "$d" +check 1 "$EC" "first push: a planted violation in a file that is not seeded fails ($OUT)" +d=$T/fp-notable +pyonly "$d" +printf 'exit 3\n' > "$d/scripts/gate-ratchet.sh" +commit_all "$d" first +fpush "$d" +check 2 "$EC" "first push: an unreadable seeded file table fails closed ($OUT)" +has "seeded file table" "$OUT" "first push: the unreadable table is named" +d=$T/fp-localbranch +pyonly "$d" +commit_all "$d" first +(cd "$d" && "${GIT[@]}" update-ref refs/heads/origin/main HEAD) +fpush "$d" +check 0 "$EC" "a local branch named origin/main is not taken for the base ($OUT)" +has "first push, no base branch" "$OUT" "a local branch named origin/main still reads as a first push" +# A deleted remote-tracking ref after a first push is no first push: an upstream is still configured, so the gate exits 2 instead of judging nothing. +d=$T/fp-deleted +repo "$d" +mkdir -p "$d/src" "$T/fp-origin.git" +git -c init.defaultBranch=main init -q --bare "$T/fp-origin.git" +(cd "$d" && "${GIT[@]}" init -q . && "${GIT[@]}" checkout -q -b main) +cp "$FIX/ts/trailing.bad.ts" "$d/src/a.ts" +commit_all "$d" first +(cd "$d" && "${GIT[@]}" remote add origin "$T/fp-origin.git" && "${GIT[@]}" push -q -u origin main 2> /dev/null) +(cd "$d" && "${GIT[@]}" update-ref -d refs/remotes/origin/main) +fpush "$d" +check 2 "$EC" "a ref deleted after a first push exits 2, it is not a first push ($OUT)" +# BASE_REF at HEAD cannot empty the diff of a first push: the environment base is refused there. +d=$T/fp-bad +fpush "$d" BASE_REF=main +check 2 "$EC" "first push: BASE_REF at HEAD is refused ($OUT)" +has "refused on a first push" "$OUT" "first push: the refusal says why" for lang in ts py; do d=$T/diff-$lang repo "$d" @@ -494,7 +595,7 @@ for lang in ts py; do cp "$FIX/diff/base.$lang" "$d/src/mod.$lang" (cd "$d" && "${GIT[@]}" init -q . && "${GIT[@]}" checkout -q -b main) commit_all "$d" base - (cd "$d" && "${GIT[@]}" checkout -q -b topic) + (cd "$d" && "${GIT[@]}" checkout -q -b topic && "${GIT[@]}" commit -q --allow-empty -m topic-start) gate_diff "$d" main check 0 "$EC" "diff[$lang]: untouched old violations pass ($OUT)" cp "$FIX/diff/new.$lang" "$d/src/mod.$lang" @@ -506,10 +607,11 @@ for lang in ts py; do commit_all "$d" topic gate_diff "$d" main check 1 "$EC" "diff[$lang]: committed new violations still fail against the base" - gate_diff "$d" HEAD - check 0 "$EC" "diff[$lang]: nothing changed against HEAD passes ($OUT)" + (cd "$d" && "${GIT[@]}" commit -q --allow-empty -m next && "${GIT[@]}" update-ref refs/remotes/origin/main HEAD~1) + gate_diff "$d" origin/main + check 0 "$EC" "diff[$lang]: nothing changed against the base passes ($OUT)" cp "$FIX/$lang/trailing.bad.$lang" "$d/src/untracked.$lang" - gate_diff "$d" HEAD + gate_diff "$d" origin/main check 1 "$EC" "diff[$lang]: an untracked file is judged whole" has "untracked.$lang:1: comments/trailing" "$OUT" "diff[$lang]: untracked finding named" done @@ -524,7 +626,7 @@ for attr in '*.py -diff' '*.ts -diff' '* -diff' '* binary' '* linguist-generated cp "$FIX/diff/base.$lang" "$d/src/mod.$lang" (cd "$d" && "${GIT[@]}" init -q . && "${GIT[@]}" checkout -q -b main) commit_all "$d" base - (cd "$d" && "${GIT[@]}" checkout -q -b topic) + (cd "$d" && "${GIT[@]}" checkout -q -b topic && "${GIT[@]}" commit -q --allow-empty -m topic-start) printf '%s\n' "$attr" > "$d/.gitattributes" cp "$FIX/diff/new.$lang" "$d/src/mod.$lang" gate_diff "$d" main @@ -653,10 +755,11 @@ check 2 "$EC" "ci: Azure override that is not the target is refused" ci CI=true GITHUB_BASE_REF=main -- check 1 "$EC" "ci: no override uses the pipeline target branch" has "pipeline target branch (main)" "$OUT" "ci: report states the target decision" -ci CI=true GITHUB_ACTIONS=true BASE_REF=topic -- main +ci CI=true GITHUB_ACTIONS=true BASE_REF=topic -- origin/main check 1 "$EC" "ci: an explicit argument in the pipeline step is accepted" has "command-line argument" "$OUT" "ci: report states the argument decision" -ci CI=false BASE_REF=main -- +(cd "$d" && "${GIT[@]}" commit -q --allow-empty -m ci-false-next && "${GIT[@]}" update-ref refs/remotes/origin/main HEAD~1) +ci CI=false BASE_REF=origin/main -- check 1 "$EC" "ci: CI=false is not CI, so a BASE_REF override works" has "BASE_REF from the environment (not CI)" "$OUT" "ci: report states the non-CI decision" ci CI=true GITHUB_ACTIONS=true GITHUB_BASE_REF=gone -- @@ -681,10 +784,10 @@ has "judges pull requests" "$OUT" "ci push: says the gate judges pull requests" has "nothing checked" "$OUT" "ci push: final line says nothing was checked" lacks "check-comments: ok" "$OUT" "ci push: no green ok line" run_push A=1 -check 0 "$EC" "non-ci, HEAD is the base: exits 0" -has "nothing checked: HEAD is the base" "$OUT" "non-ci, HEAD is the base: says nothing was checked and why" -lacks "check-comments: ok" "$OUT" "non-ci, HEAD is the base: no green ok line" -lacks "nothing to compare" "$OUT" "non-ci, HEAD is the base: no push message" +# Remote-tracking base at HEAD: it cannot be told from a ref written by hand, so the whole content is judged (this clone has no harness.json, so the seeded table cannot be read and the run fails closed). +check 2 "$EC" "non-ci, the only base stands at HEAD: judged whole, fails closed without a harness.json ($OUT)" +has "seeded file table cannot be read" "$OUT" "non-ci, the only base stands at HEAD: says why" +lacks "nothing checked: HEAD is the base" "$OUT" "non-ci, the only base stands at HEAD: never reports nothing checked" ci CI=true GITHUB_ACTIONS=true GITHUB_BASE_REF=main -- lacks "nothing to compare" "$OUT" "ci pull request with changes: no push message" check 1 "$EC" "ci pull request with changes: still judged" @@ -785,12 +888,13 @@ commit_all "$d" base printf '// caf\xc3\xa9 \xe2\x80\x94 d\xc3\xa9j\xc3\xa0 vu\nexport const b = 2;\nexport const c = "\xff\xfe latin-1";\n' > "$d/src/a.ts" printf '\x89PNG\r\n\x1a\n\0\0\0' > "$d/logo.png" commit_all "$d" "multibyte and invalid utf-8" +(cd "$d" && "${GIT[@]}" update-ref refs/remotes/origin/main main) for loc in C en_US.UTF-8; do - LOUT=$(cd "$d" && "${CLEAN_ENV[@]}" LC_ALL=$loc bash scripts/check-comments.sh main 2>&1) + LOUT=$(cd "$d" && "${CLEAN_ENV[@]}" LC_ALL=$loc bash scripts/check-comments.sh origin/main 2>&1) LEC=$? check 0 "$LEC" "$loc locale, check-comments: no awk multibyte failure ($LOUT)" lacks "towc" "$LOUT" "$loc locale, check-comments: no towc error" - LOUT=$(cd "$d" && "${CLEAN_ENV[@]}" LC_ALL=$loc bash scripts/check-workarounds.sh main 2>&1) + LOUT=$(cd "$d" && "${CLEAN_ENV[@]}" LC_ALL=$loc bash scripts/check-workarounds.sh origin/main 2>&1) LEC=$? check 0 "$LEC" "$loc locale, check-workarounds: no awk multibyte failure ($LOUT)" has "no suppression markers added" "$LOUT" "$loc locale, check-workarounds: reads the diff to the end" @@ -810,8 +914,9 @@ LONG=$(python3 -c 'print("export const t = \"" + "\u65e5" * 40 + "\" as any;")') printf '// \xc3\xa9t\xc3\xa9 @ts-ignore\nexport const j = "\xe6\x97\xa5\xe6\x9c\xac" as any;\n%s\n' "$LONG" > "$d/src/b.ts" printf '# \xc3\xa9t\xc3\xa9 noqa\nb = "\xe6\x97\xa5\xe6\x9c\xac" # type: ignore\n' > "$d/src/b.py" commit_all "$d" "markers beside multibyte text" +(cd "$d" && "${GIT[@]}" update-ref refs/remotes/origin/main main) for loc in C en_US.UTF-8; do - LOUT=$(cd "$d" && "${CLEAN_ENV[@]}" LC_ALL=$loc bash scripts/check-workarounds.sh main 2>&1) + LOUT=$(cd "$d" && "${CLEAN_ENV[@]}" LC_ALL=$loc bash scripts/check-workarounds.sh origin/main 2>&1) LEC=$? check 1 "$LEC" "$loc locale: markers beside multibyte text are found ($LOUT)" has "src/b.ts:1:" "$LOUT" "$loc locale: the @ts-ignore after multibyte text is reported" @@ -1052,7 +1157,10 @@ OUT=$("${CLEAN_ENV[@]}" bash "$GATE" --root "$T/shallow" origin/main 2>&1) check 2 "$?" "shallow clone: no merge base exits 2 ($OUT)" has "no merge base" "$OUT" "shallow clone: message names the cause" has "fetch-depth: 0" "$OUT" "shallow clone: message names the fix" -OUT=$("${CLEAN_ENV[@]}" bash "$GATE" --root "$d" main 2>&1) +(cd "$d" && "${GIT[@]}" update-ref refs/remotes/origin/main main~1) +mkdir -p "$d/node_modules" +ln -s "$TSPKG" "$d/node_modules/typescript" +OUT=$("${CLEAN_ENV[@]}" bash "$GATE" --root "$d" origin/main 2>&1) check 0 "$?" "full history control: the same refs run ($OUT)" # a non-CI BASE_REF other than main is honoured @@ -1065,14 +1173,16 @@ commit_all "$d" base (cd "$d" && "${GIT[@]}" checkout -q -b develop) printf 'export const dev = 1; // bad\n' > "$d/src/dev.ts" commit_all "$d" develop +(cd "$d" && "${GIT[@]}" update-ref refs/remotes/origin/develop develop) (cd "$d" && "${GIT[@]}" checkout -q -b topic) printf 'export const top = 1; // bad\n' > "$d/src/top.ts" commit_all "$d" topic -OUT=$(cd "$d" && "${CLEAN_ENV[@]}" env BASE_REF=develop bash scripts/check-comments.sh 2>&1) +OUT=$(cd "$d" && "${CLEAN_ENV[@]}" env BASE_REF=origin/develop bash scripts/check-comments.sh 2>&1) check 1 "$?" "BASE_REF=develop: judged" has "src/top.ts:1" "$OUT" "BASE_REF=develop: the topic change is judged" lacks "src/dev.ts" "$OUT" "BASE_REF=develop: the develop change is not" has "BASE_REF from the environment (not CI)" "$OUT" "BASE_REF=develop: report states the decision" +(cd "$d" && "${GIT[@]}" update-ref refs/remotes/origin/main main) gate_diff "$d" has "src/dev.ts:1" "$OUT" "default base (main): the develop change is judged too" @@ -1232,5 +1342,226 @@ else check present missing "characterisation: driver and stored corpus exist in $CHAR" fi +# A tag named origin/main must not stand in for the remote-tracking branch: with a real base present the change after it is still judged. +d=$T/tagbase +repo "$d" fastapi +(cd "$d" && "${GIT[@]}" init -q . && "${GIT[@]}" checkout -q -b main) +printf 'A = 1\n' > "$d/a.py" +commit_all "$d" base +(cd "$d" && "${GIT[@]}" update-ref refs/remotes/origin/main HEAD && "${GIT[@]}" checkout -q -b topic) +printf 'B = 1 # bad\n' > "$d/b.py" +commit_all "$d" topic +(cd "$d" && "${GIT[@]}" tag origin/main HEAD) +gate_diff "$d" +check 1 "$EC" "a tag named origin/main is not the base: the topic change is judged ($OUT)" +has "b.py:1" "$OUT" "a tag named origin/main: the violation is reported" +gate_diff "$d" origin/main +check 1 "$EC" "a tag named origin/main as the base argument: the topic change is judged ($OUT)" +# A local branch named main or master is never a base: with only a non-default remote-tracking ref present, the gate refuses to guess (exit 2) and never passes against a forged local main. +d=$T/localbase +repo "$d" fastapi +(cd "$d" && "${GIT[@]}" init -q . && "${GIT[@]}" checkout -q -b main) +printf 'Z = 1\n' > "$d/z.py" +commit_all "$d" root +printf 'B = 1 # bad\n' > "$d/b.py" +commit_all "$d" bad +printf 'A = 1\n' > "$d/a.py" +commit_all "$d" clean +(cd "$d" && "${GIT[@]}" update-ref refs/remotes/origin/develop HEAD && "${GIT[@]}" branch -q -f master HEAD~1 && "${GIT[@]}" checkout -q -b topic) +printf 'C = 1\n' > "$d/c.py" +commit_all "$d" topic +(cd "$d" && "${GIT[@]}" remote add origin "$d" && "${GIT[@]}" branch -q -f main HEAD && "${GIT[@]}" branch -q --set-upstream-to=origin/develop topic) +gate_diff "$d" +check 2 "$EC" "a forged local main and master with only an origin/develop upstream is not a base: exit 2 ($OUT)" +has "no default branch" "$OUT" "a forged local main: the gate says no default branch was found" +lacks "nothing to check" "$OUT" "a forged local main: no pass message" +(cd "$d" && "${GIT[@]}" update-ref refs/remotes/origin/main "$("${GIT[@]}" rev-list --max-parents=0 HEAD)") +gate_diff "$d" +check 1 "$EC" "control: a real remote-tracking origin/main is the base and the old violation is judged ($OUT)" +# A symlink at a seeded path is not a regular file, so it is judged, never left out. +d=$T/fp-pylink +pyonly "$d" +mv "$d/scripts/check-comments.mjs" "$d/src/real.mjs" +ln -s ../src/real.mjs "$d/scripts/check-comments.mjs" +commit_all "$d" first +fpush "$d" +check 2 "$EC" "first push: a symlink at a seeded path is judged ($OUT)" +has "is a symlink" "$OUT" "first push: the symlinked helper is refused, not left out" + +# Real scaffolds of the four stacks, committed with no origin: the review, comments and contract gates pass a first push against the real seeded table. +real_scaffold() { # real_scaffold + local rs_stack=$1 rs_dir=$2 rs_part rs_f + mkdir -p "$rs_dir" + for rs_part in stack base agents settings; do TC_STACK=$rs_stack TC_PART=$rs_part bash "$SHARED/tc-copy.sh" "$rs_dir" > /dev/null 2>&1; done + TC_STACK=$rs_stack TC_PART=ci TC_CI=github bash "$SHARED/tc-copy.sh" "$rs_dir" > /dev/null 2>&1 + for rs_part in late manifest tail; do TC_STACK=$rs_stack TC_PART=$rs_part bash "$SHARED/tc-copy.sh" "$rs_dir" > /dev/null 2>&1; done + for rs_f in docs/CONSTITUTION.md docs/harness.md; do + if [[ -f "$rs_dir/$rs_f" ]]; then + grep -v '\[Fill in' "$rs_dir/$rs_f" | sed 's/__TC_PROJECT_TITLE__/Probe/g' > "$rs_dir/$rs_f.new" + mv "$rs_dir/$rs_f.new" "$rs_dir/$rs_f" + fi + done + TC_STACK=$rs_stack TC_PART=finish bash "$SHARED/tc-copy.sh" "$rs_dir" > /dev/null 2>&1 + (cd "$rs_dir" && "${GIT[@]}" init -q -b main . && "${GIT[@]}" add -A && "${GIT[@]}" commit -q -m scaffold) +} +for stack in nextjs nestjs vite-react fastapi; do + d=$T/real-$stack + echo "progress: real $stack scaffold" + real_scaffold "$stack" "$d" + OUT=$(cd "$d" && env -u CI -u GITHUB_ACTIONS -u TF_BUILD -u BASE_REF bash scripts/check-comments.sh 2>&1) + check 0 "$?" "real $stack scaffold, first push: the comments gate passes ($OUT)" + has "first push: " "$OUT" "real $stack scaffold: the comments gate names the first-push route" + OUT=$(cd "$d" && env -u CI -u GITHUB_ACTIONS -u TF_BUILD -u TC_REVIEW_BASE bash scripts/record-review.sh --prepare 2>&1) + check 0 "$?" "real $stack scaffold, first push: the review gate prepares the diff ($OUT)" + has "base empty-tree" "$OUT" "real $stack scaffold: the review base is the empty tree" + judged=$(printf '%s\n' "$OUT" | sed -n 's/.*left out; \([0-9][0-9]*\) are judged.*/\1/p' | head -n 1) + [[ -n "$judged" && "$judged" -le 8 ]] && got=few || got="$judged" + check few "$got" "real $stack scaffold: only the circular and filled-in files are judged" + OUT=$(cd "$d" && env -u CI -u GITHUB_ACTIONS -u TF_BUILD -u GATE_BASE bash scripts/check-contract.sh 2>&1) + ec=$? + [[ "$ec" -le 1 ]] && got=ran || got="exit $ec" + check ran "$got" "real $stack scaffold, first push: the contract gate reaches its own judgement ($OUT)" + has "first push, no base branch" "$OUT" "real $stack scaffold: the contract gate names the first-push route" +done + +# --seeded-paths reads the stack from the committed .claude/harness.json, the source the review gate uses, so an edited or deleted working copy cannot change it. +d=$T/real-nextjs +echo "progress: seeded-paths stack source" +n_head=$(cd "$d" && bash scripts/check-review-record.sh --seeded-paths 2> /dev/null | wc -l | tr -d ' ') +[[ "$n_head" -gt 100 ]] && got=many || got="$n_head" +check many "$got" "seeded-paths on a clean scaffold lists the seeded files ($n_head)" +printf '{\n "stack": "fastapi"\n}\n' > "$d/.claude/harness.json" +n_edit=$(cd "$d" && bash scripts/check-review-record.sh --seeded-paths 2> /dev/null | wc -l | tr -d ' ') +check "$n_head" "$n_edit" "seeded-paths with the working harness.json edited to another stack still uses the committed stack" +rm -f "$d/.claude/harness.json" +n_gone=$(cd "$d" && bash scripts/check-review-record.sh --seeded-paths 2> /dev/null | wc -l | tr -d ' ') +check "$n_head" "$n_gone" "seeded-paths with the working harness.json deleted still uses the committed stack" +(cd "$d" && "${GIT[@]}" checkout -q -- .claude/harness.json) + +# ---- round 4: one closed allow-list of bases. A base counts only as a fully qualified refs/remotes/origin/ ref: a local branch, a tag, HEAD or a ref under refs/heads is never one. +echo "progress: round 4 bases (env, argument, non-main target, forged ref at HEAD)" +r4repo() { # r4repo : origin/main stands at the base commit, topic adds one file + d=$T/$1 + rm -rf "$d" + repo "$d" + mkdir -p "$d/src" + printf 'export const a = 1;\n' > "$d/src/a.ts" + (cd "$d" && "${GIT[@]}" init -q . && "${GIT[@]}" checkout -q -b main) + commit_all "$d" base + (cd "$d" && "${GIT[@]}" update-ref refs/remotes/origin/main main && "${GIT[@]}" checkout -q -b topic) + if [[ "$2" == violation ]]; then printf 'export const b = 2; // bad\n' > "$d/src/b.ts"; else printf 'export const b = 2;\n' > "$d/src/b.ts"; fi + commit_all "$d" topic +} +r4run() { # r4run -- + local envs=() + while [[ "$1" != "--" ]]; do + envs+=("$1") + shift + done + shift + OUT=$(cd "$d" && env -u CI -u GITHUB_ACTIONS -u TF_BUILD -u BASE_REF -u GITHUB_BASE_REF -u SYSTEM_PULLREQUEST_TARGETBRANCH -u SYSTEM_PULLREQUEST_TARGETBRANCHNAME ${envs[@]+"${envs[@]}"} bash scripts/check-comments.sh "$@" 2>&1) + EC=$? +} +# item 1: BASE_REF from the environment outside CI +r4repo r4-env-bad violation +r4run BASE_REF=origin/main -- +check 1 "$EC" "r4 BASE_REF control: a real remote-tracking base judges the diff ($OUT)" +r4run BASE_REF=HEAD -- +check 2 "$EC" "r4 BASE_REF=HEAD is refused, not an empty diff ($OUT)" +has "BASE_REF=HEAD is refused" "$OUT" "r4 BASE_REF=HEAD: message names the cause" +r4run BASE_REF=main -- +check 2 "$EC" "r4 BASE_REF=main (a local branch) is refused ($OUT)" +(cd "$d" && "${GIT[@]}" tag origin/main HEAD) +r4run BASE_REF=origin/main -- +check 1 "$EC" "r4 BASE_REF=origin/main with a tag of that name at HEAD still judges the real base ($OUT)" +r4repo r4-env-ok clean +r4run BASE_REF=origin/main -- +check 0 "$EC" "r4 BASE_REF clean control: a clean change passes ($OUT)" +# item 2: an argument base +r4repo r4-arg-bad violation +r4run -- origin/main +check 1 "$EC" "r4 argument control: origin/main judges the diff ($OUT)" +(cd "$d" && "${GIT[@]}" branch origin/main HEAD) +r4run -- refs/heads/origin/main +check 2 "$EC" "r4 argument refs/heads/origin/main is refused ($OUT)" +r4run -- main +check 2 "$EC" "r4 argument main (a local branch) is refused ($OUT)" +r4run -- HEAD +check 2 "$EC" "r4 argument HEAD is refused ($OUT)" +r4run -- "$(cd "$d" && git rev-parse main)" +check 2 "$EC" "r4 argument bare sha is refused ($OUT)" +r4run -- origin/main +check 1 "$EC" "r4 argument origin/main with a local branch of that name still judges the real base ($OUT)" +r4repo r4-arg-ok clean +r4run -- origin/main +check 0 "$EC" "r4 argument clean control: a clean change passes ($OUT)" +# item 3: a non-main target with a tag of the same name at HEAD +r4repo r4-dev-bad violation +(cd "$d" && "${GIT[@]}" update-ref refs/remotes/origin/develop main && "${GIT[@]}" tag origin/develop HEAD) +r4run CI=true GITHUB_ACTIONS=true GITHUB_BASE_REF=develop -- +check 1 "$EC" "r4 CI target develop: the tag origin/develop at HEAD does not empty the diff ($OUT)" +r4run CI=true GITHUB_ACTIONS=true GITHUB_BASE_REF=develop -- origin/develop +check 1 "$EC" "r4 CI argument origin/develop: the tag at HEAD does not empty the diff ($OUT)" +r4run CI=true GITHUB_ACTIONS=true GITHUB_BASE_REF=develop BASE_REF=develop -- +check 1 "$EC" "r4 CI BASE_REF equal to the target develop judges the real base ($OUT)" +r4repo r4-dev-ok clean +(cd "$d" && "${GIT[@]}" update-ref refs/remotes/origin/develop main && "${GIT[@]}" tag origin/develop HEAD) +r4run CI=true GITHUB_ACTIONS=true GITHUB_BASE_REF=develop -- +check 0 "$EC" "r4 CI target develop clean control: a clean change passes ($OUT)" +# item 6: a remote-tracking ref written by hand at HEAD +d=$T/r4-forged +repo "$d" +mkdir -p "$d/src" +(cd "$d" && "${GIT[@]}" init -q . && "${GIT[@]}" checkout -q -b main) +cp "$FIX/ts/trailing.bad.ts" "$d/src/a.ts" +commit_all "$d" first +(cd "$d" && "${GIT[@]}" update-ref refs/remotes/origin/main HEAD) +r4run -- +check 1 "$EC" "r4 a ref written at HEAD does not empty the diff: the whole content is judged ($OUT)" +has "judged as new" "$OUT" "r4 a ref written at HEAD: the report says the whole content is judged" +d=$T/r4-forged-ok +repo "$d" +mkdir -p "$d/src" +(cd "$d" && "${GIT[@]}" init -q . && "${GIT[@]}" checkout -q -b main) +printf 'export const a = 1;\n' > "$d/src/a.ts" +commit_all "$d" first +(cd "$d" && "${GIT[@]}" update-ref refs/remotes/origin/main HEAD) +r4run -- +check 0 "$EC" "r4 a ref written at HEAD, clean content: passes (control) ($OUT)" + +# ---- round 5: an explicit base at HEAD, outside CI, is judged as the whole content (fail closed). +echo "progress: round 5 explicit base at HEAD" +r5head() { # r5head : one commit on main, origin/main written at HEAD + d=$T/$1 + repo "$d" + mkdir -p "$d/src" + (cd "$d" && "${GIT[@]}" init -q . && "${GIT[@]}" checkout -q -b main) + if [ "$2" = bad ]; then cp "$FIX/ts/trailing.bad.ts" "$d/src/a.ts"; else printf 'export const a = 1;\n' > "$d/src/a.ts"; fi + commit_all "$d" first + (cd "$d" && "${GIT[@]}" update-ref refs/remotes/origin/main HEAD) +} +r5head r5-env-bad bad +r4run BASE_REF=origin/main -- +check 1 "$EC" "r5 BASE_REF=origin/main at HEAD: the whole content is judged, not an empty diff ($OUT)" +has "stands at HEAD" "$OUT" "r5 BASE_REF at HEAD: the report names the cause" +r5head r5-env-ok ok +r4run BASE_REF=origin/main -- +check 0 "$EC" "r5 BASE_REF at HEAD, clean content: passes (control) ($OUT)" +r5head r5-arg-bad bad +r4run -- origin/main +check 1 "$EC" "r5 argument origin/main at HEAD: the whole content is judged, not an empty diff ($OUT)" +has "stands at HEAD" "$OUT" "r5 argument at HEAD: the report names the cause" +r5head r5-arg-ok ok +r4run -- origin/main +check 0 "$EC" "r5 argument at HEAD, clean content: passes (control) ($OUT)" +has "check-comments: whole content: " "$OUT" "r5 argument at HEAD: the report line says whole content" +lacks "first push:" "$OUT" "r5 argument at HEAD: the report line does not call it a first push" +r5head r5-arg-real bad +(cd "$d" && "${GIT[@]}" update-ref -d refs/remotes/origin/main && printf 'export const b = 1;\n' > src/b.ts) +commit_all "$d" second +(cd "$d" && "${GIT[@]}" update-ref refs/remotes/origin/main HEAD~1) +r4run -- origin/main +check 0 "$EC" "r5 control: an argument at a real older base judges only the new commit ($OUT)" + echo "seeded-comments.test: $PASS passed, $FAIL failed" [[ "$FAIL" -eq 0 ]] diff --git a/scripts/seeded-contract.test.sh b/scripts/seeded-contract.test.sh index d1e9a58d..1f3c31b5 100755 --- a/scripts/seeded-contract.test.sh +++ b/scripts/seeded-contract.test.sh @@ -298,9 +298,41 @@ check 0 "$?" "an unresolved base passes the comparison locally ($OUT)" has "changed-generator rule is skipped locally" "$OUT" "an unresolved base is reported locally" OUT=$(cd "$D" && env CI=true STUB_OUT="$FIX/openapi.json" bash "$GATE" no-such-ref 2>&1) check 2 "$?" "an unresolved base fails in CI" +# First push: no base named and no remote base at all. The contract match still judges the whole content; a base that may exist but is not here exits 2. +new_app fpush fastapi +OUT=$(cd "$D" && env -u CI -u GITHUB_ACTIONS -u TF_BUILD -u GATE_BASE STUB_OUT="$FIX/openapi.json" bash "$GATE" 2>&1) +check 0 "$?" "first push: a matching contract passes (control) ($OUT)" +has "first push, no base branch" "$OUT" "first push: the route is named" +OUT=$(cd "$D" && env -u CI -u GITHUB_ACTIONS -u TF_BUILD -u GATE_BASE STUB_OUT="$FIX/openapi.changed.json" bash "$GATE" 2>&1) +check 1 "$?" "first push: a contract that no longer matches the code is refused ($OUT)" +(cd "$D" && git config branch.work.remote origin && git config branch.work.merge refs/heads/work) +OUT=$(cd "$D" && env -u CI -u GITHUB_ACTIONS -u TF_BUILD -u GATE_BASE STUB_OUT="$FIX/openapi.json" bash "$GATE" 2>&1) +check 2 "$?" "a deleted remote-tracking ref (upstream still configured) is not a first push ($OUT)" +(cd "$D" && git config --unset branch.work.remote && git config --unset branch.work.merge && git update-ref refs/remotes/upstream/dev HEAD) +OUT=$(cd "$D" && env -u CI -u GITHUB_ACTIONS -u TF_BUILD -u GATE_BASE STUB_OUT="$FIX/openapi.json" bash "$GATE" 2>&1) +check 2 "$?" "a remote-tracking ref that is not the base is not a first push ($OUT)" +has "GATE_BASE" "$OUT" "the no-base failure names the supported way to set the base" +new_app fplocal fastapi +(cd "$D" && git update-ref refs/heads/origin/main HEAD) +OUT=$(cd "$D" && env -u CI -u GITHUB_ACTIONS -u TF_BUILD -u GATE_BASE STUB_OUT="$FIX/openapi.json" bash "$GATE" 2>&1) +check 0 "$?" "a local branch named origin/main is not taken for the base ($OUT)" +has "first push, no base branch" "$OUT" "a local branch named origin/main still reads as a first push" OUT=$(cd "$D" && env -u CI -u GITHUB_ACTIONS -u TF_BUILD GATE_BASE=main STUB_OUT="$FIX/openapi.json" bash "$GATE" 2>&1) check 0 "$?" "GATE_BASE names the base ($OUT)" hasnt "skipped locally" "$OUT" "GATE_BASE resolves" +# A tag named origin/main must not stand in for the remote-tracking branch: the entry point and the contract changed after the base, and the pair rule still fires. +new_app tagbase fastapi +printf '# changed\n' >> "$A/scripts/export-openapi.py" +printf '\n' >> "$A/openapi.json" +git -C "$D" add -A +git -C "$D" commit -q -m change +git -C "$D" update-ref refs/remotes/origin/main main +git -C "$D" tag origin/main HEAD +OUT=$(cd "$D" && env -u CI -u GITHUB_ACTIONS -u TF_BUILD -u GATE_BASE STUB_OUT="$FIX/openapi.json" bash "$GATE" 2>&1) +check 1 "$?" "a tag named origin/main is not the base: the pair rule still fires ($OUT)" +has "both changed in this diff" "$OUT" "a tag named origin/main: the pair failure is reported" +OUT=$(cd "$D" && env -u CI -u GITHUB_ACTIONS -u TF_BUILD -u GATE_BASE STUB_OUT="$FIX/openapi.json" bash "$GATE" origin/main 2>&1) +check 1 "$?" "a tag named origin/main as the base argument: the pair rule still fires ($OUT)" # --- hidden errors: unwritable TMPDIR mkdir "$T/ro" diff --git a/scripts/seeded-facts.sh b/scripts/seeded-facts.sh index a65844a5..471f40a5 100644 --- a/scripts/seeded-facts.sh +++ b/scripts/seeded-facts.sh @@ -11,6 +11,12 @@ # each stack yields, read with the same facts.awk it embeds, and judges the project's config against them with the same # compare.awk the merge-base path uses. The table comes from this repo's templates, never from the project, so a harness # refresh cannot launder a weakened config into it. +# +# The same block holds fp_files : the sha256 and path of every file a template-only scaffold of the stack writes, read by +# gate-ratchet.sh --seeded-table. On a first push the review, comments and contract gates leave a file out of whole-content judging +# only when its path and bytes both equal a row here. The rows are made by running the real scaffold (tc-copy.sh) into a scratch +# folder, so no second list of template folders exists. gate-ratchet.sh, .claude/harness.json and its mirror copy are left out of the table: they +# embed the table or its hash, so a row for them could never converge; the ratchet pins all three itself. set -uo pipefail REPO=$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd) R=$REPO/skills/scaffold @@ -38,6 +44,33 @@ hashes_of() { printf '%s\t%s\n' "$h" "$p" done } +# files_of : "hashpath" lines, sorted by path, for every regular file a template-only scaffold of the stack writes (the steps the scaffold skill runs, in order), hashed byte for byte. +EXCLUDE_ROWS='scripts/gate-ratchet.sh|.claude/harness.json|.claude/.harness-base/scripts/gate-ratchet.sh' +files_of() { + local st=$1 p part f + p=$(mktemp -d "$T/scaffold-$st.XXXXXX") || return 1 + for part in stack base agents settings; do + TC_STACK=$st TC_PART=$part bash "$R/shared/tc-copy.sh" "$p" > /dev/null 2>&1 || return 1 + done + TC_STACK=$st TC_PART=ci TC_CI=github bash "$R/shared/tc-copy.sh" "$p" > /dev/null 2>&1 || return 1 + for part in late manifest tail; do + TC_STACK=$st TC_PART=$part bash "$R/shared/tc-copy.sh" "$p" > /dev/null 2>&1 || return 1 + done + # finish refuses a placeholder: fill-in lines go and the title is set, as a project author does. + for f in docs/CONSTITUTION.md FUTURE.md docs/harness.md; do + if [ -f "$p/$f" ]; then + grep -v '\[Fill in' "$p/$f" | sed 's/__TC_PROJECT_TITLE__/Probe/g' > "$p/$f.new" || true + mv "$p/$f.new" "$p/$f" || return 1 + fi + done + TC_STACK=$st TC_PART=finish bash "$R/shared/tc-copy.sh" "$p" > /dev/null 2>&1 || return 1 + ( + cd "$p" || exit 1 + find . -type f | sed 's|^\./||' | LC_ALL=C sort > "$T/$st.paths" || exit 1 + grep -Ev "^($EXCLUDE_ROWS)$" "$T/$st.paths" > "$T/$st.keep" || exit 1 + tr '\n' '\0' < "$T/$st.keep" | xargs -0 shasum -a 256 -- | awk 'BEGIN { OFS = "\t" } { h = $1; sub(/^[^ ]+ /, ""); print h, $0 }' + ) +} kind_of_file() { case "$1" in .jscpd.json) echo jscpd ;; @@ -63,6 +96,16 @@ facts_of() { done done } +for st in fastapi nestjs nextjs vite-react; do + ( files_of "$st" > "$T/$st.files" 2> "$T/$st.files.err"; echo $? > "$T/$st.files.rc" ) & +done +wait +for st in fastapi nestjs nextjs vite-react; do + [ "$(cat "$T/$st.files.rc" 2> /dev/null)" = 0 ] || { echo "seeded-facts: scaffolding the $st template failed" >&2; exit 2; } + [ -s "$T/$st.files" ] || { echo "seeded-facts: the $st scaffold yields no files" >&2; exit 2; } + if cut -f2- "$T/$st.files" | grep -q '|'; then echo "seeded-facts: a file path holds a vertical bar, which the table uses for the slash" >&2; exit 2; fi + if grep -q '^SEEDED_FILES$' "$T/$st.files"; then echo "seeded-facts: a file row equals the here-document delimiter" >&2; exit 2; fi +done { printf '# BEGIN seeded-facts (generated by scripts/seeded-facts.sh --write; do not edit by hand)\n' printf 'fp_seeded() {\n case "%s1" in\n' '$' @@ -84,6 +127,15 @@ facts_of() { cat "$T/$st.hashes" printf 'SEEDED_HASHES\n ;;\n' done + printf ' esac\n}\n' + printf '# fp_files : the sha256 and path of every file a template-only scaffold of the stack writes (generated: scripts/seeded-facts.sh). A first push leaves a file out of whole-content judging only on an exact path and exact bytes row here; the table sits in this pinned script, so an edit to it is a gate-script change.\n' + printf '# The paths are stored with | for each slash, so that no script mentions a path under scripts/ or .claude/ and the guard scan does not take a seeded rules file for a gate file; fp_files turns the bars back.\n' + printf 'fp_files() {\n fp_files_stored "%s1" | tr '"'|' '/'"'\n}\nfp_files_stored() {\n case "%s1" in\n' '$' '$' + for st in fastapi nestjs nextjs vite-react; do + printf ' %s)\n cat <<'"'"'SEEDED_FILES'"'"'\n' "$st" + tr '/' '|' < "$T/$st.files" + printf 'SEEDED_FILES\n ;;\n' + done printf ' esac\n}\n# END seeded-facts\n' } > "$T/block" [ -s "$T/block" ] || exit 2 diff --git a/scripts/seeded-gates.test.sh b/scripts/seeded-gates.test.sh index 18f757d1..93a07295 100755 --- a/scripts/seeded-gates.test.sh +++ b/scripts/seeded-gates.test.sh @@ -39,9 +39,10 @@ newrepo() { g checkout -q -b work } -# runwa : run the workaround detector against main, output in $OUT, status in $RC. +# runwa : run the workaround detector against origin/main (a remote-tracking ref set at local main), output in $OUT, status in $RC. runwa() { - OUT=$(cd "$R" && clean bash scripts/check-workarounds.sh main 2>&1) + g update-ref refs/remotes/origin/main main + OUT=$(cd "$R" && clean bash scripts/check-workarounds.sh origin/main 2>&1) RC=$? } @@ -263,7 +264,7 @@ check 0 "$RC" "editing a test file that keeps its test calls passes" # ---- fails closed when the base cannot be found newrepo nobase -OUT=$(cd "$R" && clean bash scripts/check-workarounds.sh no-such-branch 2>&1) +OUT=$(cd "$R" && clean bash scripts/check-workarounds.sh origin/no-such-branch 2>&1) RC=$? check 1 "$RC" "an unknown base fails closed" has "fetch-depth 0" "$OUT" "unknown base message says how to fix" @@ -437,8 +438,12 @@ wa_remote pp-ci add_marker OUT=$(cd "$R" && clean bash scripts/check-workarounds.sh origin/main 2>&1) pcheck 1 "$?" "CI route (argument origin/main): the added suppression is refused ($OUT)" +g update-ref refs/remotes/origin/main HEAD +OUT=$(cd "$R" && clean bash scripts/check-workarounds.sh origin/main 2>&1) +pcheck 1 "$?" "a remote-tracking argument equal to HEAD cannot empty the diff: the whole content is judged and the suppression is found ($OUT)" +phas "stands at the pushed commit" "$OUT" "argument equal to HEAD: the gate says the whole content is judged" OUT=$(cd "$R" && clean bash scripts/check-workarounds.sh HEAD 2>&1) -pcheck 0 "$?" "argument equal to HEAD: nothing is new ($OUT)" +pcheck 1 "$?" "argument HEAD is refused, never read as a base ($OUT)" # ---- ci-gates.sh nosonar (A1): the eslint rule text passes, a real marker fails. newrepo nosonar-clean @@ -1092,7 +1097,8 @@ chmod +x "$T/shimbin/git" # runwa_shim: like runwa, with git calls logged to $T/gitlog; GITSHOW and GITCAT count the show and cat-file calls. runwa_shim() { : > "$T/gitlog" - OUT=$(cd "$R" && PATH="$T/shimbin:$PATH" clean bash scripts/check-workarounds.sh main 2>&1) + g update-ref refs/remotes/origin/main main + OUT=$(cd "$R" && PATH="$T/shimbin:$PATH" clean bash scripts/check-workarounds.sh origin/main 2>&1) RC=$? GITSHOW=$(grep -c '^show$' "$T/gitlog") GITCAT=$(grep -c '^cat-file$' "$T/gitlog") @@ -1372,5 +1378,126 @@ for bg in workflows dockerfile; do check 1 "$RC" "$bg: a baseline without its reader fails the gate ($OUT)" done +# ---- base resolution: only remote-tracking refs are a base. A forged local branch or tag must not hide an earlier violation. +echo "progress: base resolution" +BAD_PY=$'try:\n pass\nexcept Exception:\n pass # noqa\n' +# baserepo : commit 1 holds a violation, commit 2 is clean; the repo has no remote. +baserepo() { + newrepo "$1" + g checkout -q main + g branch -q -D work + printf '%s' "$BAD_PY" > "$R/src/old.py" + g add -A + g commit -q -m violation + printf 'x = 1\n' > "$R/src/clean.py" + g add -A + g commit -q -m clean +} +runwa_arg() { OUT=$(cd "$R" && clean bash scripts/check-workarounds.sh "$@" 2>&1); RC=$?; } +baserepo bs-control +runwa_arg +check 1 "$RC" "no base: the whole content is judged and the old violation is found ($OUT)" +has "src/old.py" "$OUT" "no base: the violation names its file" +baserepo bs-local +g branch -q -f master HEAD~1 +g branch -q -f work HEAD~1 +runwa_arg +check 1 "$RC" "a forged local master is not a base: the old violation is still found ($OUT)" +g checkout -q -b trunk2 +g branch -q -D main +g branch -q -f main HEAD~1 +runwa_arg +check 1 "$RC" "a forged local main is not a base: the old violation is still found ($OUT)" +baserepo bs-tag +g tag origin/main HEAD~1 +runwa_arg origin/main +check 1 "$RC" "a tag named origin/main is not a base for the argument ($OUT)" +has "not found" "$OUT" "a tag named origin/main: the gate says the base is not found" +baserepo bs-tag-real +g update-ref refs/remotes/origin/main HEAD~1 +g tag origin/main HEAD +runwa_arg origin/main +check 0 "$RC" "a real remote-tracking origin/main is the base for the argument, and the tag at HEAD does not hide the diff ($OUT)" +baserepo bs-tag-real2 +g update-ref refs/remotes/origin/main HEAD~2 +g tag origin/main HEAD +runwa_arg origin/main +check 1 "$RC" "a tag at HEAD does not empty the diff against the real remote-tracking base ($OUT)" +baserepo bs-remote +g update-ref refs/remotes/origin/main HEAD~1 +runwa_arg +check 0 "$RC" "control: with a real remote-tracking base only the new commit is judged ($OUT)" + +# ---- round 4: one closed allow-list. Only refs/remotes/origin/ is a base, for every branch name and for the upstream. +echo "progress: round 4 bases (argument, non-main target, upstream on a local branch)" +# item 2 and 3: an argument that is not a remote-tracking ref is refused; every origin/ maps to refs/remotes/origin/. +baserepo r4-arg +g branch -q origin/main HEAD +runwa_arg refs/heads/origin/main +check 1 "$RC" "r4 argument refs/heads/origin/main is refused ($OUT)" +has "is refused" "$OUT" "r4 argument refs/heads/origin/main: the gate says it is refused" +runwa_arg main +check 1 "$RC" "r4 argument main (a local branch) is refused ($OUT)" +has "is refused" "$OUT" "r4 argument main: the gate says it is refused" +runwa_arg HEAD +check 1 "$RC" "r4 argument HEAD is refused ($OUT)" +has "is refused" "$OUT" "r4 argument HEAD: the gate says it is refused" +runwa_arg "$(g rev-parse HEAD~1)" +check 1 "$RC" "r4 argument bare sha with no tip is refused ($OUT)" +has "is refused" "$OUT" "r4 argument bare sha: the gate says it is refused" +g update-ref refs/remotes/origin/main HEAD~1 +runwa_arg origin/main +check 0 "$RC" "r4 control: a real remote-tracking origin/main wins over a local branch of that name ($OUT)" +g update-ref refs/remotes/origin/main HEAD~2 +runwa_arg origin/main +check 1 "$RC" "r4 a violation after a real remote-tracking base still fails ($OUT)" +lacks "is refused" "$OUT" "r4 real base: not refused" +# item 3: a non-main target with a tag of the same name at HEAD +baserepo r4-dev +g update-ref refs/remotes/origin/develop HEAD~2 +g tag origin/develop HEAD +runwa_arg origin/develop +check 1 "$RC" "r4 target develop: the tag origin/develop at HEAD does not hide the violation ($OUT)" +has "src/old.py" "$OUT" "r4 target develop: the violation is named" +runwa_arg refs/remotes/origin/develop +check 1 "$RC" "r4 target develop, qualified argument: the violation is found ($OUT)" +g update-ref refs/remotes/origin/develop HEAD~1 +runwa_arg origin/develop +check 0 "$RC" "r4 target develop control: a real base after the violation passes with the tag at HEAD ($OUT)" +# item 4: an upstream that is a local branch is not a base +baserepo r4-up +g branch -q -f base-local HEAD~1 +g checkout -q -b feature +g config branch.feature.remote . +g config branch.feature.merge refs/heads/base-local +runwa_arg +check 1 "$RC" "r4 an upstream that is a local branch is not a base: the old violation is found ($OUT)" +has "src/old.py" "$OUT" "r4 upstream on a local branch: the violation is named" +g config --unset branch.feature.remote +g config --unset branch.feature.merge +g update-ref refs/remotes/origin/feature HEAD~1 +g config remote.origin.url "$T/no-such-remote.git" +g config remote.origin.fetch '+refs/heads/*:refs/remotes/origin/*' +g config branch.feature.remote origin +g config branch.feature.merge refs/heads/feature +runwa_arg +check 0 "$RC" "r4 control: an upstream that is a remote-tracking ref of origin is the base ($OUT)" + +# ---- round 5: an explicit base at the tip is judged as the whole content; a bare sha is taken only from the pre-push route. +echo "progress: round 5 bases" +baserepo r5-head +g update-ref refs/remotes/origin/main HEAD +runwa_arg origin/main +check 1 "$RC" "r5 argument origin/main at HEAD: the whole content is judged and the old violation is found ($OUT)" +has "stands at the pushed commit" "$OUT" "r5 argument at HEAD: the gate says the whole content is judged" +g update-ref refs/remotes/origin/main HEAD~1 +runwa_arg origin/main +check 0 "$RC" "r5 control: the same argument at a real older base judges only the new commit ($OUT)" +runwa_arg "$(g rev-parse HEAD~1)" HEAD +check 1 "$RC" "r5 a bare sha with a tip, called by hand, is refused ($OUT)" +has "is refused" "$OUT" "r5 bare sha with a tip by hand: the gate says it is refused" +TC_WA_CHILD=1 runwa_arg "$(g rev-parse HEAD~1)" HEAD +check 1 "$RC" "r5 a bare sha with a forged TC_WA_CHILD that is not the parent process id is refused ($OUT)" + echo "seeded-gates: $PASS passed, $FAIL failed, $SKIPPED skipped" [[ "$FAIL" -eq 0 ]] diff --git a/scripts/seeded-mutation-diff.test.sh b/scripts/seeded-mutation-diff.test.sh index a0127764..acee1f74 100755 --- a/scripts/seeded-mutation-diff.test.sh +++ b/scripts/seeded-mutation-diff.test.sh @@ -461,5 +461,17 @@ times > "$T/t1" check 0 "$EC" "150 changed files in one app pass ($OUT)" echo "cpu (user+sys, shell and children), 150 changed files: before [$(tr '\n' ' ' < "$T/t0")] after [$(tr '\n' ' ' < "$T/t1")]" +# A tag named origin/main must not stand in for the remote-tracking branch: the change after the base is still judged, by default and by argument. +new_repo tagbase +touch_src src/a.ts +git -C "$D" commit -q -am change +git -C "$D" update-ref refs/remotes/origin/main main +git -C "$D" tag origin/main HEAD +OUT=$(cd "$D" && env -u CI -u GITHUB_ACTIONS -u TF_BUILD -u GATE_BASE -u MUTATION_DIFF_CPU_SECONDS PATH="$FIX/bin:$PYBIN:$PATH" STUB_STATUS=Survived bash "$GATE" 2>&1) +check 1 "$?" "a tag named origin/main is not the base: the surviving mutant is found ($OUT)" +has "src/a.ts line 3" "$OUT" "a tag named origin/main: the changed file is mutated" +OUT=$(cd "$D" && env -u CI -u GITHUB_ACTIONS -u TF_BUILD -u GATE_BASE -u MUTATION_DIFF_CPU_SECONDS PATH="$FIX/bin:$PYBIN:$PATH" STUB_STATUS=Survived bash "$GATE" origin/main 2>&1) +check 1 "$?" "a tag named origin/main as the base argument: the surviving mutant is found ($OUT)" + echo "seeded-mutation-diff: $PASS passed, $FAIL failed" [ "$FAIL" -eq 0 ] diff --git a/scripts/seeded-review-gate.test.sh b/scripts/seeded-review-gate.test.sh index 5a3def41..a4d00980 100644 --- a/scripts/seeded-review-gate.test.sh +++ b/scripts/seeded-review-gate.test.sh @@ -15,6 +15,9 @@ check() { # check has() { # has if [[ "$2" == *"$1"* ]]; then PASS=$((PASS + 1)); else FAIL=$((FAIL + 1)); echo "FAIL: $3 — [$1] not in [$2]"; fi } +hasnt() { # hasnt + if [[ "$2" != *"$1"* ]]; then PASS=$((PASS + 1)); else FAIL=$((FAIL + 1)); echo "FAIL: $3 — [$1] is in [$2]"; fi +} T=$(mktemp -d "${TMPDIR:-/tmp}/review-gate.XXXXXX") || exit 2 trap 'rm -rf "$T"' EXIT @@ -24,7 +27,9 @@ fixture() { D="$T/$1" rm -rf "$D" mkdir -p "$D/scripts" - cp "$SC/check-review-record.sh" "$SC/record-review.sh" "$D/scripts/" + cp "$SC/check-review-record.sh" "$SC/record-review.sh" "$SC/gate-ratchet.sh" "$D/scripts/" + mkdir -p "$D/.claude" + printf '{\n "stack": "nextjs"\n}\n' > "$D/.claude/harness.json" ( cd "$D" || exit 2 git init -q @@ -251,6 +256,106 @@ suite() { prep has "base origin/main" "$OUT" "default base is origin/main" + # First push: no remote base at all. Local mode reviews the whole content against the empty tree; CI never takes this route. + fixture firstpush + (cd "$D" && git update-ref -d refs/remotes/origin/main) + prep + if [ "$MODE" = local ]; then + check 0 "$EC" "first push: prepare works with no origin/main ($OUT)" + has "base empty-tree" "$OUT" "first push: base is the empty tree" + has "+base" "$(cat "$D/.claude/review/current.diff")" "first push: the diff holds the content of the first commit, not only the last" + has "+change" "$(cat "$D/.claude/review/current.diff")" "first push: the diff holds the later commit" + reply "$T/pass.txt" "FINDINGS: none" "VERDICT: pass" + run record-review.sh "$T/pass.txt" + check 0 "$EC" "first push: a clean review records ($OUT)" + run check-review-record.sh + check 0 "$EC" "first push: the recorded review passes the gate ($OUT)" + # A second push (a base now exists) must not reuse the first-push record. + (cd "$D" && git update-ref refs/remotes/origin/main main) + run check-review-record.sh + check 1 "$EC" "second push: the first-push record is refused ($OUT)" + has "base now is 'origin/main'" "$OUT" "second push: the base mismatch is named" + # Refused content: a fail verdict stays a failure on a first push. + (cd "$D" && git update-ref -d refs/remotes/origin/main) + reply "$T/fail.txt" "a.txt:1 | blocker | wrong: x | y" "VERDICT: fail" + rm -f "$D"/.claude/review/*.record + run record-review.sh "$T/fail.txt" + run check-review-record.sh + check 1 "$EC" "first push: a fail verdict is refused ($OUT)" + else + check 1 "$EC" "first push: CI never takes the empty-tree route ($OUT)" + fi + EXTRA=(TC_REVIEW_BASE=empty-tree) + prep + check 1 "$EC" "first push: the empty-tree token cannot be set by hand ($OUT)" + EXTRA=(TC_REVIEW_BASE=HEAD) + prep + check 0 "$EC" "first push: a base override at HEAD owes no review ($OUT)" + if [ "$MODE" = local ]; then + run check-review-record.sh + check 1 "$EC" "first push: a base override at HEAD leaves no passing gate ($OUT)" + fi + EXTRA=(TC_NOOP=1) + # A remote-tracking ref that is not the base, or a shallow clone, is not a first push: the gate still refuses. + fixture fpother + (cd "$D" && git update-ref -d refs/remotes/origin/main && git update-ref refs/remotes/upstream/dev main) + prep + check 1 "$EC" "a remote-tracking ref that is not the base is not a first push ($OUT)" + has "no base ref found" "$OUT" "not-first-push message" + fixture fpdeleted + (cd "$D" && git config branch.feature.remote origin && git config branch.feature.merge refs/heads/feature && git update-ref -d refs/remotes/origin/main) + prep + check 1 "$EC" "a ref deleted after a first push is not a first push ($OUT)" + + # Seeded files on a first push: left out only on an exact path and exact bytes row of the seeded file table; everything else is judged. + if [ "$MODE" = local ]; then + # seed_row : adds a table row for (its current bytes) to the nextjs table of the fixture's ratchet copy and commits. + seed_row() { + local h + h=$(shasum -a 256 "$D/$1" | cut -d' ' -f1) + awk -v row="$h\t$1" '{ print } /^ nextjs\)$/ { f = 1 } f && /cat <<.SEEDED_FILES.$/ { print row; f = 0 }' "$D/scripts/gate-ratchet.sh" > "$D/gr.new" && mv "$D/gr.new" "$D/scripts/gate-ratchet.sh" + } + fixture fpseed + (cd "$D" && git update-ref -d refs/remotes/origin/main && printf 'seeded line\n' > seed-probe.txt && seed_row seed-probe.txt && cp seed-probe.txt other-name.txt && git add -A && git commit -q -m seeds) + prep + check 0 "$EC" "seeded: a first push with a seeded file prepares ($OUT)" + has "left out" "$OUT" "seeded: the count of left-out files is printed" + has "are judged" "$OUT" "seeded: the count of judged files is printed" + has "+base" "$(cat "$D/.claude/review/current.diff")" "seeded: a file not in the table is judged" + hasnt "diff --git a/seed-probe.txt" "$(cat "$D/.claude/review/current.diff")" "seeded: a file equal to its table row is left out" + has "other-name.txt" "$(cat "$D/.claude/review/current.diff")" "seeded: the same bytes under another path are judged" + (cd "$D" && printf 'seeded linf\n' > seed-probe.txt && git add -A && git commit -q -m "one byte") + prep + has "+seeded linf" "$(cat "$D/.claude/review/current.diff")" "seeded: a seeded file changed by one byte is judged" + fixture fpnotable + (cd "$D" && git update-ref -d refs/remotes/origin/main && printf 'exit 3\n' > scripts/gate-ratchet.sh && git add -A && git commit -q -m "broken ratchet") + prep + check yes "$([ "$EC" != 0 ] && echo yes || echo no)" "seeded: an unreadable table fails closed ($OUT)" + has "seeded file table" "$OUT" "seeded: the unreadable table is named" + fixture fpnostack + (cd "$D" && git update-ref -d refs/remotes/origin/main && git rm -q .claude/harness.json && git commit -q -m "no stack") + prep + check yes "$([ "$EC" != 0 ] && echo yes || echo no)" "seeded: a missing harness file fails closed ($OUT)" + # A local branch called origin/main is not the remote base. + fixture fplocalbranch + (cd "$D" && git update-ref -d refs/remotes/origin/main && git update-ref refs/heads/origin/main HEAD) + prep + check 0 "$EC" "a local branch named origin/main is not taken for the base ($OUT)" + has "base empty-tree" "$OUT" "a local branch named origin/main leaves the first-push route" + # A tag called origin/main is not the remote base either: with a real base present, the change after it is still in the diff. + fixture tagbase + (cd "$D" && git tag origin/main HEAD) + prep + check 0 "$EC" "a tag named origin/main is not the base: the review still prepares ($OUT)" + has "+change" "$(cat "$D/.claude/review/current.diff")" "a tag named origin/main: the change after the real base is in the diff" + # A symlink at a seeded path is not a regular file, so it is judged and shows in the diff. + fixture fplink + (cd "$D" && git update-ref -d refs/remotes/origin/main && printf 'seeded line\n' > real-probe.txt && seed_row real-probe.txt && ln -s real-probe.txt seed-probe.txt && seed_row seed-probe.txt && git add -A && git commit -q -m link) + prep + check 0 "$EC" "seeded: a first push with a symlink at a seeded path prepares ($OUT)" + has "diff --git a/seed-probe.txt" "$(cat "$D/.claude/review/current.diff")" "seeded: a symlink at a seeded path is judged" + fi + # A failing git diff reports git's own message, not only "git diff failed"; the clean control (no stub) emits the diff. fixture gitdiff mkdir -p "$T/gitstub" @@ -420,6 +525,7 @@ STUB } for MODE in local ci; do + echo "progress: suite, $MODE mode" if [ "$MODE" = local ]; then ENVARGS=(-u CI -u GITHUB_ACTIONS -u TF_BUILD -u TC_REVIEW_BASE) else @@ -495,6 +601,7 @@ wf_bless() { } for ST in nextjs nestjs vite-react fastapi; do + echo "progress: wiring, $ST" W="$T/wf-$ST" if ! wf_scaffold "$ST" "$SHARED" "$W"; then check ok scaffold-failed "wiring[$ST]: scaffold copies every part"; continue; fi for f in $GUARDED_FILES; do check yes "$(yn test -s "$W/$f")" "wiring[$ST]: scaffold seeds $f"; done @@ -513,7 +620,27 @@ for ST in nextjs nestjs vite-react fastapi; do wf_verify; check 0 "$EC" "wiring[$ST]: control, verify-harness passes ($OUT)" wf_ratchet; check 0 "$EC" "wiring[$ST]: control, ratchet passes ($OUT)" + # (t) the seeded file table sits in the pinned ratchet script: on a first push an added or changed table line is refused + echo "progress: wiring, $ST, step (t)" + git -C "$W" update-ref -d refs/remotes/origin/main + wf_ratchet + hasnt "scripts/gate-ratchet.sh" "$OUT" "wiring[$ST]: (t) control, the first-push ratchet does not name the unedited ratchet script" + wf_reset + awk -v st="$ST" '{ print } $0 ~ "^ " st "\\)$" { f = 1 } f && /cat <<.SEEDED_FILES.$/ { printf "0000000000000000000000000000000000000000000000000000000000000000\tevil.txt\n"; f = 0 }' "$W/scripts/gate-ratchet.sh" > "$W/gr.new" && mv "$W/gr.new" "$W/scripts/gate-ratchet.sh" + check yes "$(yn grep -q 'evil.txt' "$W/scripts/gate-ratchet.sh")" "wiring[$ST]: (t) the probe added a table line" + wf_commit "add a table line" + wf_ratchet; check 1 "$EC" "wiring[$ST]: (t) an added table line is refused on a first push ($OUT)" + has "scripts/gate-ratchet.sh" "$OUT" "wiring[$ST]: (t) the refusal names the ratchet script" + wf_reset + awk 'BEGIN { n = 0 } n == 0 && length($1) == 64 && substr($0, 65, 1) == "\t" { c = (substr($0, 1, 1) == "0") ? "1" : "0"; $0 = c substr($0, 2); n = 1 } { print }' "$W/scripts/gate-ratchet.sh" > "$W/gr.new" && mv "$W/gr.new" "$W/scripts/gate-ratchet.sh" + wf_commit "change a table line" + wf_ratchet; check 1 "$EC" "wiring[$ST]: (t) a changed table line is refused on a first push ($OUT)" + has "scripts/gate-ratchet.sh" "$OUT" "wiring[$ST]: (t) the changed table line names the ratchet script" + wf_reset + git -C "$W" update-ref refs/remotes/origin/main main + # (a) gate script removed, then emptied; the second case is blessed so only the structural check is left + echo "progress: wiring, $ST, step (a)" wf_reset; git -C "$W" rm -q scripts/check-review-record.sh; wf_commit "remove gate" wf_verify; check 1 "$EC" "wiring[$ST]: (a) removed gate script fails verify-harness" has "check-review-record.sh" "$OUT" "wiring[$ST]: (a) the message names the script" @@ -528,6 +655,7 @@ for ST in nextjs nestjs vite-react fastapi; do wf_reset; wf_bless; wf_verify; check 0 "$EC" "wiring[$ST]: (a) control, an untouched gate script passes after re-hashing" # (b) lefthook pre-push line removed + echo "progress: wiring, $ST, step (b)" wf_reset awk '/^ review-record:/ { skip = 1; next } skip && /^ [a-z]/ { skip = 0 } skip && /^[a-z]/ { skip = 0 } !skip' "$W/lefthook.yml" > "$W/lefthook.new" && mv "$W/lefthook.new" "$W/lefthook.yml" check no "$(yn grep -q 'check-review-record' "$W/lefthook.yml")" "wiring[$ST]: (b) the probe removed the lefthook line" @@ -537,6 +665,7 @@ for ST in nextjs nestjs vite-react fastapi; do has "GATE MISSING: review" "$OUT" "wiring[$ST]: (b) the review gate is named" # (c) checklist edited in the change under review + echo "progress: wiring, $ST, step (c)" wf_reset; printf 'nothing to see\n' > "$W/.claude/review-checklist.txt"; wf_commit "weaken checklist" wf_verify; check 1 "$EC" "wiring[$ST]: (c) edited checklist fails verify-harness" wf_ratchet; check 1 "$EC" "wiring[$ST]: (c) edited checklist fails the ratchet" @@ -549,6 +678,7 @@ for ST in nextjs nestjs vite-react fastapi; do wf_ratchet; check 1 "$EC" "wiring[$ST]: (c) edited record-review.sh fails the ratchet" # (e) the review row deleted from gates.txt: the hash check catches it until a human re-hashes; verify-harness.sh does not yet fail on the missing row after that + echo "progress: wiring, $ST, step (e)" wf_reset; grep -v '^review|' "$W/.claude/gates.txt" > "$W/.claude/gates.new" && mv "$W/.claude/gates.new" "$W/.claude/gates.txt" check 0 "$(grep -c '^review|' "$W/.claude/gates.txt")" "wiring[$ST]: (e) the probe removed the review row" wf_commit "drop review row" diff --git a/scripts/seeded-shared-gates.test.sh b/scripts/seeded-shared-gates.test.sh index 5790183c..2583608b 100644 --- a/scripts/seeded-shared-gates.test.sh +++ b/scripts/seeded-shared-gates.test.sh @@ -189,6 +189,12 @@ for st in ts py; do (cd "$D" && git branch -q --set-upstream-to=origin/main work) run "$D" changelog check 1 "$EC" "$st changelog: the upstream branch is the base when one is set ($OUT)" + repo "cl-tag-$st" "$st" + change_src + (cd "$D" && git tag origin/main HEAD) + run "$D" changelog + check 1 "$EC" "$st changelog: a tag named origin/main is not the base ($OUT)" + has "CHANGELOG.md was not updated" "$OUT" "$st changelog: the remote-tracking base is still judged with a tag of the same name present" repo "cl-nob-$st" "$st" no-origin change_src run "$D" changelog diff --git a/scripts/test-ci-templates.sh b/scripts/test-ci-templates.sh index 56b76e74..502a5070 100644 --- a/scripts/test-ci-templates.sh +++ b/scripts/test-ci-templates.sh @@ -494,7 +494,7 @@ MANIFEST = {'github-ts': {'file': 'github-ts/.github/workflows/ci.yml', 'gate-ratchet', 'run', 'set -euo pipefail\n' - 'if ! base_sha=$(git rev-parse --verify --quiet "origin/$BASE_REF^{commit}"); then echo "::error::origin/$BASE_REF not found; check out with fetch-depth: 0"; exit 1; fi\n' + 'if ! base_sha=$(git rev-parse --verify --quiet "refs/remotes/origin/$BASE_REF^{commit}"); then echo "::error::origin/$BASE_REF not found; check out with fetch-depth: 0"; exit 1; fi\n' 'if ! mbase=$(git merge-base "$base_sha" HEAD); then echo "::error::no merge base with origin/$BASE_REF; check out with fetch-depth: 0"; exit 1; fi\n' 'tmp=$(mktemp "$RUNNER_TEMP/ci-gates.XXXXXX")\n' 'trap \'rm -f "$tmp"\' EXIT\n' @@ -544,7 +544,7 @@ MANIFEST = {'github-ts': {'file': 'github-ts/.github/workflows/ci.yml', 'gate-ratchet', 'run', 'set -euo pipefail\n' - 'if ! base_sha=$(git rev-parse --verify --quiet "origin/$BASE_REF^{commit}"); then echo "::error::origin/$BASE_REF not found; check out with fetch-depth: 0"; exit 1; fi\n' + 'if ! base_sha=$(git rev-parse --verify --quiet "refs/remotes/origin/$BASE_REF^{commit}"); then echo "::error::origin/$BASE_REF not found; check out with fetch-depth: 0"; exit 1; fi\n' 'if ! mbase=$(git merge-base "$base_sha" HEAD); then echo "::error::no merge base with origin/$BASE_REF; check out with fetch-depth: 0"; exit 1; fi\n' 'tmp=$(mktemp "$RUNNER_TEMP/ci-gates.XXXXXX")\n' 'trap \'rm -f "$tmp"\' EXIT\n' @@ -660,7 +660,7 @@ MANIFEST = {'github-ts': {'file': 'github-ts/.github/workflows/ci.yml', 'branch="${SYSTEM_PULLREQUEST_TARGETBRANCH:-}"\n' 'branch="${branch#refs/heads/}"\n' 'if [ -n "$branch" ]; then\n' - ' if ! base_sha=$(git rev-parse --verify --quiet "origin/$branch^{commit}"); then echo "##vso[task.logissue type=error]origin/$branch not found; check out with fetchDepth: 0"; exit 1; fi\n' + ' if ! base_sha=$(git rev-parse --verify --quiet "refs/remotes/origin/$branch^{commit}"); then echo "##vso[task.logissue type=error]origin/$branch not found; check out with fetchDepth: 0"; exit 1; fi\n' ' if ! mbase=$(git merge-base "$base_sha" HEAD); then echo "##vso[task.logissue type=error]no merge base with origin/$branch; check out with fetchDepth: 0"; exit 1; fi\n' ' tmp=$(mktemp "${AGENT_TEMPDIRECTORY:-${TMPDIR:-/tmp}}/ci-gates.XXXXXX")\n' ' trap \'rm -f "$tmp"\' EXIT\n' @@ -792,7 +792,7 @@ PINNED = {'github-ts': {'jobs': {'plan': {'runs-on': 'ubuntu-latest', 'LABELS': "${{ join(github.event.pull_request.labels.*.name, ' " "') }}"}, 'run': 'set -euo pipefail\n' - 'if ! base_sha=$(git rev-parse --verify --quiet "origin/$BASE_REF^{commit}"); then echo "::error::origin/$BASE_REF not found; check out with fetch-depth: 0"; exit 1; fi\n' + 'if ! base_sha=$(git rev-parse --verify --quiet "refs/remotes/origin/$BASE_REF^{commit}"); then echo "::error::origin/$BASE_REF not found; check out with fetch-depth: 0"; exit 1; fi\n' 'if ! mbase=$(git merge-base "$base_sha" HEAD); then echo "::error::no merge base with origin/$BASE_REF; check out with fetch-depth: 0"; exit 1; fi\n' 'tmp=$(mktemp "$RUNNER_TEMP/ci-gates.XXXXXX")\n' 'trap \'rm -f "$tmp"\' EXIT\n' @@ -943,7 +943,7 @@ PINNED = {'github-ts': {'jobs': {'plan': {'runs-on': 'ubuntu-latest', 'LABELS': "${{ join(github.event.pull_request.labels.*.name, ' " "') }}"}, 'run': 'set -euo pipefail\n' - 'if ! base_sha=$(git rev-parse --verify --quiet "origin/$BASE_REF^{commit}"); then echo "::error::origin/$BASE_REF not found; check out with fetch-depth: 0"; exit 1; fi\n' + 'if ! base_sha=$(git rev-parse --verify --quiet "refs/remotes/origin/$BASE_REF^{commit}"); then echo "::error::origin/$BASE_REF not found; check out with fetch-depth: 0"; exit 1; fi\n' 'if ! mbase=$(git merge-base "$base_sha" HEAD); then echo "::error::no merge base with origin/$BASE_REF; check out with fetch-depth: 0"; exit 1; fi\n' 'tmp=$(mktemp "$RUNNER_TEMP/ci-gates.XXXXXX")\n' 'trap \'rm -f "$tmp"\' EXIT\n' @@ -1002,7 +1002,7 @@ PINNED = {'github-ts': {'jobs': {'plan': {'runs-on': 'ubuntu-latest', 'branch="${SYSTEM_PULLREQUEST_TARGETBRANCH:-}"\n' 'branch="${branch#refs/heads/}"\n' 'if [ -n "$branch" ]; then\n' - ' if ! base_sha=$(git rev-parse --verify --quiet "origin/$branch^{commit}"); then echo "##vso[task.logissue type=error]origin/$branch not found; check out with fetchDepth: 0"; exit 1; fi\n' + ' if ! base_sha=$(git rev-parse --verify --quiet "refs/remotes/origin/$branch^{commit}"); then echo "##vso[task.logissue type=error]origin/$branch not found; check out with fetchDepth: 0"; exit 1; fi\n' ' if ! mbase=$(git merge-base "$base_sha" HEAD); then echo "##vso[task.logissue type=error]no merge base with origin/$branch; check out with fetchDepth: 0"; exit 1; fi\n' ' tmp=$(mktemp "${AGENT_TEMPDIRECTORY:-${TMPDIR:-/tmp}}/ci-gates.XXXXXX")\n' ' trap \'rm -f "$tmp"\' EXIT\n' diff --git a/scripts/test-harness-kit.sh b/scripts/test-harness-kit.sh index a7b4e5d5..92efb2cf 100755 --- a/scripts/test-harness-kit.sh +++ b/scripts/test-harness-kit.sh @@ -2236,7 +2236,7 @@ chmod +x "$T/awkshim/awk" (cd "$GV" && PATH="$T/awkshim:$PATH" bash "$KIT/verify-harness.sh" > "$T/awkrun.txt" 2>&1); awk_rc=$? check 0 "$awk_rc" "verify-harness passes with the awk call counter in place ($(cat "$T/awkrun.txt"))" awk_calls=$(grep -c x "$T/awklog") -if [ "$awk_calls" -le 20 ]; then ok; else bad "verify-harness ran awk $awk_calls times on $(grep -c . "$GV/.claude/gates.txt") gate rows, expected at most 20"; fi +check "yes" "$([ "$awk_calls" -le 20 ] && echo yes || echo no)" "verify-harness runs awk at most 20 times ($awk_calls calls on $(grep -c . "$GV/.claude/gates.txt") gate rows)" # A gate's script, and the config files it reads, must stay hashed entries of harness.json: removing one entry is a finding that names the gate and the file (control: the full manifest passes above). cp "$GV/.claude/harness.json" "$GV/.claude/harness.full" while IFS='|' read -r gid lh ci; do @@ -2397,7 +2397,7 @@ grep -q '| sha256sum -c - ||' "$KIT/ci-gates.sh" check 0 "$?" "ci-gates verifies the gitleaks checksum" rm -f "$GLS/argv" (cd "$FEAT" && PATH="$GLS:$PATH" STUB_EXIT=0 bash "$KIT/ci-gates.sh" secrets refs/heads/main >/dev/null 2>&1) -check "0:git --log-opts=origin/main..HEAD --redact --no-banner" "$?:$(cut -d' ' -f1-4 "$GLS/argv" 2>/dev/null)" "ci-gates secrets scans only the PR range" +check "0:git --log-opts=refs/remotes/origin/main..HEAD --redact --no-banner" "$?:$(cut -d' ' -f1-4 "$GLS/argv" 2>/dev/null)" "ci-gates secrets scans only the PR range" (cd "$FEAT" && PATH="$GLS:$PATH" STUB_EXIT=0 bash "$KIT/ci-gates.sh" secrets >/dev/null 2>&1) check "0:git --redact --no-banner" "$?:$(cut -d' ' -f1-3 "$GLS/argv" 2>/dev/null)" "ci-gates secrets scans full history off-PR" (cd "$FEAT" && PATH="$GLS:$PATH" STUB_EXIT=1 bash "$KIT/ci-gates.sh" secrets main >/dev/null 2>&1) diff --git a/skills/scaffold/shared/template-ci/azure/azure-pipelines/templatecentral-gates.yml b/skills/scaffold/shared/template-ci/azure/azure-pipelines/templatecentral-gates.yml index cef2dc13..56c5410a 100644 --- a/skills/scaffold/shared/template-ci/azure/azure-pipelines/templatecentral-gates.yml +++ b/skills/scaffold/shared/template-ci/azure/azure-pipelines/templatecentral-gates.yml @@ -38,7 +38,7 @@ steps: branch="${SYSTEM_PULLREQUEST_TARGETBRANCH:-}" branch="${branch#refs/heads/}" if [ -n "$branch" ]; then - if ! base_sha=$(git rev-parse --verify --quiet "origin/$branch^{commit}"); then echo "##vso[task.logissue type=error]origin/$branch not found; check out with fetchDepth: 0"; exit 1; fi + if ! base_sha=$(git rev-parse --verify --quiet "refs/remotes/origin/$branch^{commit}"); then echo "##vso[task.logissue type=error]origin/$branch not found; check out with fetchDepth: 0"; exit 1; fi if ! mbase=$(git merge-base "$base_sha" HEAD); then echo "##vso[task.logissue type=error]no merge base with origin/$branch; check out with fetchDepth: 0"; exit 1; fi tmp=$(mktemp "${AGENT_TEMPDIRECTORY:-${TMPDIR:-/tmp}}/ci-gates.XXXXXX") trap 'rm -f "$tmp"' EXIT diff --git a/skills/scaffold/shared/template-ci/github-py/.github/workflows/ci.yml b/skills/scaffold/shared/template-ci/github-py/.github/workflows/ci.yml index 456fc3e3..93b24394 100644 --- a/skills/scaffold/shared/template-ci/github-py/.github/workflows/ci.yml +++ b/skills/scaffold/shared/template-ci/github-py/.github/workflows/ci.yml @@ -164,7 +164,7 @@ jobs: LABELS: "${{ join(github.event.pull_request.labels.*.name, ' ') }}" run: | set -euo pipefail - if ! base_sha=$(git rev-parse --verify --quiet "origin/$BASE_REF^{commit}"); then echo "::error::origin/$BASE_REF not found; check out with fetch-depth: 0"; exit 1; fi + if ! base_sha=$(git rev-parse --verify --quiet "refs/remotes/origin/$BASE_REF^{commit}"); then echo "::error::origin/$BASE_REF not found; check out with fetch-depth: 0"; exit 1; fi if ! mbase=$(git merge-base "$base_sha" HEAD); then echo "::error::no merge base with origin/$BASE_REF; check out with fetch-depth: 0"; exit 1; fi tmp=$(mktemp "$RUNNER_TEMP/ci-gates.XXXXXX") trap 'rm -f "$tmp"' EXIT diff --git a/skills/scaffold/shared/template-ci/github-ts/.github/workflows/ci.yml b/skills/scaffold/shared/template-ci/github-ts/.github/workflows/ci.yml index ec8d9cab..110c05b5 100644 --- a/skills/scaffold/shared/template-ci/github-ts/.github/workflows/ci.yml +++ b/skills/scaffold/shared/template-ci/github-ts/.github/workflows/ci.yml @@ -267,7 +267,7 @@ jobs: LABELS: "${{ join(github.event.pull_request.labels.*.name, ' ') }}" run: | set -euo pipefail - if ! base_sha=$(git rev-parse --verify --quiet "origin/$BASE_REF^{commit}"); then echo "::error::origin/$BASE_REF not found; check out with fetch-depth: 0"; exit 1; fi + if ! base_sha=$(git rev-parse --verify --quiet "refs/remotes/origin/$BASE_REF^{commit}"); then echo "::error::origin/$BASE_REF not found; check out with fetch-depth: 0"; exit 1; fi if ! mbase=$(git merge-base "$base_sha" HEAD); then echo "::error::no merge base with origin/$BASE_REF; check out with fetch-depth: 0"; exit 1; fi tmp=$(mktemp "$RUNNER_TEMP/ci-gates.XXXXXX") trap 'rm -f "$tmp"' EXIT diff --git a/skills/scaffold/shared/template-late/docs/harness.md b/skills/scaffold/shared/template-late/docs/harness.md index 40be580d..a1eb1190 100644 --- a/skills/scaffold/shared/template-late/docs/harness.md +++ b/skills/scaffold/shared/template-late/docs/harness.md @@ -40,6 +40,8 @@ A workaround detector (`scripts/check-workarounds.sh`, pre-push and the CI `work `scripts/check-review-record.sh` (lefthook pre-push only; CI skips it because records are local and gitignored) fails a push without that record. It is an honesty aid, not a security boundary: it does not cover a push of another ref, a hand-set `GITHUB_ACTIONS=true`, or `git push --no-verify` outside an agent session. The gate script, `record-review.sh`, both checklists and the agent file are guarded, so a change cannot weaken its own review. +**First push, review and diff gates:** with no remote base (no `origin/main`, no upstream, no other remote-tracking ref, not CI) the review gate, `check-comments.sh` and `check-contract.sh` judge the whole pushed content against the empty tree instead of failing on a missing base; the record says `base=empty-tree`, so the next push, which has a base, needs a new review. A base that may exist but is not here (a deleted remote-tracking ref with an upstream still set, a shallow clone) still fails; fetch the base. Setting `BASE_REF` is refused on a first push. On a first push a file is left out of that whole-content judging only when its path and its bytes equal a row of the seeded file table kept in `gate-ratchet.sh` (the table is generated, and the ratchet pins the script); a seeded file edited by one byte, a file with your project name filled in and every file you added are judged. The gates print how many files they left out and how many they judged, and fail when the table cannot be read. The table is only as strong as the manifest hash in `.claude/harness.json` that pins `gate-ratchet.sh`: on a single-commit first push whoever commits the table also commits that hash, so the first push is a human-read push. CI judges the later pushes against a fetched base, where the base copy of the script and its table are used. To name the base yourself, set `TC_REVIEW_BASE` (review gate), pass the base-ref argument or set `BASE_REF` outside CI (`check-comments.sh`), or pass the argument or set `GATE_BASE` (`check-contract.sh`). + **Removal:** `bash scripts/remove-harness.sh` lists the seeded harness files it would remove (dry run); `--apply` removes unmodified ones, `--force ` one modified file. It restores nothing; undo the `AGENTS.md` tail, `.gitignore` lines and git hooks by hand. **Coverage floor:** 80 is the target line coverage. A scaffolded project starts at 80 in its own config. An adopted project starts at its measured coverage: `scripts/set-coverage-floor.sh` runs the tests once at adoption and records min(80, measured) in `coverage.thresholds.lines` (vitest or vite config), `coverageThreshold.global.lines` (`jest.config.*`) or `fail_under` (`.coveragerc` when one exists, else `pyproject.toml`), and the gate ratchet then refuses to lower or remove it, so the floor may only rise. The script never lowers an existing floor and exits 2 without writing when it cannot measure or find exactly one place to write. `bash scripts/set-coverage-floor.sh --check` reads no tests and fails when the config holds no floor; the pre-push coverage check runs it first, so a project with no recorded floor is stopped with one line naming the script. Nothing raises the floor for you: when coverage has risen, raise the number by hand in a reviewed change. diff --git a/skills/scaffold/shared/template/.claude/agents/code-reviewer.md b/skills/scaffold/shared/template/.claude/agents/code-reviewer.md index 2715b499..f58daf11 100644 --- a/skills/scaffold/shared/template/.claude/agents/code-reviewer.md +++ b/skills/scaffold/shared/template/.claude/agents/code-reviewer.md @@ -14,6 +14,7 @@ Constraints (restated because this prompt may be all you load): Steps: 1. Read `.claude/review/current.diff`. If it is missing, reply with one finding line saying to run `bash scripts/record-review.sh --prepare` first, then `VERDICT: fail`. +On a first push the diff covers the whole project except the files that equal their seeded copy: the gate leaves a file out only when its path and bytes equal a row of the seeded file table, so an edited seeded file, a file with your project name filled in and every file you added are in the diff. A file missing from the diff is a seeded file, not a deleted one; the gate prints how many it left out. Review what is in the diff. 2. Read `.claude/review-checklist.txt`, and `.claude/review-checklist-stack.txt` if it exists. Each line is `id|check`. 3. Open the changed files for context when the diff alone is not enough. 4. Report each problem as one line, exactly: diff --git a/skills/scaffold/shared/template/.claude/ci-gates.sh b/skills/scaffold/shared/template/.claude/ci-gates.sh index fe5fa689..31b330bd 100755 --- a/skills/scaffold/shared/template/.claude/ci-gates.sh +++ b/skills/scaffold/shared/template/.claude/ci-gates.sh @@ -5,6 +5,8 @@ gate=${1:-} branch=${2:-} branch=${branch#refs/heads/} base="origin/$branch" +# The git commands below read the full remote-tracking ref: a tag or a local branch named origin/ must not stand in for the base. The scripts and diff-cover that receive $base get the short name. +bref="refs/remotes/$base" # Every gate but `list` is timed: this script runs again as a child with TC_GATE_TIMED set (an exported TC_GATE_TIMED turns the recording off), then records name, seconds and exit status through gate-budget.sh. stdin, stdout and stderr pass through. # Why a background child with job control, not a foreground run: bash defers a trap until its foreground command ends, so a TERM sent to this process alone could not stop the gate, and a plain background job starts with SIGINT ignored, which every grandchild would inherit (a timed run would then survive Ctrl-C that kills an untimed one). `set -m` gives the child its own process group with default signals, so INT behaves as in an untimed run, and this process forwards INT, TERM and HUP to that whole group; the handlers are installed before the launch, and a signal that lands during the launch is forwarded right after it. When the child is gone the row is recorded with the gate's own status, then the signal is raised again with its default action, as an untimed run dies of TERM or HUP at once; INT is raised again only when the gate died of it, because an untimed bash lets a gate that survived INT finish with its own status. The caller sees what an untimed run gives, and a signal sent to this process alone also stops the gate, which an untimed run does not do. A gate that reads the terminal is in a background group and would stop; gates are not interactive. @@ -132,7 +134,7 @@ coverage_excludes() { } pr_only() { [ -n "$branch" ] || { echo "$gate: not a pull request — skipped"; exit 0; } - git rev-parse --verify -q "$base^{commit}" >/dev/null || fail "$base not found — check out with full history (fetch-depth 0)" + git rev-parse --verify -q "$bref^{commit}" >/dev/null || fail "$base not found — check out with full history (fetch-depth 0)" } case "$gate" in @@ -164,14 +166,14 @@ case "$gate" in fi gate_script scripts/scan-secrets.sh if [ -n "$branch" ]; then - bash scripts/scan-secrets.sh git --log-opts="$base..HEAD" || fail "possible secrets in this PR's commits (file, line and rule above). Remove the value, rotate it if it was ever pushed, and read it from the environment." + bash scripts/scan-secrets.sh git --log-opts="$bref..HEAD" || fail "possible secrets in this PR's commits (file, line and rule above). Remove the value, rotate it if it was ever pushed, and read it from the environment." else bash scripts/scan-secrets.sh git || fail "possible secrets in history (file, line and rule above). Remove the value, rotate it, and read it from the environment." fi ;; changelog) pr_only - changed=$(git diff --name-only "$base"...HEAD) || fail "cannot diff against $base" + changed=$(git diff --name-only "$bref"...HEAD) || fail "cannot diff against $base" if vgrep "$changed" -E '^src/' && ! vgrep "$changed" -x 'CHANGELOG.md'; then bypassed skip-changelog && exit 0 fail "src/ changed but CHANGELOG.md was not updated. Add an entry or apply the 'skip-changelog' label." @@ -193,8 +195,8 @@ case "$gate" in if [ -n "$stripped" ] && vgrep "$stripped" -E -f "$strict_patterns"; then flagged="$flagged$nl - $f: $stripped" fi - done < <(git --literal-pathspecs diff -U0 --no-ext-diff --no-textconv --text "$base"...HEAD -- "$f" | grep '^+' | grep -vE '^\+\+\+' | sed 's/^+//' | grep -E '^[[:space:]]*(#|//|\*|"""|/\*\*?)') - done < <(git diff -z --name-only "$base"...HEAD) + done < <(git --literal-pathspecs diff -U0 --no-ext-diff --no-textconv --text "$bref"...HEAD -- "$f" | grep '^+' | grep -vE '^\+\+\+' | sed 's/^+//' | grep -E '^[[:space:]]*(#|//|\*|"""|/\*\*?)') + done < <(git diff -z --name-only "$bref"...HEAD) rm -f "$strict_patterns" if [ -n "$flagged" ]; then bypassed skip-comment-check && exit 0 @@ -206,7 +208,7 @@ case "$gate" in pr_only # A PR may not weaken gate config versus its merge base; the merge-base copy of the checker runs, so a PR cannot rewrite the script that judges it. runner=scripts/gate-ratchet.sh - mbase=$(git merge-base "$base" HEAD) || fail "no merge base with $base — check out with full history (fetch-depth 0)" + mbase=$(git merge-base "$bref" HEAD) || fail "no merge base with $base — check out with full history (fetch-depth 0)" runner_tmp=$(mktemp "${RUNNER_TEMP:-${AGENT_TEMPDIRECTORY:-${TMPDIR:-/tmp}}}/gate-ratchet.XXXXXX") || fail "cannot create a temporary file" if git show "$mbase:scripts/gate-ratchet.sh" > "$runner_tmp" 2>/dev/null; then runner=$runner_tmp @@ -419,12 +421,12 @@ JS workarounds) pr_only gate_script scripts/check-workarounds.sh - bash scripts/check-workarounds.sh "$base" || fail "this change silences a tool or removes covering tests (output above). Fix the cause; there is no waiver." + bash scripts/check-workarounds.sh "$bref" || fail "this change silences a tool or removes covering tests (output above). Fix the cause; there is no waiver." ;; diffcover) # The CI step runs diff-cover --fail-under=80 and keeps its output in diff-cover.txt; diff-cover exits 0 when the diff has no covered lines, so this gate turns that into a failure whenever measured source changed. Deleted files, files the coverage config leaves out, and files whose added lines are all blank or comment-only have no lines to cover and are skipped. pr_only - changed=$(git diff --name-only --diff-filter=d "$base"...HEAD) || fail "cannot diff against $base" + changed=$(git diff --name-only --diff-filter=d "$bref"...HEAD) || fail "cannot diff against $base" if srcall=$(printf '%s\n' "$changed" | grep -E '^src/.*[.](py|ts|tsx|js|jsx|mjs|cjs)$'); then :; else [ "$?" -le 1 ] || fail "grep failed while listing the changed source files" srcall="" @@ -448,7 +450,7 @@ JS [ -n "$f" ] || continue is_py=0 case "$f" in *.py) is_py=1 ;; esac - dtext=$(git --literal-pathspecs diff -U0 --no-color --no-ext-diff --no-textconv --text "$base"...HEAD -- "$f") || fail "cannot read the diff of $f against $base" + dtext=$(git --literal-pathspecs diff -U0 --no-color --no-ext-diff --no-textconv --text "$bref"...HEAD -- "$f") || fail "cannot read the diff of $f against $base" awk_rc=0 printf '%s\n' "$dtext" | awk -v py="$is_py" ' /^@@/ { inbody = 1; next } @@ -536,7 +538,7 @@ JS commentshape) pr_only gate_script scripts/check-comments.sh - bash scripts/check-comments.sh "$base" || fail "a comment this change adds breaks the comment rules, or the gate could not run (output above). Delete the comment or shorten it to one reason; never add a disable." + bash scripts/check-comments.sh "$bref" || fail "a comment this change adds breaks the comment rules, or the gate could not run (output above). Delete the comment or shorten it to one reason; never add a disable." ;; duptests) gate_script scripts/check-duplicate-tests.sh diff --git a/skills/scaffold/shared/template/scripts/check-change-size.sh b/skills/scaffold/shared/template/scripts/check-change-size.sh index fb2f5ac7..80da1a3d 100755 --- a/skills/scaffold/shared/template/scripts/check-change-size.sh +++ b/skills/scaffold/shared/template/scripts/check-change-size.sh @@ -67,6 +67,11 @@ git rev-parse --git-dir > /dev/null 2>&1 || die "not a git repository" case "${CHANGE_SIZE_EXCLUDE_FILE:-}" in '' | /*) ;; *) CHANGE_SIZE_EXCLUDE_FILE=$PWD/$CHANGE_SIZE_EXCLUDE_FILE ;; esac top=$(git rev-parse --show-toplevel 2> /dev/null) || die "cannot find the top of the repository (a bare repository has none)" cd "$top" || die "cannot enter the top of the repository $top" +# A tag or a local branch named origin/ must not stand in for the remote-tracking branch, so an origin/ base is read as refs/remotes/origin/. +bref=$base +case "$base" in + origin/?*) bref=refs/remotes/$base ;; +esac # A first push has no base to measure against: with no base ref named, no CI, a full history on a branch, and no sign that a remote ever existed, the default origin/main is missing because no remote branch exists yet, so there is no change to size. Every git call is checked: a git failure, like any sign of a remote, means a base should exist, so the caller fails closed. Signs of a remote: a named base, any remote-tracking ref, a shallow clone, a detached HEAD, an upstream on any branch, a non-empty FETCH_HEAD, and a clone, pull, fetch or merge of origin in the HEAD reflog. The last three outlive a deleted remote or ref; an agent that also deletes the reflog or FETCH_HEAD file is not caught, and a history that only ever pushed (never fetched or cloned) leaves no sign once the remote, the remote-tracking refs and the upstream settings are deleted. That residual stays: CI never takes this path. first_push() { local refs shallow_file cur fh msgs rc @@ -98,12 +103,12 @@ merge origin"*) return 1 ;; esac return 0 } -if ! git rev-parse --verify --quiet "${base}^{commit}" > /dev/null && first_push; then +if ! git rev-parse --verify --quiet "${bref}^{commit}" > /dev/null && first_push; then printf 'check-change-size: first push: no base branch yet, so there is no change to measure against one\n' exit 0 fi -git rev-parse --verify --quiet "${base}^{commit}" > /dev/null || die "base ref '$base' not found, so the change size cannot be measured. Fetch it (git fetch origin main), or pass another base ref as the first argument. With no origin (a cloned project whose remote was removed), the base ref argument is the way: for example the commit before the adoption commit." -mb=$(git merge-base "$base" HEAD 2> /dev/null) || die "no merge base between '$base' and HEAD (shallow clone?). Fetch full history (git fetch --unshallow), or pass another base ref." +git rev-parse --verify --quiet "${bref}^{commit}" > /dev/null || die "base ref '$base' not found, so the change size cannot be measured. Fetch it (git fetch origin main), or pass another base ref as the first argument. With no origin (a cloned project whose remote was removed), the base ref argument is the way: for example the commit before the adoption commit." +mb=$(git merge-base "$bref" HEAD 2> /dev/null) || die "no merge base between '$base' and HEAD (shallow clone?). Fetch full history (git fetch --unshallow), or pass another base ref." tmp=$(mktemp -d "${TMPDIR:-/tmp}/check-change-size.XXXXXX") || die "cannot create a temporary folder" trap 'rm -rf "$tmp"' EXIT diff --git a/skills/scaffold/shared/template/scripts/check-comments.sh b/skills/scaffold/shared/template/scripts/check-comments.sh index 82f50e70..b809d0a5 100755 --- a/skills/scaffold/shared/template/scripts/check-comments.sh +++ b/skills/scaffold/shared/template/scripts/check-comments.sh @@ -14,6 +14,8 @@ # Shebangs are never judged. Tokenizers: the project's own node_modules/typescript for TypeScript and JavaScript, python3 tokenize and ast for Python. # Base ref: the argument, else BASE_REF, else the merge base with the default branch; in CI (CI, GITHUB_ACTIONS or TF_BUILD) the default branch is never guessed, # so CI needs the argument or the pipeline target variable; the pipeline passes the base argument on every trigger, since a push run has no target variable and exits 2. In CI a BASE_REF from the environment is accepted only when it names the pipeline's own target branch variable; the report says which. +# First push: with no remote base (no upstream, origin/main or origin/master, no remote-tracking ref, not CI: check-review-record.sh --first-push) every tracked source file is judged as new, never nothing, and a BASE_REF from the environment is refused there. +# On a first push a source file is left out only when its path and sha256 equal a row of the seeded file table (check-review-record.sh --seeded-paths); an edited, substituted or unlisted file is judged, a missing or unreadable table exits 2, and the counts left out and judged are printed. # In CI on a push to the target branch HEAD is the base, so there is nothing to compare: the gate says so, exits 0 and judges pull requests only. # When a change touches no judged file the gate prints "nothing checked" and the reason instead of ok and exits 0. --all with no source file under its paths, or a missing path, exits 2. # Exit 0 clean, 1 findings, 2 cannot run (missing runtime or package, no base, unreadable file), always with one line naming the cause. @@ -90,6 +92,26 @@ src_seen=0 : > "$wd/skipped" : > "$wd/links" +# Prints refs/remotes/origin/ for origin/ or refs/remotes/origin/; fails for anything else (a local branch, a tag, HEAD, a sha, refs/heads/...). Only the remote-tracking ref is a base: a local branch or a tag is writable by the agent and can stand at HEAD. +qualify_base() { + case "$1" in + '' | -* | *..* | *[!A-Za-z0-9._/-]*) return 1 ;; + refs/remotes/origin/?*) printf '%s\n' "$1" ;; + origin/?*) printf 'refs/remotes/%s\n' "$1" ;; + *) return 1 ;; + esac +} + +# Sets up the whole-content mode: the base is the empty tree and every tracked source file is judged as new, except files equal to their seeded copy. +whole_content() { + first=1 + wclabel="first push" + ref="the empty tree" + decision=$1 + bash "$here/check-review-record.sh" --seeded-paths > "$wd/seeded.lst" 2> "$wd/seeded.err" || die "the seeded file table cannot be read, so whole content cannot tell seeded files from changed ones: $(head -n 1 "$wd/seeded.err")" + seeded=$(cat "$wd/seeded.lst") || die "cannot read the seeded file list" +} + # Joins the lines of a file with commas, at most 20 of them. list_lines() { LC_ALL=C awk 'NR <= 20 { printf "%s%s", (NR > 1 ? ", " : ""), $0 } END { if (NR > 20) printf ", and %d more", NR - 20 }' "$1" @@ -146,7 +168,12 @@ else target=${SYSTEM_PULLREQUEST_TARGETBRANCH#refs/heads/} fi ref= + first=0 + ref_full="" + seeded="" + NL=$'\n' if [ -n "$arg_base" ]; then + ref_full=$(qualify_base "$arg_base") || die "base ref '$arg_base' is refused: only a remote-tracking base (origin/) counts, never a local branch, a tag, HEAD or a sha. Fix: fetch it (git fetch origin) and pass origin/." ref=$arg_base decision="base ref taken from the command-line argument" elif [ -n "$env_base" ]; then @@ -157,27 +184,63 @@ else *) die "BASE_REF=$env_base is refused in CI: it is not the pipeline target branch ($target). Fix: unset BASE_REF, or pass the base ref as an argument in the pipeline step." ;; esac decision="BASE_REF from the environment, accepted because it names the pipeline target branch ($target)" + env_base=origin/$target else + if bash "$here/check-review-record.sh" --first-push > /dev/null 2>&1; then + die "BASE_REF from the environment is refused on a first push: no base exists, so a base set by hand could only empty the diff. Fix: unset BASE_REF." + fi decision="BASE_REF from the environment (not CI)" fi + ref_full=$(qualify_base "$env_base") || die "BASE_REF=$env_base is refused: only a remote-tracking base (origin/) counts, never a local branch, a tag, HEAD or a sha. Fix: unset BASE_REF, or set it to origin/." ref=$env_base elif [ "$in_ci" = 1 ] && [ -n "$target" ]; then ref=origin/$target + ref_full=$(qualify_base "$ref") || die "the pipeline target branch name '$target' is not a plain branch name. Fix: pass the base ref as an argument in the pipeline step." decision="pipeline target branch ($target)" elif [ "$in_ci" = 1 ]; then die "in CI the base ref is never guessed and no pull-request target variable is set (GITHUB_BASE_REF or SYSTEM_PULLREQUEST_TARGETBRANCH). Fix: pass the base ref as an argument in the pipeline step." + elif bash "$here/check-review-record.sh" --first-push > /dev/null 2>&1; then + whole_content "first push, no base branch: every tracked source file is judged as new, except files equal to their seeded copy" else head_ref=$(git symbolic-ref -q refs/remotes/origin/HEAD 2> /dev/null || true) head_ref=${head_ref#refs/remotes/} - for cand in "$head_ref" origin/main origin/master main master; do + head_rev=$(git rev-parse --verify -q 'HEAD^{commit}' 2> /dev/null) || die "cannot read HEAD" + equal_head=0 + # Only remote-tracking refs are a base. A candidate that stands at HEAD is skipped: a ref written by hand at HEAD would empty the diff, as it does in check-workarounds.sh. + for cand in "$head_ref" origin/main origin/master; do [ -n "$cand" ] || continue - if git rev-parse --verify -q "$cand^{commit}" > /dev/null 2>&1; then ref=$cand; break; fi + full=$(qualify_base "$cand") || continue + cand_rev=$(git rev-parse --verify -q "$full^{commit}" 2> /dev/null) || continue + if [ "$cand_rev" = "$head_rev" ]; then equal_head=1; continue; fi + ref=$cand + ref_full=$full + break done - [ -n "$ref" ] || die "no default branch found to diff against. Fix: fetch it (git fetch origin) or pass the base ref as an argument." - decision="merge base with the default branch ($ref)" + if [ -z "$ref" ] && [ "$equal_head" = 1 ]; then + whole_content "every remote-tracking base stands at HEAD, so none can be told from a ref written by hand: every tracked source file is judged as new, except files equal to their seeded copy" + wclabel="whole content" + elif [ -z "$ref" ]; then + bash "$here/check-review-record.sh" --first-push > /dev/null 2>&1 + [ $? -ne 2 ] || die "no remote base branch is readable, yet a remote-tracking ref, an upstream, a shallow clone or a CI marker says one may exist, and a local branch is not a base. Fix: fetch it (git fetch origin), or name the base yourself: pass it as the base-ref argument, or set BASE_REF outside CI." + die "no default branch found to diff against. Fix: fetch it (git fetch origin), or name the base yourself: pass it as the base-ref argument, or set BASE_REF outside CI." + fi + if [ "$first" = 0 ]; then decision="merge base with the default branch ($ref)"; fi + fi + # Outside CI an explicit base that stands at HEAD cannot be told from a ref written by hand to empty the diff, so the whole content is judged. + if [ "$first" = 0 ] && [ "$in_ci" = 0 ] && { [ -n "$arg_base" ] || [ -n "$env_base" ]; }; then + head_rev=$(git rev-parse --verify -q 'HEAD^{commit}' 2> /dev/null) || die "cannot read HEAD" + base_rev=$(git rev-parse --verify -q "$ref_full^{commit}" 2> /dev/null) || base_rev="" + if [ -n "$base_rev" ] && [ "$base_rev" = "$head_rev" ]; then + whole_content "the base $ref stands at HEAD, so it cannot be told from a ref written by hand: every tracked source file is judged as new, except files equal to their seeded copy" + wclabel="whole content" + fi + fi + if [ "$first" = 1 ]; then + mb=$(git hash-object -t tree /dev/null) || die "cannot name the empty tree" + else + git rev-parse --verify -q "$ref_full^{commit}" > /dev/null 2>&1 || die "base ref not found: $ref. Fix: fetch it (CI needs fetch-depth: 0)." + mb=$(git merge-base "$ref_full" HEAD 2> /dev/null) || die "no merge base between $ref and HEAD. Fix: fetch full history (CI needs fetch-depth: 0)." fi - git rev-parse --verify -q "$ref^{commit}" > /dev/null 2>&1 || die "base ref not found: $ref. Fix: fetch it (CI needs fetch-depth: 0)." - mb=$(git merge-base "$ref" HEAD 2> /dev/null) || die "no merge base between $ref and HEAD. Fix: fetch full history (CI needs fetch-depth: 0)." head_sha=$(git rev-parse HEAD 2> /dev/null) || die "cannot read HEAD" git -c core.quotePath=false diff --relative --src-prefix=a/ --dst-prefix=b/ --no-color --no-ext-diff --no-textconv --text -U0 -M --diff-filter=AMR "$mb" -- . > "$wd/diff" 2> "$wd/diff.err" || die "git diff failed: $(head -n 1 "$wd/diff.err")" LC_ALL=C awk ' @@ -201,10 +264,12 @@ else ' "$wd/diff" > "$wd/ranges" || die "cannot read the git diff" while IFS="$(printf '\t')" read -r f r; do [ "$r" != '!quoted' ] || die "a changed path needs quoting, rename it: $f" + case "$NL$seeded$NL" in *"$NL$f$NL"*) continue ;; esac add_spec "$f" "$r" done < "$wd/ranges" git ls-files -o --exclude-standard -z > "$wd/untracked.z" || die "cannot list the untracked files (git ls-files failed, see the message above)" while IFS= read -r -d '' f; do + case "$NL$seeded$NL" in *"$NL$f$NL"*) continue ;; esac add_spec "$f" all done < "$wd/untracked.z" if [ "$in_ci" = 1 ] && [ "$mb" = "$head_sha" ] && [ ! -s "$specs" ]; then @@ -255,6 +320,10 @@ fi nfiles=$(wc -l < "$specs" | tr -d ' ') [ -z "$decision" ] || printf 'check-comments: diff base: %s\n' "$decision" +if [ "${first:-0}" = 1 ]; then + nseeded=$(wc -l < "$wd/seeded.lst" | tr -d ' ') + printf 'check-comments: %s: %s project files equal their seeded copy and are left out; %s source files are judged.\n' "${wclabel:-first push}" "$nseeded" "$nfiles" +fi if [ "$nfiles" = 0 ]; then if [ "$all" = 1 ] && [ "$src_seen" = 0 ]; then if [ -s "$wd/links" ]; then diff --git a/skills/scaffold/shared/template/scripts/check-contract.sh b/skills/scaffold/shared/template/scripts/check-contract.sh index 0c698ca0..f646db09 100755 --- a/skills/scaffold/shared/template/scripts/check-contract.sh +++ b/skills/scaffold/shared/template/scripts/check-contract.sh @@ -4,7 +4,7 @@ # The app may sit in any folder (backend/, apps/api/): it is found by its stack files (requirements*.txt or pyproject.toml naming fastapi, nest-cli.json or @nestjs/core in package.json) or by its entry point, anywhere in the tracked and untracked-but-not-ignored files. The gate works from the repository root, so a run from a subfolder gives the same result. # Comparison: both documents are read with the stack's interpreter (python3 -I, node), keys sorted at every level, whitespace dropped, array order kept. A difference fails, prints at most 40 lines of unified diff and the exact regenerate command. A document that differs only in key order or whitespace passes. # Fails closed: a committed contract that is empty, not a JSON object with an openapi or swagger key, a symlink, not a regular file or over 5 MB; a generator that exits non-zero, prints nothing or prints invalid JSON; a committed contract with no entry point; an entry point with no committed contract; a missing python3 or node (one line, in every mode). -# Base ref (argument, GATE_BASE, else origin/main) is read for one rule: when the entry point and the contract both changed in the same diff, the gate fails, because a changed generator can print the committed file. A changed entry point alone is reported. An unresolved base is a failure in CI and skips that one rule locally. +# Base ref (argument, GATE_BASE, else origin/main) is read for one rule: when the entry point and the contract both changed in the same diff, the gate fails, because a changed generator can print the committed file. A changed entry point alone is reported. An unresolved base is a failure in CI and, locally, with no base named, a failure too unless this is a genuine first push (check-review-record.sh --first-push: no base branch, nothing hinting at one), where every file is new and only that one rule is skipped; the contract match still runs on the whole content. # Nothing checked (exit 0, own line): an app with no committed contract and no entry point; a frontend (next.config.*, vite.config.*), because the scaffold seeds no generated API types from a contract today. No generator is added here. # Exit: 0 match or nothing checked, 1 a mismatch or a rule broken, 2 it could not run (no git, unreadable input, unresolved base in CI, no temporary folder). # Not caught: a developer who edits files outside git and the hooks on their own machine and never opens a PR; git commit --no-verify locally (CI still runs the gate); a contract that matches the code but is wrong for the consumer; an entry point that prints the committed file and was changed in an earlier pull request; a generator that reaches a network; stacks or tools the plugin does not seed. @@ -45,14 +45,24 @@ trap 'rm -rf "$tmp"' EXIT base=${1:-${GATE_BASE:-origin/main}} mb= -if git rev-parse --verify --quiet "${base}^{commit}" > /dev/null 2>&1; then - mb=$(git merge-base "$base" HEAD 2> /dev/null) || mb= +bref=$base +case "$base" in + origin/main | origin/master) bref=refs/remotes/$base ;; +esac +if git rev-parse --verify --quiet "${bref}^{commit}" > /dev/null 2>&1; then + mb=$(git merge-base "$bref" HEAD 2> /dev/null) || mb= fi if [ -z "$mb" ]; then if is_ci; then - die "base ref '$base' not found or has no merge base with HEAD, so a changed generator cannot be detected. Fetch it (git fetch origin main with full history) or pass another base ref." + die "base ref '$base' not found or has no merge base with HEAD, so a changed generator cannot be detected. Fetch it (git fetch origin main with full history), or pass another base ref as the argument or in GATE_BASE." + fi + if [ -n "${1:-}${GATE_BASE:-}" ]; then + echo "check-contract: base ref '$base' not found: the changed-generator rule is skipped locally." + elif bash "$(dirname "$0")/check-review-record.sh" --first-push > /dev/null 2>&1; then + echo "check-contract: first push, no base branch: every file is new, so the changed-generator rule has nothing to compare; the contract match below judges the whole content." + else + die "base ref '$base' not found and this is not a first push, so a changed generator cannot be detected. Fix: fetch it (git fetch origin main with full history), or name the base yourself: pass it as the argument or set GATE_BASE=." fi - echo "check-contract: base ref '$base' not found: the changed-generator rule is skipped locally." fi # Writes the helper scripts: one prints the canonical form of a JSON file, one per interpreter. diff --git a/skills/scaffold/shared/template/scripts/check-mutation-diff.sh b/skills/scaffold/shared/template/scripts/check-mutation-diff.sh index 4b0868bf..4f4f31f6 100755 --- a/skills/scaffold/shared/template/scripts/check-mutation-diff.sh +++ b/skills/scaffold/shared/template/scripts/check-mutation-diff.sh @@ -57,8 +57,12 @@ trap 'rm -rf "$tmp"' EXIT base=${1:-${GATE_BASE:-origin/main}} mb= -if git rev-parse --verify --quiet "${base}^{commit}" > /dev/null 2>&1; then - mb=$(git merge-base "$base" HEAD 2> /dev/null) || mb= +bref=$base +case "$base" in + origin/main | origin/master) bref=refs/remotes/$base ;; +esac +if git rev-parse --verify --quiet "${bref}^{commit}" > /dev/null 2>&1; then + mb=$(git merge-base "$bref" HEAD 2> /dev/null) || mb= fi if [ -z "$mb" ]; then if is_ci; then diff --git a/skills/scaffold/shared/template/scripts/check-review-record.sh b/skills/scaffold/shared/template/scripts/check-review-record.sh index f93c9bd9..9ca76081 100755 --- a/skills/scaffold/shared/template/scripts/check-review-record.sh +++ b/skills/scaffold/shared/template/scripts/check-review-record.sh @@ -7,6 +7,8 @@ # A bare CI=1 or GITHUB_ACTIONS=false does not skip. Anyone can set these by hand: the skip is not a security boundary. # Limit: only the record for HEAD is checked, so a push of another branch or ref is not covered (a pre-push hook gets the pushed refs on stdin). # Also used by record-review.sh: --emit [base] prints base, HEAD sha and diff hash; --print-diff prints the diff. +# First push: when no remote base exists and nothing hints at one, the base is the empty tree, so the whole pushed content is reviewed, never nothing. --first-push exits 0 for that case, 1 when a base exists, 2 when one may exist but cannot be read (upstream configured, remote-tracking refs, shallow clone, CI); check-comments.sh and check-contract.sh ask it too. An explicit TC_REVIEW_BASE never gets the empty tree: it must name a real ref, and a ref equal to HEAD still leaves nothing to review. +# Seeded files on a first push: a tracked file is left out of the first-push diff only when its path and its sha256 equal a row of the seeded file table (gate-ratchet.sh --seeded-table , stack from .claude/harness.json); a file edited by one byte, a substituted file and every file not in the table stay in the diff. A missing, unreadable or empty table exits 2. The counts left out and judged go to stderr. --seeded-paths prints those paths for the work tree (check-comments.sh uses it). # The record is an honesty aid inside one session, not a security boundary. set -uo pipefail @@ -43,6 +45,32 @@ hash_file() { fi } +# Exit 0 on a genuine first push (no upstream, origin/HEAD, origin/main or origin/master, no remote-tracking ref at all, no shallow clone, no configured upstream, not CI), 1 when a base ref exists, 2 when a base may exist but is not here. +first_push() { + local cand remotes shallow_file cur_branch + git rev-parse --git-dir > /dev/null 2>&1 || return 2 + git rev-parse --verify --quiet 'HEAD^{commit}' > /dev/null 2>&1 || return 2 + for cand in '@{upstream}' refs/remotes/origin/HEAD refs/remotes/origin/main refs/remotes/origin/master; do + if git rev-parse --verify --quiet "$cand^{commit}" > /dev/null 2>&1; then return 1; fi + done + remotes=$(git for-each-ref --count=1 --format='%(refname)' refs/remotes) || return 2 + [ -z "$remotes" ] || return 2 + shallow_file=$(git rev-parse --git-path shallow) || return 2 + [ ! -e "$shallow_file" ] || return 2 + cur_branch=$(git symbolic-ref -q --short HEAD 2> /dev/null || true) + if [ -n "$cur_branch" ] && git config --get "branch.$cur_branch.merge" > /dev/null 2>&1; then return 2; fi + if [ -n "${GITHUB_ACTIONS:-}" ] || [ -n "${TF_BUILD:-}" ] || { [ -n "${CI:-}" ] && [ "${CI:-}" != false ]; }; then return 2; fi + return 0 +} + +# Names the remote-tracking ref for the two default branches, so a local branch or tag called origin/main is never taken for it. +full_ref() { + case "$1" in + origin/?*) printf 'refs/remotes/%s\n' "$1" ;; + *) printf '%s\n' "$1" ;; + esac +} + safe_ref() { case "$1" in '' | -* | *[!A-Za-z0-9._/-]*) return 1 ;; @@ -55,49 +83,130 @@ resolve_base() { local c if [ -n "$1" ]; then safe_ref "$1" || fail "base ref '$1' is not a plain branch name." - git rev-parse --verify --quiet "$1^{commit}" > /dev/null 2>&1 || fail "base ref '$1' does not exist here: set TC_REVIEW_BASE to a branch such as origin/main." + [ "$1" != empty-tree ] || fail "base ref 'empty-tree' is reserved for a first push and cannot be set by hand." + git rev-parse --verify --quiet "$(full_ref "$1")^{commit}" > /dev/null 2>&1 || fail "base ref '$1' does not exist here: fetch it, or set TC_REVIEW_BASE to a branch that exists here, such as origin/main." printf '%s\n' "$1" return 0 fi for c in origin/main origin/master; do - if git rev-parse --verify --quiet "$c^{commit}" > /dev/null 2>&1; then + if git rev-parse --verify --quiet "refs/remotes/$c^{commit}" > /dev/null 2>&1; then printf '%s\n' "$c" return 0 fi done - fail "no base ref found (looked for origin/main and origin/master): fetch it, or set TC_REVIEW_BASE to a branch." + if first_push; then + printf 'empty-tree\n' + return 0 + fi + fail "no base ref found (looked for origin/main and origin/master) and this is not a first push, so a base may exist. Fix: fetch it (git fetch origin main), or name the base yourself with TC_REVIEW_BASE=, for example TC_REVIEW_BASE=origin/main bash scripts/record-review.sh --prepare." } mb_out="" +pargs=(.) + +# Sets pargs to the pathspecs of the first-push diff: the project folder minus every committed file that equals its seeded copy (exact path and exact sha256 row of the table). Prints the counts to stderr. Dies (exit 2) when the stack or the table cannot be read. +exclude_seeded_head() { + local st f n m + mkdir "$sd/head" || die "cannot create a temporary folder" + git show 'HEAD:./.claude/harness.json' > "$sd/harness.json" 2> "$sd/show.err" || die "a first push needs .claude/harness.json committed, to know the stack of the seeded file table: $(head -n 1 "$sd/show.err")" + st=$(stack_of "$sd/harness.json") || exit 2 + git archive HEAD > "$sd/head.tar" 2> "$sd/archive.err" || die "cannot read the committed files: $(head -n 1 "$sd/archive.err")" + tar -xf "$sd/head.tar" -C "$sd/head" 2> "$sd/tar.err" || die "cannot unpack the committed files: $(head -n 1 "$sd/tar.err")" + ( cd "$sd/head" && find . -type f -print0 > "$sd/all.z" && filter_regular "$sd/all.z" "$sd/cand.z" ) || exit 2 + ( cd "$sd/head" && seeded_core "$st" "$sd/cand.z" ) > "$sd/seeded.lst" || exit 2 + n=0 + while IFS= read -r f; do + pargs+=(":(exclude,literal)$f") + n=$((n + 1)) + done < "$sd/seeded.lst" + m=$(tr -cd '\0' < "$sd/cand.z" | wc -c | tr -d ' ') || die "cannot count the committed files" + printf 'check-review-record: first push: %s of %s committed files equal their seeded copy (stack %s) and are left out; %s are judged.\n' "$n" "$m" "$st" "$((m - n))" >&2 +} # Writes the committed diff of this project from the merge base of $1 to HEAD into file $2; fails closed on every problem. write_diff() { - local bsha hsha mb gerr + local bsha bref hsha mb gerr hsha=$(git rev-parse HEAD 2> /dev/null) || fail "no commit yet: commit first, then review." - bsha=$(git rev-parse --verify --quiet "$1^{commit}" 2> /dev/null) || fail "base ref '$1' does not exist here." - [ "$bsha" != "$hsha" ] || nothing "base ref '$1' is HEAD itself: there is nothing to review." - mb=$(git merge-base "$1" HEAD 2> /dev/null) || fail "no merge base between '$1' and HEAD (shallow clone or unrelated history): fetch more history, for example git fetch --unshallow, or set TC_REVIEW_BASE." - [ "$mb" != "$hsha" ] || nothing "HEAD has no commit beyond '$1': there is nothing to review." + if [ "$1" = empty-tree ]; then + first_push || fail "base 'empty-tree' is only for a first push, and a base may exist: fetch origin, then review again." + mb=$(git hash-object -t tree /dev/null) || fail "cannot name the empty tree." + exclude_seeded_head + else + bref=$(full_ref "$1") + bsha=$(git rev-parse --verify --quiet "$bref^{commit}" 2> /dev/null) || fail "base ref '$1' does not exist here." + [ "$bsha" != "$hsha" ] || nothing "base ref '$1' is HEAD itself: there is nothing to review." + mb=$(git merge-base "$bref" HEAD 2> /dev/null) || fail "no merge base between '$1' and HEAD (shallow clone or unrelated history): fetch more history, for example git fetch --unshallow, or name another base with TC_REVIEW_BASE=." + [ "$mb" != "$hsha" ] || nothing "HEAD has no commit beyond '$1': there is nothing to review." + fi mb_out=$mb if ! gerr=$(git -c core.quotepath=false -c diff.noprefix=false -c diff.mnemonicPrefix=false diff \ --no-ext-diff --no-textconv --text --no-color --no-renames --full-index \ - --src-prefix=a/ --dst-prefix=b/ -U3 --diff-algorithm=myers "$mb" HEAD -- . 2>&1 > "$2"); then + --src-prefix=a/ --dst-prefix=b/ -U3 --diff-algorithm=myers "$mb" HEAD -- "${pargs[@]}" 2>&1 > "$2"); then fail "git diff failed against '$1': ${gerr%%$'\n'*}" fi [ -s "$2" ] || nothing "the diff against '$1' is empty: there is nothing to review." } +here=$(cd "$(dirname "$0")" && pwd) || die "cannot find the scripts folder" +sd="" + +# Prints the stack named in the harness file $1; dies unless it is one of the four known stacks. +stack_of() { + local st + st=$(sed -n 's/^[[:space:]]*"stack"[[:space:]]*:[[:space:]]*"\([a-z-]*\)".*/\1/p' "$1" | awk 'NR == 1') || die "cannot read the stack from the harness file" + case "$st" in + fastapi | nestjs | nextjs | vite-react) printf '%s\n' "$st" ;; + *) die "the seeded file table needs the stack in .claude/harness.json (fastapi, nestjs, nextjs or vite-react), found '$st'" ;; + esac +} + +# Keeps the regular, non-symlink files of the NUL list $1 whose names have no newline, NUL separated, into $2. +filter_regular() { + local f + { + while IFS= read -r -d '' f; do + case "$f" in *$'\n'*) continue ;; esac + if [ -f "$f" ] && [ ! -L "$f" ]; then printf '%s\0' "$f"; fi + done < "$1" + } > "$2" || die "cannot write a temporary file" +} + +# Prints, one per line, each file of the NUL list $2 (names relative to the current folder) whose path and sha256 equal a row of the seeded table of stack $1. +seeded_core() { + [ -s "$2" ] || return 0 + bash "$here/gate-ratchet.sh" --seeded-table "$1" > "$sd/table" 2> "$sd/table.err" || die "the seeded file table of $1 cannot be read: $(head -n 1 "$sd/table.err")" + [ -s "$sd/table" ] || die "the seeded file table of $1 is empty" + if command -v shasum > /dev/null 2>&1; then + xargs -0 shasum -a 256 -- < "$2" > "$sd/hashes" 2> "$sd/hashes.err" || die "cannot hash the tracked files: $(head -n 1 "$sd/hashes.err")" + elif command -v sha256sum > /dev/null 2>&1; then + xargs -0 sha256sum -- < "$2" > "$sd/hashes" 2> "$sd/hashes.err" || die "cannot hash the tracked files: $(head -n 1 "$sd/hashes.err")" + else + die "need shasum or sha256sum" + fi + LC_ALL=C awk -F'\t' ' + NR == FNR { t[$2] = $1; next } + { h = substr($0, 1, 64); p = substr($0, 67); sub(/^\.\//, "", p); if ((p in t) && t[p] == h) print p } + ' "$sd/table" "$sd/hashes" || die "cannot compare the files with the seeded table" +} + require_clean() { local st st=$(git status --porcelain -- . 2> /dev/null) || fail "cannot read the git status." [ -z "$st" ] || fail "the working tree has uncommitted or untracked changes: commit the changes, then review again." } +# Judges the repository of the caller's folder, so check-comments.sh and check-contract.sh ask about their own project. +if [ "${1:-}" = --first-push ]; then + first_push + exit $? +fi + root=$(cd "$(dirname "$0")/.." && pwd) || die "cannot find the project root" cd "$root" || die "cannot enter $root" git rev-parse --git-dir > /dev/null 2>&1 || die "not a git repository" tmpf=$(mktemp "${TMPDIR:-/tmp}/review-record.XXXXXX") || die "cannot create a temporary file" -trap 'rm -f "$tmpf"' EXIT +sd=$(mktemp -d "${TMPDIR:-/tmp}/review-record.XXXXXX") || die "cannot create a temporary folder" +trap 'rm -f "$tmpf"; rm -rf "$sd"' EXIT mode=${1:-} case "$mode" in @@ -119,6 +228,15 @@ case "$mode" in cat "$tmpf" exit 0 ;; + --seeded-paths) + # The stack is read from the committed .claude/harness.json, the same source exclude_seeded_head uses, so the review and comments gates cannot pick different stacks from an edited working copy. + git show 'HEAD:./.claude/harness.json' > "$sd/harness.json" 2> "$sd/show.err" || die "a first push needs .claude/harness.json committed, to know the stack of the seeded file table: $(head -n 1 "$sd/show.err")" + st=$(stack_of "$sd/harness.json") || exit 2 + git ls-files -z -co --exclude-standard > "$sd/all.z" 2> "$sd/ls.err" || die "cannot list the project files: $(head -n 1 "$sd/ls.err")" + filter_regular "$sd/all.z" "$sd/cand.z" + seeded_core "$st" "$sd/cand.z" + exit 0 + ;; '') ;; *) die "usage: check-review-record.sh" ;; esac diff --git a/skills/scaffold/shared/template/scripts/check-shared-gates.sh b/skills/scaffold/shared/template/scripts/check-shared-gates.sh index 82516105..3a05e4f2 100755 --- a/skills/scaffold/shared/template/scripts/check-shared-gates.sh +++ b/skills/scaffold/shared/template/scripts/check-shared-gates.sh @@ -44,9 +44,12 @@ ci_var() { # Sets branch to the base branch name (origin/) or prints a first-push skip and exits 0. The first-push decision is gate-ratchet.sh's own: it is asked, not repeated here. resolve_base() { local cand name="" ratchet_out ratchet_rc - for cand in '@{upstream}' origin/HEAD origin/main origin/master; do + for cand in '@{upstream}' refs/remotes/origin/HEAD refs/remotes/origin/main refs/remotes/origin/master; do if git rev-parse --verify -q "$cand^{commit}" >/dev/null 2>&1; then - name=$(git rev-parse --abbrev-ref "$cand" 2>/dev/null) || die "cannot name the base ref $cand" + # The full ref name is read, not the abbreviation: a tag with the same short name makes git abbreviate to remotes/origin/main. + name=$(git rev-parse --symbolic-full-name "$cand" 2>/dev/null) || die "cannot name the base ref $cand" + name=${name#refs/remotes/} + name=${name#refs/heads/} break fi done diff --git a/skills/scaffold/shared/template/scripts/check-workarounds.sh b/skills/scaffold/shared/template/scripts/check-workarounds.sh index b4c92280..78b67399 100755 --- a/skills/scaffold/shared/template/scripts/check-workarounds.sh +++ b/skills/scaffold/shared/template/scripts/check-workarounds.sh @@ -47,7 +47,7 @@ if [ "${1:-}" = "--pre-push" ]; then echo "check-workarounds: the remote's commit $pbase for '$rref' is not in this repository. Run 'git fetch $remote' and push again." >&2 exit 1 fi - bash "$0" "$pbase" "$tip" || pp_status=1 + TC_WA_CHILD=$$ bash "$0" "$pbase" "$tip" || pp_status=1 done if [ "$pp_seen" -eq 0 ]; then echo "check-workarounds: the push list on stdin is empty. git sends an empty list when there is nothing to push ('Everything up-to-date'), so that push changes nothing on the remote; otherwise the pre-push hook must pass the list (lefthook use_stdin: true). To check by hand, pass a base: bash scripts/check-workarounds.sh ." >&2; exit 1; fi if [ "$pp_status" -eq 0 ]; then echo "check-workarounds: pre-push judged every pushed ref against the remote's own commit"; fi @@ -55,7 +55,6 @@ if [ "${1:-}" = "--pre-push" ]; then fi arg=${1:-} -arg=${arg#refs/heads/} tipname=${2:-HEAD} head=$(git rev-parse --verify -q "$tipname^{commit}") || { echo "check-workarounds: no commit yet; nothing to compare. Commit first, then push."; exit 0; } @@ -63,11 +62,34 @@ base="" if [ "$arg" = "--root" ]; then : # first push to an empty remote: every file is new, the whole tree is judged elif [ -n "$arg" ]; then + # Only a remote-tracking ref is a base: origin/ and refs/remotes/origin/ map to refs/remotes/origin/, so a tag or local branch of that name cannot win. A bare sha is taken only from the --pre-push route itself (it sets TC_WA_CHILD to its own process id and hands over the remote sha it was given with the tip). + case "$arg" in + '' | -* | *..* | *[!A-Za-z0-9._/-]*) echo "check-workarounds: base '$arg' is refused: only a remote-tracking base (origin/) counts, never a local branch, a tag or HEAD. Fetch it (git fetch origin) and pass origin/." >&2; exit 1 ;; + refs/remotes/origin/?*) ;; + origin/?*) arg=refs/remotes/$arg ;; + *) + sha_ok=0 + case "$arg" in *[!0-9a-f]*) ;; *) if [ "${TC_WA_CHILD:-}" = "$PPID" ] && [ -n "${2:-}" ] && { [ "${#arg}" -eq 40 ] || [ "${#arg}" -eq 64 ]; }; then sha_ok=1; fi ;; esac + if [ "$sha_ok" = 0 ]; then + echo "check-workarounds: base '$arg' is refused: only a remote-tracking base (origin/) counts, never a local branch, a tag or HEAD. Fetch it (git fetch origin) and pass origin/." >&2 + exit 1 + fi + ;; + esac git rev-parse --verify -q "$arg^{commit}" > /dev/null || { echo "check-workarounds: base '$arg' not found. Fetch with full history (fetch-depth 0) and run again." >&2; exit 1; } base=$arg + # A base that stands at the tip cannot be told from a ref written by hand to empty the diff: the whole content is judged. + if [ "$(git rev-parse --verify -q "$arg^{commit}")" = "$head" ]; then + echo "check-workarounds: the base '$arg' stands at the pushed commit, so it cannot be told from a ref written by hand: the whole content is judged" + base="" + fi else - for cand in '@{upstream}' origin/HEAD origin/main origin/master main master; do + # Only remote-tracking candidates: a local branch named main or master is writable by the agent and proves nothing. With none found the whole content is judged. + for cand in '@{upstream}' refs/remotes/origin/HEAD refs/remotes/origin/main refs/remotes/origin/master; do rev=$(git rev-parse --verify -q "$cand^{commit}" 2> /dev/null) || continue + # The upstream counts only when it is a remote-tracking ref of origin: branch..remote can be "." and name a local branch. + full=$(git rev-parse --symbolic-full-name "$cand" 2> /dev/null) || continue + case "$full" in refs/remotes/origin/?*) ;; *) continue ;; esac if [ "$rev" != "$head" ]; then base=$cand; break; fi done fi diff --git a/skills/scaffold/shared/template/scripts/gate-baseline.sh b/skills/scaffold/shared/template/scripts/gate-baseline.sh index ef079790..153bb3bc 100755 --- a/skills/scaffold/shared/template/scripts/gate-baseline.sh +++ b/skills/scaffold/shared/template/scripts/gate-baseline.sh @@ -570,6 +570,10 @@ cmd_prune() { cmd_growth() { [ $# -ge 1 ] || die "usage: gate-baseline.sh growth []" local base=$1 head=${2:-HEAD} top + # A tag or a local branch named origin/main must not stand in for the remote-tracking branch. + case "$base" in + origin/main | origin/master) base=refs/remotes/$base ;; + esac command -v git >/dev/null 2>&1 || die "git not found" case "$BREL" in /*) die "growth needs a baseline path relative to the project directory, not $BREL" ;; diff --git a/skills/scaffold/shared/template/scripts/gate-ratchet.sh b/skills/scaffold/shared/template/scripts/gate-ratchet.sh index 9eca0ded..90bfac06 100755 --- a/skills/scaffold/shared/template/scripts/gate-ratchet.sh +++ b/skills/scaffold/shared/template/scripts/gate-ratchet.sh @@ -22,16 +22,20 @@ die() { } list_mode="" +table_mode="" no_base="" if [ "${1:-}" = --list-guarded ]; then list_mode=1; list_ref=${2:-HEAD}; fi +if [ "${1:-}" = --seeded-table ]; then table_mode=1; table_stack=${2:-}; fi wd=$(mktemp -d "${TMPDIR:-/tmp}/gate-ratchet.XXXXXX") || die "cannot create a temporary folder" trap 'rm -rf "$wd"' EXIT -if [ -z "$list_mode" ]; then +if [ -n "$table_mode" ]; then + : +elif [ -z "$list_mode" ]; then base_ref=${1:-} if [ "$base_ref" = auto ]; then base_ref="" - for cand in '@{upstream}' origin/HEAD origin/main origin/master; do + for cand in '@{upstream}' refs/remotes/origin/HEAD refs/remotes/origin/main refs/remotes/origin/master; do if git rev-parse --verify -q "$cand^{commit}" >/dev/null 2>&1; then base_ref=$cand; break; fi done if [ -z "$base_ref" ]; then @@ -72,6 +76,10 @@ merge origin"*) die "the HEAD reflog shows a clone, pull, fetch or merge of orig no_base=1 fi fi + # A tag or a local branch named origin/main must not stand in for the remote-tracking branch. + case "$base_ref" in + origin/main | origin/master) base_ref=refs/remotes/$base_ref ;; + esac [ -n "$base_ref" ] || [ -n "$no_base" ] || die "usage: gate-ratchet.sh (for example origin/main; auto picks the upstream or origin/main)" if [ -z "$no_base" ]; then git rev-parse --git-dir >/dev/null 2>&1 || die "not a git repository" @@ -2349,39 +2357,987 @@ fp_wholefile() { fastapi) cat <<'SEEDED_HASHES' ca6fa43b6f7055ea558d6cf0d9dacdec403006f5952253357c94f5f8209d46ff lefthook.yml -34bfa71fbaa5c401bb6fd35bb15cddf5db272b9c2776be073e8d4c57b3e75271 .github/workflows/ci.yml +04e027f69421cce153c4413fdb9c2ba9b41c0d5f2909909d830cb031ec596a55 .github/workflows/ci.yml f56dfbf5c46f2579c50953cb4c739a7323be4ff6ceda41007389861892e0d2d4 azure-pipelines.yml -af5385556a02ca8e5eb7821096677df29f95dde94f349e726e408567aeb9ae08 azure-pipelines/templatecentral-gates.yml +172b2ed64d45bbb7465c4ca3e197c4755af5df5a27030556fd20aeef56b77843 azure-pipelines/templatecentral-gates.yml SEEDED_HASHES ;; nestjs) cat <<'SEEDED_HASHES' eeec20bfc0861c308877721179631117fac6ca438b6d4e7cd8441feaeb36c744 lefthook.yml -070a7ae4b7cd9e1db83aad5c63ad5b25fe194e3913e5165cec2a233329c2b90d .github/workflows/ci.yml +7a39f9eca83ca7f6a45cee8625b9c709fbfabb8d55315ad33e307cb6f86268d1 .github/workflows/ci.yml 970a7388f41ce4022541cc643b1c8215d4d84fb8b2dc29fb526b93c78cc5b374 azure-pipelines.yml -af5385556a02ca8e5eb7821096677df29f95dde94f349e726e408567aeb9ae08 azure-pipelines/templatecentral-gates.yml +172b2ed64d45bbb7465c4ca3e197c4755af5df5a27030556fd20aeef56b77843 azure-pipelines/templatecentral-gates.yml SEEDED_HASHES ;; nextjs) cat <<'SEEDED_HASHES' eeec20bfc0861c308877721179631117fac6ca438b6d4e7cd8441feaeb36c744 lefthook.yml -070a7ae4b7cd9e1db83aad5c63ad5b25fe194e3913e5165cec2a233329c2b90d .github/workflows/ci.yml +7a39f9eca83ca7f6a45cee8625b9c709fbfabb8d55315ad33e307cb6f86268d1 .github/workflows/ci.yml 970a7388f41ce4022541cc643b1c8215d4d84fb8b2dc29fb526b93c78cc5b374 azure-pipelines.yml -af5385556a02ca8e5eb7821096677df29f95dde94f349e726e408567aeb9ae08 azure-pipelines/templatecentral-gates.yml +172b2ed64d45bbb7465c4ca3e197c4755af5df5a27030556fd20aeef56b77843 azure-pipelines/templatecentral-gates.yml SEEDED_HASHES ;; vite-react) cat <<'SEEDED_HASHES' eeec20bfc0861c308877721179631117fac6ca438b6d4e7cd8441feaeb36c744 lefthook.yml -070a7ae4b7cd9e1db83aad5c63ad5b25fe194e3913e5165cec2a233329c2b90d .github/workflows/ci.yml +7a39f9eca83ca7f6a45cee8625b9c709fbfabb8d55315ad33e307cb6f86268d1 .github/workflows/ci.yml 970a7388f41ce4022541cc643b1c8215d4d84fb8b2dc29fb526b93c78cc5b374 azure-pipelines.yml -af5385556a02ca8e5eb7821096677df29f95dde94f349e726e408567aeb9ae08 azure-pipelines/templatecentral-gates.yml +172b2ed64d45bbb7465c4ca3e197c4755af5df5a27030556fd20aeef56b77843 azure-pipelines/templatecentral-gates.yml SEEDED_HASHES ;; esac } +# fp_files : the sha256 and path of every file a template-only scaffold of the stack writes (generated: scripts/seeded-facts.sh). A first push leaves a file out of whole-content judging only on an exact path and exact bytes row here; the table sits in this pinned script, so an edit to it is a gate-script change. +# The paths are stored with | for each slash, so that no script mentions a path under scripts/ or .claude/ and the guard scan does not take a seeded rules file for a gate file; fp_files turns the bars back. +fp_files() { + fp_files_stored "$1" | tr '|' '/' +} +fp_files_stored() { + case "$1" in + fastapi) + cat <<'SEEDED_FILES' +1029a45ca118fdb8e440928413a5cb8f86f74fd6dc81b269e82690ee36318320 .claude|.harness-base|.claude|agents|code-reviewer.md +af4cc4a30768a329da916b21de9960dce48bae8bfea1b0237e20be678af3683d .claude|.harness-base|.claude|allowed-licences.txt +4237aa3d384bf3d2e27e7163149a0d7f3a4e12ccb5ab66bbaecb04d78b79cc5c .claude|.harness-base|.claude|bundle-budget.txt +eb8cf70089062a9c297309be2b2e20f0240223feff1fe1eb5e188b371539f1b6 .claude|.harness-base|.claude|change-size-exclude.txt +476fc19f407a4de087953fe9e2d5d64026c41290253df7c547da968582a40648 .claude|.harness-base|.claude|ci-gates.sh +493e60c9326a091f17b62a1ddc088696825546f77f8214915360dd3616e3f392 .claude|.harness-base|.claude|comment-hygiene-patterns.txt +7f468ec04debaa70989ed1c65771d06d89a5ab7a61b9becb6fbc3b77e4f6f0d0 .claude|.harness-base|.claude|gate-budget.conf +5f01d143115a3a5bc1d6e6d122709d9db50566dcc37f6bbdc4000d8445573548 .claude|.harness-base|.claude|gate-budget.sh +4a76d433a06f85ab967b7e0c1c251f9f56585cec8a70997060f052e794004849 .claude|.harness-base|.claude|gates.txt +5393c43cd3fcb77100e7e8ee42ad0642ca85788f8615b30fe3357d3797edf41d .claude|.harness-base|.claude|hooks|block-no-verify.sh +087c4a81b2f96433a2316fcec8323eb7f695b5a4c0bd3dc8205e23429bab0203 .claude|.harness-base|.claude|hooks|post-edit-comment-check.sh +2a399dc5d889ad97664ec54a3155e44cc2b2363ddbae779f31dc818535a021ce .claude|.harness-base|.claude|hooks|post-edit-typecheck.sh +68b09a40cd604e424fda591190e4756199f78740b1d8a6ecfb30ab6b62dac618 .claude|.harness-base|.claude|hooks|protect-files.sh +9cb9ce0e9513b2ae7bcef59cf9403842aa7c7e38840d18c6b4e328678d84d52b .claude|.harness-base|.claude|hooks|session-context.sh +7eed857cb3a62268a1f5904abd0f51a4e4427e9eb155af606e19c180bd3faf01 .claude|.harness-base|.claude|hooks|skill-usage-log.sh +e29e707e8af68c2a5b19d407d772f1a7ca3e51c929091ab70eabe4d335ec771c .claude|.harness-base|.claude|hooks|stop-checks.sh +fabb0a97b1e36659ffdb7331f0a9bd16343674553839b88f0f0e51a89668b13a .claude|.harness-base|.claude|hooks|subagent-stop.sh +20ec81995ed709d3e038e2f43eeb25fb6491c27cd4245db46398437baf080af7 .claude|.harness-base|.claude|hooks|user-prompt-guard.py +e8f19a996f5e512fa8f22ab4ea3f7f55827020f6bff7c596c2b087f00f2adb91 .claude|.harness-base|.claude|licence-exceptions.txt +23e894af3145fbe2ff9f54fa9a9181e189c6aa14156ba151df7422d1c9346b0c .claude|.harness-base|.claude|regen-harness.sh +bdaa785c95e21e9dc4ef70a8c376784784344426858620fd2b4d4c04f5daef22 .claude|.harness-base|.claude|registry-hosts.txt +41777b1a66bc13a7ff72eaaffcc82af7413206f1a06596d0789e3d441434da3e .claude|.harness-base|.claude|release-age-exclude.txt +c2a95d39b93e2e9c3afeaf3c3b19ef158b2b1a5268b5bf3d64760a699738ef6b .claude|.harness-base|.claude|review-checklist-stack.txt +fdf9fca2a99ae6f1a9efd417807c64847b65c07613cd02d47053b3bc71894cb1 .claude|.harness-base|.claude|review-checklist.txt +1ca32ca691625a64452e65adc4cd79bf48812294b9fc69f1664415a74689031b .claude|.harness-base|.claude|seeded-paths.txt +d2a2904080c7c3f345b70beaecf5b0ae9b2371a87748e9610769080efd27640a .claude|.harness-base|.claude|settings.json +51283eeb6d52ffc88f66a852cb5dca2a93655f5456fdc43d27dee927ed336888 .claude|.harness-base|.claude|skills|api-verify|SKILL.md +8436a463b24cffbcfcbba9e6f9d88e1aee3048957c54424deef018d0b024a5b4 .claude|.harness-base|.claude|skills|skill-audit|SKILL.md +805c987b975e0a4c66019d6de553ffcf1503c3f78c459bec67ff4fa5b9251bd5 .claude|.harness-base|.claude|skills|test-consolidate|SKILL.md +6a78ad7f4dfb2c00c60a877b0a33074bf0ff508055cc69f5908c06032c4c8444 .claude|.harness-base|.claude|verify-harness.sh +c34439d3ec8e70df23ecea08ffb63e5d750313cd5269a5c656a87a68a7c49629 .claude|.harness-base|.github|dependabot.yml +04e027f69421cce153c4413fdb9c2ba9b41c0d5f2909909d830cb031ec596a55 .claude|.harness-base|.github|workflows|ci.yml +a1978b7a1e366072692ed55ab372a83b62908ccf6eaa5e2e261906c92c704e43 .claude|.harness-base|.gitleaks.toml +143fa3d4218dd82360a68b69a00ac6f5f26e81453f05842c80a67e8b12fab40f .claude|.harness-base|.lefthook|commit-msg.sh +a87211950f6ac6b6fb7e24524e51c452d0b419d1dd290fa2863fb8bd65eefa61 .claude|.harness-base|AGENTS.md +f62f6d822cd73580c8ac858385aef13f627eca4aad0b54bdca2ec8d03001a142 .claude|.harness-base|docs|adr|0001-test-each-behaviour-once.md +154082be3208d8a04e8ab3064ddb99e4d5345284866c7e7547cb136e8357f3a5 .claude|.harness-base|docs|harness.md +ca6fa43b6f7055ea558d6cf0d9dacdec403006f5952253357c94f5f8209d46ff .claude|.harness-base|lefthook.yml +f17cae7331a1803e3637b03789b683676e0ea9415c3735b38dbe8df341ce7187 .claude|.harness-base|scripts|assertless_tests_py.py +21caf005962dc5a9b9cac8008ab08d73e92eb718297c7dd143e7ab7c4b1604aa .claude|.harness-base|scripts|check-affected-tests.sh +db2586ce1bb8d0dc3ce42bc01fac844bcf97621d00138ff5ef044e55e02ac3d7 .claude|.harness-base|scripts|check-bundle-size.sh +0ef4238413f625d85051790e01f5a54e3c4ef3b23075a123a8db7db023cea43b .claude|.harness-base|scripts|check-change-size.sh +46821202801e1a1c4869a1b8a60ce50d568a05ea7fce2d9e57f24eb4366f0274 .claude|.harness-base|scripts|check-comments.licences.txt +dcb9c59e0417becea353e20985d0c441e098df1e1ca1e7cb9d127a87fd1f823d .claude|.harness-base|scripts|check-comments.mjs +4798fcabcd27f53c008cc41d4460c252beccfa978f4afa63719df2dfc155bd93 .claude|.harness-base|scripts|check-comments.py +c2eeba162bcce9f2da976a2def85917473ebb60fda39cf28c8537c9cc15cdeb1 .claude|.harness-base|scripts|check-comments.sh +78537b8167edf06a8a22b7554c1c7c44e78f7c287352e80a0ecd3709ddc8c917 .claude|.harness-base|scripts|check-contract.sh +69363e7511cd294e1f6db2cd3246e1925c5ecf09b1b31cc300264eaaba2a08a8 .claude|.harness-base|scripts|check-dockerfile.sh +afe420bf0134c63cb1e327588cdf781b29eb1139f16addf9e334784e1491f26d .claude|.harness-base|scripts|check-docs.sh +678a9233a9c44c140753fb0dc796f21f4fc771015fa4b2e02ac2d79ec7b2ccd1 .claude|.harness-base|scripts|check-duplicate-tests.sh +73331e83849face750576d78bfb425c3f44c28d7f488b3bcebc8c59183407e0c .claude|.harness-base|scripts|check-env-example.sh +4882fe7d697d08e2aed037b9b27739afbc2021bd5604ebba7f4253f2fb25a089 .claude|.harness-base|scripts|check-exclude-reasons.awk +8bae9957f35c8134add1eba6a3d4d30d57a701ab72fbaaa4b92d759833941220 .claude|.harness-base|scripts|check-exclude-reasons.mjs +13c41f6f1047ada17700b885c2f8840da44073a6b7459d726bc08eaf72f5c8ec .claude|.harness-base|scripts|check-exclude-reasons.py +8d04b7b35d5bfb1d2ca4c82499f3a17e779b3329374cd40bfcad484f30f6791e .claude|.harness-base|scripts|check-exclude-reasons.sh +30636896f074a81097cc9d230ee4fdca511b4e4e903042779a04d213a48c8230 .claude|.harness-base|scripts|check-exclude-rules.sh +d5b8d21bc41c33aeedb93db8b19994f663ecb1e6c51c1d26f11e6c928e756f28 .claude|.harness-base|scripts|check-import-layers.sh +27428060cbc818d2fa75bbadd84e3d840790d478a584a09884b3b9dd4c3ddeb6 .claude|.harness-base|scripts|check-licences.sh +43539b3fc53533fc0ae11e5ac6a5696c5c1b7a7cc7e63bdc7c5f36bbdb7e48b8 .claude|.harness-base|scripts|check-mutation-diff.sh +18cf122fa40dc1ce7f54e8671d20fe8536f927c011992f827f72148c13863077 .claude|.harness-base|scripts|check-review-record.sh +e87336ac3c1719b2906e771d5e1f45cf49f3d7c40dd985fa6093d1f7afd7e3d2 .claude|.harness-base|scripts|check-secret-scanner.sh +211f0645652fb0daf1ab315b4f87ade96f4704e80d4e68ba78be74316238320e .claude|.harness-base|scripts|check-shared-gates.sh +e871f3dd5850309717e8556d30d0126f771c3a880093b6079dd8edfa937a7c6c .claude|.harness-base|scripts|check-supply-chain.sh +3ee878d98f5e9296ebb46ceaa66993cd76f0ca59eed475e0db65f6ec52950436 .claude|.harness-base|scripts|check-workarounds.sh +ab80c3ab9f8ac2eeab4c5a0f0004f1e26fd6adacbc75469fd4bfe00e791070e7 .claude|.harness-base|scripts|check-workflows.sh +13e8cc294be6fe5a315c29b827b43bb82cad7b4bf004e7393acce85fd76edda3 .claude|.harness-base|scripts|duplicate-tests-ts.mjs +8aab7e87a42fa451fdddc2b3939b72e8d07bd3c3080f0e8abde6af8c043d910b .claude|.harness-base|scripts|duplicate_tests_py.py +84d10ea43df30579ca62c7d212bff597b7a5d14fd2b2be631b636ee038ff3476 .claude|.harness-base|scripts|export-openapi.py +055249313525496d682bc79688ed40f8e23c22fb3afd22c7c9fb51b7d8231705 .claude|.harness-base|scripts|gate-baseline.sh +cccb8022930f0043802d74bb9a48c681d7bcf0dc68705387c2b0a1550eb98cb8 .claude|.harness-base|scripts|gate-baselined.sh +f105c09063c535f5aed591915e34621227d0ea3f98f337794d78cb1dfaff3b9a .claude|.harness-base|scripts|generate-sbom.sh +55604fae082ab98f07e6b263221a614e5399f46c1dbbf89aad5351eb68531748 .claude|.harness-base|scripts|hook-shim.sh +70edb543475618e2dddc2954a0b9f24309a312cb114cfe3596ff9ebe91db6d7e .claude|.harness-base|scripts|py-env.py +e0064665b086fb07593a255667c69dcc2080618666df6b6e1d14f8451d5ca5f5 .claude|.harness-base|scripts|py-test-dirs.sh +ff24e2d2b39700e7434a461746fadfcd285814185f1ac297e3f6f0517f4479ac .claude|.harness-base|scripts|record-review.sh +41bd3d4ec9045327e1a023c898189a98b6e17515eecd45f10e471b47f8f4d956 .claude|.harness-base|scripts|remove-harness.sh +4063966fec5a5021ed09906289f89c2e5935dd4dc680ae6625affb3aecfd2dee .claude|.harness-base|scripts|scan-secrets.sh +09bbb6dc4d1be61544a0cd8b8344ac4f6f1a3b04c0dbb986fea090a702b8faa9 .claude|.harness-base|scripts|seeded-files.sh +30e8eede6e476e9271b6999067fb8a588e411857f0539ed3c4ce69ddb3ae54a2 .claude|.harness-base|scripts|set-coverage-floor.sh +b78a9ae43f5b9ad0b5d6c92c1f986b1e0005ed1313b01e8e8fc4ca09c5e5f65b .claude|.harness-base|scripts|test-budget.sh +1029a45ca118fdb8e440928413a5cb8f86f74fd6dc81b269e82690ee36318320 .claude|agents|code-reviewer.md +af4cc4a30768a329da916b21de9960dce48bae8bfea1b0237e20be678af3683d .claude|allowed-licences.txt +4237aa3d384bf3d2e27e7163149a0d7f3a4e12ccb5ab66bbaecb04d78b79cc5c .claude|bundle-budget.txt +eb8cf70089062a9c297309be2b2e20f0240223feff1fe1eb5e188b371539f1b6 .claude|change-size-exclude.txt +476fc19f407a4de087953fe9e2d5d64026c41290253df7c547da968582a40648 .claude|ci-gates.sh +493e60c9326a091f17b62a1ddc088696825546f77f8214915360dd3616e3f392 .claude|comment-hygiene-patterns.txt +7f468ec04debaa70989ed1c65771d06d89a5ab7a61b9becb6fbc3b77e4f6f0d0 .claude|gate-budget.conf +5f01d143115a3a5bc1d6e6d122709d9db50566dcc37f6bbdc4000d8445573548 .claude|gate-budget.sh +4a76d433a06f85ab967b7e0c1c251f9f56585cec8a70997060f052e794004849 .claude|gates.txt +5393c43cd3fcb77100e7e8ee42ad0642ca85788f8615b30fe3357d3797edf41d .claude|hooks|block-no-verify.sh +087c4a81b2f96433a2316fcec8323eb7f695b5a4c0bd3dc8205e23429bab0203 .claude|hooks|post-edit-comment-check.sh +2a399dc5d889ad97664ec54a3155e44cc2b2363ddbae779f31dc818535a021ce .claude|hooks|post-edit-typecheck.sh +68b09a40cd604e424fda591190e4756199f78740b1d8a6ecfb30ab6b62dac618 .claude|hooks|protect-files.sh +9cb9ce0e9513b2ae7bcef59cf9403842aa7c7e38840d18c6b4e328678d84d52b .claude|hooks|session-context.sh +7eed857cb3a62268a1f5904abd0f51a4e4427e9eb155af606e19c180bd3faf01 .claude|hooks|skill-usage-log.sh +e29e707e8af68c2a5b19d407d772f1a7ca3e51c929091ab70eabe4d335ec771c .claude|hooks|stop-checks.sh +fabb0a97b1e36659ffdb7331f0a9bd16343674553839b88f0f0e51a89668b13a .claude|hooks|subagent-stop.sh +20ec81995ed709d3e038e2f43eeb25fb6491c27cd4245db46398437baf080af7 .claude|hooks|user-prompt-guard.py +e8f19a996f5e512fa8f22ab4ea3f7f55827020f6bff7c596c2b087f00f2adb91 .claude|licence-exceptions.txt +23e894af3145fbe2ff9f54fa9a9181e189c6aa14156ba151df7422d1c9346b0c .claude|regen-harness.sh +bdaa785c95e21e9dc4ef70a8c376784784344426858620fd2b4d4c04f5daef22 .claude|registry-hosts.txt +41777b1a66bc13a7ff72eaaffcc82af7413206f1a06596d0789e3d441434da3e .claude|release-age-exclude.txt +c2a95d39b93e2e9c3afeaf3c3b19ef158b2b1a5268b5bf3d64760a699738ef6b .claude|review-checklist-stack.txt +fdf9fca2a99ae6f1a9efd417807c64847b65c07613cd02d47053b3bc71894cb1 .claude|review-checklist.txt +3851819b0e6dfc1930276dbc8181f5f03f44d8803f8cc17de11f6f036bc4a5ee .claude|rules|fastapi.md +1ca32ca691625a64452e65adc4cd79bf48812294b9fc69f1664415a74689031b .claude|seeded-paths.txt +d2a2904080c7c3f345b70beaecf5b0ae9b2371a87748e9610769080efd27640a .claude|settings.json +51283eeb6d52ffc88f66a852cb5dca2a93655f5456fdc43d27dee927ed336888 .claude|skills|api-verify|SKILL.md +8436a463b24cffbcfcbba9e6f9d88e1aee3048957c54424deef018d0b024a5b4 .claude|skills|skill-audit|SKILL.md +805c987b975e0a4c66019d6de553ffcf1503c3f78c459bec67ff4fa5b9251bd5 .claude|skills|test-consolidate|SKILL.md +6a78ad7f4dfb2c00c60a877b0a33074bf0ff508055cc69f5908c06032c4c8444 .claude|verify-harness.sh +f653017b648f781dcb87349a24e97dffeb70609921c093f860cc7f021a58df41 .dockerignore +55cc958e854659ca6addaa8c12a3954f3c7afd78710d7cfbcb0bfaf10f038fd3 .env.example +c34439d3ec8e70df23ecea08ffb63e5d750313cd5269a5c656a87a68a7c49629 .github|dependabot.yml +04e027f69421cce153c4413fdb9c2ba9b41c0d5f2909909d830cb031ec596a55 .github|workflows|ci.yml +43b8d0938f205f63e03ef9bf24b77899b52dc91383dcae0c65672683f7ffbb1c .gitignore +a1978b7a1e366072692ed55ab372a83b62908ccf6eaa5e2e261906c92c704e43 .gitleaks.toml +dad71493182865313b83c70f7651196346669c78409784a0274d86fdb47ff8aa .jscpd.json +143fa3d4218dd82360a68b69a00ac6f5f26e81453f05842c80a67e8b12fab40f .lefthook|commit-msg.sh +a87211950f6ac6b6fb7e24524e51c452d0b419d1dd290fa2863fb8bd65eefa61 AGENTS.md +d4a44fe67b98b29a691d075a2c499773a555a3799bbccac1b0572dce9156030a CHANGELOG.md +2445fb2402262043a62bd6c5c8e5f952902ad2e115d7db276623c108d293208d Dockerfile +0a19b2752a6c21cdd6fd9b74330c938e5a3f1042eded2c139428446d95de9c5f FUTURE.md +4174391cb3afea88f9e116db0967791aca49da374c86e91b17ac667ed917d350 docker-entrypoint.sh +1983f9772efec802a4ed120049212cdcda57cd8be696bf6f630bf7cd97ac1c3c docs|CONSTITUTION.md +f62f6d822cd73580c8ac858385aef13f627eca4aad0b54bdca2ec8d03001a142 docs|adr|0001-test-each-behaviour-once.md +981d5626d83b7e231fb3c7f3b7fab1ca15c79152aea54a047f7d336313eee449 docs|architecture.md +154082be3208d8a04e8ab3064ddb99e4d5345284866c7e7547cb136e8357f3a5 docs|harness.md +ca6fa43b6f7055ea558d6cf0d9dacdec403006f5952253357c94f5f8209d46ff lefthook.yml +88581548a0a89a9ea4759b9de9261cd27bcf1083551b8c5726c7bb289c3d2609 pyproject.toml +504251a5eeb938827d4ae4189ac3d39d30ba4c4651acdbf602f691bc1964f16e pyrightconfig.json +35097cf7fd9b982fcb90a352a2b87d8b9e7bb12bf25a3e3aa3e4cb1100384fb9 requirements-dev.txt +f17cae7331a1803e3637b03789b683676e0ea9415c3735b38dbe8df341ce7187 scripts|assertless_tests_py.py +21caf005962dc5a9b9cac8008ab08d73e92eb718297c7dd143e7ab7c4b1604aa scripts|check-affected-tests.sh +db2586ce1bb8d0dc3ce42bc01fac844bcf97621d00138ff5ef044e55e02ac3d7 scripts|check-bundle-size.sh +0ef4238413f625d85051790e01f5a54e3c4ef3b23075a123a8db7db023cea43b scripts|check-change-size.sh +46821202801e1a1c4869a1b8a60ce50d568a05ea7fce2d9e57f24eb4366f0274 scripts|check-comments.licences.txt +dcb9c59e0417becea353e20985d0c441e098df1e1ca1e7cb9d127a87fd1f823d scripts|check-comments.mjs +4798fcabcd27f53c008cc41d4460c252beccfa978f4afa63719df2dfc155bd93 scripts|check-comments.py +c2eeba162bcce9f2da976a2def85917473ebb60fda39cf28c8537c9cc15cdeb1 scripts|check-comments.sh +78537b8167edf06a8a22b7554c1c7c44e78f7c287352e80a0ecd3709ddc8c917 scripts|check-contract.sh +69363e7511cd294e1f6db2cd3246e1925c5ecf09b1b31cc300264eaaba2a08a8 scripts|check-dockerfile.sh +afe420bf0134c63cb1e327588cdf781b29eb1139f16addf9e334784e1491f26d scripts|check-docs.sh +678a9233a9c44c140753fb0dc796f21f4fc771015fa4b2e02ac2d79ec7b2ccd1 scripts|check-duplicate-tests.sh +73331e83849face750576d78bfb425c3f44c28d7f488b3bcebc8c59183407e0c scripts|check-env-example.sh +4882fe7d697d08e2aed037b9b27739afbc2021bd5604ebba7f4253f2fb25a089 scripts|check-exclude-reasons.awk +8bae9957f35c8134add1eba6a3d4d30d57a701ab72fbaaa4b92d759833941220 scripts|check-exclude-reasons.mjs +13c41f6f1047ada17700b885c2f8840da44073a6b7459d726bc08eaf72f5c8ec scripts|check-exclude-reasons.py +8d04b7b35d5bfb1d2ca4c82499f3a17e779b3329374cd40bfcad484f30f6791e scripts|check-exclude-reasons.sh +30636896f074a81097cc9d230ee4fdca511b4e4e903042779a04d213a48c8230 scripts|check-exclude-rules.sh +d5b8d21bc41c33aeedb93db8b19994f663ecb1e6c51c1d26f11e6c928e756f28 scripts|check-import-layers.sh +27428060cbc818d2fa75bbadd84e3d840790d478a584a09884b3b9dd4c3ddeb6 scripts|check-licences.sh +43539b3fc53533fc0ae11e5ac6a5696c5c1b7a7cc7e63bdc7c5f36bbdb7e48b8 scripts|check-mutation-diff.sh +18cf122fa40dc1ce7f54e8671d20fe8536f927c011992f827f72148c13863077 scripts|check-review-record.sh +e87336ac3c1719b2906e771d5e1f45cf49f3d7c40dd985fa6093d1f7afd7e3d2 scripts|check-secret-scanner.sh +211f0645652fb0daf1ab315b4f87ade96f4704e80d4e68ba78be74316238320e scripts|check-shared-gates.sh +e871f3dd5850309717e8556d30d0126f771c3a880093b6079dd8edfa937a7c6c scripts|check-supply-chain.sh +3ee878d98f5e9296ebb46ceaa66993cd76f0ca59eed475e0db65f6ec52950436 scripts|check-workarounds.sh +ab80c3ab9f8ac2eeab4c5a0f0004f1e26fd6adacbc75469fd4bfe00e791070e7 scripts|check-workflows.sh +13e8cc294be6fe5a315c29b827b43bb82cad7b4bf004e7393acce85fd76edda3 scripts|duplicate-tests-ts.mjs +8aab7e87a42fa451fdddc2b3939b72e8d07bd3c3080f0e8abde6af8c043d910b scripts|duplicate_tests_py.py +84d10ea43df30579ca62c7d212bff597b7a5d14fd2b2be631b636ee038ff3476 scripts|export-openapi.py +055249313525496d682bc79688ed40f8e23c22fb3afd22c7c9fb51b7d8231705 scripts|gate-baseline.sh +cccb8022930f0043802d74bb9a48c681d7bcf0dc68705387c2b0a1550eb98cb8 scripts|gate-baselined.sh +f105c09063c535f5aed591915e34621227d0ea3f98f337794d78cb1dfaff3b9a scripts|generate-sbom.sh +55604fae082ab98f07e6b263221a614e5399f46c1dbbf89aad5351eb68531748 scripts|hook-shim.sh +70edb543475618e2dddc2954a0b9f24309a312cb114cfe3596ff9ebe91db6d7e scripts|py-env.py +e0064665b086fb07593a255667c69dcc2080618666df6b6e1d14f8451d5ca5f5 scripts|py-test-dirs.sh +ff24e2d2b39700e7434a461746fadfcd285814185f1ac297e3f6f0517f4479ac scripts|record-review.sh +41bd3d4ec9045327e1a023c898189a98b6e17515eecd45f10e471b47f8f4d956 scripts|remove-harness.sh +4063966fec5a5021ed09906289f89c2e5935dd4dc680ae6625affb3aecfd2dee scripts|scan-secrets.sh +09bbb6dc4d1be61544a0cd8b8344ac4f6f1a3b04c0dbb986fea090a702b8faa9 scripts|seeded-files.sh +30e8eede6e476e9271b6999067fb8a588e411857f0539ed3c4ce69ddb3ae54a2 scripts|set-coverage-floor.sh +b78a9ae43f5b9ad0b5d6c92c1f986b1e0005ed1313b01e8e8fc4ca09c5e5f65b scripts|test-budget.sh +fdf01c2ee1cedcb1a811b73d54ec1c84e84cb28acedf5dfb20101995a2378a41 src|.env.default +e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 src|api|__init__.py +e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 src|api|routers|__init__.py +0d7cae69d0093de6c4dc881b6f44627b0e108fa5260510a580b8435a2b93d274 src|api|routers|example.py +223427aade91963287c8417b96b6d35c4bf65c946dea07f8176d46d9e9917f5e src|api|routes.py +e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 src|api|schemas|__init__.py +ada7b093d85ec417b3f329cd660ed086556755d16b489f53087fe02588bb6a45 src|api|schemas|base.py +e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 src|api|schemas|request|__init__.py +d3271f5d64df38f74366a1e8b5ff03c50f694efb9a7aaad667e03fc2da82a030 src|api|schemas|request|example.py +e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 src|api|schemas|response|__init__.py +20f10932b7da5f1b9d89953d720ec24e43340e6ad9c02cc09f43501e9532a2f7 src|api|schemas|response|example.py +e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 src|api|services|__init__.py +347647269ad655e1cd3928aec6c314600f89375f1adb7e08de1b172b324358d9 src|api|services|example.py +68b7e05a36fb9d0ff3491ba3af593373f970961b9a8cb97dc8e74171ebdf447c src|api|tags.py +ee7caa71f0818d0ca423e30f5c4b063e5e7a703685606ee7235385abee165310 src|app.py +e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 src|constants|__init__.py +e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 src|core|__init__.py +3bebf8dd93551f6f09c9f74d7dcb4bfb03fb682c2a479961e62f4870c5880e50 src|core|config.py +906152c0d2f363142824bd44686f9c40775d0f661c291a49a72db676eecdf172 src|core|directory_manager.py +0308b448856b12778add5404b57686d325a1b88c38bf66f46a604e0c65926b40 src|core|exceptions.py +f52f65f18b437ca0141293910bf2e9cc3e6507c478c8fbce42d5061248b2f679 src|core|logging.py +c0d1b6c09561be7d281ef52a5cdf1fd1ca396a3c625193683ff9cfbde1a71469 src|core|security_headers.py +4e0d8d6ab0e86f47dcb8cb6324d1dc84b89154ed7d308a405ea04e24b143439b src|core|uvicorn_log_config.json +d9ac8c8c0723e0c51ee072f258151e5d7058a8d35d3894512118bede27eadb1a src|error_handler.py +e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 src|logic|__init__.py +8247157016abac7ab0529666a2f578a175f31253b88c83dac748a7fe24a88e47 src|main.py +e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 src|models|__init__.py +b0df782fc8c64a29022aa89914801c335608e1189f7169beb7f6295e51df0864 src|models|base.py +e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 src|utils|__init__.py +d23613bc784ff5a9ab39af9dd9dd3d7cda63893958ba09295a10ddc5c24b3500 src|utils|date.py +2eed193efcfca22b82da83734564eec0b7ded92ba9361e48f1025a1bfe735dca test|conftest.py +e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 test|factories|__init__.py +bdcc34c42c679fdad6ba54160f3fad042a598cb402ac71068aaf5fb04b9bc776 test|factories|models.py +e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 test|test_api|__init__.py +4cf36ea311a2d0f5befd6b496efca864357460dd8b59b0cb086b875cd43b475c test|test_api|test_example.py +7fe21fbd42a4c4ec38727b87b4acfdedef04448cce3969a4d428fc33ec5a3b99 test|test_api|test_health.py +e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 test|test_logic|__init__.py +5efbfe047f0b094b4dceae30073b08debc65f47c06db92b924eb897134e65bc6 test|test_main.py +e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 test|test_models|__init__.py +e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 test|test_utils|__init__.py +87e299879b4012134d4ab1c034bc9a6440b098c58e044456895fdf813385d204 test|test_utils|test_date.py +596cde394ac3506a78725eabc1e0500b73d0ba482762b60815e754668526b81e test|test_utils|test_logging.py +6e061edaf34fa025a8236bc411649ce79029e3474da23289030e8c617de4fcc0 test|test_utils|test_security_headers.py +SEEDED_FILES + ;; + nestjs) + cat <<'SEEDED_FILES' +1029a45ca118fdb8e440928413a5cb8f86f74fd6dc81b269e82690ee36318320 .claude|.harness-base|.claude|agents|code-reviewer.md +af4cc4a30768a329da916b21de9960dce48bae8bfea1b0237e20be678af3683d .claude|.harness-base|.claude|allowed-licences.txt +4237aa3d384bf3d2e27e7163149a0d7f3a4e12ccb5ab66bbaecb04d78b79cc5c .claude|.harness-base|.claude|bundle-budget.txt +eb8cf70089062a9c297309be2b2e20f0240223feff1fe1eb5e188b371539f1b6 .claude|.harness-base|.claude|change-size-exclude.txt +476fc19f407a4de087953fe9e2d5d64026c41290253df7c547da968582a40648 .claude|.harness-base|.claude|ci-gates.sh +493e60c9326a091f17b62a1ddc088696825546f77f8214915360dd3616e3f392 .claude|.harness-base|.claude|comment-hygiene-patterns.txt +7f468ec04debaa70989ed1c65771d06d89a5ab7a61b9becb6fbc3b77e4f6f0d0 .claude|.harness-base|.claude|gate-budget.conf +5f01d143115a3a5bc1d6e6d122709d9db50566dcc37f6bbdc4000d8445573548 .claude|.harness-base|.claude|gate-budget.sh +4a76d433a06f85ab967b7e0c1c251f9f56585cec8a70997060f052e794004849 .claude|.harness-base|.claude|gates.txt +f4b4e6438db7f20cad5fb7d160cb5ead6fc2aa8ffd47ae79a3e877f0c991a604 .claude|.harness-base|.claude|hooks|block-no-verify.sh +23c76185d22e65b7667096ed17d2982d96d7b9a36fec8408a2896547c8ca5465 .claude|.harness-base|.claude|hooks|post-edit-comment-check.sh +c368bd85603a31708fab8257c0c5ef20981453814efcd1768a17dcd6bc8ba96d .claude|.harness-base|.claude|hooks|post-edit-typecheck.sh +3c5e448430bf4b00f1a882e6f66fa680ee57e92ca183f7c1787130480731f433 .claude|.harness-base|.claude|hooks|protect-files.sh +9cb9ce0e9513b2ae7bcef59cf9403842aa7c7e38840d18c6b4e328678d84d52b .claude|.harness-base|.claude|hooks|session-context.sh +7eed857cb3a62268a1f5904abd0f51a4e4427e9eb155af606e19c180bd3faf01 .claude|.harness-base|.claude|hooks|skill-usage-log.sh +d997f39290833016bb42d7b079e961e78cc1469bfd185f1d7e768f373e71aa1b .claude|.harness-base|.claude|hooks|stop-checks.sh +d1f6e2de78928cdfbbfe01eb874fbd3d9c918c6132b28ab5dbab21dcbb56f373 .claude|.harness-base|.claude|hooks|subagent-stop.sh +7883f086d37e83a2e45e1da4abed01a9dc42e69e30f0b7797efab6a4390e007f .claude|.harness-base|.claude|hooks|user-prompt-guard.cjs +e8f19a996f5e512fa8f22ab4ea3f7f55827020f6bff7c596c2b087f00f2adb91 .claude|.harness-base|.claude|licence-exceptions.txt +23e894af3145fbe2ff9f54fa9a9181e189c6aa14156ba151df7422d1c9346b0c .claude|.harness-base|.claude|regen-harness.sh +bdaa785c95e21e9dc4ef70a8c376784784344426858620fd2b4d4c04f5daef22 .claude|.harness-base|.claude|registry-hosts.txt +41777b1a66bc13a7ff72eaaffcc82af7413206f1a06596d0789e3d441434da3e .claude|.harness-base|.claude|release-age-exclude.txt +ed29d2aebe2e3f5c852c1b9bd29aea87c0fa07b176c0de4823ce54f16af85de0 .claude|.harness-base|.claude|review-checklist-stack.txt +fdf9fca2a99ae6f1a9efd417807c64847b65c07613cd02d47053b3bc71894cb1 .claude|.harness-base|.claude|review-checklist.txt +2300b6e5d4210b86929259efef1de78853b356986f9c280d85c96c575da7fe82 .claude|.harness-base|.claude|seeded-paths.txt +6dd80b02208d66b2acfaf55f20bc875fcd003a476fb0cab8fc6d20f90e48af12 .claude|.harness-base|.claude|settings.json +66eaf32dab2335f6a69c5f51e8155cacbe2bb9d85cc4701de0225e675d4032c2 .claude|.harness-base|.claude|skills|nest-verify|SKILL.md +8436a463b24cffbcfcbba9e6f9d88e1aee3048957c54424deef018d0b024a5b4 .claude|.harness-base|.claude|skills|skill-audit|SKILL.md +805c987b975e0a4c66019d6de553ffcf1503c3f78c459bec67ff4fa5b9251bd5 .claude|.harness-base|.claude|skills|test-consolidate|SKILL.md +6a78ad7f4dfb2c00c60a877b0a33074bf0ff508055cc69f5908c06032c4c8444 .claude|.harness-base|.claude|verify-harness.sh +0472a1ed6b700e1548cc16a5cc8357b73f0df7e3e38d30f35d617548c3cd0b9b .claude|.harness-base|.github|dependabot.yml +7a39f9eca83ca7f6a45cee8625b9c709fbfabb8d55315ad33e307cb6f86268d1 .claude|.harness-base|.github|workflows|ci.yml +a1978b7a1e366072692ed55ab372a83b62908ccf6eaa5e2e261906c92c704e43 .claude|.harness-base|.gitleaks.toml +143fa3d4218dd82360a68b69a00ac6f5f26e81453f05842c80a67e8b12fab40f .claude|.harness-base|.lefthook|commit-msg.sh +f5870276c3dbb2c25a502d5aaee0e69042aea8da4c814cc0dce1cbaf06a97dcd .claude|.harness-base|AGENTS.md +f62f6d822cd73580c8ac858385aef13f627eca4aad0b54bdca2ec8d03001a142 .claude|.harness-base|docs|adr|0001-test-each-behaviour-once.md +154082be3208d8a04e8ab3064ddb99e4d5345284866c7e7547cb136e8357f3a5 .claude|.harness-base|docs|harness.md +eeec20bfc0861c308877721179631117fac6ca438b6d4e7cd8441feaeb36c744 .claude|.harness-base|lefthook.yml +f17cae7331a1803e3637b03789b683676e0ea9415c3735b38dbe8df341ce7187 .claude|.harness-base|scripts|assertless_tests_py.py +21caf005962dc5a9b9cac8008ab08d73e92eb718297c7dd143e7ab7c4b1604aa .claude|.harness-base|scripts|check-affected-tests.sh +db2586ce1bb8d0dc3ce42bc01fac844bcf97621d00138ff5ef044e55e02ac3d7 .claude|.harness-base|scripts|check-bundle-size.sh +0ef4238413f625d85051790e01f5a54e3c4ef3b23075a123a8db7db023cea43b .claude|.harness-base|scripts|check-change-size.sh +46821202801e1a1c4869a1b8a60ce50d568a05ea7fce2d9e57f24eb4366f0274 .claude|.harness-base|scripts|check-comments.licences.txt +dcb9c59e0417becea353e20985d0c441e098df1e1ca1e7cb9d127a87fd1f823d .claude|.harness-base|scripts|check-comments.mjs +4798fcabcd27f53c008cc41d4460c252beccfa978f4afa63719df2dfc155bd93 .claude|.harness-base|scripts|check-comments.py +c2eeba162bcce9f2da976a2def85917473ebb60fda39cf28c8537c9cc15cdeb1 .claude|.harness-base|scripts|check-comments.sh +78537b8167edf06a8a22b7554c1c7c44e78f7c287352e80a0ecd3709ddc8c917 .claude|.harness-base|scripts|check-contract.sh +69363e7511cd294e1f6db2cd3246e1925c5ecf09b1b31cc300264eaaba2a08a8 .claude|.harness-base|scripts|check-dockerfile.sh +afe420bf0134c63cb1e327588cdf781b29eb1139f16addf9e334784e1491f26d .claude|.harness-base|scripts|check-docs.sh +678a9233a9c44c140753fb0dc796f21f4fc771015fa4b2e02ac2d79ec7b2ccd1 .claude|.harness-base|scripts|check-duplicate-tests.sh +73331e83849face750576d78bfb425c3f44c28d7f488b3bcebc8c59183407e0c .claude|.harness-base|scripts|check-env-example.sh +4882fe7d697d08e2aed037b9b27739afbc2021bd5604ebba7f4253f2fb25a089 .claude|.harness-base|scripts|check-exclude-reasons.awk +8bae9957f35c8134add1eba6a3d4d30d57a701ab72fbaaa4b92d759833941220 .claude|.harness-base|scripts|check-exclude-reasons.mjs +13c41f6f1047ada17700b885c2f8840da44073a6b7459d726bc08eaf72f5c8ec .claude|.harness-base|scripts|check-exclude-reasons.py +8d04b7b35d5bfb1d2ca4c82499f3a17e779b3329374cd40bfcad484f30f6791e .claude|.harness-base|scripts|check-exclude-reasons.sh +30636896f074a81097cc9d230ee4fdca511b4e4e903042779a04d213a48c8230 .claude|.harness-base|scripts|check-exclude-rules.sh +d5b8d21bc41c33aeedb93db8b19994f663ecb1e6c51c1d26f11e6c928e756f28 .claude|.harness-base|scripts|check-import-layers.sh +27428060cbc818d2fa75bbadd84e3d840790d478a584a09884b3b9dd4c3ddeb6 .claude|.harness-base|scripts|check-licences.sh +43539b3fc53533fc0ae11e5ac6a5696c5c1b7a7cc7e63bdc7c5f36bbdb7e48b8 .claude|.harness-base|scripts|check-mutation-diff.sh +18cf122fa40dc1ce7f54e8671d20fe8536f927c011992f827f72148c13863077 .claude|.harness-base|scripts|check-review-record.sh +e87336ac3c1719b2906e771d5e1f45cf49f3d7c40dd985fa6093d1f7afd7e3d2 .claude|.harness-base|scripts|check-secret-scanner.sh +211f0645652fb0daf1ab315b4f87ade96f4704e80d4e68ba78be74316238320e .claude|.harness-base|scripts|check-shared-gates.sh +e871f3dd5850309717e8556d30d0126f771c3a880093b6079dd8edfa937a7c6c .claude|.harness-base|scripts|check-supply-chain.sh +3ee878d98f5e9296ebb46ceaa66993cd76f0ca59eed475e0db65f6ec52950436 .claude|.harness-base|scripts|check-workarounds.sh +ab80c3ab9f8ac2eeab4c5a0f0004f1e26fd6adacbc75469fd4bfe00e791070e7 .claude|.harness-base|scripts|check-workflows.sh +13e8cc294be6fe5a315c29b827b43bb82cad7b4bf004e7393acce85fd76edda3 .claude|.harness-base|scripts|duplicate-tests-ts.mjs +8aab7e87a42fa451fdddc2b3939b72e8d07bd3c3080f0e8abde6af8c043d910b .claude|.harness-base|scripts|duplicate_tests_py.py +32a4c641ed3fa587143c2638c02c8ee86dc7a57119ef87f7dfd435487c531144 .claude|.harness-base|scripts|eslint-effective.mjs +5cf243f9c1e927b4b5fa4bdbffc2cb7331643405b2cb15c2cebf4d44f2c42530 .claude|.harness-base|scripts|export-openapi.mjs +055249313525496d682bc79688ed40f8e23c22fb3afd22c7c9fb51b7d8231705 .claude|.harness-base|scripts|gate-baseline.sh +cccb8022930f0043802d74bb9a48c681d7bcf0dc68705387c2b0a1550eb98cb8 .claude|.harness-base|scripts|gate-baselined.sh +f105c09063c535f5aed591915e34621227d0ea3f98f337794d78cb1dfaff3b9a .claude|.harness-base|scripts|generate-sbom.sh +70edb543475618e2dddc2954a0b9f24309a312cb114cfe3596ff9ebe91db6d7e .claude|.harness-base|scripts|py-env.py +ff24e2d2b39700e7434a461746fadfcd285814185f1ac297e3f6f0517f4479ac .claude|.harness-base|scripts|record-review.sh +41bd3d4ec9045327e1a023c898189a98b6e17515eecd45f10e471b47f8f4d956 .claude|.harness-base|scripts|remove-harness.sh +4063966fec5a5021ed09906289f89c2e5935dd4dc680ae6625affb3aecfd2dee .claude|.harness-base|scripts|scan-secrets.sh +09bbb6dc4d1be61544a0cd8b8344ac4f6f1a3b04c0dbb986fea090a702b8faa9 .claude|.harness-base|scripts|seeded-files.sh +30e8eede6e476e9271b6999067fb8a588e411857f0539ed3c4ce69ddb3ae54a2 .claude|.harness-base|scripts|set-coverage-floor.sh +b78a9ae43f5b9ad0b5d6c92c1f986b1e0005ed1313b01e8e8fc4ca09c5e5f65b .claude|.harness-base|scripts|test-budget.sh +1029a45ca118fdb8e440928413a5cb8f86f74fd6dc81b269e82690ee36318320 .claude|agents|code-reviewer.md +af4cc4a30768a329da916b21de9960dce48bae8bfea1b0237e20be678af3683d .claude|allowed-licences.txt +4237aa3d384bf3d2e27e7163149a0d7f3a4e12ccb5ab66bbaecb04d78b79cc5c .claude|bundle-budget.txt +eb8cf70089062a9c297309be2b2e20f0240223feff1fe1eb5e188b371539f1b6 .claude|change-size-exclude.txt +476fc19f407a4de087953fe9e2d5d64026c41290253df7c547da968582a40648 .claude|ci-gates.sh +493e60c9326a091f17b62a1ddc088696825546f77f8214915360dd3616e3f392 .claude|comment-hygiene-patterns.txt +7f468ec04debaa70989ed1c65771d06d89a5ab7a61b9becb6fbc3b77e4f6f0d0 .claude|gate-budget.conf +5f01d143115a3a5bc1d6e6d122709d9db50566dcc37f6bbdc4000d8445573548 .claude|gate-budget.sh +4a76d433a06f85ab967b7e0c1c251f9f56585cec8a70997060f052e794004849 .claude|gates.txt +f4b4e6438db7f20cad5fb7d160cb5ead6fc2aa8ffd47ae79a3e877f0c991a604 .claude|hooks|block-no-verify.sh +23c76185d22e65b7667096ed17d2982d96d7b9a36fec8408a2896547c8ca5465 .claude|hooks|post-edit-comment-check.sh +c368bd85603a31708fab8257c0c5ef20981453814efcd1768a17dcd6bc8ba96d .claude|hooks|post-edit-typecheck.sh +3c5e448430bf4b00f1a882e6f66fa680ee57e92ca183f7c1787130480731f433 .claude|hooks|protect-files.sh +9cb9ce0e9513b2ae7bcef59cf9403842aa7c7e38840d18c6b4e328678d84d52b .claude|hooks|session-context.sh +7eed857cb3a62268a1f5904abd0f51a4e4427e9eb155af606e19c180bd3faf01 .claude|hooks|skill-usage-log.sh +d997f39290833016bb42d7b079e961e78cc1469bfd185f1d7e768f373e71aa1b .claude|hooks|stop-checks.sh +d1f6e2de78928cdfbbfe01eb874fbd3d9c918c6132b28ab5dbab21dcbb56f373 .claude|hooks|subagent-stop.sh +7883f086d37e83a2e45e1da4abed01a9dc42e69e30f0b7797efab6a4390e007f .claude|hooks|user-prompt-guard.cjs +e8f19a996f5e512fa8f22ab4ea3f7f55827020f6bff7c596c2b087f00f2adb91 .claude|licence-exceptions.txt +23e894af3145fbe2ff9f54fa9a9181e189c6aa14156ba151df7422d1c9346b0c .claude|regen-harness.sh +bdaa785c95e21e9dc4ef70a8c376784784344426858620fd2b4d4c04f5daef22 .claude|registry-hosts.txt +41777b1a66bc13a7ff72eaaffcc82af7413206f1a06596d0789e3d441434da3e .claude|release-age-exclude.txt +ed29d2aebe2e3f5c852c1b9bd29aea87c0fa07b176c0de4823ce54f16af85de0 .claude|review-checklist-stack.txt +fdf9fca2a99ae6f1a9efd417807c64847b65c07613cd02d47053b3bc71894cb1 .claude|review-checklist.txt +4bf47e1f7b11b4626f5b101ecd6c048407a2b5612784c0d2bead6801e5376f28 .claude|rules|nestjs.md +2300b6e5d4210b86929259efef1de78853b356986f9c280d85c96c575da7fe82 .claude|seeded-paths.txt +6dd80b02208d66b2acfaf55f20bc875fcd003a476fb0cab8fc6d20f90e48af12 .claude|settings.json +66eaf32dab2335f6a69c5f51e8155cacbe2bb9d85cc4701de0225e675d4032c2 .claude|skills|nest-verify|SKILL.md +8436a463b24cffbcfcbba9e6f9d88e1aee3048957c54424deef018d0b024a5b4 .claude|skills|skill-audit|SKILL.md +805c987b975e0a4c66019d6de553ffcf1503c3f78c459bec67ff4fa5b9251bd5 .claude|skills|test-consolidate|SKILL.md +6a78ad7f4dfb2c00c60a877b0a33074bf0ff508055cc69f5908c06032c4c8444 .claude|verify-harness.sh +dcf7f166300f51b18591329d7cc911f03e75ece443605995d7ecc856d0956d2b .dockerignore +1432114e78428530f7e3bb3a8718f48cfa2a97abbe722a18da14dc9c058355f7 .env.example +0472a1ed6b700e1548cc16a5cc8357b73f0df7e3e38d30f35d617548c3cd0b9b .github|dependabot.yml +7a39f9eca83ca7f6a45cee8625b9c709fbfabb8d55315ad33e307cb6f86268d1 .github|workflows|ci.yml +010415f0a833c83d4007f002162ff7af3c6dca3b94ad15ecefe34d1c23228026 .gitignore +a1978b7a1e366072692ed55ab372a83b62908ccf6eaa5e2e261906c92c704e43 .gitleaks.toml +79532a2683b753ca54cca9b7ab4e53c7b2631fcd7ee221fa60e7a1a694b9d029 .jscpd.json +143fa3d4218dd82360a68b69a00ac6f5f26e81453f05842c80a67e8b12fab40f .lefthook|commit-msg.sh +d76c138f28da0f0acb33eb0048b6213930b9e67072421202bd77f04981bdb8f3 .npmrc +ba3e9f56ab9b1b692e930e62bd027b368fc1289302f70177d4796a2a64eeef88 .prettierignore +d2c1e1db2ffa1985124064c5d89152fb7e47b64732fc1e2c0cb1e98cffe3d792 .prettierrc +f5870276c3dbb2c25a502d5aaee0e69042aea8da4c814cc0dce1cbaf06a97dcd AGENTS.md +d4a44fe67b98b29a691d075a2c499773a555a3799bbccac1b0572dce9156030a CHANGELOG.md +94456b670c2ac93ca7131aa0a43a1ce3c9f88ee7d55c099677d1946bf666b9d8 Dockerfile +0a19b2752a6c21cdd6fd9b74330c938e5a3f1042eded2c139428446d95de9c5f FUTURE.md +a8843001d6694f8f4fe4a4756872feaa0c2c0c4a0d769414454a23d11b7cdb4b docker-entrypoint.sh +1983f9772efec802a4ed120049212cdcda57cd8be696bf6f630bf7cd97ac1c3c docs|CONSTITUTION.md +f62f6d822cd73580c8ac858385aef13f627eca4aad0b54bdca2ec8d03001a142 docs|adr|0001-test-each-behaviour-once.md +7b2da90507df827e00ca40d52087f15565081820797e0a5fb7b7aa224ad7c3b8 docs|architecture.md +154082be3208d8a04e8ab3064ddb99e4d5345284866c7e7547cb136e8357f3a5 docs|harness.md +631aec06ad547384170fdc822d92bb2569d3dd393a64d5fd39ae85980aa250df eslint.config.mjs +99a14b82a620926e31c3a3b4b95a3787c45a1ddc761f52f3cc7c15a64e545067 layers.config.mjs +eeec20bfc0861c308877721179631117fac6ca438b6d4e7cd8441feaeb36c744 lefthook.yml +bcb15e3049ff5d131762d2bfe3a6f917c3c64c83ac772467a4073975cd423b5b nest-cli.json +7403d81aac7ce6807ffd8cce2d21f4182b3593903635e10aeb85a92eb688266d package.json +10e8d5deb855633c52bc5ae40fcf4c91db3b18cb6573af5b08b704b77c97fe1c pnpm-workspace.yaml +f17cae7331a1803e3637b03789b683676e0ea9415c3735b38dbe8df341ce7187 scripts|assertless_tests_py.py +21caf005962dc5a9b9cac8008ab08d73e92eb718297c7dd143e7ab7c4b1604aa scripts|check-affected-tests.sh +db2586ce1bb8d0dc3ce42bc01fac844bcf97621d00138ff5ef044e55e02ac3d7 scripts|check-bundle-size.sh +0ef4238413f625d85051790e01f5a54e3c4ef3b23075a123a8db7db023cea43b scripts|check-change-size.sh +46821202801e1a1c4869a1b8a60ce50d568a05ea7fce2d9e57f24eb4366f0274 scripts|check-comments.licences.txt +dcb9c59e0417becea353e20985d0c441e098df1e1ca1e7cb9d127a87fd1f823d scripts|check-comments.mjs +4798fcabcd27f53c008cc41d4460c252beccfa978f4afa63719df2dfc155bd93 scripts|check-comments.py +c2eeba162bcce9f2da976a2def85917473ebb60fda39cf28c8537c9cc15cdeb1 scripts|check-comments.sh +78537b8167edf06a8a22b7554c1c7c44e78f7c287352e80a0ecd3709ddc8c917 scripts|check-contract.sh +69363e7511cd294e1f6db2cd3246e1925c5ecf09b1b31cc300264eaaba2a08a8 scripts|check-dockerfile.sh +afe420bf0134c63cb1e327588cdf781b29eb1139f16addf9e334784e1491f26d scripts|check-docs.sh +678a9233a9c44c140753fb0dc796f21f4fc771015fa4b2e02ac2d79ec7b2ccd1 scripts|check-duplicate-tests.sh +73331e83849face750576d78bfb425c3f44c28d7f488b3bcebc8c59183407e0c scripts|check-env-example.sh +4882fe7d697d08e2aed037b9b27739afbc2021bd5604ebba7f4253f2fb25a089 scripts|check-exclude-reasons.awk +8bae9957f35c8134add1eba6a3d4d30d57a701ab72fbaaa4b92d759833941220 scripts|check-exclude-reasons.mjs +13c41f6f1047ada17700b885c2f8840da44073a6b7459d726bc08eaf72f5c8ec scripts|check-exclude-reasons.py +8d04b7b35d5bfb1d2ca4c82499f3a17e779b3329374cd40bfcad484f30f6791e scripts|check-exclude-reasons.sh +30636896f074a81097cc9d230ee4fdca511b4e4e903042779a04d213a48c8230 scripts|check-exclude-rules.sh +d5b8d21bc41c33aeedb93db8b19994f663ecb1e6c51c1d26f11e6c928e756f28 scripts|check-import-layers.sh +27428060cbc818d2fa75bbadd84e3d840790d478a584a09884b3b9dd4c3ddeb6 scripts|check-licences.sh +43539b3fc53533fc0ae11e5ac6a5696c5c1b7a7cc7e63bdc7c5f36bbdb7e48b8 scripts|check-mutation-diff.sh +18cf122fa40dc1ce7f54e8671d20fe8536f927c011992f827f72148c13863077 scripts|check-review-record.sh +e87336ac3c1719b2906e771d5e1f45cf49f3d7c40dd985fa6093d1f7afd7e3d2 scripts|check-secret-scanner.sh +211f0645652fb0daf1ab315b4f87ade96f4704e80d4e68ba78be74316238320e scripts|check-shared-gates.sh +e871f3dd5850309717e8556d30d0126f771c3a880093b6079dd8edfa937a7c6c scripts|check-supply-chain.sh +3ee878d98f5e9296ebb46ceaa66993cd76f0ca59eed475e0db65f6ec52950436 scripts|check-workarounds.sh +ab80c3ab9f8ac2eeab4c5a0f0004f1e26fd6adacbc75469fd4bfe00e791070e7 scripts|check-workflows.sh +13e8cc294be6fe5a315c29b827b43bb82cad7b4bf004e7393acce85fd76edda3 scripts|duplicate-tests-ts.mjs +8aab7e87a42fa451fdddc2b3939b72e8d07bd3c3080f0e8abde6af8c043d910b scripts|duplicate_tests_py.py +32a4c641ed3fa587143c2638c02c8ee86dc7a57119ef87f7dfd435487c531144 scripts|eslint-effective.mjs +5cf243f9c1e927b4b5fa4bdbffc2cb7331643405b2cb15c2cebf4d44f2c42530 scripts|export-openapi.mjs +055249313525496d682bc79688ed40f8e23c22fb3afd22c7c9fb51b7d8231705 scripts|gate-baseline.sh +cccb8022930f0043802d74bb9a48c681d7bcf0dc68705387c2b0a1550eb98cb8 scripts|gate-baselined.sh +f105c09063c535f5aed591915e34621227d0ea3f98f337794d78cb1dfaff3b9a scripts|generate-sbom.sh +70edb543475618e2dddc2954a0b9f24309a312cb114cfe3596ff9ebe91db6d7e scripts|py-env.py +ff24e2d2b39700e7434a461746fadfcd285814185f1ac297e3f6f0517f4479ac scripts|record-review.sh +41bd3d4ec9045327e1a023c898189a98b6e17515eecd45f10e471b47f8f4d956 scripts|remove-harness.sh +4063966fec5a5021ed09906289f89c2e5935dd4dc680ae6625affb3aecfd2dee scripts|scan-secrets.sh +09bbb6dc4d1be61544a0cd8b8344ac4f6f1a3b04c0dbb986fea090a702b8faa9 scripts|seeded-files.sh +30e8eede6e476e9271b6999067fb8a588e411857f0539ed3c4ce69ddb3ae54a2 scripts|set-coverage-floor.sh +b78a9ae43f5b9ad0b5d6c92c1f986b1e0005ed1313b01e8e8fc4ca09c5e5f65b scripts|test-budget.sh +31dbdab0c530d4650646c0b6f68b85533ab3bbf8cf7d6c8303bacf416fc9d0c0 src|app.factory.ts +717573b7cbb95fb6e9fdcea1c7f59259feae6f121b91ae5c680016263f5f2907 src|app.module.ts +ee376046d9d03bd3d37801875563774eba0cd1c08d49f31179d49fc1e78cde32 src|bootstrap.ts +4e4c26774fca41ba7983e8e0a5ffab908857ada74ba22f4d5fdb814dc71b6033 src|common|constants|http.constants.ts +9f66ee333257110beedcc510032be943043e4b7d0dc89de34a947440b20711fe src|common|constants|index.ts +9aa20b1e117370d42c0c9973bdef052eaffa2bf750938fbce5fe40395d802428 src|common|filters|http-exception.filter.ts +26d7e7814de0704b17133a3df922a3d7f36bcc688804841d4833bea065121285 src|common|utils|date.utils.ts +8e1272068caafd95f5962e585429458f0e48ca2782ad60b83048fb720214684a src|common|utils|string.utils.ts +a266793423bf68939c7d39b2b2bae572584285448a697d69f988a3bac406bb6c src|config|env.config.ts +31d555dd2162db02eeddbdac2e1fa41be2439c7243d6df0402179f42989fbeef src|config|index.ts +a629af3e6e9194dcd2f8064b07715d962a8f40c85ef52fc92b06b235335e9ea8 src|config|setups|security.setup.ts +28e4e9de157a228d1fc4e0f77d4fa3d8d2b559b854626c000d68947fc8ff4bb0 src|config|setups|swagger.setup.ts +965f7591d8796711be50dc01630b82f3e686505e820b926ca2f9b4375b4f2448 src|main.ts +dad9892e3c35c31ebd964210259ee4a3e25fe606c0aae96ea30582e45b1b095d src|modules|base|base.controller.ts +364a373805ba50e8d67a686685567e23864dcd6c0e6735952f02c51732d510fe src|modules|base|base.module.ts +9a931e3ef489b65d17e4d0dd6de16e19e26e7bd832de878e52e11147b8418bb7 src|modules|base|base.service.ts +4007bd36d6a279e27616df9afd4071d423fe6ca6062574d9fc300d71e1ebb56d src|modules|example|example.controller.ts +d325eb68755dbd4ebba806192ee50f894360c7115f2284ad978dd0654ae251ad src|modules|example|example.dto.ts +5ab1c2d99c9772df01bd8cc7556375e61195cbe544decae2d1fbe74b3393f7c5 src|modules|example|example.module.ts +2513b6a24385176a7098491f06e496f00d49db4a8f4b5aaec275e7632e847ccf src|modules|example|example.repository.ts +c01acca2fd53717b251c633ac229cfd0f5d877f026b381f5b368cd2ec3c80a95 src|modules|example|example.service.ts +da042ea34cb99e6a86bd151406ebd90646cf4db07fe63cbd9c2576d6b56c1908 src|modules|example|example.types.ts +1a1c57c5b8159ea23950cd8d6297b35afade1ff543b754456724fbf00577d1ee src|modules|index.ts +a2b7bf0cab7723dec4a0a43b18a27670e6e800d826ffe94486a15e1a08d753f8 test|app.e2e-spec.ts +4831bf49fbb39f7efb9d66ffa9e124db7f6b6b1885a5bf630a843ba5f020a6d7 test|app.factory.spec.ts +b4ef12832e3ee386d269732142e25986a7956f06dfd6ca9a04e1c4c1a86703d1 test|bootstrap.spec.ts +75ac98544b8a65c4de6ec22e39b5a9f3b2cb6331fa2658ee7c7f0ac40247e85b test|config|security.setup.spec.ts +40bcc69dd1f8d8dbb623121eb949de50186658887b7cd63f12621176473774a9 test|main.spec.ts +800a895e585e1f211f75762c1bd4c200044bd9a7f84bf5d3f241ff1ad979b206 tsconfig.build.json +8fb1e3f877ed71e60d9e8bff319e3799ecfdd56d5d470539702fbb2583480ad7 tsconfig.json +c9d7f2718a9456010d451aff724c4b46663dc853c0e38f78b229bfe3a1ae3941 vitest.config.e2e.mts +30b54bf16ab94795959164e2d74da634907017f4d0b7e2e7a3f5d4e8cc54169a vitest.config.mts +SEEDED_FILES + ;; + nextjs) + cat <<'SEEDED_FILES' +1029a45ca118fdb8e440928413a5cb8f86f74fd6dc81b269e82690ee36318320 .claude|.harness-base|.claude|agents|code-reviewer.md +af4cc4a30768a329da916b21de9960dce48bae8bfea1b0237e20be678af3683d .claude|.harness-base|.claude|allowed-licences.txt +4237aa3d384bf3d2e27e7163149a0d7f3a4e12ccb5ab66bbaecb04d78b79cc5c .claude|.harness-base|.claude|bundle-budget.txt +eb8cf70089062a9c297309be2b2e20f0240223feff1fe1eb5e188b371539f1b6 .claude|.harness-base|.claude|change-size-exclude.txt +476fc19f407a4de087953fe9e2d5d64026c41290253df7c547da968582a40648 .claude|.harness-base|.claude|ci-gates.sh +493e60c9326a091f17b62a1ddc088696825546f77f8214915360dd3616e3f392 .claude|.harness-base|.claude|comment-hygiene-patterns.txt +7f468ec04debaa70989ed1c65771d06d89a5ab7a61b9becb6fbc3b77e4f6f0d0 .claude|.harness-base|.claude|gate-budget.conf +5f01d143115a3a5bc1d6e6d122709d9db50566dcc37f6bbdc4000d8445573548 .claude|.harness-base|.claude|gate-budget.sh +4a76d433a06f85ab967b7e0c1c251f9f56585cec8a70997060f052e794004849 .claude|.harness-base|.claude|gates.txt +f4b4e6438db7f20cad5fb7d160cb5ead6fc2aa8ffd47ae79a3e877f0c991a604 .claude|.harness-base|.claude|hooks|block-no-verify.sh +23c76185d22e65b7667096ed17d2982d96d7b9a36fec8408a2896547c8ca5465 .claude|.harness-base|.claude|hooks|post-edit-comment-check.sh +c368bd85603a31708fab8257c0c5ef20981453814efcd1768a17dcd6bc8ba96d .claude|.harness-base|.claude|hooks|post-edit-typecheck.sh +3c5e448430bf4b00f1a882e6f66fa680ee57e92ca183f7c1787130480731f433 .claude|.harness-base|.claude|hooks|protect-files.sh +9cb9ce0e9513b2ae7bcef59cf9403842aa7c7e38840d18c6b4e328678d84d52b .claude|.harness-base|.claude|hooks|session-context.sh +7eed857cb3a62268a1f5904abd0f51a4e4427e9eb155af606e19c180bd3faf01 .claude|.harness-base|.claude|hooks|skill-usage-log.sh +d997f39290833016bb42d7b079e961e78cc1469bfd185f1d7e768f373e71aa1b .claude|.harness-base|.claude|hooks|stop-checks.sh +d1f6e2de78928cdfbbfe01eb874fbd3d9c918c6132b28ab5dbab21dcbb56f373 .claude|.harness-base|.claude|hooks|subagent-stop.sh +7883f086d37e83a2e45e1da4abed01a9dc42e69e30f0b7797efab6a4390e007f .claude|.harness-base|.claude|hooks|user-prompt-guard.cjs +e8f19a996f5e512fa8f22ab4ea3f7f55827020f6bff7c596c2b087f00f2adb91 .claude|.harness-base|.claude|licence-exceptions.txt +23e894af3145fbe2ff9f54fa9a9181e189c6aa14156ba151df7422d1c9346b0c .claude|.harness-base|.claude|regen-harness.sh +bdaa785c95e21e9dc4ef70a8c376784784344426858620fd2b4d4c04f5daef22 .claude|.harness-base|.claude|registry-hosts.txt +41777b1a66bc13a7ff72eaaffcc82af7413206f1a06596d0789e3d441434da3e .claude|.harness-base|.claude|release-age-exclude.txt +ed29d2aebe2e3f5c852c1b9bd29aea87c0fa07b176c0de4823ce54f16af85de0 .claude|.harness-base|.claude|review-checklist-stack.txt +fdf9fca2a99ae6f1a9efd417807c64847b65c07613cd02d47053b3bc71894cb1 .claude|.harness-base|.claude|review-checklist.txt +3ffc084b0909359a79e906f90fa1aba321c3cde6cde8e0d07da2d180371ed096 .claude|.harness-base|.claude|seeded-paths.txt +6dd80b02208d66b2acfaf55f20bc875fcd003a476fb0cab8fc6d20f90e48af12 .claude|.harness-base|.claude|settings.json +1b14ad6ef54edfb3096e056a0dc82a51f8b6f6149e7c354bcfe5cb538911c89f .claude|.harness-base|.claude|skills|next-migrate|SKILL.md +6a34b8d1287b7ea4e1c51f0e7dc16a671e4f678dd980fc0681436dc0406073f5 .claude|.harness-base|.claude|skills|next-verify|SKILL.md +8436a463b24cffbcfcbba9e6f9d88e1aee3048957c54424deef018d0b024a5b4 .claude|.harness-base|.claude|skills|skill-audit|SKILL.md +805c987b975e0a4c66019d6de553ffcf1503c3f78c459bec67ff4fa5b9251bd5 .claude|.harness-base|.claude|skills|test-consolidate|SKILL.md +6a78ad7f4dfb2c00c60a877b0a33074bf0ff508055cc69f5908c06032c4c8444 .claude|.harness-base|.claude|verify-harness.sh +0472a1ed6b700e1548cc16a5cc8357b73f0df7e3e38d30f35d617548c3cd0b9b .claude|.harness-base|.github|dependabot.yml +7a39f9eca83ca7f6a45cee8625b9c709fbfabb8d55315ad33e307cb6f86268d1 .claude|.harness-base|.github|workflows|ci.yml +a1978b7a1e366072692ed55ab372a83b62908ccf6eaa5e2e261906c92c704e43 .claude|.harness-base|.gitleaks.toml +143fa3d4218dd82360a68b69a00ac6f5f26e81453f05842c80a67e8b12fab40f .claude|.harness-base|.lefthook|commit-msg.sh +a5097d25c98979d70d9795ea877b486e4cbb7a66d4a71b55e8a159e2b5da97ea .claude|.harness-base|AGENTS.md +f62f6d822cd73580c8ac858385aef13f627eca4aad0b54bdca2ec8d03001a142 .claude|.harness-base|docs|adr|0001-test-each-behaviour-once.md +154082be3208d8a04e8ab3064ddb99e4d5345284866c7e7547cb136e8357f3a5 .claude|.harness-base|docs|harness.md +eeec20bfc0861c308877721179631117fac6ca438b6d4e7cd8441feaeb36c744 .claude|.harness-base|lefthook.yml +f17cae7331a1803e3637b03789b683676e0ea9415c3735b38dbe8df341ce7187 .claude|.harness-base|scripts|assertless_tests_py.py +21caf005962dc5a9b9cac8008ab08d73e92eb718297c7dd143e7ab7c4b1604aa .claude|.harness-base|scripts|check-affected-tests.sh +db2586ce1bb8d0dc3ce42bc01fac844bcf97621d00138ff5ef044e55e02ac3d7 .claude|.harness-base|scripts|check-bundle-size.sh +0ef4238413f625d85051790e01f5a54e3c4ef3b23075a123a8db7db023cea43b .claude|.harness-base|scripts|check-change-size.sh +46821202801e1a1c4869a1b8a60ce50d568a05ea7fce2d9e57f24eb4366f0274 .claude|.harness-base|scripts|check-comments.licences.txt +dcb9c59e0417becea353e20985d0c441e098df1e1ca1e7cb9d127a87fd1f823d .claude|.harness-base|scripts|check-comments.mjs +4798fcabcd27f53c008cc41d4460c252beccfa978f4afa63719df2dfc155bd93 .claude|.harness-base|scripts|check-comments.py +c2eeba162bcce9f2da976a2def85917473ebb60fda39cf28c8537c9cc15cdeb1 .claude|.harness-base|scripts|check-comments.sh +78537b8167edf06a8a22b7554c1c7c44e78f7c287352e80a0ecd3709ddc8c917 .claude|.harness-base|scripts|check-contract.sh +69363e7511cd294e1f6db2cd3246e1925c5ecf09b1b31cc300264eaaba2a08a8 .claude|.harness-base|scripts|check-dockerfile.sh +afe420bf0134c63cb1e327588cdf781b29eb1139f16addf9e334784e1491f26d .claude|.harness-base|scripts|check-docs.sh +678a9233a9c44c140753fb0dc796f21f4fc771015fa4b2e02ac2d79ec7b2ccd1 .claude|.harness-base|scripts|check-duplicate-tests.sh +73331e83849face750576d78bfb425c3f44c28d7f488b3bcebc8c59183407e0c .claude|.harness-base|scripts|check-env-example.sh +4882fe7d697d08e2aed037b9b27739afbc2021bd5604ebba7f4253f2fb25a089 .claude|.harness-base|scripts|check-exclude-reasons.awk +8bae9957f35c8134add1eba6a3d4d30d57a701ab72fbaaa4b92d759833941220 .claude|.harness-base|scripts|check-exclude-reasons.mjs +13c41f6f1047ada17700b885c2f8840da44073a6b7459d726bc08eaf72f5c8ec .claude|.harness-base|scripts|check-exclude-reasons.py +8d04b7b35d5bfb1d2ca4c82499f3a17e779b3329374cd40bfcad484f30f6791e .claude|.harness-base|scripts|check-exclude-reasons.sh +30636896f074a81097cc9d230ee4fdca511b4e4e903042779a04d213a48c8230 .claude|.harness-base|scripts|check-exclude-rules.sh +d5b8d21bc41c33aeedb93db8b19994f663ecb1e6c51c1d26f11e6c928e756f28 .claude|.harness-base|scripts|check-import-layers.sh +27428060cbc818d2fa75bbadd84e3d840790d478a584a09884b3b9dd4c3ddeb6 .claude|.harness-base|scripts|check-licences.sh +43539b3fc53533fc0ae11e5ac6a5696c5c1b7a7cc7e63bdc7c5f36bbdb7e48b8 .claude|.harness-base|scripts|check-mutation-diff.sh +18cf122fa40dc1ce7f54e8671d20fe8536f927c011992f827f72148c13863077 .claude|.harness-base|scripts|check-review-record.sh +e72bc0d164a525080a2e59c70abf3ea9415cdedc7c788fb87a03d9c850cb4a33 .claude|.harness-base|scripts|check-route-logging.mjs +e87336ac3c1719b2906e771d5e1f45cf49f3d7c40dd985fa6093d1f7afd7e3d2 .claude|.harness-base|scripts|check-secret-scanner.sh +211f0645652fb0daf1ab315b4f87ade96f4704e80d4e68ba78be74316238320e .claude|.harness-base|scripts|check-shared-gates.sh +e871f3dd5850309717e8556d30d0126f771c3a880093b6079dd8edfa937a7c6c .claude|.harness-base|scripts|check-supply-chain.sh +3ee878d98f5e9296ebb46ceaa66993cd76f0ca59eed475e0db65f6ec52950436 .claude|.harness-base|scripts|check-workarounds.sh +ab80c3ab9f8ac2eeab4c5a0f0004f1e26fd6adacbc75469fd4bfe00e791070e7 .claude|.harness-base|scripts|check-workflows.sh +13e8cc294be6fe5a315c29b827b43bb82cad7b4bf004e7393acce85fd76edda3 .claude|.harness-base|scripts|duplicate-tests-ts.mjs +8aab7e87a42fa451fdddc2b3939b72e8d07bd3c3080f0e8abde6af8c043d910b .claude|.harness-base|scripts|duplicate_tests_py.py +32a4c641ed3fa587143c2638c02c8ee86dc7a57119ef87f7dfd435487c531144 .claude|.harness-base|scripts|eslint-effective.mjs +055249313525496d682bc79688ed40f8e23c22fb3afd22c7c9fb51b7d8231705 .claude|.harness-base|scripts|gate-baseline.sh +cccb8022930f0043802d74bb9a48c681d7bcf0dc68705387c2b0a1550eb98cb8 .claude|.harness-base|scripts|gate-baselined.sh +f105c09063c535f5aed591915e34621227d0ea3f98f337794d78cb1dfaff3b9a .claude|.harness-base|scripts|generate-sbom.sh +70edb543475618e2dddc2954a0b9f24309a312cb114cfe3596ff9ebe91db6d7e .claude|.harness-base|scripts|py-env.py +ff24e2d2b39700e7434a461746fadfcd285814185f1ac297e3f6f0517f4479ac .claude|.harness-base|scripts|record-review.sh +41bd3d4ec9045327e1a023c898189a98b6e17515eecd45f10e471b47f8f4d956 .claude|.harness-base|scripts|remove-harness.sh +4063966fec5a5021ed09906289f89c2e5935dd4dc680ae6625affb3aecfd2dee .claude|.harness-base|scripts|scan-secrets.sh +09bbb6dc4d1be61544a0cd8b8344ac4f6f1a3b04c0dbb986fea090a702b8faa9 .claude|.harness-base|scripts|seeded-files.sh +30e8eede6e476e9271b6999067fb8a588e411857f0539ed3c4ce69ddb3ae54a2 .claude|.harness-base|scripts|set-coverage-floor.sh +b78a9ae43f5b9ad0b5d6c92c1f986b1e0005ed1313b01e8e8fc4ca09c5e5f65b .claude|.harness-base|scripts|test-budget.sh +1029a45ca118fdb8e440928413a5cb8f86f74fd6dc81b269e82690ee36318320 .claude|agents|code-reviewer.md +af4cc4a30768a329da916b21de9960dce48bae8bfea1b0237e20be678af3683d .claude|allowed-licences.txt +4237aa3d384bf3d2e27e7163149a0d7f3a4e12ccb5ab66bbaecb04d78b79cc5c .claude|bundle-budget.txt +eb8cf70089062a9c297309be2b2e20f0240223feff1fe1eb5e188b371539f1b6 .claude|change-size-exclude.txt +476fc19f407a4de087953fe9e2d5d64026c41290253df7c547da968582a40648 .claude|ci-gates.sh +493e60c9326a091f17b62a1ddc088696825546f77f8214915360dd3616e3f392 .claude|comment-hygiene-patterns.txt +7f468ec04debaa70989ed1c65771d06d89a5ab7a61b9becb6fbc3b77e4f6f0d0 .claude|gate-budget.conf +5f01d143115a3a5bc1d6e6d122709d9db50566dcc37f6bbdc4000d8445573548 .claude|gate-budget.sh +4a76d433a06f85ab967b7e0c1c251f9f56585cec8a70997060f052e794004849 .claude|gates.txt +f4b4e6438db7f20cad5fb7d160cb5ead6fc2aa8ffd47ae79a3e877f0c991a604 .claude|hooks|block-no-verify.sh +23c76185d22e65b7667096ed17d2982d96d7b9a36fec8408a2896547c8ca5465 .claude|hooks|post-edit-comment-check.sh +c368bd85603a31708fab8257c0c5ef20981453814efcd1768a17dcd6bc8ba96d .claude|hooks|post-edit-typecheck.sh +3c5e448430bf4b00f1a882e6f66fa680ee57e92ca183f7c1787130480731f433 .claude|hooks|protect-files.sh +9cb9ce0e9513b2ae7bcef59cf9403842aa7c7e38840d18c6b4e328678d84d52b .claude|hooks|session-context.sh +7eed857cb3a62268a1f5904abd0f51a4e4427e9eb155af606e19c180bd3faf01 .claude|hooks|skill-usage-log.sh +d997f39290833016bb42d7b079e961e78cc1469bfd185f1d7e768f373e71aa1b .claude|hooks|stop-checks.sh +d1f6e2de78928cdfbbfe01eb874fbd3d9c918c6132b28ab5dbab21dcbb56f373 .claude|hooks|subagent-stop.sh +7883f086d37e83a2e45e1da4abed01a9dc42e69e30f0b7797efab6a4390e007f .claude|hooks|user-prompt-guard.cjs +e8f19a996f5e512fa8f22ab4ea3f7f55827020f6bff7c596c2b087f00f2adb91 .claude|licence-exceptions.txt +23e894af3145fbe2ff9f54fa9a9181e189c6aa14156ba151df7422d1c9346b0c .claude|regen-harness.sh +bdaa785c95e21e9dc4ef70a8c376784784344426858620fd2b4d4c04f5daef22 .claude|registry-hosts.txt +41777b1a66bc13a7ff72eaaffcc82af7413206f1a06596d0789e3d441434da3e .claude|release-age-exclude.txt +ed29d2aebe2e3f5c852c1b9bd29aea87c0fa07b176c0de4823ce54f16af85de0 .claude|review-checklist-stack.txt +fdf9fca2a99ae6f1a9efd417807c64847b65c07613cd02d47053b3bc71894cb1 .claude|review-checklist.txt +c65862ea0316046635cb97ca3c755cb14573ae69112ff9cf6943d769ac1c5a3e .claude|rules|nextjs.md +3ffc084b0909359a79e906f90fa1aba321c3cde6cde8e0d07da2d180371ed096 .claude|seeded-paths.txt +6dd80b02208d66b2acfaf55f20bc875fcd003a476fb0cab8fc6d20f90e48af12 .claude|settings.json +1b14ad6ef54edfb3096e056a0dc82a51f8b6f6149e7c354bcfe5cb538911c89f .claude|skills|next-migrate|SKILL.md +6a34b8d1287b7ea4e1c51f0e7dc16a671e4f678dd980fc0681436dc0406073f5 .claude|skills|next-verify|SKILL.md +8436a463b24cffbcfcbba9e6f9d88e1aee3048957c54424deef018d0b024a5b4 .claude|skills|skill-audit|SKILL.md +805c987b975e0a4c66019d6de553ffcf1503c3f78c459bec67ff4fa5b9251bd5 .claude|skills|test-consolidate|SKILL.md +6a78ad7f4dfb2c00c60a877b0a33074bf0ff508055cc69f5908c06032c4c8444 .claude|verify-harness.sh +ec0e64c9102bf53f381a2a32c68fcb3f479a8ac0ae5c8463299b21f3f98a53c5 .dockerignore +53f406abef7e392fb497f48b1447e09f66cfd1171df63747667cec0ff7bd0e4a .env.example +0472a1ed6b700e1548cc16a5cc8357b73f0df7e3e38d30f35d617548c3cd0b9b .github|dependabot.yml +7a39f9eca83ca7f6a45cee8625b9c709fbfabb8d55315ad33e307cb6f86268d1 .github|workflows|ci.yml +9287aefb10c73fdfe04b5cd79951b3cef3dd17a3bb28b82531629afe03c7d46e .gitignore +a1978b7a1e366072692ed55ab372a83b62908ccf6eaa5e2e261906c92c704e43 .gitleaks.toml +79532a2683b753ca54cca9b7ab4e53c7b2631fcd7ee221fa60e7a1a694b9d029 .jscpd.json +143fa3d4218dd82360a68b69a00ac6f5f26e81453f05842c80a67e8b12fab40f .lefthook|commit-msg.sh +d76c138f28da0f0acb33eb0048b6213930b9e67072421202bd77f04981bdb8f3 .npmrc +c5ebe984251ed4d55a410355354bc497d9138dff86a3a49ab02b9ef11876c539 .prettierignore +51a5686d6d1d4f2712a90345c6513021f742757633a60858b7f3169084538161 .prettierrc +a5097d25c98979d70d9795ea877b486e4cbb7a66d4a71b55e8a159e2b5da97ea AGENTS.md +d4a44fe67b98b29a691d075a2c499773a555a3799bbccac1b0572dce9156030a CHANGELOG.md +f14b0a143e3ffa79523936bf5aa7d1cd991340350602d65a82a75c704743b99e Dockerfile +0a19b2752a6c21cdd6fd9b74330c938e5a3f1042eded2c139428446d95de9c5f FUTURE.md +13f4720a1f45a2f5788190326ed3ca1a3f326da360638197c19edec2ac74db95 components.json +c587baf49bdcd12005ef8c42d49269e6c53f51e46e8999097573b7e26897a113 docker-entrypoint.sh +1983f9772efec802a4ed120049212cdcda57cd8be696bf6f630bf7cd97ac1c3c docs|CONSTITUTION.md +f62f6d822cd73580c8ac858385aef13f627eca4aad0b54bdca2ec8d03001a142 docs|adr|0001-test-each-behaviour-once.md +d46e12db381cdf8e180fb9f7d7321da0f75eccbf3c0c0d51f38d18a9af05bafe docs|architecture.md +154082be3208d8a04e8ab3064ddb99e4d5345284866c7e7547cb136e8357f3a5 docs|harness.md +903bdcb3d185a2ed2788ea4438570d516c8c068b281e6b433accdd8c882e9f63 eslint.config.mjs +6b18151e461f35bbd34df1df21de1afc630cc03de23748a5afd664328edc3630 layers.config.mjs +eeec20bfc0861c308877721179631117fac6ca438b6d4e7cd8441feaeb36c744 lefthook.yml +710a3320e711833d3cd7d16f21954448c63a2b260c229db7e4cfe0721ddaeabd next.config.ts +2960d1471a0516eb9664b46359d752242c5e49e35d47385d590646c11d63fa89 package.json +cdf8c0aba8325f27292f71f7e9c4292c3f250bafe78fa3eec680b8e99cc663e0 pnpm-workspace.yaml +9ca55411b62b2c9cc5631a3e6c631d80c8b8171c7b9ea1e19f83400f4100e910 postcss.config.mjs +ce6bcee1376163e3c8adb1495cf7f70810b474bbf071fe7ca50ee2eb2a1f8a5a public|image_assets|default-square.svg +7f364931e0cf19f7308563f479cae21677d6f1318b065d13856b36caf60c1517 public|image_assets|logo.svg +f17cae7331a1803e3637b03789b683676e0ea9415c3735b38dbe8df341ce7187 scripts|assertless_tests_py.py +21caf005962dc5a9b9cac8008ab08d73e92eb718297c7dd143e7ab7c4b1604aa scripts|check-affected-tests.sh +db2586ce1bb8d0dc3ce42bc01fac844bcf97621d00138ff5ef044e55e02ac3d7 scripts|check-bundle-size.sh +0ef4238413f625d85051790e01f5a54e3c4ef3b23075a123a8db7db023cea43b scripts|check-change-size.sh +46821202801e1a1c4869a1b8a60ce50d568a05ea7fce2d9e57f24eb4366f0274 scripts|check-comments.licences.txt +dcb9c59e0417becea353e20985d0c441e098df1e1ca1e7cb9d127a87fd1f823d scripts|check-comments.mjs +4798fcabcd27f53c008cc41d4460c252beccfa978f4afa63719df2dfc155bd93 scripts|check-comments.py +c2eeba162bcce9f2da976a2def85917473ebb60fda39cf28c8537c9cc15cdeb1 scripts|check-comments.sh +78537b8167edf06a8a22b7554c1c7c44e78f7c287352e80a0ecd3709ddc8c917 scripts|check-contract.sh +69363e7511cd294e1f6db2cd3246e1925c5ecf09b1b31cc300264eaaba2a08a8 scripts|check-dockerfile.sh +afe420bf0134c63cb1e327588cdf781b29eb1139f16addf9e334784e1491f26d scripts|check-docs.sh +678a9233a9c44c140753fb0dc796f21f4fc771015fa4b2e02ac2d79ec7b2ccd1 scripts|check-duplicate-tests.sh +73331e83849face750576d78bfb425c3f44c28d7f488b3bcebc8c59183407e0c scripts|check-env-example.sh +4882fe7d697d08e2aed037b9b27739afbc2021bd5604ebba7f4253f2fb25a089 scripts|check-exclude-reasons.awk +8bae9957f35c8134add1eba6a3d4d30d57a701ab72fbaaa4b92d759833941220 scripts|check-exclude-reasons.mjs +13c41f6f1047ada17700b885c2f8840da44073a6b7459d726bc08eaf72f5c8ec scripts|check-exclude-reasons.py +8d04b7b35d5bfb1d2ca4c82499f3a17e779b3329374cd40bfcad484f30f6791e scripts|check-exclude-reasons.sh +30636896f074a81097cc9d230ee4fdca511b4e4e903042779a04d213a48c8230 scripts|check-exclude-rules.sh +d5b8d21bc41c33aeedb93db8b19994f663ecb1e6c51c1d26f11e6c928e756f28 scripts|check-import-layers.sh +27428060cbc818d2fa75bbadd84e3d840790d478a584a09884b3b9dd4c3ddeb6 scripts|check-licences.sh +43539b3fc53533fc0ae11e5ac6a5696c5c1b7a7cc7e63bdc7c5f36bbdb7e48b8 scripts|check-mutation-diff.sh +18cf122fa40dc1ce7f54e8671d20fe8536f927c011992f827f72148c13863077 scripts|check-review-record.sh +e72bc0d164a525080a2e59c70abf3ea9415cdedc7c788fb87a03d9c850cb4a33 scripts|check-route-logging.mjs +e87336ac3c1719b2906e771d5e1f45cf49f3d7c40dd985fa6093d1f7afd7e3d2 scripts|check-secret-scanner.sh +211f0645652fb0daf1ab315b4f87ade96f4704e80d4e68ba78be74316238320e scripts|check-shared-gates.sh +e871f3dd5850309717e8556d30d0126f771c3a880093b6079dd8edfa937a7c6c scripts|check-supply-chain.sh +3ee878d98f5e9296ebb46ceaa66993cd76f0ca59eed475e0db65f6ec52950436 scripts|check-workarounds.sh +ab80c3ab9f8ac2eeab4c5a0f0004f1e26fd6adacbc75469fd4bfe00e791070e7 scripts|check-workflows.sh +13e8cc294be6fe5a315c29b827b43bb82cad7b4bf004e7393acce85fd76edda3 scripts|duplicate-tests-ts.mjs +8aab7e87a42fa451fdddc2b3939b72e8d07bd3c3080f0e8abde6af8c043d910b scripts|duplicate_tests_py.py +32a4c641ed3fa587143c2638c02c8ee86dc7a57119ef87f7dfd435487c531144 scripts|eslint-effective.mjs +055249313525496d682bc79688ed40f8e23c22fb3afd22c7c9fb51b7d8231705 scripts|gate-baseline.sh +cccb8022930f0043802d74bb9a48c681d7bcf0dc68705387c2b0a1550eb98cb8 scripts|gate-baselined.sh +f105c09063c535f5aed591915e34621227d0ea3f98f337794d78cb1dfaff3b9a scripts|generate-sbom.sh +70edb543475618e2dddc2954a0b9f24309a312cb114cfe3596ff9ebe91db6d7e scripts|py-env.py +ff24e2d2b39700e7434a461746fadfcd285814185f1ac297e3f6f0517f4479ac scripts|record-review.sh +41bd3d4ec9045327e1a023c898189a98b6e17515eecd45f10e471b47f8f4d956 scripts|remove-harness.sh +4063966fec5a5021ed09906289f89c2e5935dd4dc680ae6625affb3aecfd2dee scripts|scan-secrets.sh +09bbb6dc4d1be61544a0cd8b8344ac4f6f1a3b04c0dbb986fea090a702b8faa9 scripts|seeded-files.sh +30e8eede6e476e9271b6999067fb8a588e411857f0539ed3c4ce69ddb3ae54a2 scripts|set-coverage-floor.sh +b78a9ae43f5b9ad0b5d6c92c1f986b1e0005ed1313b01e8e8fc4ca09c5e5f65b scripts|test-budget.sh +96df2c5e47a8bf7eb3dd54b3e2b47b824dc248f25bf55feadd322fb95b7fed53 src|app|(public)|layout.tsx +f7352a16541e15dee7aa3e591aab00867e28153479b579b3598d5c3bea8d1f1b src|app|(public)|page.tsx +a922d122f4915fa8c66b23287140cb968c159751e7f7c7d935997e5c0650379e src|app|api|health|route.ts +57a00241ac8993474b70f785c8f74659be76c075d452d8c597de1a1f3ca3f101 src|app|dashboard|(overview)|page.tsx +bacc3363a4969babf7067736ebcbd442bd85f5e01e4b3410659abf874e13375e src|app|dashboard|layout.tsx +bc9179d23a7e020cbdbe5528c9ddd94d6e534bbba1d77d090a8b778fcd2c2ae5 src|app|error.tsx +c117a387abb4a597d834e92b0fb9c444eedbbef014481f04b735eff6f765ba89 src|app|globals.css +ff99693b06906cfe6bc13d26893415dcde96f347a231b606bbfcf8ff06d0f461 src|app|layout.tsx +afac84765b7f9ef9c499d1c3aa645b2f36a238dfe5cbdd048c0dedb003d0256b src|app|not-found.tsx +86764b27653bc2ef33ed876326fcf2ff4a8f50b0cce61bcdaf128d56de6afd01 src|components|layout|index.ts +9ad454df99168e3844fc1e8d75a0dec2bb98cb1e735f91c106e944b7141ac7de src|components|layout|navbar.tsx +fa3515f681208d3157fb92a424ae3cbf1ab0f05399bdfd35657caddff754c162 src|components|layout|providers.tsx +f16cf853eacc6461ca486b4a4140e6c7534b954ceb6bf850ecb6d9a8692b46dc src|components|layout|site-footer.tsx +7ac07ad872eaee09673233168f84260a4d56124d8155d05eb65a2dce9cd15167 src|components|layout|theme-provider.tsx +73a840ab8b71ba13dc587ceb5c1e18607cd52225b8f8106e69665a85bee81cf9 src|components|widgets|brand-logo.tsx +8c3bb336674cf344ac008be63e4575c00e9bb5b68a4701b8980449342575929a src|components|widgets|brand-text.tsx +315813096b412173128c61c4e2d41115ba072466d8690af8f6f03ed2b017267c src|components|widgets|custom-card.tsx +43df4df6aaacffd9850950d5613e5257c31bbae01880681e4174d26df751b743 src|components|widgets|custom-dialog.tsx +b1604cb9b345a10ee63b3c57ae851b7292b80b9bd22d486e01461c25f964a3e1 src|components|widgets|custom-form-field.tsx +cf8978d74a7a2933ca3d02ac82656f42a12471b947145390467080e7d8d2e925 src|components|widgets|floating-shape.tsx +ee474c2d0ffaf37662ff7fdee47652c5d631f66cd403bb4cedc33252b5f463e3 src|components|widgets|index.ts +0435208c803fdbb085930bbe8839ee27b24524655cb4153e9259d565420599ff src|components|widgets|link-list.tsx +5ca3d146f0e9e2c87e7e109acee657c8cfabe8dbeda1aa37866878d5783d6943 src|components|widgets|media-card.tsx +6e285bbcf2a2de5a04fbd177b2fa9693c4fa556456c19c3b711946d74f177955 src|components|widgets|pill.tsx +6d3e1a1206d465cc0ac8be779decd99b2fb9ca85692f8f7fb76c8c3bb88dede5 src|components|widgets|theme-toggle-button.tsx +195c73f99a71406dfab9159e683e86f5f5b5a72bb7702b16d331e2cb60edf04c src|features|example|api|example-service.ts +39ecaebef34bae5a01749c309ef7521d8b7fb5c121f031efa98c83ff0ffa5425 src|features|example|api|index.ts +34861ba1bafed9f136396065d6989e61c7d963745f8789f264d94bfd2cb61c46 src|features|example|components|example-card.tsx +04fa72659cb0473908a561488accb8dd3d3b43845a2aff47a674694bf39ec651 src|features|example|components|example-list.tsx +e88d43b1ea8ac1cb75c7b5abe192d6da2f5542461ac5331cde44287a14673a7c src|features|example|components|index.ts +3c95971aff9b72f9c98b7b78756e9253d89d9f021e311938c629d5a9fbd44ea1 src|features|example|constants.ts +6946fbafa176f562b9323a9aadddfac646742c7138b2a5ac9ebfa1803b40d278 src|features|example|hooks|index.ts +8791d9424fe804f7d787aa1e9943b30ebbc59e0ae5017a7bdd0e302ee2c8ffc3 src|features|example|hooks|use-example-items.query.ts +1d16c871e1fe525899098e11820c172c94c21e9afc1ac610399dca89fb25373f src|features|example|index.ts +8e609bb71c20b858c77f0e9f90bb1319db8477b13f9f965f1a1e18524bf50881 src|features|example|schemas|index.ts +bb8b348ca0b248f3f1ca4ba64c774b3bc1e9d9f7976114d6561b936682602379 src|features|example|types.ts +8e609bb71c20b858c77f0e9f90bb1319db8477b13f9f965f1a1e18524bf50881 src|hooks|index.ts +fe9c5d7c103f508a704c723b72a325c6dbd2f4d6ea8f039b741c24a7e294d58a src|integrations|clients|base|axios-client.ts +4877b4c722c84e4725717797f9fb58f634251fdfea4b8e1c20fdbac63d4ac941 src|integrations|clients|base|fetch-client.ts +db9006a4ed77d093ce7885cec76a310407f5a6130fbaaecaec8d5a9a52313e5b src|integrations|clients|base|https-agent.ts +14297103b093d9f0ab3c1a9be3b0381d14ff7ae193a5117c61a6e09185b0bdfe src|integrations|error.ts +99fa5f66b1f0b993a4e156a44a38f483a430b07e5dcffab1347c0414369c6ddb src|integrations|factories.ts +3800de9438d18caa82b7abe52c5443ed19f16b367cb4aa1fffa47961b4c8fe37 src|lib|constants|env.ts +874d367d69fbf3447ca00b405bc59cc0b41eb1f4f0a6c4a2553ee5076e20104b src|lib|constants|index.ts +827e04b9511036626f660b0e183e46ca0ccf5e97af10c453c064411e0b785202 src|lib|constants|routes.ts +9e3679b62b703c20f634058268cfc46cf212fd179335616546877991fd152455 src|lib|errors|error-log-handler.ts +e932aea0539c0fe9962d8305f3cc7a44d5638f85cda7412f6a905991d5f552df src|lib|errors|handle-api-error.ts +7417b9f25fb9050c809c81aa4336c6e7b69d8d776e60ca301dc16aaae73ae006 src|lib|errors|index.ts +0c077275add85344f9d058e42e79032ac86bb768557e40633c2dbd23afa1c6b8 src|lib|logger.ts +fc5318b1a2c6e6f99ee9d4b459ff58e2d666af44e2ce18686a5e11eae7babedd src|lib|security|frame-protection.ts +9304a861c8673bee09e0f12de31773abbde503b02e59dfd74763ddec2e37cf05 src|lib|utils|index.ts +e32f8ff1d5b8df2e0b498c4c1dae0afd321f4edd6511b9858823b5f9b71dbaf1 src|lib|utils|request-origin.ts +e3a9eee3d39eaedcce9df26162e29592fd70a3164ea590745229dac4d06f7830 src|lib|utils|with-logging.ts +73bef9a7f7d3f7db91aec85ac8e2da6b45be9c2d97cdeee72353071959030dde src|proxy.ts +59bb27a48746048c5b733cf843efd96aa849ffecb00a384f5f4289d59e377f87 test|api|health.test.ts +a0f6862e7a5e608dce98bc8c7f33f8211299a372c16272d8bc6d3cf7f274b459 test|api|with-logging.test.ts +d9e55a0d56ebd78e37652df3ae99383a5ba0155a6e9352b14ad10fb3de0e770a test|components|render.test.tsx +d99fcd6caff08874d243eee6f992636c69b4762afc0ca7fbb33adb4ecfe3b7ba test|integrations|clients.test.ts +30a466d987770abb446babb94293e9e1e7dc5730fca6eb98c4d7209030ef9dd6 test|lib|errors.test.ts +4d4dbacfe3c09484e20ee4b98c53f1a77e6679e0f53ea78697605e0b97861e8b test|lib|frame-protection.test.ts +74159179676b3ff608f01ed41938ec546fdde34c79ccdfff14b400261d5fcafc tsconfig.json +68fcdab03380a4f0c73321acb7a1be24accc702f1581a1657fc6b85c496502e5 vitest.config.ts +SEEDED_FILES + ;; + vite-react) + cat <<'SEEDED_FILES' +1029a45ca118fdb8e440928413a5cb8f86f74fd6dc81b269e82690ee36318320 .claude|.harness-base|.claude|agents|code-reviewer.md +af4cc4a30768a329da916b21de9960dce48bae8bfea1b0237e20be678af3683d .claude|.harness-base|.claude|allowed-licences.txt +4237aa3d384bf3d2e27e7163149a0d7f3a4e12ccb5ab66bbaecb04d78b79cc5c .claude|.harness-base|.claude|bundle-budget.txt +eb8cf70089062a9c297309be2b2e20f0240223feff1fe1eb5e188b371539f1b6 .claude|.harness-base|.claude|change-size-exclude.txt +476fc19f407a4de087953fe9e2d5d64026c41290253df7c547da968582a40648 .claude|.harness-base|.claude|ci-gates.sh +493e60c9326a091f17b62a1ddc088696825546f77f8214915360dd3616e3f392 .claude|.harness-base|.claude|comment-hygiene-patterns.txt +7f468ec04debaa70989ed1c65771d06d89a5ab7a61b9becb6fbc3b77e4f6f0d0 .claude|.harness-base|.claude|gate-budget.conf +5f01d143115a3a5bc1d6e6d122709d9db50566dcc37f6bbdc4000d8445573548 .claude|.harness-base|.claude|gate-budget.sh +4a76d433a06f85ab967b7e0c1c251f9f56585cec8a70997060f052e794004849 .claude|.harness-base|.claude|gates.txt +f4b4e6438db7f20cad5fb7d160cb5ead6fc2aa8ffd47ae79a3e877f0c991a604 .claude|.harness-base|.claude|hooks|block-no-verify.sh +23c76185d22e65b7667096ed17d2982d96d7b9a36fec8408a2896547c8ca5465 .claude|.harness-base|.claude|hooks|post-edit-comment-check.sh +c368bd85603a31708fab8257c0c5ef20981453814efcd1768a17dcd6bc8ba96d .claude|.harness-base|.claude|hooks|post-edit-typecheck.sh +3c5e448430bf4b00f1a882e6f66fa680ee57e92ca183f7c1787130480731f433 .claude|.harness-base|.claude|hooks|protect-files.sh +9cb9ce0e9513b2ae7bcef59cf9403842aa7c7e38840d18c6b4e328678d84d52b .claude|.harness-base|.claude|hooks|session-context.sh +7eed857cb3a62268a1f5904abd0f51a4e4427e9eb155af606e19c180bd3faf01 .claude|.harness-base|.claude|hooks|skill-usage-log.sh +d997f39290833016bb42d7b079e961e78cc1469bfd185f1d7e768f373e71aa1b .claude|.harness-base|.claude|hooks|stop-checks.sh +d1f6e2de78928cdfbbfe01eb874fbd3d9c918c6132b28ab5dbab21dcbb56f373 .claude|.harness-base|.claude|hooks|subagent-stop.sh +7883f086d37e83a2e45e1da4abed01a9dc42e69e30f0b7797efab6a4390e007f .claude|.harness-base|.claude|hooks|user-prompt-guard.cjs +e8f19a996f5e512fa8f22ab4ea3f7f55827020f6bff7c596c2b087f00f2adb91 .claude|.harness-base|.claude|licence-exceptions.txt +23e894af3145fbe2ff9f54fa9a9181e189c6aa14156ba151df7422d1c9346b0c .claude|.harness-base|.claude|regen-harness.sh +bdaa785c95e21e9dc4ef70a8c376784784344426858620fd2b4d4c04f5daef22 .claude|.harness-base|.claude|registry-hosts.txt +41777b1a66bc13a7ff72eaaffcc82af7413206f1a06596d0789e3d441434da3e .claude|.harness-base|.claude|release-age-exclude.txt +ed29d2aebe2e3f5c852c1b9bd29aea87c0fa07b176c0de4823ce54f16af85de0 .claude|.harness-base|.claude|review-checklist-stack.txt +fdf9fca2a99ae6f1a9efd417807c64847b65c07613cd02d47053b3bc71894cb1 .claude|.harness-base|.claude|review-checklist.txt +cd5cc319ebe00d1f8794c56ff26056fada12670a9d8d9192906782eb2b32e657 .claude|.harness-base|.claude|seeded-paths.txt +6dd80b02208d66b2acfaf55f20bc875fcd003a476fb0cab8fc6d20f90e48af12 .claude|.harness-base|.claude|settings.json +8436a463b24cffbcfcbba9e6f9d88e1aee3048957c54424deef018d0b024a5b4 .claude|.harness-base|.claude|skills|skill-audit|SKILL.md +805c987b975e0a4c66019d6de553ffcf1503c3f78c459bec67ff4fa5b9251bd5 .claude|.harness-base|.claude|skills|test-consolidate|SKILL.md +5fe482a02e0ff020cc0286654dcceba1c893b693cfe3d0c7919d44bd34ba45b7 .claude|.harness-base|.claude|skills|vite-verify|SKILL.md +6a78ad7f4dfb2c00c60a877b0a33074bf0ff508055cc69f5908c06032c4c8444 .claude|.harness-base|.claude|verify-harness.sh +0472a1ed6b700e1548cc16a5cc8357b73f0df7e3e38d30f35d617548c3cd0b9b .claude|.harness-base|.github|dependabot.yml +7a39f9eca83ca7f6a45cee8625b9c709fbfabb8d55315ad33e307cb6f86268d1 .claude|.harness-base|.github|workflows|ci.yml +a1978b7a1e366072692ed55ab372a83b62908ccf6eaa5e2e261906c92c704e43 .claude|.harness-base|.gitleaks.toml +143fa3d4218dd82360a68b69a00ac6f5f26e81453f05842c80a67e8b12fab40f .claude|.harness-base|.lefthook|commit-msg.sh +2a85ed4158fd58a2f95a6d7f3fb4aca38824c26de2e4728f88d12948e9ad7999 .claude|.harness-base|AGENTS.md +f62f6d822cd73580c8ac858385aef13f627eca4aad0b54bdca2ec8d03001a142 .claude|.harness-base|docs|adr|0001-test-each-behaviour-once.md +154082be3208d8a04e8ab3064ddb99e4d5345284866c7e7547cb136e8357f3a5 .claude|.harness-base|docs|harness.md +eeec20bfc0861c308877721179631117fac6ca438b6d4e7cd8441feaeb36c744 .claude|.harness-base|lefthook.yml +f17cae7331a1803e3637b03789b683676e0ea9415c3735b38dbe8df341ce7187 .claude|.harness-base|scripts|assertless_tests_py.py +21caf005962dc5a9b9cac8008ab08d73e92eb718297c7dd143e7ab7c4b1604aa .claude|.harness-base|scripts|check-affected-tests.sh +db2586ce1bb8d0dc3ce42bc01fac844bcf97621d00138ff5ef044e55e02ac3d7 .claude|.harness-base|scripts|check-bundle-size.sh +0ef4238413f625d85051790e01f5a54e3c4ef3b23075a123a8db7db023cea43b .claude|.harness-base|scripts|check-change-size.sh +46821202801e1a1c4869a1b8a60ce50d568a05ea7fce2d9e57f24eb4366f0274 .claude|.harness-base|scripts|check-comments.licences.txt +dcb9c59e0417becea353e20985d0c441e098df1e1ca1e7cb9d127a87fd1f823d .claude|.harness-base|scripts|check-comments.mjs +4798fcabcd27f53c008cc41d4460c252beccfa978f4afa63719df2dfc155bd93 .claude|.harness-base|scripts|check-comments.py +c2eeba162bcce9f2da976a2def85917473ebb60fda39cf28c8537c9cc15cdeb1 .claude|.harness-base|scripts|check-comments.sh +78537b8167edf06a8a22b7554c1c7c44e78f7c287352e80a0ecd3709ddc8c917 .claude|.harness-base|scripts|check-contract.sh +69363e7511cd294e1f6db2cd3246e1925c5ecf09b1b31cc300264eaaba2a08a8 .claude|.harness-base|scripts|check-dockerfile.sh +afe420bf0134c63cb1e327588cdf781b29eb1139f16addf9e334784e1491f26d .claude|.harness-base|scripts|check-docs.sh +678a9233a9c44c140753fb0dc796f21f4fc771015fa4b2e02ac2d79ec7b2ccd1 .claude|.harness-base|scripts|check-duplicate-tests.sh +73331e83849face750576d78bfb425c3f44c28d7f488b3bcebc8c59183407e0c .claude|.harness-base|scripts|check-env-example.sh +4882fe7d697d08e2aed037b9b27739afbc2021bd5604ebba7f4253f2fb25a089 .claude|.harness-base|scripts|check-exclude-reasons.awk +8bae9957f35c8134add1eba6a3d4d30d57a701ab72fbaaa4b92d759833941220 .claude|.harness-base|scripts|check-exclude-reasons.mjs +13c41f6f1047ada17700b885c2f8840da44073a6b7459d726bc08eaf72f5c8ec .claude|.harness-base|scripts|check-exclude-reasons.py +8d04b7b35d5bfb1d2ca4c82499f3a17e779b3329374cd40bfcad484f30f6791e .claude|.harness-base|scripts|check-exclude-reasons.sh +30636896f074a81097cc9d230ee4fdca511b4e4e903042779a04d213a48c8230 .claude|.harness-base|scripts|check-exclude-rules.sh +d5b8d21bc41c33aeedb93db8b19994f663ecb1e6c51c1d26f11e6c928e756f28 .claude|.harness-base|scripts|check-import-layers.sh +27428060cbc818d2fa75bbadd84e3d840790d478a584a09884b3b9dd4c3ddeb6 .claude|.harness-base|scripts|check-licences.sh +43539b3fc53533fc0ae11e5ac6a5696c5c1b7a7cc7e63bdc7c5f36bbdb7e48b8 .claude|.harness-base|scripts|check-mutation-diff.sh +18cf122fa40dc1ce7f54e8671d20fe8536f927c011992f827f72148c13863077 .claude|.harness-base|scripts|check-review-record.sh +e87336ac3c1719b2906e771d5e1f45cf49f3d7c40dd985fa6093d1f7afd7e3d2 .claude|.harness-base|scripts|check-secret-scanner.sh +211f0645652fb0daf1ab315b4f87ade96f4704e80d4e68ba78be74316238320e .claude|.harness-base|scripts|check-shared-gates.sh +e871f3dd5850309717e8556d30d0126f771c3a880093b6079dd8edfa937a7c6c .claude|.harness-base|scripts|check-supply-chain.sh +3ee878d98f5e9296ebb46ceaa66993cd76f0ca59eed475e0db65f6ec52950436 .claude|.harness-base|scripts|check-workarounds.sh +ab80c3ab9f8ac2eeab4c5a0f0004f1e26fd6adacbc75469fd4bfe00e791070e7 .claude|.harness-base|scripts|check-workflows.sh +13e8cc294be6fe5a315c29b827b43bb82cad7b4bf004e7393acce85fd76edda3 .claude|.harness-base|scripts|duplicate-tests-ts.mjs +8aab7e87a42fa451fdddc2b3939b72e8d07bd3c3080f0e8abde6af8c043d910b .claude|.harness-base|scripts|duplicate_tests_py.py +32a4c641ed3fa587143c2638c02c8ee86dc7a57119ef87f7dfd435487c531144 .claude|.harness-base|scripts|eslint-effective.mjs +055249313525496d682bc79688ed40f8e23c22fb3afd22c7c9fb51b7d8231705 .claude|.harness-base|scripts|gate-baseline.sh +cccb8022930f0043802d74bb9a48c681d7bcf0dc68705387c2b0a1550eb98cb8 .claude|.harness-base|scripts|gate-baselined.sh +f105c09063c535f5aed591915e34621227d0ea3f98f337794d78cb1dfaff3b9a .claude|.harness-base|scripts|generate-sbom.sh +70edb543475618e2dddc2954a0b9f24309a312cb114cfe3596ff9ebe91db6d7e .claude|.harness-base|scripts|py-env.py +ff24e2d2b39700e7434a461746fadfcd285814185f1ac297e3f6f0517f4479ac .claude|.harness-base|scripts|record-review.sh +41bd3d4ec9045327e1a023c898189a98b6e17515eecd45f10e471b47f8f4d956 .claude|.harness-base|scripts|remove-harness.sh +4063966fec5a5021ed09906289f89c2e5935dd4dc680ae6625affb3aecfd2dee .claude|.harness-base|scripts|scan-secrets.sh +09bbb6dc4d1be61544a0cd8b8344ac4f6f1a3b04c0dbb986fea090a702b8faa9 .claude|.harness-base|scripts|seeded-files.sh +30e8eede6e476e9271b6999067fb8a588e411857f0539ed3c4ce69ddb3ae54a2 .claude|.harness-base|scripts|set-coverage-floor.sh +b78a9ae43f5b9ad0b5d6c92c1f986b1e0005ed1313b01e8e8fc4ca09c5e5f65b .claude|.harness-base|scripts|test-budget.sh +1029a45ca118fdb8e440928413a5cb8f86f74fd6dc81b269e82690ee36318320 .claude|agents|code-reviewer.md +af4cc4a30768a329da916b21de9960dce48bae8bfea1b0237e20be678af3683d .claude|allowed-licences.txt +4237aa3d384bf3d2e27e7163149a0d7f3a4e12ccb5ab66bbaecb04d78b79cc5c .claude|bundle-budget.txt +eb8cf70089062a9c297309be2b2e20f0240223feff1fe1eb5e188b371539f1b6 .claude|change-size-exclude.txt +476fc19f407a4de087953fe9e2d5d64026c41290253df7c547da968582a40648 .claude|ci-gates.sh +493e60c9326a091f17b62a1ddc088696825546f77f8214915360dd3616e3f392 .claude|comment-hygiene-patterns.txt +7f468ec04debaa70989ed1c65771d06d89a5ab7a61b9becb6fbc3b77e4f6f0d0 .claude|gate-budget.conf +5f01d143115a3a5bc1d6e6d122709d9db50566dcc37f6bbdc4000d8445573548 .claude|gate-budget.sh +4a76d433a06f85ab967b7e0c1c251f9f56585cec8a70997060f052e794004849 .claude|gates.txt +f4b4e6438db7f20cad5fb7d160cb5ead6fc2aa8ffd47ae79a3e877f0c991a604 .claude|hooks|block-no-verify.sh +23c76185d22e65b7667096ed17d2982d96d7b9a36fec8408a2896547c8ca5465 .claude|hooks|post-edit-comment-check.sh +c368bd85603a31708fab8257c0c5ef20981453814efcd1768a17dcd6bc8ba96d .claude|hooks|post-edit-typecheck.sh +3c5e448430bf4b00f1a882e6f66fa680ee57e92ca183f7c1787130480731f433 .claude|hooks|protect-files.sh +9cb9ce0e9513b2ae7bcef59cf9403842aa7c7e38840d18c6b4e328678d84d52b .claude|hooks|session-context.sh +7eed857cb3a62268a1f5904abd0f51a4e4427e9eb155af606e19c180bd3faf01 .claude|hooks|skill-usage-log.sh +d997f39290833016bb42d7b079e961e78cc1469bfd185f1d7e768f373e71aa1b .claude|hooks|stop-checks.sh +d1f6e2de78928cdfbbfe01eb874fbd3d9c918c6132b28ab5dbab21dcbb56f373 .claude|hooks|subagent-stop.sh +7883f086d37e83a2e45e1da4abed01a9dc42e69e30f0b7797efab6a4390e007f .claude|hooks|user-prompt-guard.cjs +e8f19a996f5e512fa8f22ab4ea3f7f55827020f6bff7c596c2b087f00f2adb91 .claude|licence-exceptions.txt +23e894af3145fbe2ff9f54fa9a9181e189c6aa14156ba151df7422d1c9346b0c .claude|regen-harness.sh +bdaa785c95e21e9dc4ef70a8c376784784344426858620fd2b4d4c04f5daef22 .claude|registry-hosts.txt +41777b1a66bc13a7ff72eaaffcc82af7413206f1a06596d0789e3d441434da3e .claude|release-age-exclude.txt +ed29d2aebe2e3f5c852c1b9bd29aea87c0fa07b176c0de4823ce54f16af85de0 .claude|review-checklist-stack.txt +fdf9fca2a99ae6f1a9efd417807c64847b65c07613cd02d47053b3bc71894cb1 .claude|review-checklist.txt +9bae4d396712ea547685f50ce18a6ce978aadccc1e38fed51452212c2ee2a457 .claude|rules|vite-react.md +cd5cc319ebe00d1f8794c56ff26056fada12670a9d8d9192906782eb2b32e657 .claude|seeded-paths.txt +6dd80b02208d66b2acfaf55f20bc875fcd003a476fb0cab8fc6d20f90e48af12 .claude|settings.json +8436a463b24cffbcfcbba9e6f9d88e1aee3048957c54424deef018d0b024a5b4 .claude|skills|skill-audit|SKILL.md +805c987b975e0a4c66019d6de553ffcf1503c3f78c459bec67ff4fa5b9251bd5 .claude|skills|test-consolidate|SKILL.md +5fe482a02e0ff020cc0286654dcceba1c893b693cfe3d0c7919d44bd34ba45b7 .claude|skills|vite-verify|SKILL.md +6a78ad7f4dfb2c00c60a877b0a33074bf0ff508055cc69f5908c06032c4c8444 .claude|verify-harness.sh +bd94a2fe74c8ec8e562e462ac8a87dc2571a98110ccff8bd6cb1f97873d35671 .dockerignore +5707cdbef3c210a1b4fbe6a1c7168a39ab23affd7283edda80559fde83b8e843 .env.example +0472a1ed6b700e1548cc16a5cc8357b73f0df7e3e38d30f35d617548c3cd0b9b .github|dependabot.yml +7a39f9eca83ca7f6a45cee8625b9c709fbfabb8d55315ad33e307cb6f86268d1 .github|workflows|ci.yml +c133b621a08f15125bfbc8ec28ad7bf4d25f3a086fcae8e96074bd0330a51a1f .gitignore +a1978b7a1e366072692ed55ab372a83b62908ccf6eaa5e2e261906c92c704e43 .gitleaks.toml +79532a2683b753ca54cca9b7ab4e53c7b2631fcd7ee221fa60e7a1a694b9d029 .jscpd.json +143fa3d4218dd82360a68b69a00ac6f5f26e81453f05842c80a67e8b12fab40f .lefthook|commit-msg.sh +d76c138f28da0f0acb33eb0048b6213930b9e67072421202bd77f04981bdb8f3 .npmrc +33a30ca144211b42630db26107541e7107026a43c30f99649af907c4b1a66070 .prettierignore +51a5686d6d1d4f2712a90345c6513021f742757633a60858b7f3169084538161 .prettierrc +2a85ed4158fd58a2f95a6d7f3fb4aca38824c26de2e4728f88d12948e9ad7999 AGENTS.md +d4a44fe67b98b29a691d075a2c499773a555a3799bbccac1b0572dce9156030a CHANGELOG.md +fd36a68221423be928710c778fd7f15e950475601702fec7c3e82b0639ef82d2 Dockerfile +0a19b2752a6c21cdd6fd9b74330c938e5a3f1042eded2c139428446d95de9c5f FUTURE.md +18c341a90141f3082347084460eea28120bdbce79abc7f9e3464365e9e467efd components.json +14be19fc48507ab3a02e5e39be66b66754386d80e3e2992cf7f51237ab50d2c2 docker-entrypoint.sh +ecdcb4c6824889733f39872883083d9d8afc2c8f6f4fe41434570f2f30763e22 docker|15-frame-protection.envsh +1983f9772efec802a4ed120049212cdcda57cd8be696bf6f630bf7cd97ac1c3c docs|CONSTITUTION.md +f62f6d822cd73580c8ac858385aef13f627eca4aad0b54bdca2ec8d03001a142 docs|adr|0001-test-each-behaviour-once.md +6706338b75d6b63e1713126c27e808b8d6351461d9c140711d985c57a45cabac docs|architecture.md +154082be3208d8a04e8ab3064ddb99e4d5345284866c7e7547cb136e8357f3a5 docs|harness.md +c72fb5479c5b045b7553eba3d508b66e827b3d786a5f543b304e8ea07372fb78 eslint.config.mjs +aaea542dcd638a628af0dbadf04d299101629c453cf324746d7c9ab4908eb648 index.html +c790ae0a50aefe6154b49ffa1616f322ed7bba84ad25dc9c2936ac94dde59352 layers.config.mjs +eeec20bfc0861c308877721179631117fac6ca438b6d4e7cd8441feaeb36c744 lefthook.yml +5a58d7739d51b4cdcdeb8838223f4443105fa5d634d700179a205e1a13acc6b1 nginx.conf.template +7c6d3e691fae8520829c495151021c184e60884a7eb4665e35a44c4f07d88498 package.json +50301a4b562ef6fc48a48c85326c659414e74d308734c5b1943bc67e0199f608 pnpm-workspace.yaml +4cae941be9bc3bee9a6905e47ea7a51aee216d587d34a8cc4ae48f78fd6d8159 postcss.config.mjs +f17cae7331a1803e3637b03789b683676e0ea9415c3735b38dbe8df341ce7187 scripts|assertless_tests_py.py +21caf005962dc5a9b9cac8008ab08d73e92eb718297c7dd143e7ab7c4b1604aa scripts|check-affected-tests.sh +db2586ce1bb8d0dc3ce42bc01fac844bcf97621d00138ff5ef044e55e02ac3d7 scripts|check-bundle-size.sh +0ef4238413f625d85051790e01f5a54e3c4ef3b23075a123a8db7db023cea43b scripts|check-change-size.sh +46821202801e1a1c4869a1b8a60ce50d568a05ea7fce2d9e57f24eb4366f0274 scripts|check-comments.licences.txt +dcb9c59e0417becea353e20985d0c441e098df1e1ca1e7cb9d127a87fd1f823d scripts|check-comments.mjs +4798fcabcd27f53c008cc41d4460c252beccfa978f4afa63719df2dfc155bd93 scripts|check-comments.py +c2eeba162bcce9f2da976a2def85917473ebb60fda39cf28c8537c9cc15cdeb1 scripts|check-comments.sh +78537b8167edf06a8a22b7554c1c7c44e78f7c287352e80a0ecd3709ddc8c917 scripts|check-contract.sh +69363e7511cd294e1f6db2cd3246e1925c5ecf09b1b31cc300264eaaba2a08a8 scripts|check-dockerfile.sh +afe420bf0134c63cb1e327588cdf781b29eb1139f16addf9e334784e1491f26d scripts|check-docs.sh +678a9233a9c44c140753fb0dc796f21f4fc771015fa4b2e02ac2d79ec7b2ccd1 scripts|check-duplicate-tests.sh +73331e83849face750576d78bfb425c3f44c28d7f488b3bcebc8c59183407e0c scripts|check-env-example.sh +4882fe7d697d08e2aed037b9b27739afbc2021bd5604ebba7f4253f2fb25a089 scripts|check-exclude-reasons.awk +8bae9957f35c8134add1eba6a3d4d30d57a701ab72fbaaa4b92d759833941220 scripts|check-exclude-reasons.mjs +13c41f6f1047ada17700b885c2f8840da44073a6b7459d726bc08eaf72f5c8ec scripts|check-exclude-reasons.py +8d04b7b35d5bfb1d2ca4c82499f3a17e779b3329374cd40bfcad484f30f6791e scripts|check-exclude-reasons.sh +30636896f074a81097cc9d230ee4fdca511b4e4e903042779a04d213a48c8230 scripts|check-exclude-rules.sh +d5b8d21bc41c33aeedb93db8b19994f663ecb1e6c51c1d26f11e6c928e756f28 scripts|check-import-layers.sh +27428060cbc818d2fa75bbadd84e3d840790d478a584a09884b3b9dd4c3ddeb6 scripts|check-licences.sh +43539b3fc53533fc0ae11e5ac6a5696c5c1b7a7cc7e63bdc7c5f36bbdb7e48b8 scripts|check-mutation-diff.sh +18cf122fa40dc1ce7f54e8671d20fe8536f927c011992f827f72148c13863077 scripts|check-review-record.sh +e87336ac3c1719b2906e771d5e1f45cf49f3d7c40dd985fa6093d1f7afd7e3d2 scripts|check-secret-scanner.sh +211f0645652fb0daf1ab315b4f87ade96f4704e80d4e68ba78be74316238320e scripts|check-shared-gates.sh +e871f3dd5850309717e8556d30d0126f771c3a880093b6079dd8edfa937a7c6c scripts|check-supply-chain.sh +3ee878d98f5e9296ebb46ceaa66993cd76f0ca59eed475e0db65f6ec52950436 scripts|check-workarounds.sh +ab80c3ab9f8ac2eeab4c5a0f0004f1e26fd6adacbc75469fd4bfe00e791070e7 scripts|check-workflows.sh +13e8cc294be6fe5a315c29b827b43bb82cad7b4bf004e7393acce85fd76edda3 scripts|duplicate-tests-ts.mjs +8aab7e87a42fa451fdddc2b3939b72e8d07bd3c3080f0e8abde6af8c043d910b scripts|duplicate_tests_py.py +32a4c641ed3fa587143c2638c02c8ee86dc7a57119ef87f7dfd435487c531144 scripts|eslint-effective.mjs +055249313525496d682bc79688ed40f8e23c22fb3afd22c7c9fb51b7d8231705 scripts|gate-baseline.sh +cccb8022930f0043802d74bb9a48c681d7bcf0dc68705387c2b0a1550eb98cb8 scripts|gate-baselined.sh +f105c09063c535f5aed591915e34621227d0ea3f98f337794d78cb1dfaff3b9a scripts|generate-sbom.sh +70edb543475618e2dddc2954a0b9f24309a312cb114cfe3596ff9ebe91db6d7e scripts|py-env.py +ff24e2d2b39700e7434a461746fadfcd285814185f1ac297e3f6f0517f4479ac scripts|record-review.sh +41bd3d4ec9045327e1a023c898189a98b6e17515eecd45f10e471b47f8f4d956 scripts|remove-harness.sh +4063966fec5a5021ed09906289f89c2e5935dd4dc680ae6625affb3aecfd2dee scripts|scan-secrets.sh +09bbb6dc4d1be61544a0cd8b8344ac4f6f1a3b04c0dbb986fea090a702b8faa9 scripts|seeded-files.sh +30e8eede6e476e9271b6999067fb8a588e411857f0539ed3c4ce69ddb3ae54a2 scripts|set-coverage-floor.sh +b78a9ae43f5b9ad0b5d6c92c1f986b1e0005ed1313b01e8e8fc4ca09c5e5f65b scripts|test-budget.sh +5d6857c5dd2610665ce9be6c7b9870345d9d3451f4cbecae42b5f8f5855c961b src|app.test.tsx +bd43caebd208435102e89ba538fbe9377b7feed90cb9412542364519deed421a src|app.tsx +8e9f6d518b73a60c978110736cf4d6b0a28e307250283e47b6318bc20d1f2b26 src|components|layout|error-boundary.tsx +38fd1e902f02659905689c4176c3f405539afefbaa3aad854b57ad75b4a74ab4 src|components|layout|index.ts +af08d5c43cabe45942af39fdaedb94c119b9ace7f44120d851bf13cb89d0c03d src|components|layout|navbar.tsx +8bd386cc8b5655924e793c7b211882cfc3dfe7bf713501121f5d871de727d4f3 src|components|layout|providers.tsx +8b8763471492a09d9115442cf90dd2bce8ab3bae9ef48a10522d388b41ecfe0c src|components|layout|root-layout.tsx +8f61cfc6a59458f48b4be3c92fe2778419e4edb6e65c8af0ce9598f2bdab0f1f src|components|layout|site-footer.tsx +8c3bb336674cf344ac008be63e4575c00e9bb5b68a4701b8980449342575929a src|components|widgets|brand-text.tsx +61323d3fcf0aadfe92a21b4c9f2f3dd5881beb9cc16a7773b52056d6969963a9 src|components|widgets|custom-card.tsx +87420ad1384a147ad4b16a9cfd14df9979985d11d0037cef37b47cbb8a23fb5e src|components|widgets|custom-dialog.tsx +d31111ebe18ae274df1729c92da2bc70c285f2b90febba0657e4e0cc6e224bb5 src|components|widgets|custom-form-field.tsx +ba76804281006c5826d1d989f2e572359a479dffce0240539e7c2739d0b9ebc5 src|components|widgets|index.ts +66f44b356269cabf6c2035c950c802e204b1e09b446976abe89098c73621c2d6 src|components|widgets|link-list.tsx +fb8ebae9ff53a4128a78e77481d9078a024fbcc3a714942df45fd384a225fbd2 src|components|widgets|media-card.tsx +6535a01d454fd1d899ff34c19d736e3d872a3322cb8f710b6b0e52eff3cdcb56 src|components|widgets|pill.tsx +877a55a1b9e2ba1849e827af597e54a4c091b191442feb3dc4069a24cd5f9b3b src|features|auth|components|auth-provider.tsx +5856ac0f114df83dc438888fab1b931cce30dc76ecbbcc6456b962685cd3e3d6 src|features|auth|components|index.ts +95bf565f02f0f4b88f1c0f53e8aa2f3adec502c7b3e5b2856fdbc9d9954000ee src|features|auth|components|login-card.tsx +4bf3e699118b0d8188e03239161a8009e6037187a8b656ad89cda9a7e2ada885 src|features|auth|components|protected-route.tsx +dd3d953ced9562f90455a0ad7883f7ce31ebccc558117f2bb545f33ea87ceecc src|features|auth|hooks|index.ts +5414087edb4e273ee64440d0323329a56483dcc24d05f4edbe742c18a3fedbd5 src|features|auth|hooks|use-auth.ts +244d6366af8260c523645e8acb68a8a7c1e51975ddab47f970d4addcda249392 src|features|auth|index.ts +7b109c9fee52f15a1feef873732c9804f54c955de77b0f3b2b24cef1a4587da3 src|features|auth|types.ts +02cad49b8d26185e3ebddde3e5c4f739d15a3ab3f5785e097dd177ca9345bd49 src|features|example|api|example-service.test.ts +f49bd2895e579354e857f2f2ec7be7501d93f6e21c39641d84fab8bf313b320f src|features|example|api|example-service.ts +1cceca65c4f680b7db4ff1c09847c9b93856ae74e45ad50b68ce4927c98274b7 src|features|example|api|index.ts +ab675cdc3bc8e7d077806697ed82d5f406530ed777de65b8fd6108b8d90d9722 src|features|example|components|example-card.test.tsx +67f9e3066fe551221adbafdf59d46d61896dd555a65f77613f61e12d62a0672a src|features|example|components|example-card.tsx +97a7760d41f8627a760d24425464851c43180a34c307855235fea1fe3fbe0863 src|features|example|components|example-list.tsx +e88d43b1ea8ac1cb75c7b5abe192d6da2f5542461ac5331cde44287a14673a7c src|features|example|components|index.ts +3d051492e79bb6ff85514b48303012c9dfc474ce2a04d17c90190f88313d2730 src|features|example|constants.ts +6946fbafa176f562b9323a9aadddfac646742c7138b2a5ac9ebfa1803b40d278 src|features|example|hooks|index.ts +1c83cd1eca824e1359acbe6bcc09cfa6b23c2c415fa4995e1a026628e75f3ec8 src|features|example|hooks|use-example-items.query.ts +e3e12d00057f3a7d6a20c93400e0948f9845d8e536d06ffd09f05f369d7f1b3c src|features|example|index.ts +e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 src|features|example|schemas|index.ts +77133584ac517cdacdc880962555a9369047476c06b1ab47c2c26b4da2aaa6ed src|features|example|types.ts +8a243cdc0cc20804b7aac06bf314a121bf12772daa02aa040257033363f229ed src|hooks|index.ts +da7f4c797fdf14d97080156378f5560d17762add578656638523a36fdd4751d4 src|lib|clients|fetch-client.test.ts +73f43cd90cc94188ce7978d177b067f39ed6ff7a4fcae91662d4a0a540096704 src|lib|clients|fetch-client.ts +d8ef54b8a0e6b0261b87372b05b81345fcc5905bd3772b7d49cfa8c78988c133 src|lib|constants|env.ts +e24d12245bb2fe02d1763bbf754b2ec2fc825c6fafd106a3a5a543895ff6da37 src|lib|constants|index.ts +856eeb26b1d009283ea5b12ed308292a44f0f5e42cdf6395355ece7bdc5a1b84 src|lib|constants|routes.ts +236a5b3ace2596f18520fb4e1d3883e899f69b2ba65e94ec299482bf848f5055 src|lib|errors|api-error.ts +58d6f573500198cfd0cdf7d73b74d8ec9abca8ee8de2cc8fbd461250732a3b6e src|lib|errors|error-log-handler.ts +9f6ec9e8472ac5903aa9a4b99e61fa5669b239f22618e0ff96863cbb7b738b0e src|lib|errors|global-handlers.test.ts +b493a2b4aff71277c27005ed7f1318f870b5d3bdf0358e0544e4a31eda6e3ff9 src|lib|errors|global-handlers.ts +79de14caa02f8060fe7c987178f8f1e0598fc2c48ce1871b7409ed670ca13055 src|lib|errors|index.ts +9304a861c8673bee09e0f12de31773abbde503b02e59dfd74763ddec2e37cf05 src|lib|utils|index.ts +0abecc59bdef63bddb77ffe667954deda290fe61e59ef10d3f394ae969f63086 src|main.tsx +9c6d883c2af9de65ca68cf8581644642e297baddc8402f8296035debc64141f9 src|pages|dashboard.tsx +dde160de65278cef2bca887038fb74d089104c01d144e82463756685d2ace519 src|pages|home.tsx +e766c4187acdf61e93669ae2ca27018fcd72a4cbf138349ad1a3ef420bbfaca2 src|pages|index.ts +8e5f749d9ea2f277227b92412123aa5d760d4832362ac05a1059cdb4aa426a83 src|pages|login.tsx +7576695a640ace9e4605c3af92685eed6fab458dd140beba1749b516bf637e2b src|pages|not-found.tsx +301ea478d4d2760adaf5df239aafd573cd6a5fa4916a78f5f0dbbc3ffd97e90d src|router.tsx +be571557f1bf7194ab7ccc562485198d1027e9c01662ec08196bd5296fd9a594 src|styles|globals.css +e696e3641a7e5ccf290230e22fd4e174a0e7705877c3bfafc22000c2092dea02 src|test|setup.ts +18f3a45a70088a553d4b029c0fc44270884c943a83e16bd8ab1949fdaf5ae70f tsconfig.json +41555af3f516578eb8d948261621ceaaea54246006909b71c793fa117fdc67f1 vite-env.d.ts +23b31cc06f844ae853e3d2c15e683b503f5299a110a72f91244b25c32868ac54 vite.config.ts +SEEDED_FILES + ;; + esac +} # END seeded-facts +# gate-ratchet.sh --seeded-table prints "sha256path" for every file a template-only scaffold of the stack writes (fp_files); the review, comments and contract gates read it to leave out exactly the files that equal their seed. An unknown stack or an empty table exits 2. +if [ -n "$table_mode" ]; then + case "$table_stack" in + fastapi | nestjs | nextjs | vite-react) ;; + *) die "--seeded-table: unknown stack '$table_stack'" ;; + esac + fp_files "$table_stack" > "$wd/table.out" || die "--seeded-table: cannot read the seeded file table of $table_stack" + [ -s "$wd/table.out" ] || die "--seeded-table: the seeded file table of $table_stack is empty" + cat "$wd/table.out" + exit 0 +fi + # fp_judge