Commit 6b0f954
* docs(quick-402): create generic benchmark runner plan
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* feat(quick-402): extract benchmark-utils and add generic nf-benchmark runner
- Create bin/benchmark-utils.cjs with 6 shared utility functions extracted from nf-benchmark-solve.cjs
- Refactor bin/nf-benchmark-solve.cjs to import from benchmark-utils (no re-inlined bodies)
- Create bin/nf-benchmark.cjs generic runner supporting --skill=<name> --track=<name> --json
- Add benchmarks/quick/fixtures.json with 3 exits_zero smoke fixtures (no env_required)
- Add benchmarks/quick/baseline.json with pass_rate floor of 100
* feat(quick-402): update benchmark-gate.yml to enforce both solve and quick baselines
- Add benchmark-quick job that runs nf-benchmark.cjs --skill=quick --track=smoke
- Add needs: benchmark-solve to ensure sequential gating
- Both jobs use explicit baseline paths via check-benchmark-gate.cjs second positional arg
- Gate now blocks PRs if either solve smoke or quick smoke drops below its floor
* docs(quick-402): Build generic benchmark runner for nForma skills (issue #107)
* docs(quick-402): update verification status
* req(quick-402): add BENCH-07
* fix(403): wire fixture._traces into nf-benchmark result output
Task 3 action now assigns fixture._traces unconditionally in evaluatePassCondition
and explicitly patches nf-benchmark.cjs to include traces: fixture._traces || []
in the result push block. must_haves updated with traces truth and key_link.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* feat(quick-403): add three buggy bench stubs for debug track
* feat(quick-403): add 6 TLA+ bug/fix model pairs for debug bench fixtures
* feat(quick-403): add TLC pass conditions, debug fixtures, baseline, and CI gate job
* docs(quick-403): Add nf:debug benchmark track with TLA+ bug/fix models and TLC trace output
* docs(quick-403): update verification status
* req(quick-403): add BENCH-08
* fix(bench): fix TLA+ init state in filter/counter models — raise debug baseline to 100
Bug models initialized result/counted from buggy predicate so TLC detects
the boundary violation in the initial state. Fix models initialize from the
correct predicate so the invariant holds for all initial states. All 6
debug benchmark fixtures now pass (sort, filter, counter × bug+fix).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* docs(quick-404): create nf:debug autonomy benchmark plan
Plan for building 7 buggy stubs (easy/medium/hard), paired test files,
nf-debug-runner.cjs fix-cycle, and nf-benchmark-debug.cjs scorer (0-100).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* fix(quick-404): revise must_haves truths to match implementation
- Truth[1] (sort stub): Changed 'no-op sort' to 'sorts descending instead of ascending' to match actual implementation which returns [3,2,1] for [3,1,2]
- Truth[5] (baseline.json): Changed 'pass_rate between 60 and 80' to 'pass_rate 43, representing 3/7 easy stubs' to match action which sets pass_rate to 43
* fix(404-plan): revise with quorum improvements for robustness and timeout handling
* feat(quick-404): add 5 buggy stubs and 7 paired failing test files
- Replace bench-buggy-sort.cjs with observable descending-sort bug
- Add bench-buggy-medium-dedup.cjs (string coercion dedup bug)
- Add bench-buggy-medium-accumulator.cjs (addition instead of multiplication)
- Add bench-buggy-hard-parser.cjs (off-by-one slice drops last char)
- Add bench-buggy-hard-scheduler.cjs (inverted priority comparison)
- Create 7 test files in benchmarks/debug/tests/ all failing on buggy stubs
* feat(quick-404): add nf-debug-runner, nf-benchmark-debug scorer, update baseline
- Create bin/nf-debug-runner.cjs: fix-cycle runner with pre-flight checks,
try/finally restoration, syntax validation, robust regex code extraction,
and timeout handling returning {fixed, error, elapsed_ms}
- Create bin/nf-benchmark-debug.cjs: standalone 0-100 scorer over 7 stubs,
supports --dry-run, --json, --verbose, --timeout, restores stubs after each run
- Update benchmarks/debug/baseline.json: pass_rate=43 (3/7 easy stubs floor)
* docs(quick-404): Build nf:debug autonomy benchmark with graded difficulty stubs, fix-cycle runner, and standalone scorer
* docs(quick-404): update verification status
* req(quick-404): add BENCH-09
* docs(quick-404): mark task 404 Verified in STATE.md
* fix(bench): use claude CLI directly in nf-debug-runner instead of call-quorum-slot with null-cli slot
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* feat(bench): add extreme-tier formal-model-only stubs to debug benchmark
Three new stubs requiring distributed-systems formal reasoning to fix:
- lamport: missing +1 on receive violates causal-ordering invariant
- quorum: >= instead of > allows split-brain on even-cluster partitions
- vector-clock: sum comparison misclassifies concurrent events as ordered
Each stub has a paired test that enumerates the boundary cases TLC
would find via exhaustive state enumeration — bugs look locally plausible
but only the formal invariant explains the correct fix.
Benchmark grows from 7 to 10 stubs; baseline floor updated to 30%.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* feat(bench): expand debug benchmark to 100 stubs across 5 tiers (20 each)
Adds legendary tier (protocol-level formal reasoning required) and
fills each tier to 20 stubs:
easy (20): off-by-one, wrong operator, wrong initial value
medium (20): type coercion, closure bugs, wrong algorithm semantics
hard (20): LRU, binary search, trie, BFS, Dijkstra, segment tree, etc.
extreme (20): distributed invariants — Lamport clocks, quorum split-brain,
vector clocks, CRDT merge, Paxos promise, gossip idempotency,
fencing tokens, causal consistency, etc.
legendary (20): multi-protocol formal properties — Raft Figure 8, Paxos
chosen-value, 2PC recovery, Chandy-Lamport snapshot, BFT
quorum (2f+1), HLC receive, Spanner TrueTime, Percolator
prewrite, PBFT view, SSI rw-antidependency, chain-replication
ACK ordering, ZAB epoch, MVCC snapshot, linearizability, etc.
Every test was verified to exit code 1 against its buggy stub.
Baseline floor updated to 20% (easy-tier-only expectation).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* feat(bench): harden debug benchmark — strip all hint comments and diagnostic output
- Strip all // and /* */ comments from 100 buggy stubs (removes BUG:/Fix: hints)
- Normalize all 100 test assert helpers to emit only "FAIL {label}" with no
expected/actual/info diagnostics (covers bool, equality, and 4-arg forms)
- Fix strip-bench-hints.cjs regex to correctly consume full assert function body
(previous regex left a dangling } causing syntax errors)
- All 100 tests confirmed: syntax valid, exit 1 on buggy stubs
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* fix(bench): relabel ai_failed vs runner_failed, update hardened baseline
- runner_failed now means the runner itself crashed (can't parse JSON output)
- ai_failed means Claude provided a valid fix but the test still failed
- baseline.json updated to 93/100 (hardened run: Haiku without hint comments)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* feat(bench): full semantic obfuscation — zero hints for AI debugger
Three-layer hardening applied to all 100 stubs + tests:
1. Stubs: exported function names → f/g/h, declared params → a/b/c/d
(happensBefore(vcA,vcB) → f(a,b), hasQuorum(clusterSize,votes) → f(a,b))
2. Tests: import destructuring + call sites updated to match new stub exports;
require() path string protected via placeholder — never mutated
3. Tests: assert helper replaced with execution-order counter version:
prints "FAIL t{N}" by call order regardless of label argument, blocking
ALL label leakage including concatenated/runtime-built strings
Runner already anonymises filename (fn.cjs) in the prompt.
After this pass Claude sees: function f(a,b) { ... } + FAIL t4 / FAIL t7
No function name, no parameter names, no test descriptions.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* chore(bench): update baseline to 58/100 after full obfuscation
Haiku on fully obfuscated benchmark (no function names, no param names,
opaque test labels, anonymous filename):
easy=17/20 medium=13/20 hard=17/20 extreme=8/20 legendary=3/20
Extreme/legendary collapse confirms the benchmark now requires genuine
protocol-level reasoning rather than name-matching.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* feat(bench): add CI regression gates and structural integrity check for debug benchmark
- Add check-debug-bench-structure.cjs: validates all 100 stubs still have real bugs,
tests are syntactically valid, no hint comments remain, and assert helpers use
counter form — runs in ~10s with no API key
- Add benchmark-debug-structure and benchmark-debug-smoke jobs to benchmark-gate.yml:
structural check runs on every PR; smoke LLM job runs 5 easy stubs with graceful
skip when ANTHROPIC_API_KEY is absent (fork PRs)
- Add benchmarks/debug/smoke-baseline.json: 80% floor (4/5) for smoke LLM gate
- Fix obfuscate-bench.cjs: don't apply paramMap to test files (word-boundary \bn\b
was corrupting \n escape sequences and matching process.stderr.write)
- Restore 5 corrupted test files (chunk, factorial, hard-union-find, legendary x2)
and re-run obfuscation with corrected script
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* chore(solve): update formal verification artifacts
Automated commit from nf-solve — includes layer manifests, gate results,
evidence snapshots, model registry, and requirements coverage updates.
* chore(solve): update formal verification artifacts
Automated commit from nf-solve — includes layer manifests, gate results,
evidence snapshots, model registry, and requirements coverage updates.
* chore: trigger CI
* chore: force re-trigger CI
* chore: force CI trigger
---------
Co-authored-by: jobordu <jonathan@jonathanborduas.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 59055dd commit 6b0f954
248 files changed
Lines changed: 8425 additions & 260 deletions
File tree
- .github/workflows
- .planning
- formal
- alloy
- evidence
- prism
- spec
- debug-bench-counter
- debug-bench-filter
- debug-bench-sort
- tla
- quick
- 402-build-generic-benchmark-runner-for-nform
- 403-add-nf-debug-benchmark-track-with-generi
- 404-build-nf-debug-autonomy-benchmark-with-g
- benchmarks
- debug
- tests
- quick
- bin
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | 3 | | |
10 | 4 | | |
11 | 5 | | |
12 | 6 | | |
13 | 7 | | |
14 | 8 | | |
15 | 9 | | |
16 | | - | |
17 | | - | |
18 | | - | |
| 10 | + | |
| 11 | + | |
19 | 12 | | |
20 | | - | |
21 | | - | |
| 13 | + | |
22 | 14 | | |
23 | | - | |
| 15 | + | |
24 | 16 | | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | 17 | | |
29 | 18 | | |
30 | 19 | | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
| 20 | + | |
| 21 | + | |
35 | 22 | | |
36 | | - | |
37 | | - | |
| 23 | + | |
38 | 24 | | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
| 25 | + | |
| 26 | + | |
60 | 27 | | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
68 | 32 | | |
69 | | - | |
70 | | - | |
71 | | - | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
72 | 43 | | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
80 | 63 | | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
| 64 | + | |
| 65 | + | |
85 | 66 | | |
86 | | - | |
| 67 | + | |
87 | 68 | | |
| 69 | + | |
| 70 | + | |
88 | 71 | | |
89 | | - | |
90 | | - | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
| 94 | + | |
| 95 | + | |
98 | 96 | | |
99 | | - | |
100 | | - | |
| 97 | + | |
101 | 98 | | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
| 99 | + | |
134 | 100 | | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
| 101 | + | |
139 | 102 | | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | | - | |
146 | | - | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
147 | 106 | | |
148 | | - | |
149 | | - | |
| 107 | + | |
150 | 108 | | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | | - | |
156 | | - | |
157 | | - | |
158 | | - | |
159 | | - | |
160 | | - | |
161 | | - | |
162 | | - | |
163 | | - | |
164 | | - | |
165 | | - | |
166 | | - | |
167 | | - | |
168 | | - | |
169 | | - | |
170 | | - | |
171 | | - | |
172 | | - | |
173 | | - | |
174 | | - | |
175 | | - | |
176 | | - | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
39 | 44 | | |
| 45 | + | |
40 | 46 | | |
41 | 47 | | |
42 | 48 | | |
| |||
61 | 67 | | |
62 | 68 | | |
63 | 69 | | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
64 | 73 | | |
| 74 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
5 | 8 | | |
| 9 | + | |
6 | 10 | | |
7 | 11 | | |
8 | 12 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
2 | 12 | | |
3 | 13 | | |
4 | 14 | | |
| |||
7 | 17 | | |
8 | 18 | | |
9 | 19 | | |
| 20 | + | |
10 | 21 | | |
11 | 22 | | |
12 | 23 | | |
| |||
30 | 41 | | |
31 | 42 | | |
32 | 43 | | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
33 | 56 | | |
34 | 57 | | |
35 | 58 | | |
| |||
56 | 79 | | |
57 | 80 | | |
58 | 81 | | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
59 | 94 | | |
60 | 95 | | |
61 | 96 | | |
| |||
0 commit comments