chore(lint): repo-wide green becomes the contract
CI / ci (push) Canceled after 0s

Close the lint arc #194-#197: deliberate-style rule disables with
rationales (#194), filter-safe test renames + --test-case-name-format
preserve (#195), every surviving warning fixed through the sanctioned
lint-stable shapes (#196), and the docs now state the true contract
(#197): bare swiftlint . reports zero violations and swiftformat .
reformats nothing, while push gates stay scoped to the push's own
files (settled #190 design) — the pre-push hook's stale 'pre-existing
violations' rationale blocks refreshed, gate logic untouched.

Also in the sweep: quiesce the FSEvent-burst watcher race in
LibrarySearchTests (two rescans double-count one shared PostScanCache
miss; benign revision over-bump), pin the learnings scan's symlink-skip
contract (flip-verified — defended in depth by the lstat guard AND
contentsOfDirectory's own symlink refusal), reorder that scan's guard
so cheap rejections precede the directory listing, and park the roster
chmod window with a ceiling comment.

Finish-audit: 3 reviewers, 0 blocking; the one code finding was
disproved by probe (&& out-binds ?? — the guard was correct). Suite
693/693 via scripts/full-test.sh; swiftlint 0 violations; swiftformat
0/141; hook rig 23/23.

Closes #197
This commit is contained in:
AlexKucera committed 2026-11-17 16:29:46 +01:00
1 parent 0ab00eb7b6
commit d7fd11cf0d
29 files changed
+549 -269

No files matched your search

+7 -8
View File
@@ -5,8 +5,8 @@
# 1. no push while a full-test run is live — concurrent load flakes the
# real-process suites (#30), and pushing mid-verification defeats the run;
# 2. lint gate scoped to the push's own Swift files — failing closed on
# violations there (the repo tree carries pre-existing findings a bare
# repo-wide gate could never clear);
# violations there (settled #190 design: the gate guards what the
# push itself carries, not the whole tree);
# 3. autofix guard — a lint autofix pass that rewrites files AFTER
# verification must not ride the push untested: the push fails, the
# rewrite gets reviewed and re-verified via scripts/full-test.sh.
@@ -44,11 +44,10 @@ if [[ -n $live ]]; then
exit 1
fi
# 2. Lint gate, scoped to THIS PUSH's Swift files (#190): the repo tree
# carries pre-existing swiftlint findings (warning noise repo-wide,
# error-severity in spike/ experiments and one tests file) — a bare
# `swiftlint .` gate can never pass here and would block every push.
# The gate is the push's own files; no Swift in the push → nothing to gate.
# 2. Lint gate, scoped to THIS PUSH's Swift files (#190): the gate guards
# what the push itself carries — settled #190 design, kept even now
# that bare `swiftlint .` runs green repo-wide (#195/#196 cleared the
# last findings). No Swift in the push → nothing to gate.
before="$(git status --porcelain)"
zero=0000000000000000000000000000000000000000
# Default-branch base for NEW-ref scoping: the project's default branch at
@@ -63,7 +62,7 @@ while read -r lref lsha rref rsha; do
[[ "$lsha" == "$zero" ]] && continue # ref deletion — no content to lint
if [[ "$rsha" == "$zero" ]]; then
# NEW ref: lint the delta against the default branch, never the whole
# tree (pre-existing violations could never clear it). No resolvable
# tree (the gate is the push's delta, not the repo). No resolvable
# base FAILS CLOSED — a silent skip is a vacuous pass (#31/#134 class).
base="$(git merge-base "$lsha" "$default_ref" 2>/dev/null || true)"
[[ -n "$base" ]] || {