chore: repo policy compliance sweep — test rerun, npx, frozen lockfile, docs (closes #166) #204
Reference in New Issue
Block a user
Delete Branch "chore/issue-166-policy-compliance-sweep"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #166.
Divergences fixed
1.
script/testnow uses the conditional verbose rerun pattern.REPO_POLICIES.md: "make testshould use the conditional verbose rerunpattern. Run tests without
-v(verbose) first. If tests fail, automaticallyrerun with
-vto show full output. ... Theexit 1ensures the target alwaysfails after a rerun — the first run already proved the tests are broken, so the
build must not pass even if a flaky test happens to succeed on the second
attempt." The verbose form of the existing
jest --forceExitis added as thetest:verbosepackage script. The 30-secondtimeoutis kept on both runs.2.
build.jsno longer shells out tonpx.REPO_POLICIES.md: "Useyarn, notnpm."npxresolves from the registry when the local binary isabsent, which is an unpinned network fetch mid-build; it is now the explicit
node_modules/.bin/tailwindcsspath (the bin@tailwindcss/cliprovides), withthe paths quoted.
3.
make installuses--frozen-lockfile.REPO_POLICIES.md: "Always useMakefile targets (
make fmt,make test,make lint, etc.) instead ofinvoking the underlying tools directly. The Makefile is the single source of
truth for how these operations are run."
script/bootstrapwas already frozen,so the Makefile shim was the one path that could silently rewrite
yarn.lock.CI is unaffected — the workflow runs
script/cibuild->docker build->script/bootstrap, which was alreadyyarn install --frozen-lockfile.4. README Getting Started directs new users to
make setup.REPO_POLICIES.mddefinessetupas "make the repo ready for development aftera fresh clone: runs
bootstrap, theninstall-precommit". Following the oldmake install+make buildblock left a fresh clone with no pre-commit hook.5. Makefile-only targets documented.
REPO_POLICIES.md: "The Makefile isauthoritative documentation for how the repo is used. ... A new contributor
should be able to understand the entire development workflow by reading the
Makefile."
make install,make hooks,make build,make build-debug,make cleanandmake devare now listed in the README Entrypoints section.Reconciled in both directions: all 16 Makefile targets are now documented, and
all 14 documented
script/entrypoints exist on disk.6.
.dockerignorerecords why.gitis deliberately not excluded —build.jsshells out togit rev-parsefor build-info stamping and theDockerfile runs
make build, so excluding it would stamp every extension withcommitHash: "unknown".Deferred:
SCRIPT_DIRinscript/check,script/precommit,script/setupNot changed. The issue conditions the fix on it not forking a shared file, and
all three are byte-identical to the canonical upstream templates
(
https://git.eeqj.de/sneak/prompts/raw/branch/main/script/{check,precommit,setup},fetched and diffed during this work — zero difference). They dispatch only to
sibling scripts, each of which
cds to the root itself. Fixing it here wouldcreate a local fork of a shared file; it belongs upstream in
prompts.Evidence
Frozen lockfile.
package.jsonwas drifted by adding a dependency(
left-pad@^1.3.0) without touchingyarn.lock:The same drift under the pre-fix bare
yarn installabsorbed it silently:package.jsonandyarn.lockwere then restored;git diffon this branchshows the one intended
test:verboseline inpackage.jsonand no change toyarn.lock.Verbose rerun. A deliberately failing test was added to
tests/, thenremoved:
The per-case
✕line appears only in the second run — that is the verboseoutput.
script/testexits 1,make testexits 2 (make's failed-recipe code).On success there is no rerun and the target takes 2.8s, well inside the 30s
timeout.
Build.
make clean && make buildcompiles Tailwind through the local binary(
≈ tailwindcss v4.2.1,Done in 225ms) and emitsdist/chrome/anddist/firefox/, each with a 12120-bytesrc/popup/styles.css;script/verify-buildreports 4 bundles verifiedautistmask-build-debug=off.script/cibuild(the CI path, run uncached on the changed layers —RUN make checkandRUN make buildboth executed, 6.7s for the build step, notCACHED): exit 0.make checkon the rebased branch head: exit 0, 8 test suites / 149 testspassed,
prettier --check .clean twice (lint + fmt-check), andgit status --shortempty afterwards, so it modifies no files.FAIL —
needs-rebase.Not mergeable into
next.TODO.mdconflicts: this branch's merge-base isb882cede, andnexthas since landed19cb1ca(#163), which added its own entry at the top of# Completed Steps.git merge origin/next→CONFLICT (content): Merge conflict in TODO.md. Rebase ontoorigin/nextand keep both bullets.Everything else in the change verified and passes: all DoD items of #166 satisfied against the policy text; single commit titled
(closes #166); basenext; no attribution trailers.Disclosures, none blocking:
d9808dfispending/ "Waiting to run" — queued, never executed, not red. I ranscript/cibuildlocally instead: exit 0 withRUN make check(24.7s, 149 tests actually executed) andRUN make build(10.8s, Tailwind v4.2.1 via the new local bin path) both uncached, proving thenode_modules/.bin/tailwindcsspath resolves inside the container too. The rebase will re-trigger CI regardless.tests/.script/testexits 1,make checkexits 2, the rerun banner appears exactly once, verbose per-case output is present only in the second run, andscript/checkaborts beforelint/fmt-check. The unconditionalexit 1after|| truecorrectly prevents a flaky second-run pass from turning the build green. Test removed; tree left clean.SCRIPT_DIRdeferral is legitimate, independently verified:script/check,script/precommit,script/setupare byte-identical toprompts/script/{check,precommit,setup}(fetched and diffed here, zero difference).--frozen-lockfileconfirmed on every install path —Makefile:14,script/bootstrap:124,126, Dockerfile viascript/bootstrap, and CI viascript/cibuild→docker build→script/bootstrap. No bareyarn installremains anywhere.script/files documented and existing, 16/16 Makefile targets documented.make setupfrom this fresh clone, thenmake clean && make build: exit 0, bothdist/chrome/anddist/firefox/emit a 12120-bytesrc/popup/styles.css,verify-buildreports 4 bundlesautistmask-build-debug=off.make checkexit 0 in 13s,git status --shortempty afterwards.d9808df919to9e209e27bd9e209e27bdtod749ed9212d749ed9212toc631cc7626