Every tracked file that can carry a comment (880 of them) now opens with "Author: Guoliang Chen, a Senior Digital Design Engineer" and closes with "Author: Guoliang Chen. Lucisv is made by Guoliang Chen with love, luciochen.com", in the file's own comment syntax. No behaviour change: the diff outside the version bump and changelogs is comment lines only. - tools/stamp_author.py: writes the lines; idempotent, `--check` lists what is missing. Headers go under a shebang and under Markdown front matter. - Left alone: test fixtures, cases and snapshots (byte-exact inputs), JSON and JSONL, logs, images, lockfiles, docs/site/dist (regenerated) and the LICENSE files (already carry the copyright line). - tools/linux_check.sh: --help reads its header from line 3, now that the author line sits under the shebang. - tools/gates.sh green on this tree: 5 545 tests, corpus 814/6 as before. Co-Authored-By: Claude Mythos 5.2 <[email protected]>
38 lines
1.5 KiB
Bash
Executable File
38 lines
1.5 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# Author: Guoliang Chen, a Senior Digital Design Engineer
|
|
# CI gate over the corpus score: fail on any regression from the recorded
|
|
# baseline. `scripts/corpus-baseline` holds the passing-file count the tree
|
|
# must sustain; a verification error or a crash fails regardless of the
|
|
# count — those are formatter bugs by definition (see tools/corpus_check.sh).
|
|
#
|
|
# Usage: scripts/corpus_gate.sh [corpus-dir]
|
|
#
|
|
# An improvement does not fail, it nags: bump the baseline in the same
|
|
# change that earns it, so the gate ratchets and never slides back.
|
|
|
|
set -eu
|
|
|
|
here=$(cd "$(dirname "$0")" && pwd)
|
|
corpus=${1:-corpus}
|
|
baseline=$(cat "$here/corpus-baseline")
|
|
|
|
json=$("$here/score.sh" "$corpus")
|
|
printf '%s\n' "$json"
|
|
|
|
passing=$(printf '%s' "$json" | jq .passing)
|
|
verr=$(printf '%s' "$json" | jq '.failures_by_category["verification-error"] // 0')
|
|
crash=$(printf '%s' "$json" | jq '.failures_by_category.crash // 0')
|
|
|
|
status=0
|
|
[ "$verr" -eq 0 ] || { echo "FAIL: $verr verification error(s) — always a formatter bug" >&2; status=1; }
|
|
[ "$crash" -eq 0 ] || { echo "FAIL: $crash crash(es) — always a formatter bug" >&2; status=1; }
|
|
if [ "$passing" -lt "$baseline" ]; then
|
|
echo "FAIL: corpus regression — $passing passing, baseline is $baseline" >&2
|
|
status=1
|
|
elif [ "$passing" -gt "$baseline" ]; then
|
|
echo "note: $passing passing beats the baseline $baseline — bump scripts/corpus-baseline"
|
|
fi
|
|
exit $status
|
|
|
|
# Author: Guoliang Chen. Lucisv is made by Guoliang Chen with love, luciochen.com
|