Skip to content

Commit 68f0146

Browse files
authored
test: preserve stranded CI baseline fixes (#60)
* no-mistakes: apply CI fixes * no-mistakes: apply CI fixes * no-mistakes: apply CI fixes * ci: rerun checks after policy repair * fix: include current behavior inventory
1 parent 9ff8250 commit 68f0146

5 files changed

Lines changed: 37 additions & 4 deletions

File tree

CONTRIBUTING.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ We require this to reduce the maintainer's burden of reviewing and merging contr
1010
Pushing through it runs an AI-driven review/test/lint pipeline in an isolated worktree, forwards the push upstream only after every check passes, and opens a clean PR automatically.
1111

1212
A GitHub Actions check (`Require no-mistakes`) runs on PRs targeting `main` and fails if the body is missing the deterministic signature that no-mistakes writes.
13+
The generated `## Pipeline` section must contain `Updates from [git push no-mistakes](https://github.com/kunchenguid/no-mistakes)` exactly; prose that merely says the checks passed is not a substitute for that machine-verifiable marker.
1314
Dependency bots are exempt so their automation keeps working, but regular contributor PRs without the signature will not be reviewed or merged.
1415

1516
## Workflow

tests/behavior-test-durations.tsv

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,4 +92,5 @@
9292
23744 tests/fm-x-mode.test.sh
9393
250 tests/lavish-repair.test.sh
9494
6200 tests/lavish.test.sh
95+
160 tests/no-mistakes-required.test.sh
9596
92 tests/operating-fundamentals.test.sh

tests/fm-account-routing-suite.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5208,7 +5208,7 @@ SH
52085208
mkdir -p "$lock/.reclaiming"
52095209
printf '1\nstale-reclaimer\n' > "$lock/.reclaiming/owner"
52105210
touch -t 200001010000 "$lock" "$lock/.reclaiming"
5211-
FM_ACCOUNT_META_LOCK_WAIT_SECONDS=2 FM_ACCOUNT_META_LOCK_ORPHAN_GRACE_SECONDS=0 \
5211+
FM_ACCOUNT_META_LOCK_ORPHAN_GRACE_SECONDS=0 \
52125212
bash -c '. "$1"; held=$(fm_account_meta_lock_acquire "$2" lock-task) || exit $?; fm_account_meta_lock_release "$held"' \
52135213
_ "$ROOT/bin/fm-account-routing-lib.sh" "$state" || fail "abandoned metadata reclaim owner blocked acquisition"
52145214
assert_absent "$lock" "metadata lock retained an abandoned reclaim owner"

tests/fm-behavior-shards.test.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ test_checked_in_plan_is_complete_balanced_and_deterministic() {
2222

2323
out=$("$SHARDER" --check "$SHARD_COUNT") \
2424
|| fail "checked-in behavior shard plan failed its coverage guard"
25-
assert_contains "$out" "FM_BEHAVIOR_PLAN ok tests=90 shards=8" \
26-
"coverage guard did not report the complete 90-test inventory"
25+
assert_contains "$out" "FM_BEHAVIOR_PLAN ok tests=91 shards=8" \
26+
"coverage guard did not report the complete 91-test inventory"
2727
"$SHARDER" --plan "$SHARD_COUNT" > "$plan_a"
2828
"$SHARDER" --plan "$SHARD_COUNT" > "$plan_b"
2929
cmp -s "$plan_a" "$plan_b" || fail "same durations produced different shard plans"
@@ -165,7 +165,7 @@ test_post_run_guard_requires_the_exact_executed_union() {
165165
write_complete_manifests "$plan" "$good"
166166
out=$("$SHARDER" --verify "$SHARD_COUNT" "$good") \
167167
|| fail "post-run guard rejected the exact complete manifest union"
168-
assert_contains "$out" "FM_BEHAVIOR_COMPLETENESS ok tests=90 shards=8" \
168+
assert_contains "$out" "FM_BEHAVIOR_COMPLETENESS ok tests=91 shards=8" \
169169
"post-run guard did not report complete execution"
170170

171171
cp -R "$good" "$missing"

tests/no-mistakes-required.test.sh

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
#!/usr/bin/env bash
2+
set -euo pipefail
3+
4+
ROOT=$(cd -- "$(dirname -- "$0")/.." && pwd)
5+
MARKER='Updates from [git push no-mistakes](https://github.com/kunchenguid/no-mistakes)'
6+
WORKFLOW="$ROOT/.github/workflows/no-mistakes-required.yml"
7+
CONTRIBUTING="$ROOT/CONTRIBUTING.md"
8+
9+
assert_marker_assignment_once() {
10+
local file=$1
11+
local count
12+
13+
count=$(grep -Fc -- "marker='$MARKER'" "$file" || true)
14+
if [[ $count -ne 1 ]]; then
15+
printf 'expected exactly one no-mistakes marker assignment in %s, found %s\n' \
16+
"$file" "$count" >&2
17+
return 1
18+
fi
19+
}
20+
21+
# The workflow and contributor instructions are both inputs to the external
22+
# publisher. Keep their machine-verifiable signature synchronized so a PR body
23+
# cannot claim successful publication while omitting the gate marker.
24+
assert_marker_assignment_once "$WORKFLOW"
25+
26+
if ! grep -Fq -- "\`$MARKER\` exactly" "$CONTRIBUTING"; then
27+
printf 'CONTRIBUTING.md does not document the workflow marker exactly\n' >&2
28+
exit 1
29+
fi
30+
31+
printf 'no-mistakes PR signature contract is synchronized\n'

0 commit comments

Comments
 (0)