Repository navigation
refactor: GE train 3 — run-qd, capture tags, serialize and lexical tiers as named steps, plus a stricter tangle gate (answers byte-identical) #721
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
807e461
1deff0f
c44850c
0a263b5
a1b5406
fdf598c
8a5ae87
2d08a8d
9be808d
6279672
88edebe
998e337
7141a99
6fe4be7
d472f94
0441283
fc3621b
d32bc14
a7defa4
1dc9c0e
8468dd8
eb5b6bf
ccb3ad8
0358bc2
6f961f7
7c116cd
6fb8a84
ef4a92d
a365f33
ca702e7
81adcac
191b7fc
5020dbd
103dde8
9462d3d
e134d4f
6436338
e0f61bb
f21031e
1c3b76d
8d53017
a137178
12c46c4
4342846
cb81ec5
aead22f
a979769
49c76eb
2dc0065
8954c40
22f06fe
334be90
73a25ba
b9bd5fe
a7dd106
a5d3ad3
18afe40
a7f8a0c
feda815
6d040f3
5abe97a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| ### Fixed — format-arity acks written by 0.6.10 and earlier match again | ||
|
|
||
| The unchecked-status facet widened the facet bits of a defect-shape site value from two to three, which changed the ack key of every row holding a site whose hash had bit 2 set (about half of all one-site rows; 4 of 8 in a fixture sample): an ack written by 0.6.10 or earlier stopped matching, the row gated again and the ack was listed stale. Such an ack is now re-filed to its current key on read (counted in `acks_rekeyed_by_scheme=`) and written back healed by the next `--quality-ack`. Only rows whose key moved are affected; acks written since are unchanged. New gate `test/defectackschemecheck.sh`, its legacy key recorded from the released 0.6.9 binary. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| ### Fixed — a deeply nested shell script no longer crashes `--quality-delta` | ||
|
|
||
| The shell lexer and parser behind the Bash defect-shape facets recursed without a bound on subshells, brace groups, `if` and quote/substitution nesting; a test script 5,000 levels deep ended the run on SIGSEGV. One nesting budget (64 levels) now covers the lexer and the parser; a script that reaches it is cut there, and the run says so with `shell_cut=N` on the `<quality-delta>` root (and `"shell_cut"` in `--json`): N shell files whose scan stopped, what lies deeper was not judged. The old silent 40-level substitution cap is gone. New gate `test/shellnestcheck.sh` (generated scripts, never committed). | ||
|
joyful-ii-V-I marked this conversation as resolved.
Resolved
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| ### Changed — `--quality-delta`'s tangle kind gates a new, crossing or growing tangle | ||
|
|
||
| `tangle` was report-only. A row now gates (exit 2) when the function is new at tangle 6.0 or more, crossed 6.0, or its score grew against the range base while over 6.0; a moved body and test code never gate, and a row an input rose on while the score held stays `sev="minor"`. The best-since-tag ratchet is now a facet (`ratchet=`) on those rows, not a row of its own, so a function that only sits above its tag best no longer prints. Replayed on the 20 merges before 8861b0d4d (tangle kind, range form): main gated 0 rows; this gates 9 over 5 PRs, every one a function that crossed or grew in its own PR (#702 `runLsp` 2.1→11.0, eight growth rows of a tenth or more), and the four rows on functions that did not grow in their PR print nothing. What it does not mean: a function already over 6.0 that the change leaves no worse never gates. Method and table: `docs/EVALS.md`, the thirteen kinds. |
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6282,14 +6282,24 @@ These are the exact `kind=` strings the binary emits, from `src/quality.h`: | |
| `complexity` · `verbosity` · `nesting` · `params` · `duplication` · `dead-code` · `api-surface` · | ||
| `error-masking` · `short-horizon-churn` · `new-clone-of-reused-helper` · `placeholder` · `defect-shape` · `tangle` | ||
|
|
||
| `tangle` (QD-TANGLE, 2026-11-19) is report-only: always `sev="minor"`, a long function's nesting past 3, deep share and | ||
| steering locals amplified by length (AUC 0.986 on 44 hand labels; a long orchestrator of named steps scores 0). | ||
| `tangle` (QD-TANGLE, 2026-11-19) scores a long function's nesting past 3, deep share and steering locals amplified by | ||
| length (AUC 0.986 on 44 hand labels; a long orchestrator of named steps scores 0). It was report-only until | ||
| TANGLE-GATE-B / QD-RATCHET-BASE (2026-11-21): a row now gates when the function is new at 6.0 or more, crossed 6.0, or | ||
| its score grew against the range base while over 6.0 (not a moved body, not test code); a row an input rose on while the | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Clarify the moved-function exception. A moved-and-rewritten function can gate, but “not a moved body” excludes that case. Distinguish a moved-only body from a moved-and-rewritten function. The PR objectives state that moved-and-rewritten functions can gate.
|
||
| score held stays `sev="minor"`, and the best-since-tag ratchet is a facet (`ratchet=`) on those rows, never a row of its | ||
| own. Replayed on the 20 merges before 8861b0d4d (range form, tangle kind only): main printed 3 minor rows and gated 0; | ||
| the lane gates 9 rows over 5 PRs — #702 `runLsp` 2.1→11.0 (crossed) and the 8 growth rows the re-census found | ||
|
Comment on lines
+6290
to
+6291
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Pin the replay evidence. This file requires published numbers to name an in-repository provenance file. The replay names neither an artifact nor the binary revisions, so readers cannot reproduce the comparison from this description. Add the replay record and its pins, or label the figures as unverified.
|
||
| (#714 `serialize` 25.4→25.5 and `cc_walk` 9.1→9.7, #706 `runForLensPass` 16.4→16.5, #705 `buildGraph` 56.8→56.9, | ||
| #702 `serialize` 25.2→25.4, #688 `ElixirContext::prepare` 12.2→12.3 and `captureTagsFacts` 28.8→29.2); the four | ||
|
Comment on lines
+6291
to
+6293
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Reconcile the replay row count. The text claims eight growth rows, but lists seven. With the crossing row, the examples account for eight gated rows, not nine. Check the replay and add the missing row or correct the totals.
|
||
| tag-best rows on functions that did not grow in their PR (`buildGraph` #706/#714, `serialize` #705, `captureTagsFacts` | ||
| #714 29.2→29.1) print nothing. Expected effect: a PR that adds even a tenth to an over-bar function gates until it | ||
| leaves the function no worse (or acks it). | ||
|
|
||
| The first ten each target a failure mode measured in the literature; `placeholder` (added 0.6.7) is an | ||
| honesty check on "done" — a stub or TODO the change added — and never gates. `defect-shape` carries six | ||
| facets in `defect=` (`format-arity`, `utf8-cut`, `dedup-first`, `vacuous-assert`, `unchecked-status`, `unhandled-arm`), shapes this project's own | ||
| code review kept finding; only `format-arity` gates, and on any origin (new-symbol rows never gate, except | ||
| defect-shape format-arity; since QD-ENTRY-CEILING also a new function at the ceiling). Measured (2026-10-07): recall 7/8 on the eight review findings it was built | ||
| defect-shape format-arity, a new function at the ceiling (QD-ENTRY-CEILING) and a tangled new function (TANGLE-GATE-B)). Measured (2026-10-07): recall 7/8 on the eight review findings it was built | ||
| from; with every site treated as new, 0 format-arity false positives on this tree (1,330 literal-format calls), | ||
| on the Python 3.13 standard library (405 calls) and on libc++'s std::format tests (80 calls; the 24 hits are its | ||
| deliberately ill-formed `.verify.cpp` calls); vacuous-assert sample precision 30/30 on this tree's gates | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,9 +1,9 @@ | ||
| --- | ||
| name: ripwire-quality-bar | ||
| description: > | ||
| Code QUALITY of what YOU just wrote, before commit/'done' or a cleanup: --quality-delta | ||
| QUALITY of code YOU just wrote, before commit/'done' or cleanup: --quality-delta | ||
| lists what got WORSE in 13 kinds; exit 2 if old code did (new-symbol rows never gate, | ||
| except defect-shape format-arity and a new function at the ceiling); the fix each shape calls for. | ||
| except defect-shape format-arity, a new function at the ceiling and a tangled new one); each shape's fix. | ||
| Merge safety → change-check. Even a single-line leaf fix runs it. | ||
| allowed-tools: Bash, Read | ||
| --- | ||
|
|
@@ -34,7 +34,7 @@ anyway and stamps `baseline_absorbed="N"`). | |
| ## Read the exit code — it is narrower than it looks | ||
|
|
||
| Exit 2 ONLY on a finding that is major AND unacked AND on code that already existed (`preexisting-worse`) — | ||
| exactly the header's `gating="N"`. Read `gating=`, not `regressions=`. The new-symbol rows never gate, except defect-shape format-arity and a new function at the ceiling | ||
| exactly the header's `gating="N"`. Read `gating=`, not `regressions=`. The new-symbol rows never gate, except defect-shape format-arity, a new function at the ceiling and a tangled new function | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Explain exit 2 without restricting it to existing code. A new production function can be the only gating row at tangle 6.0. The command then exits 2 with
|
||
| (a format/argument mismatch is a defect, so it gates on new code too). **Exit 0 means "nothing that already existed got worse", NOT "clean"**: open the | ||
| `origin="new-symbol"` rows — they are the debt you are adding. A renamed or moved symbol reads as new | ||
| (`origin="moved"` never gates), so on a diff that moves code the exit code is weak evidence. Before an extract-method fix, read `ev=` | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Qualify the tangle gate conditions.
A new test function can score 6 or more without gating. This sentence says it gates, but
docs/COMMANDS.mdexcludes test code and moved bodies. Include those exclusions and the acknowledgment condition here.