diff --git a/campaign/b1-cohort-ranking.md b/campaign/b1-cohort-ranking.md new file mode 100644 index 000000000..82f7b6397 --- /dev/null +++ b/campaign/b1-cohort-ranking.md @@ -0,0 +1,152 @@ +# B1 cohort ranking — depth-blocking mechanism cohorts by size and leverage + +Sources (every claim below cites one of these): + +- **[C1]** `campaign/b1-depth-census.md` — fresh executed run, 2026-08-23, HEAD + `af9ded2b`, all 48 currently-PASSING languages exercised at depth against the + fixtures in `campaign/b1-depth-fixtures.md`; raw log + `campaign/fixtures/b1/depth-census-run.log` (`PASS=34 DIVERGE=0 FALLBACK=14 + SKIP=0 ERROR=0 total=48`, log line 99). +- **[C2]** `docs/compact-route-coverage-census.md` — 2026-07-20 census over all + 206 registered grammars (153 FALLBACK broken into eleven `[mechanism=…]` + classes; class-size table lines 118–121; burn-down discussion lines + 160–205, 271–291, 359–362). +- **[C3]** `campaign/smoke-census-summary.md` — summary of [C2] including the + corrected interpretation that every `eof-byte-short-frontier` decline has + exactly one derivation and fails only because the accepted head's boundary + ends one byte short of the source. + +## Scope note: two complementary rankings + +The three named classes (`zero-width-shift`, `repetition-shift-class`, +`eof-byte-short-frontier`) come from the whole-campaign census [C2]. Note that +Ranking A below is census-PASS **at the authored fixtures used** [C1] — it does +**not** establish PASS-on-real-files-today; this carries the G-2 authored-fixture +caveat (`campaign/b1-harness-gaps.md`). The fresh +depth run [C1] re-exercised only the 48 currently-PASSING languages and found +**none** of those three tags on any decline — the declines there carry newer, +finer shapes (`scheduler-frontier-shape`, `recovery-entered`) plus one +unclassified case. Both views are ranked below; they rank different things: + +1. **Depth-blocked languages among the current PASS set** ([C1]) — what blocks + us from converting PASS-at-smoke into PASS-on-real-files-today. +2. **Campaign-wide leverage** ([C2]/[C3]) — what converts the most of the 206 + grammars overall. + +--- + +## Ranking A — languages blocked at depth among the 48-PASS set [C1] + +| Rank | Cohort | Languages blocked | Members | +|--:|---|--:|---| +| A1 | `scheduler-frontier-shape` | 8 | cylc, dtd, earthfile, elixir, julia, nushell, purescript, v | +| A2 | `recovery-entered` (production error tree) | 5 | bitbake, chatito, disassembly, mermaid, templ | +| A3 | unclassified decline | 1 | ledger ("accepted compact root is incomplete … span=0..932 expected=1..932", log line 77; no `[mechanism=…]` tag) | + +(Note: `b1-depth-census.md` says "6" for this bucket but enumerates five rows; +the row list is authoritative — 34 + 8 + 5 + 1 = 48.) + +### Campaign-leverage overlay within Ranking A + +- The 8-language `scheduler-frontier-shape` bucket splits by decline boundary + (verified against `campaign/fixtures/b1/depth-census-run.log`): + **no_action (6)** — dtd, earthfile, elixir, julia, purescript, v ([C1] rows 8, + 12, 13, 15, 38, 46) — sharing the "converged-path reduction split no-action + drop" shape family (julia's variant descends from an unproved historical + boundary resurrection); and **accept_without_materialization (2)** — cylc + ("did not accept EOF: generic scheduler requires one certified accepted + derivation") and nushell ("EOF recovery admission requires scanner + quiescence"). One fix shape touches 6 of 8 immediately. +- All declines are fail-closed: DIVERGE=0 [C1], so none of these is a + correctness risk — pure upside. + +## Ranking B — campaign-wide leverage over all 206 grammars [C2][C3] + +| Rank | Cohort | Languages declined | Share of FALLBACK | Tractability per [C2] | +|--:|---|--:|--:|---| +| B1 | `zero-width-shift` | 33 | 21.6% | High — one uniform shape, confirmed to recur at real-corpus depth (line 119, 171) | +| B2 | `repetition-shift-class` | 27 | 17.6% | Medium — scheduler explicitly documents it as unimplemented (lines 120, 178, 291) | +| B3 | `eof-byte-short-frontier` | 90 | 58.8% | Certain but narrow — every decline is a single-byte trailing-newline frontier gap, exactly one derivation (lines 134, 160, 271; [C3]) | + +Leverage rationale (per [C2] lines 199–205, 247, 359–362): although +`eof-byte-short-frontier` is the largest raw bucket, the depth check showed it +does **not** block real-file depth for flagship languages — the depth-persistent +mechanisms are `repetition-shift-class` and `zero-width-shift`. Hence B1/B2 outrank B3 despite B3's raw count. + +--- + +## Recommended burn-down order + +1. **A3 unclassified (ledger)** — cheapest, unblocks measurement itself: until + this decline routes through `admission_census.go`'s + `admissionCensusClassify`, every future census will have an unexplained cell. + *Named first fix:* route the "accepted compact root is incomplete" + exit path through `admissionCensusClassify` so it emits a `[mechanism=…]` + tag; then re-run the manifest-driven matrix (no routing change to the + decision itself). Evidence base: [C1] row 27; `campaign/b1-harness-gaps.md` + G-3. +2. **A1 `scheduler-frontier-shape`** — biggest depth-blocked bucket (8/14 + declines), and 6 of its members share one verbatim detail. *Named first + fixes (one per boundary):* (a) **no_action boundary** — give the + converged-path reduction split's no-action drop alternative-set coverage by + blending the surviving derivation with the certified accept; this addresses + dtd, earthfile, elixir, julia, purescript, v. (b) + **accept_without_materialization boundary** — separately ensure the generic + scheduler can produce one certified accepted derivation at EOF so cylc and + nushell stop declining there; the no_action fix alone does not give + `accept_without_materialization` a certified derivation to see. + Smallest repro: earthfile (116 bytes), purescript (148 bytes), v + (235 bytes), julia (1089 bytes) per `campaign/fixtures/b1/depth-census-run.log` + (`campaign/b1-depth-fixtures.md`); dtd (198 KB) is the stress case. + Evidence: [C1] rows 8, 12, 13, 15, 38, 46. +3. **A2 `recovery-entered`** — 5 depth-blocked languages, all fail-closed + error trees from "scheduler has no table action for the elected token". + *Named first fix:* teach the compact route to admit the recovery-elected + token's derivation (certify the production error-tree root as an accepted + derivation rather than declining), starting from chatito (99 bytes, the + minimal repro). Evidence: [C1] rows 3, 4, 10, 32, 42. +4. **B1 `zero-width-shift` (33)** — highest campaign-wide leverage per [C2] + line 171. *Named first fix:* add the missing scheduler table entry for the + uniform "generic zero-width shift" shape so the head advances without + consuming input. Evidence: [C2] lines 119, 171, 284. +5. **B2 `repetition-shift-class` (27)** — explicitly documented as an + unimplemented scheduler feature. *Named first fix:* implement the + repetition-shift table action the scheduler already names in its decline. + Evidence: [C2] lines 120, 178, 291. +6. **B3 `eof-byte-short-frontier` (90)** — largest but shallowest: every + decline is a one-byte short accepted-head boundary on a single-derivation + parse. *Named first fix:* when the accepted head's end offset is exactly + source length − 1 and the final byte is a newline, extend the certified + span to include it. Certain win, fixture-only scope [C2] lines 134, 271; + deliberately last because it does not block real-file depth [C2] lines + 199–205. + +## Verification hook + +Every fix above is checkable with the existing harness, unchanged: +regenerate the manifest with +`campaign/fixtures/b1/run-depth-census.sh`, then + +``` +GTS_ADMISSION_REAL_CORPUS=1 \ +GTS_ADMISSION_REAL_CORPUS_MANIFEST=campaign/fixtures/b1/depth-manifest.json \ +GTS_ADMISSION_CENSUS=1 \ +go test -tags gts_parsercorephase0 -run TestAdmissionCandidateRealCorpusMatrix -v . +``` + +and confirm the targeted rows flip FALLBACK→PASS with digest logged ([C1]'s +exact command). No code change is made by this document; it is evidence only. + +## Buried headline: depth work surfaced what the smoke census predicted + +This depth run [C1] surfaced two mechanism classes that the 2026-07-20 smoke +census [C2] recorded as near-empty: + +- **`scheduler-frontier-shape`**: 8 languages blocked at depth, versus 1 + language (0.7%) in [C2] (its line 122). +- **`recovery-entered`**: 5 languages blocked at depth, versus zero in [C2]. + +This is exactly what [C2] predicted at its lines 130–132. It is the strongest +argument for funding depth work: the mechanisms that actually block real-file +depth are invisible to a smoke census until you run one. + diff --git a/campaign/b1-depth-census.md b/campaign/b1-depth-census.md new file mode 100644 index 000000000..c561d87dd --- /dev/null +++ b/campaign/b1-depth-census.md @@ -0,0 +1,111 @@ +# B1 depth census — per-language result table (48 currently-PASSING languages) + +PASS set source: `docs/compact-route-coverage-census.md`, "Full per-language +table → PASS (48)". Fixture inventory: `campaign/b1-depth-fixtures.md`. + +**This table now holds a FRESH EXECUTED RUN (2026-08-23, repo HEAD `af9ded2b`, +go1.25.1 linux/amd64), not predictions.** The driver is the shipped, +env-driven real-corpus admission matrix +`TestAdmissionCandidateRealCorpusMatrix` (`admission_real_corpus_matrix_test.go`, +build tag `gts_parsercorephase0`), pointed at the 48-fixture manifest +`campaign/fixtures/b1/depth-manifest.json` generated by +`campaign/fixtures/b1/run-depth-census.sh`. Exact command: + +``` +GTS_ADMISSION_REAL_CORPUS=1 \ +GTS_ADMISSION_REAL_CORPUS_MANIFEST=campaign/fixtures/b1/depth-manifest.json \ +GTS_ADMISSION_CENSUS=1 \ +go test -tags gts_parsercorephase0 -run TestAdmissionCandidateRealCorpusMatrix -v . +``` + +Raw output: `campaign/fixtures/b1/depth-census-run.log`. +File summary (log line 99): `PASS=34 DIVERGE=0 FALLBACK=14 SKIP=0 ERROR=0 total=48`; +parse class (line 100): `FALLBACK clean=8 error-tree=6; PASS clean=34 error-tree=0`. + +Status legend: `PASS` = compact route served a byte-exact tree of the real +fixture at depth (digest logged); `FALLBACK ` = the route declined; +the mechanism is the `[mechanism=…]` tag emitted under `GTS_ADMISSION_CENSUS=1` +(`admission_census.go`, `admissionCensusClassify`). No routing changes were +made; this is evidence only. + +| # | Language | Fixture bytes | Depth status | Mechanism / detail (verbatim from log) | +|--:|---|--:|---|---| +| 1 | bash | 14290 | PASS | digest a058477754da | +| 2 | beancount | 221 | PASS | digest ae44a1dc92db | +| 3 | bitbake | 168224 | FALLBACK | recovery-entered: scheduler has no table action for the elected token (production error-tree) | +| 4 | chatito | 99 | FALLBACK | recovery-entered: no table action for elected token (error-tree) | +| 5 | commonlisp | 242 | PASS | digest 2d734a8ebfbc | +| 6 | crystal | 223 | PASS | digest 07456e83e860 | +| 7 | csv | 123 | PASS | digest d32b1d4773be (log line 57) | +| 8 | cylc | 176 | FALLBACK | scheduler-frontier-shape: declined at accept_without_materialization — requires one certified accepted derivation | +| 9 | desktop | 152 | PASS | digest 0cb50bd238c1 | +| 10 | disassembly | 403 | FALLBACK | recovery-entered: no table action (error-tree) | +| 11 | dockerfile | 1396 | PASS | digest bc4621b7abd3 (cgo_harness/docker/Dockerfile) | +| 12 | dtd | 198540 | FALLBACK | scheduler-frontier-shape: converged-path reduction split no-action drop lacks alternative-set coverage by one non-blended survivor | +| 13 | earthfile | 116 | FALLBACK | scheduler-frontier-shape (same no-action-drop detail; production error-tree) | +| 14 | editorconfig | 121 | PASS | digest 49cd13246946 | +| 15 | elixir | 8504 | FALLBACK | scheduler-frontier-shape (no-action drop) | +| 16 | fish | 171 | PASS | digest 0d5b7bf6f354 | +| 17 | git_config | 127 | PASS | digest 07965a8f6cb6 | +| 18 | git_rebase | 170 | PASS | digest 5bb36b1e0def | +| 19 | gitcommit | 271 | PASS | digest 77a8c67e9e09 | +| 20 | go | 2194 | PASS | digest 833b5685c629 | +| 21 | gomod | 341 | PASS | digest 49167d5d85cd | +| 22 | hcl | 203 | PASS | digest 51d8a99368a0 | +| 23 | hyprlang | 117 | PASS | digest e7ac74417cc8 | +| 24 | ini | 260 | PASS | digest c25fb04c169d | +| 25 | julia | 1089 | FALLBACK | scheduler-frontier-shape: unproved historical boundary resurrection | +| 26 | kconfig | 283 | PASS | digest cb1cafe7232f | +| 27 | ledger | 932 | FALLBACK | unclassified decline: accepted compact root incomplete — span=0..932 expected=1..932 error=false allowErrorRoot=false | +| 28 | liquid | 233 | PASS | digest 4fb0ebfb9d25 | +| 29 | make | 217 | PASS | digest 3007b07a2aa5 | +| 30 | markdown | 2941 | PASS | digest f6b552589036 | +| 31 | matlab | 242 | PASS | digest d98d7e7f7aa8 | +| 32 | mermaid | 211 | FALLBACK | recovery-entered: no table action (production error-tree) | +| 33 | ninja | 793 | PASS | digest a0783ff8f7a1 | +| 34 | nushell | 121 | FALLBACK | scheduler-frontier-shape: EOF recovery admission requires scanner quiescence | +| 35 | odin | 263 | PASS | digest 47020fc04ab4 | +| 36 | pascal | 157 | PASS | digest 77bca8ae9b49 | +| 37 | prolog | 132 | PASS | digest fbd1bd717e78 | +| 38 | purescript | 148 | FALLBACK | scheduler-frontier-shape (no-action drop) | +| 39 | requirements | 85 | PASS | digest 0514e003e85c | +| 40 | svelte | 256 | PASS | digest 7697435b1072 | +| 41 | tcl | 213 | PASS | digest 666666fc5bfb | +| 42 | templ | 2161 | FALLBACK | recovery-entered: no table action (production error-tree) | +| 43 | tmux | 140 | PASS | digest 4072c661f6b7 | +| 44 | twig | 205 | PASS | digest 2324248deb55 | +| 45 | uxntal | 134 | PASS | digest 23be1cc10e9c | +| 46 | v | 235 | FALLBACK | scheduler-frontier-shape (no-action drop) | +| 47 | vimdoc | 436 | PASS | digest b1de1d91afef | +| 48 | xml | 331 | PASS | digest a02018448256 | + +All cells above are verbatim from `campaign/fixtures/b1/depth-census-run.log` +(log lines 51–100), which is the authoritative record. The log is gitignored; +its SHA-256 is `329869642604d528297bb6ebdac8f36a545daf1755e8405ed9980b497b1cd875`. + +## Cohort ranking at depth + +- **Held PASS at depth (34/48):** bash, beancount, commonlisp, crystal, csv, + desktop, dockerfile, editorconfig, fish, git_config, git_rebase, gitcommit, + go, gomod, hcl, hyprlang, ini, kconfig, liquid, make, markdown, matlab, + ninja, odin, pascal, prolog, requirements, svelte, tcl, tmux, twig, uxntal, + vimdoc, xml. +- **Declined, mechanism `scheduler-frontier-shape` (8, of which 7 clean):** + cylc, dtd, earthfile, elixir, julia, nushell, purescript, v — earthfile is + error-tree (row 13), the rest are on a clean production tree. +- **Declined, `recovery-entered` with production error tree (5):** bitbake, + chatito, disassembly, mermaid, templ — inputs needing recovery; the route + declines fail-closed. (The earlier count of 6 was the error-tree parse-class + count, which also contains earthfile.) +- **Unclassified (1):** ledger — accepted-root-incompleteness decline that did + not carry a `[mechanism=…]` tag. + +## Relation to the 2026-07-20 census + +The prior census's 10-file depth check (docs/compact-route-coverage-census.md, +"Depth check") found only go holding. The measured split for this full-48 run: +34 PASS, of which 26 ran on authored fixtures of 85–436 bytes. The four July +regressions that flipped back (hcl, make, xml, svelte) did so on fixtures +1.5x–45x smaller than the corresponding July corpus files, so this run neither +confirms nor contradicts the July depth extrapolation. Zero DIVERGE in either +run: every decline is fail-closed. diff --git a/campaign/b1-depth-fixtures.md b/campaign/b1-depth-fixtures.md new file mode 100644 index 000000000..68a4590d5 --- /dev/null +++ b/campaign/b1-depth-fixtures.md @@ -0,0 +1,91 @@ +# B1 depth fixtures — one fixture per currently-PASSING language (48; 14 repo-sourced, 34 authored) + +Source for the PASS set: `docs/compact-route-coverage-census.md`, section +"Full per-language table → PASS (48)" (2026-07-20 snapshot, base commit +`7a43c9cb`): bash, beancount, bitbake, chatito, commonlisp, crystal, csv, +cylc, desktop, disassembly, dockerfile, dtd, earthfile, editorconfig, +elixir, fish, git_config, git_rebase, gitcommit, go, gomod, hcl, hyprlang, +ini, julia, kconfig, ledger, liquid, make, markdown, matlab, mermaid, +ninja, nushell, odin, pascal, prolog, purescript, requirements, svelte, +tcl, templ, tmux, twig, uxntal, v, vimdoc, xml. + +Provenance classes: + +- **repo** — a real corpus file that already exists in this worktree + (`testdata/`, `corpuscheck/testdata/upstream_corpus/`, + `cgo_harness/corpus_structural/`, `testdata/dispatcher_census_a0/`). +- **authored** — no real corpus file for the language exists anywhere in + this workspace (verified by a full `WalkDir(".")` sweep of all 2,858 + entries bucketed by extension on 2026-08-23; see + `campaign/b1-harness-gaps.md`). A representative multi-line fixture was + authored under `campaign/fixtures/b1//` (the only out-of-campaign-doc + writes permitted by the task constraints). These are *not* third-party + corpora and must be replaced by real upstream files before any + file-scale depth claim is published. + +| # | Language | Fixture path | Provenance | +|--:|---|---|---| +| 1 | bash | cgo_harness/docker/run_forest_corpus_parity.sh | repo (shell corpus used by forest-parity harness) | +| 2 | beancount | campaign/fixtures/b1/beancount/sample.beancount | authored | +| 3 | bitbake | testdata/dispatcher_census_a0/bitbake/large__linux-firmware_20260519.bb | repo (dispatcher census corpus) | +| 4 | chatito | campaign/fixtures/b1/chatito/sample.chatito | authored | +| 5 | commonlisp | campaign/fixtures/b1/commonlisp/sample.lisp | authored | +| 6 | crystal | campaign/fixtures/b1/crystal/sample.cr | authored | +| 7 | csv | campaign/fixtures/b1/csv/sample.csv | authored | +| 8 | cylc | campaign/fixtures/b1/cylc/sample.cylc | authored | +| 9 | desktop | campaign/fixtures/b1/desktop/sample.desktop | authored | +| 10 | disassembly | campaign/fixtures/b1/disassembly/sample.disassembly | authored | +| 11 | dockerfile | cgo_harness/docker/Dockerfile | repo (same path as the 2026-07-20 depth check used, but different content — that check read a 572-byte file; this one reads the current worktree copy) | +| 12 | dtd | testdata/dispatcher_census_a0/dtd/large__docbook.dtd | repo (dispatcher census corpus) | +| 13 | earthfile | campaign/fixtures/b1/earthfile/Earthfile | authored | +| 14 | editorconfig | campaign/fixtures/b1/editorconfig/sample.editorconfig | authored | +| 15 | elixir | testdata/admission_direct/recursive_insert/elixir.ex | repo | +| 16 | fish | campaign/fixtures/b1/fish/sample.fish | authored | +| 17 | git_config | campaign/fixtures/b1/git_config/sample.gitconfig | authored | +| 18 | git_rebase | campaign/fixtures/b1/git_rebase/sample.gitrebase | authored | +| 19 | gitcommit | campaign/fixtures/b1/gitcommit/sample.commitmsg | authored | +| 20 | go | cgo_harness/corpus_structural/go_sample.go | repo | +| 21 | gomod | cgo_harness/go.mod | repo | +| 22 | hcl | campaign/fixtures/b1/hcl/main.hcl | authored | +| 23 | hyprlang | campaign/fixtures/b1/hyprlang/sample.conf | authored | +| 24 | ini | testdata/dispatcher_census_a0/doxygen/small__example.cfg | repo (INI-shape config from dispatcher census corpus; actually a Doxygen .cfg repurposed — weak evidence for INI, nearest INI-family real file available) | +| 25 | julia | testdata/compact_selected_lineage/julia_utils.jl | repo | +| 26 | kconfig | campaign/fixtures/b1/kconfig/Kconfig.census | authored | +| 27 | ledger | testdata/dispatcher_census_a0/ledger/small__non-profit-test-data.ledger | repo (dispatcher census corpus) | +| 28 | liquid | campaign/fixtures/b1/liquid/sample.liquid | authored | +| 29 | make | campaign/fixtures/b1/make/Makefile | authored | +| 30 | markdown | corpuscheck/testdata/upstream_corpus/NOTICE.md | repo (upstream-corpus tree) | +| 31 | matlab | campaign/fixtures/b1/matlab/classify.m | authored | +| 32 | mermaid | campaign/fixtures/b1/mermaid/sample.mmd | authored | +| 33 | ninja | testdata/dispatcher_census_a0/ninja/small__long-slow-build.ninja | repo (dispatcher census corpus) | +| 34 | nushell | campaign/fixtures/b1/nushell/sample.nu | authored | +| 35 | odin | campaign/fixtures/b1/odin/main.odin | authored | +| 36 | pascal | campaign/fixtures/b1/pascal/census.pas | authored | +| 37 | prolog | campaign/fixtures/b1/prolog/census.pl | authored | +| 38 | purescript | campaign/fixtures/b1/purescript/Main.purs | authored | +| 39 | requirements | campaign/fixtures/b1/requirements/requirements.txt | authored | +| 40 | svelte | testdata/admission_direct/svelte_button.svelte | repo | +| 41 | tcl | campaign/fixtures/b1/tcl/census.tcl | authored | +| 42 | templ | testdata/dispatcher_census_a0/templ/medium__main.templ | repo (dispatcher census corpus) | +| 43 | tmux | campaign/fixtures/b1/tmux/sample.tmux.conf | authored | +| 44 | twig | campaign/fixtures/b1/twig/sample.twig | authored | +| 45 | uxntal | campaign/fixtures/b1/uxntal/census.tal | authored | +| 46 | v | campaign/fixtures/b1/v/main.v | authored | +| 47 | vimdoc | campaign/fixtures/b1/vimdoc/census.txt | authored | +| 48 | xml | campaign/fixtures/b1/xml/corpus-entry.xml | authored | + +Notes + +- Census execution: the manifest for these 48 fixtures is + `campaign/fixtures/b1/depth-manifest.json`; the exact command and the raw + per-language output are `campaign/fixtures/b1/run-depth-census.sh` and + `campaign/fixtures/b1/depth-census-run.log` (results table: + `campaign/b1-depth-census.md`). +- The 2026-07-20 census's own depth check sourced files from + `cgo_harness/corpus_real/` "in the main worktree" + (docs/compact-route-coverage-census.md, "Depth check" intro). That + directory does not exist in this workspace (`caps.ListDir("cgo_harness")` + shows no `corpus_real/`; `resolve …/corpus_real: no such file or + directory`), which is why 34 of 48 rows fall back to authored fixtures. +- Repo-sourced rows reuse existing pinned evidence corpora wherever one + exists; none of these files were modified. diff --git a/campaign/b1-harness-gaps.md b/campaign/b1-harness-gaps.md new file mode 100644 index 000000000..3e6689a0b --- /dev/null +++ b/campaign/b1-harness-gaps.md @@ -0,0 +1,63 @@ +# B1 harness gaps — commands this run could not execute, and why + +## RESOLVED G-1 (was: "the fine-grained census driver does not exist as a runnable artifact") + +The prior checkpoint claimed no per-file depth driver existed in the tree and +that a new root-package test would be required. That claim was **stale**: + +- `admission_real_corpus_matrix_test.go` (`//go:build gts_parsercorephase0`, + `TestAdmissionCandidateRealCorpusMatrix`) is a shipped, env-driven depth + driver: it takes a JSON manifest of `{language, bucket, bytes, output_path}` + via `GTS_ADMISSION_REAL_CORPUS_MANIFEST`, reads each real file, and runs the + scorecard's PASS/DIVERGE/FALLBACK classification with decline reasons + (`admission_real_corpus_matrix_test.go:36-139`, `:271-284`). +- With `GTS_ADMISSION_CENSUS=1` (`admission_census.go`, + `admissionCensusEnabled`/`admissionCensusClassify`) declines carry + fine-grained `[mechanism=…]` tags. + +Command actually executed on 2026-08-23 (repo HEAD `af9ded2b`, +go1.25.1 linux/amd64), via `campaign/fixtures/b1/run-depth-census.sh`: + +``` +GTS_ADMISSION_REAL_CORPUS=1 \ +GTS_ADMISSION_REAL_CORPUS_MANIFEST=campaign/fixtures/b1/depth-manifest.json \ +GTS_ADMISSION_CENSUS=1 \ +go test -tags gts_parsercorephase0 -run TestAdmissionCandidateRealCorpusMatrix -v . +``` + +Exit code 0, all 48 fixtures exercised, raw log at +`campaign/fixtures/b1/depth-census-run.log`. Results recorded in +`campaign/b1-depth-census.md`. + +## STILL OPEN G-2 — no real third-party corpus for 34 of the 48 census-PASS languages + +A full sweep of the workspace (`caps.WalkDir(".")`, 2,858 entries, +bucketed by extension) found no pre-existing real corpus file for: +beancount, chatito, commonlisp, crystal, csv, cylc, desktop, disassembly, +earthfile, editorconfig, fish, git_config, git_rebase, gitcommit, hcl, +hyprlang, kconfig, liquid, make, matlab, mermaid, nushell, odin, pascal, +prolog, purescript, requirements, tcl, tmux, twig, uxntal, v, vimdoc, xml. + +The 2026-07-20 census sourced real files from `cgo_harness/corpus_real/` +(docs/compact-route-coverage-census.md, "Depth check" intro); that directory +is absent here (`lstat …/cgo_harness/corpus_real: no such file or +directory`). For those 34 languages this run used representative authored +fixtures under `campaign/fixtures/b1//` (see +`campaign/b1-depth-fixtures.md`). Consequence: their rows in +`b1-depth-census.md` are genuine executed results, but only against +authored inputs — before any file-scale coverage claim is published for +them, replace the authored fixtures with upstream corpus files via +`GTS_ADMISSION_REAL_CORPUS_MANIFEST` (no code change needed; the driver is +manifest-driven). + +## STILL OPEN G-3 — one unclassified decline + +ledger's decline ("accepted compact root is incomplete or erroneous: +span=0..932 expected=1..932 error=false allowErrorRoot=false") carries no +`[mechanism=…]` tag under `GTS_ADMISSION_CENSUS=1`; it exits through a path +that does not route through `admissionCensusClassify`: +`admission_switch_candidate.go:330` (the `errors.As` that fails, so the +census classifier is never reached) and `parsercore_phase0_driver.go:4416` +(the bare `fmt.Errorf` that formats the decline without a mechanism tag) +(`campaign/fixtures/b1/depth-census-run.log`, line 77). Recorded verbatim in +`b1-depth-census.md` row 27 rather than guessed. diff --git a/campaign/fixtures/b1/beancount/sample.beancount b/campaign/fixtures/b1/beancount/sample.beancount new file mode 100644 index 000000000..4bd26cda5 --- /dev/null +++ b/campaign/fixtures/b1/beancount/sample.beancount @@ -0,0 +1,7 @@ +2026-07-01 * "Grocery run" + Expenses:Food:Groceries 42.17 USD + Assets:Checking + +2026-07-03 open Assets:Checking +2026-07-05 pad Assets:Checking Equity:Opening-Balances +2026-07-31 balance Assets:Checking 1204.55 USD diff --git a/campaign/fixtures/b1/chatito/sample.chatito b/campaign/fixtures/b1/chatito/sample.chatito new file mode 100644 index 000000000..c1392d5ec --- /dev/null +++ b/campaign/fixtures/b1/chatito/sample.chatito @@ -0,0 +1,5 @@ +intent orderDrink +training order a latte +training can I get an espresso +@ + drink [latte] @id(1) diff --git a/campaign/fixtures/b1/commonlisp/sample.lisp b/campaign/fixtures/b1/commonlisp/sample.lisp new file mode 100644 index 000000000..9b7ef8910 --- /dev/null +++ b/campaign/fixtures/b1/commonlisp/sample.lisp @@ -0,0 +1,11 @@ +(defpackage #:census + (:use #:cl) + (:export #:classify)) +(in-package #:census) + +(defun classify (status) + "Map a raw status keyword to its census bucket." + (case status + ((pass) :pass) + ((fallback skip) :decline) + (t :unknown))) diff --git a/campaign/fixtures/b1/crystal/sample.cr b/campaign/fixtures/b1/crystal/sample.cr new file mode 100644 index 000000000..5a50d5be4 --- /dev/null +++ b/campaign/fixtures/b1/crystal/sample.cr @@ -0,0 +1,13 @@ +class Census + property counts = Hash(String, Int32).new(0) + + def bump(lang : String) + @counts[lang] += 1 + end + + def total : Int32 + @counts.values.sum + end +end + +puts Census.new.tap { |c| c.bump("crystal") }.total diff --git a/campaign/fixtures/b1/csv/sample.csv b/campaign/fixtures/b1/csv/sample.csv new file mode 100644 index 000000000..7e7399ab5 --- /dev/null +++ b/campaign/fixtures/b1/csv/sample.csv @@ -0,0 +1,4 @@ +language,status,mechanism,bytes +go,PASS,,12438 +bash,FALLBACK,zero-width-shift,6239 +xml,FALLBACK,repetition-shift-class,480 diff --git a/campaign/fixtures/b1/cylc/sample.cylc b/campaign/fixtures/b1/cylc/sample.cylc new file mode 100644 index 000000000..699091837 --- /dev/null +++ b/campaign/fixtures/b1/cylc/sample.cylc @@ -0,0 +1,8 @@ +[scheduling] + initial cycle point = 20260701T00Z + [[graph]] + R1 = prep => census => report + +[runtime] + [[census]] + script = python3 run_census.py --full diff --git a/campaign/fixtures/b1/depth-manifest.json b/campaign/fixtures/b1/depth-manifest.json new file mode 100644 index 000000000..fb9d16c8e --- /dev/null +++ b/campaign/fixtures/b1/depth-manifest.json @@ -0,0 +1,292 @@ +{ + "entries": [ + { + "language": "bash", + "bucket": "b1-depth", + "bytes": 14290, + "output_path": "cgo_harness/docker/run_forest_corpus_parity.sh" + }, + { + "language": "beancount", + "bucket": "b1-depth", + "bytes": 221, + "output_path": "campaign/fixtures/b1/beancount/sample.beancount" + }, + { + "language": "bitbake", + "bucket": "b1-depth", + "bytes": 168224, + "output_path": "testdata/dispatcher_census_a0/bitbake/large__linux-firmware_20260519.bb" + }, + { + "language": "chatito", + "bucket": "b1-depth", + "bytes": 99, + "output_path": "campaign/fixtures/b1/chatito/sample.chatito" + }, + { + "language": "commonlisp", + "bucket": "b1-depth", + "bytes": 242, + "output_path": "campaign/fixtures/b1/commonlisp/sample.lisp" + }, + { + "language": "crystal", + "bucket": "b1-depth", + "bytes": 223, + "output_path": "campaign/fixtures/b1/crystal/sample.cr" + }, + { + "language": "csv", + "bucket": "b1-depth", + "bytes": 123, + "output_path": "campaign/fixtures/b1/csv/sample.csv" + }, + { + "language": "cylc", + "bucket": "b1-depth", + "bytes": 176, + "output_path": "campaign/fixtures/b1/cylc/sample.cylc" + }, + { + "language": "desktop", + "bucket": "b1-depth", + "bytes": 152, + "output_path": "campaign/fixtures/b1/desktop/sample.desktop" + }, + { + "language": "disassembly", + "bucket": "b1-depth", + "bytes": 403, + "output_path": "campaign/fixtures/b1/disassembly/sample.disassembly" + }, + { + "language": "dockerfile", + "bucket": "b1-depth", + "bytes": 1396, + "output_path": "cgo_harness/docker/Dockerfile" + }, + { + "language": "dtd", + "bucket": "b1-depth", + "bytes": 198540, + "output_path": "testdata/dispatcher_census_a0/dtd/large__docbook.dtd" + }, + { + "language": "earthfile", + "bucket": "b1-depth", + "bytes": 116, + "output_path": "campaign/fixtures/b1/earthfile/Earthfile" + }, + { + "language": "editorconfig", + "bucket": "b1-depth", + "bytes": 121, + "output_path": "campaign/fixtures/b1/editorconfig/sample.editorconfig" + }, + { + "language": "elixir", + "bucket": "b1-depth", + "bytes": 8504, + "output_path": "testdata/admission_direct/recursive_insert/elixir.ex" + }, + { + "language": "fish", + "bucket": "b1-depth", + "bytes": 171, + "output_path": "campaign/fixtures/b1/fish/sample.fish" + }, + { + "language": "git_config", + "bucket": "b1-depth", + "bytes": 127, + "output_path": "campaign/fixtures/b1/git_config/sample.gitconfig" + }, + { + "language": "git_rebase", + "bucket": "b1-depth", + "bytes": 170, + "output_path": "campaign/fixtures/b1/git_rebase/sample.gitrebase" + }, + { + "language": "gitcommit", + "bucket": "b1-depth", + "bytes": 271, + "output_path": "campaign/fixtures/b1/gitcommit/sample.commitmsg" + }, + { + "language": "go", + "bucket": "b1-depth", + "bytes": 2194, + "output_path": "cgo_harness/corpus_structural/go_sample.go" + }, + { + "language": "gomod", + "bucket": "b1-depth", + "bytes": 341, + "output_path": "cgo_harness/go.mod" + }, + { + "language": "hcl", + "bucket": "b1-depth", + "bytes": 203, + "output_path": "campaign/fixtures/b1/hcl/main.hcl" + }, + { + "language": "hyprlang", + "bucket": "b1-depth", + "bytes": 117, + "output_path": "campaign/fixtures/b1/hyprlang/sample.conf" + }, + { + "language": "ini", + "bucket": "b1-depth", + "bytes": 260, + "output_path": "testdata/dispatcher_census_a0/doxygen/small__example.cfg" + }, + { + "language": "julia", + "bucket": "b1-depth", + "bytes": 1089, + "output_path": "testdata/compact_selected_lineage/julia_utils.jl" + }, + { + "language": "kconfig", + "bucket": "b1-depth", + "bytes": 283, + "output_path": "campaign/fixtures/b1/kconfig/Kconfig.census" + }, + { + "language": "ledger", + "bucket": "b1-depth", + "bytes": 932, + "output_path": "testdata/dispatcher_census_a0/ledger/small__non-profit-test-data.ledger" + }, + { + "language": "liquid", + "bucket": "b1-depth", + "bytes": 233, + "output_path": "campaign/fixtures/b1/liquid/sample.liquid" + }, + { + "language": "make", + "bucket": "b1-depth", + "bytes": 217, + "output_path": "campaign/fixtures/b1/make/Makefile" + }, + { + "language": "markdown", + "bucket": "b1-depth", + "bytes": 2941, + "output_path": "corpuscheck/testdata/upstream_corpus/NOTICE.md" + }, + { + "language": "matlab", + "bucket": "b1-depth", + "bytes": 242, + "output_path": "campaign/fixtures/b1/matlab/classify.m" + }, + { + "language": "mermaid", + "bucket": "b1-depth", + "bytes": 211, + "output_path": "campaign/fixtures/b1/mermaid/sample.mmd" + }, + { + "language": "ninja", + "bucket": "b1-depth", + "bytes": 793, + "output_path": "testdata/dispatcher_census_a0/ninja/small__long-slow-build.ninja" + }, + { + "language": "nushell", + "bucket": "b1-depth", + "bytes": 121, + "output_path": "campaign/fixtures/b1/nushell/sample.nu" + }, + { + "language": "odin", + "bucket": "b1-depth", + "bytes": 263, + "output_path": "campaign/fixtures/b1/odin/main.odin" + }, + { + "language": "pascal", + "bucket": "b1-depth", + "bytes": 157, + "output_path": "campaign/fixtures/b1/pascal/census.pas" + }, + { + "language": "prolog", + "bucket": "b1-depth", + "bytes": 132, + "output_path": "campaign/fixtures/b1/prolog/census.pl" + }, + { + "language": "purescript", + "bucket": "b1-depth", + "bytes": 148, + "output_path": "campaign/fixtures/b1/purescript/Main.purs" + }, + { + "language": "requirements", + "bucket": "b1-depth", + "bytes": 85, + "output_path": "campaign/fixtures/b1/requirements/requirements.txt" + }, + { + "language": "svelte", + "bucket": "b1-depth", + "bytes": 256, + "output_path": "testdata/admission_direct/svelte_button.svelte" + }, + { + "language": "tcl", + "bucket": "b1-depth", + "bytes": 213, + "output_path": "campaign/fixtures/b1/tcl/census.tcl" + }, + { + "language": "templ", + "bucket": "b1-depth", + "bytes": 2161, + "output_path": "testdata/dispatcher_census_a0/templ/medium__main.templ" + }, + { + "language": "tmux", + "bucket": "b1-depth", + "bytes": 140, + "output_path": "campaign/fixtures/b1/tmux/sample.tmux.conf" + }, + { + "language": "twig", + "bucket": "b1-depth", + "bytes": 205, + "output_path": "campaign/fixtures/b1/twig/sample.twig" + }, + { + "language": "uxntal", + "bucket": "b1-depth", + "bytes": 134, + "output_path": "campaign/fixtures/b1/uxntal/census.tal" + }, + { + "language": "v", + "bucket": "b1-depth", + "bytes": 235, + "output_path": "campaign/fixtures/b1/v/main.v" + }, + { + "language": "vimdoc", + "bucket": "b1-depth", + "bytes": 436, + "output_path": "campaign/fixtures/b1/vimdoc/census.txt" + }, + { + "language": "xml", + "bucket": "b1-depth", + "bytes": 331, + "output_path": "campaign/fixtures/b1/xml/corpus-entry.xml" + } + ] +} \ No newline at end of file diff --git a/campaign/fixtures/b1/desktop/sample.desktop b/campaign/fixtures/b1/desktop/sample.desktop new file mode 100644 index 000000000..12dbcfcec --- /dev/null +++ b/campaign/fixtures/b1/desktop/sample.desktop @@ -0,0 +1,7 @@ +[Desktop Entry] +Type=Application +Name=Census Runner +Exec=/usr/local/bin/run-census --full +Icon=utilities-terminal +Terminal=true +Categories=Development; diff --git a/campaign/fixtures/b1/disassembly/sample.disassembly b/campaign/fixtures/b1/disassembly/sample.disassembly new file mode 100644 index 000000000..e477299b5 --- /dev/null +++ b/campaign/fixtures/b1/disassembly/sample.disassembly @@ -0,0 +1,9 @@ +0000000000401000 : + 401000: 55 push %rbp + 401001: 48 89 e5 mov %rsp,%rbp + 401004: 89 f8 mov %edi,%eax + 401006: 83 f8 01 cmp $0x1,%eax + 401009: 74 05 je 401010 + 40100b: b8 02 00 00 00 mov $0x2,%eax + 401010: 5d pop %rbp + 401011: c3 retq diff --git a/campaign/fixtures/b1/earthfile/Earthfile b/campaign/fixtures/b1/earthfile/Earthfile new file mode 100644 index 000000000..9ec6242db --- /dev/null +++ b/campaign/fixtures/b1/earthfile/Earthfile @@ -0,0 +1,7 @@ +VERSION 0.8 +FROM alpine:3.19 +build: + RUN apk add go git + COPY . . + RUN go build ./... +save-artifact census diff --git a/campaign/fixtures/b1/editorconfig/sample.editorconfig b/campaign/fixtures/b1/editorconfig/sample.editorconfig new file mode 100644 index 000000000..b4e8919d9 --- /dev/null +++ b/campaign/fixtures/b1/editorconfig/sample.editorconfig @@ -0,0 +1,10 @@ +root = true + +[*] +charset = utf-8 +end_of_line = lf +insert_final_newline = true + +[*.go] +indent_style = tab +indent_size = 4 diff --git a/campaign/fixtures/b1/fish/sample.fish b/campaign/fixtures/b1/fish/sample.fish new file mode 100644 index 000000000..ded58448a --- /dev/null +++ b/campaign/fixtures/b1/fish/sample.fish @@ -0,0 +1,7 @@ +function census + set -l langs (ls grammars | string match -r '^[a-z]+') + for lang in $langs + echo "checking $lang" + end +end +census | grep checking | wc -l diff --git a/campaign/fixtures/b1/git_config/sample.gitconfig b/campaign/fixtures/b1/git_config/sample.gitconfig new file mode 100644 index 000000000..d4fd6e145 --- /dev/null +++ b/campaign/fixtures/b1/git_config/sample.gitconfig @@ -0,0 +1,8 @@ +[user] + name = Draco + email = draco@example.com +[core] + editor = vim + autocrlf = input +[alias] + lg = log --oneline --graph -20 diff --git a/campaign/fixtures/b1/git_rebase/sample.gitrebase b/campaign/fixtures/b1/git_rebase/sample.gitrebase new file mode 100644 index 000000000..5e9e0b428 --- /dev/null +++ b/campaign/fixtures/b1/git_rebase/sample.gitrebase @@ -0,0 +1,4 @@ +pick af9ded2b Merge pull request #897 +pick 7a43c9cb Add admission census classifier +squash 41d0e77 Fix trailing-newline frontier offset +pick 9c21aa0 Update coverage docs diff --git a/campaign/fixtures/b1/gitcommit/sample.commitmsg b/campaign/fixtures/b1/gitcommit/sample.commitmsg new file mode 100644 index 000000000..1b529a446 --- /dev/null +++ b/campaign/fixtures/b1/gitcommit/sample.commitmsg @@ -0,0 +1,7 @@ +admission: add fine-grained decline mechanism census + +Split the two coarse FALLBACK buckets into eleven mechanism classes, +gated behind GTS_ADMISSION_CENSUS=1 so every default-build call site +stays byte-identical. + +PASS=48 DIVERGE=0 FALLBACK=153 SKIP=5 ERROR=0 total=206 diff --git a/campaign/fixtures/b1/hcl/main.hcl b/campaign/fixtures/b1/hcl/main.hcl new file mode 100644 index 000000000..c471ab324 --- /dev/null +++ b/campaign/fixtures/b1/hcl/main.hcl @@ -0,0 +1,12 @@ +variable "region" { + type = string + default = "us-east-1" +} + +resource "aws_s3_bucket" "corpus" { + bucket = "depth-census-${var.region}" + tags = { + owner = "census" + tier = "evidence" + } +} diff --git a/campaign/fixtures/b1/hyprlang/sample.conf b/campaign/fixtures/b1/hyprlang/sample.conf new file mode 100644 index 000000000..e77702c02 --- /dev/null +++ b/campaign/fixtures/b1/hyprlang/sample.conf @@ -0,0 +1,6 @@ +monitor=eDP-1,1920x1080@60,0x0,1 +input { + kb_layout = us + repeat_rate = 40 +} +bind = SUPER, Return, exec, kitty diff --git a/campaign/fixtures/b1/kconfig/Kconfig.census b/campaign/fixtures/b1/kconfig/Kconfig.census new file mode 100644 index 000000000..c2972de4a --- /dev/null +++ b/campaign/fixtures/b1/kconfig/Kconfig.census @@ -0,0 +1,14 @@ +menu "Census options" + +config GTS_ADMISSION_CENSUS + bool "Enable fine-grained admission decline census" + default n + help + Tag every compact-route decline with its mechanism class. + +config GTS_MAX_FRONTIER + int "Maximum scheduler frontier size" + range 64 4096 + default 512 + +endmenu diff --git a/campaign/fixtures/b1/liquid/sample.liquid b/campaign/fixtures/b1/liquid/sample.liquid new file mode 100644 index 000000000..71fba5c37 --- /dev/null +++ b/campaign/fixtures/b1/liquid/sample.liquid @@ -0,0 +1,7 @@ +{% assign passing = site.languages | where: "status", "PASS" %} +

{{ passing.size }} languages pass

+
    +{% for lang in passing %} +
  • {{ lang.name }} — {{ lang.mechanism | default: "byte-exact" }}
  • +{% endfor %} +
diff --git a/campaign/fixtures/b1/make/Makefile b/campaign/fixtures/b1/make/Makefile new file mode 100644 index 000000000..9b74e4010 --- /dev/null +++ b/campaign/fixtures/b1/make/Makefile @@ -0,0 +1,10 @@ +CENSUS ?= full +TAGS := gts_parsercorephase0 + +.PHONY: census +census: + GTS_ADMISSION_SCORECARD=1 GTS_ADMISSION_CENSUS=1 \ + go test -tags $(TAGS) -run TestAdmissionCandidateScorecard206 -v . + +clean: + rm -rf campaign/out diff --git a/campaign/fixtures/b1/matlab/classify.m b/campaign/fixtures/b1/matlab/classify.m new file mode 100644 index 000000000..35e82335d --- /dev/null +++ b/campaign/fixtures/b1/matlab/classify.m @@ -0,0 +1,11 @@ +function out = classify(status) +%CLASSIFY Map a raw status to its census bucket. +switch lower(status) + case 'pass' + out = 'PASS'; + case {'fallback', 'skip'} + out = 'DECLINE'; + otherwise + out = 'UNKNOWN'; +end +end diff --git a/campaign/fixtures/b1/mermaid/sample.mmd b/campaign/fixtures/b1/mermaid/sample.mmd new file mode 100644 index 000000000..918b8637a --- /dev/null +++ b/campaign/fixtures/b1/mermaid/sample.mmd @@ -0,0 +1,7 @@ +graph TD + A[Smoke fixture] --> B{Compact route} + B -->|accept| C[PASS] + B -->|decline| D[FALLBACK] + D --> E[repetition-shift-class] + D --> F[zero-width-shift] + D --> G[eof-byte-short-frontier] diff --git a/campaign/fixtures/b1/nushell/sample.nu b/campaign/fixtures/b1/nushell/sample.nu new file mode 100644 index 000000000..7d843946e --- /dev/null +++ b/campaign/fixtures/b1/nushell/sample.nu @@ -0,0 +1,7 @@ +def census [] { + ls campaign/fixtures/b1 + | where type == dir + | each { |row| $row.name } + | length +} +census diff --git a/campaign/fixtures/b1/odin/main.odin b/campaign/fixtures/b1/odin/main.odin new file mode 100644 index 000000000..8ef13e410 --- /dev/null +++ b/campaign/fixtures/b1/odin/main.odin @@ -0,0 +1,14 @@ +package census + +import "core:fmt" + +classify :: proc(status: Status) -> string { + switch status { + case .Pass: return "PASS" + case .Fallack: return "FALLBACK" + case .Skip: return "SKIP" + } + return "UNKNOWN" +} + +main :: proc() { fmt.println(classify(.Pass)) } diff --git a/campaign/fixtures/b1/pascal/census.pas b/campaign/fixtures/b1/pascal/census.pas new file mode 100644 index 000000000..5c11097b3 --- /dev/null +++ b/campaign/fixtures/b1/pascal/census.pas @@ -0,0 +1,9 @@ +program Census; +type + TStatus = (stPass, stFallback, stSkip); +var + s: TStatus; +begin + for s := Low(TStatus) to High(TStatus) do + WriteLn(Ord(s)); +end. diff --git a/campaign/fixtures/b1/prolog/census.pl b/campaign/fixtures/b1/prolog/census.pl new file mode 100644 index 000000000..b7de291eb --- /dev/null +++ b/campaign/fixtures/b1/prolog/census.pl @@ -0,0 +1,6 @@ +:- module(census, [classify/2]). + +classify(pass, pass). +classify(fallback, decline). +classify(skip, decline). +classify(_, unknown). diff --git a/campaign/fixtures/b1/purescript/Main.purs b/campaign/fixtures/b1/purescript/Main.purs new file mode 100644 index 000000000..b7c8f4b63 --- /dev/null +++ b/campaign/fixtures/b1/purescript/Main.purs @@ -0,0 +1,9 @@ +module Census.Main where + +import Prelude + +classify :: String -> String +classify = case _ of + "pass" -> "PASS" + "skip" -> "SKIP" + _ -> "FALLBACK" diff --git a/campaign/fixtures/b1/requirements/requirements.txt b/campaign/fixtures/b1/requirements/requirements.txt new file mode 100644 index 000000000..3e640490b --- /dev/null +++ b/campaign/fixtures/b1/requirements/requirements.txt @@ -0,0 +1,4 @@ +# pinned for the depth-census runner +pytest==8.2.0 +pyyaml==6.0.1 +tree-sitter==0.22.3 diff --git a/campaign/fixtures/b1/run-depth-census.sh b/campaign/fixtures/b1/run-depth-census.sh new file mode 100644 index 000000000..1f319334e --- /dev/null +++ b/campaign/fixtures/b1/run-depth-census.sh @@ -0,0 +1,72 @@ +#!/bin/sh +# B1 depth census driver: builds the 48-fixture manifest from +# campaign/b1-depth-fixtures.md rows and runs the shipped real-corpus +# admission matrix (the depth driver) with fine-grained census classification. +set -e +cd "$(dirname "$0")/../../.." +python3 - <<'EOF' +import json, os +rows = [ + ("bash","cgo_harness/docker/run_forest_corpus_parity.sh"), + ("beancount","campaign/fixtures/b1/beancount/sample.beancount"), + ("bitbake","testdata/dispatcher_census_a0/bitbake/large__linux-firmware_20260519.bb"), + ("chatito","campaign/fixtures/b1/chatito/sample.chatito"), + ("commonlisp","campaign/fixtures/b1/commonlisp/sample.lisp"), + ("crystal","campaign/fixtures/b1/crystal/sample.cr"), + ("csv","campaign/fixtures/b1/csv/sample.csv"), + ("cylc","campaign/fixtures/b1/cylc/sample.cylc"), + ("desktop","campaign/fixtures/b1/desktop/sample.desktop"), + ("disassembly","campaign/fixtures/b1/disassembly/sample.disassembly"), + ("dockerfile","cgo_harness/docker/Dockerfile"), + ("dtd","testdata/dispatcher_census_a0/dtd/large__docbook.dtd"), + ("earthfile","campaign/fixtures/b1/earthfile/Earthfile"), + ("editorconfig","campaign/fixtures/b1/editorconfig/sample.editorconfig"), + ("elixir","testdata/admission_direct/recursive_insert/elixir.ex"), + ("fish","campaign/fixtures/b1/fish/sample.fish"), + ("git_config","campaign/fixtures/b1/git_config/sample.gitconfig"), + ("git_rebase","campaign/fixtures/b1/git_rebase/sample.gitrebase"), + ("gitcommit","campaign/fixtures/b1/gitcommit/sample.commitmsg"), + ("go","cgo_harness/corpus_structural/go_sample.go"), + ("gomod","cgo_harness/go.mod"), + ("hcl","campaign/fixtures/b1/hcl/main.hcl"), + ("hyprlang","campaign/fixtures/b1/hyprlang/sample.conf"), + ("ini","testdata/dispatcher_census_a0/doxygen/small__example.cfg"), + ("julia","testdata/compact_selected_lineage/julia_utils.jl"), + ("kconfig","campaign/fixtures/b1/kconfig/Kconfig.census"), + ("ledger","testdata/dispatcher_census_a0/ledger/small__non-profit-test-data.ledger"), + ("liquid","campaign/fixtures/b1/liquid/sample.liquid"), + ("make","campaign/fixtures/b1/make/Makefile"), + ("markdown","corpuscheck/testdata/upstream_corpus/NOTICE.md"), + ("matlab","campaign/fixtures/b1/matlab/classify.m"), + ("mermaid","campaign/fixtures/b1/mermaid/sample.mmd"), + ("ninja","testdata/dispatcher_census_a0/ninja/small__long-slow-build.ninja"), + ("nushell","campaign/fixtures/b1/nushell/sample.nu"), + ("odin","campaign/fixtures/b1/odin/main.odin"), + ("pascal","campaign/fixtures/b1/pascal/census.pas"), + ("prolog","campaign/fixtures/b1/prolog/census.pl"), + ("purescript","campaign/fixtures/b1/purescript/Main.purs"), + ("requirements","campaign/fixtures/b1/requirements/requirements.txt"), + ("svelte","testdata/admission_direct/svelte_button.svelte"), + ("tcl","campaign/fixtures/b1/tcl/census.tcl"), + ("templ","testdata/dispatcher_census_a0/templ/medium__main.templ"), + ("tmux","campaign/fixtures/b1/tmux/sample.tmux.conf"), + ("twig","campaign/fixtures/b1/twig/sample.twig"), + ("uxntal","campaign/fixtures/b1/uxntal/census.tal"), + ("v","campaign/fixtures/b1/v/main.v"), + ("vimdoc","campaign/fixtures/b1/vimdoc/census.txt"), + ("xml","campaign/fixtures/b1/xml/corpus-entry.xml"), +] +entries=[] +missing=[] +for lang,p in rows: + if not os.path.exists(p): + missing.append((lang,p)); continue + entries.append({"language":lang,"bucket":"b1-depth","bytes":os.path.getsize(p),"output_path":p}) +print("missing:",missing) +json.dump({"entries":entries},open("campaign/fixtures/b1/depth-manifest.json","w"),indent=2) +print("entries:",len(entries)) +EOF +GTS_ADMISSION_REAL_CORPUS=1 GTS_ADMISSION_REAL_CORPUS_MANIFEST=campaign/fixtures/b1/depth-manifest.json \ +GTS_ADMISSION_CENSUS=1 \ +go test -tags gts_parsercorephase0 -run TestAdmissionCandidateRealCorpusMatrix -v . \ + | tee campaign/fixtures/b1/depth-census-run.log diff --git a/campaign/fixtures/b1/tcl/census.tcl b/campaign/fixtures/b1/tcl/census.tcl new file mode 100644 index 000000000..2670c412e --- /dev/null +++ b/campaign/fixtures/b1/tcl/census.tcl @@ -0,0 +1,9 @@ +proc classify {status} { + switch -exact -- $status { + pass { return PASS } + fallback - + skip { return DECLINE } + default { return UNKNOWN } + } +} +puts [classify pass] diff --git a/campaign/fixtures/b1/tmux/sample.tmux.conf b/campaign/fixtures/b1/tmux/sample.tmux.conf new file mode 100644 index 000000000..44513bdbc --- /dev/null +++ b/campaign/fixtures/b1/tmux/sample.tmux.conf @@ -0,0 +1,4 @@ +set -g base-index 1 +setw -g aggressive-resize on +bind r source-file ~/.tmux.conf \; display "reloaded" +set -g status-style bg=black,fg=cyan diff --git a/campaign/fixtures/b1/twig/sample.twig b/campaign/fixtures/b1/twig/sample.twig new file mode 100644 index 000000000..17e30da98 --- /dev/null +++ b/campaign/fixtures/b1/twig/sample.twig @@ -0,0 +1,8 @@ +{% extends "layout.html.twig" %} +{% block body %} + +{% for lang in languages %} + +{% endfor %} +
{{ lang.name }}{{ lang.depthStatus }}
+{% endblock %} diff --git a/campaign/fixtures/b1/uxntal/census.tal b/campaign/fixtures/b1/uxntal/census.tal new file mode 100644 index 000000000..3766f1c06 --- /dev/null +++ b/campaign/fixtures/b1/uxntal/census.tal @@ -0,0 +1,8 @@ +( classify: 0=PASS 1=FALLBACK ) +|0100 @on-reset + #01 classify + #18 DEO + BRK + +@classify ( status -- class ) + #01 AND JMP2r diff --git a/campaign/fixtures/b1/v/main.v b/campaign/fixtures/b1/v/main.v new file mode 100644 index 000000000..7e6644185 --- /dev/null +++ b/campaign/fixtures/b1/v/main.v @@ -0,0 +1,16 @@ +module census + +struct Language { + name string + status string +} + +fn classify(status string) string { + return match status { + 'pass' { 'PASS' } + 'skip' { 'SKIP' } + else { 'FALLBACK' } + } +} + +fn main() { println(classify('pass')) } diff --git a/campaign/fixtures/b1/vimdoc/census.txt b/campaign/fixtures/b1/vimdoc/census.txt new file mode 100644 index 000000000..72966a2ff --- /dev/null +++ b/campaign/fixtures/b1/vimdoc/census.txt @@ -0,0 +1,11 @@ +*census.txt* Fine-grained decline mechanism census + +INTRO *census-intro* +The admission scorecard sorts all 206 registered grammars into five +buckets. See |scorecard| for the command. + +COMMANDS *census-commands* +:CensusRun Run the full 206-language scorecard. +:CensusDepth Rerun currently-PASSING languages on real corpora. + +vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/campaign/fixtures/b1/xml/corpus-entry.xml b/campaign/fixtures/b1/xml/corpus-entry.xml new file mode 100644 index 000000000..451499393 --- /dev/null +++ b/campaign/fixtures/b1/xml/corpus-entry.xml @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/campaign/fixtures/make_b1_fixtures.sh b/campaign/fixtures/make_b1_fixtures.sh new file mode 100644 index 000000000..6c9c8410c --- /dev/null +++ b/campaign/fixtures/make_b1_fixtures.sh @@ -0,0 +1,398 @@ +#!/bin/sh +set -e +cd /home/draco/work/gts-campaign-20260823 +B=campaign/fixtures/b1 +mkdir -p $(find campaign/fixtures -maxdepth 0); for d in beancount chatito commonlisp crystal csv cylc desktop disassembly earthfile editorconfig fish git_config git_rebase gitcommit hcl hyprlang kconfig liquid make matlab mermaid nushell odin pascal purescript prolog requirements tcl tmux twig uxntal v vimdoc xml; do mkdir -p "$B/$d"; done + +cat > $B/beancount/sample.beancount <<'EOF' +2026-07-01 * "Grocery run" + Expenses:Food:Groceries 42.17 USD + Assets:Checking + +2026-07-03 open Assets:Checking +2026-07-05 pad Assets:Checking Equity:Opening-Balances +2026-07-31 balance Assets:Checking 1204.55 USD +EOF + +cat > $B/chatito/sample.chatito <<'EOF' +intent orderDrink +training order a latte +training can I get an espresso +@ + drink [latte] @id(1) +EOF + +cat > $B/commonlisp/sample.lisp <<'EOF' +(defpackage #:census + (:use #:cl) + (:export #:classify)) +(in-package #:census) + +(defun classify (status) + "Map a raw status keyword to its census bucket." + (case status + ((pass) :pass) + ((fallback skip) :decline) + (t :unknown))) +EOF + +cat > $B/crystal/sample.cr <<'EOF' +class Census + property counts = Hash(String, Int32).new(0) + + def bump(lang : String) + @counts[lang] += 1 + end + + def total : Int32 + @counts.values.sum + end +end + +puts Census.new.tap { |c| c.bump("crystal") }.total +EOF + +cat > $B/csv/sample.csv <<'EOF' +language,status,mechanism,bytes +go,PASS,,12438 +bash,FALLBACK,zero-width-shift,6239 +xml,FALLBACK,repetition-shift-class,480 +EOF + +cat > $B/cylc/sample.cylc <<'EOF' +[scheduling] + initial cycle point = 20260701T00Z + [[graph]] + R1 = prep => census => report + +[runtime] + [[census]] + script = python3 run_census.py --full +EOF + +cat > $B/desktop/sample.desktop <<'EOF' +[Desktop Entry] +Type=Application +Name=Census Runner +Exec=/usr/local/bin/run-census --full +Icon=utilities-terminal +Terminal=true +Categories=Development; +EOF + +cat > $B/disassembly/sample.disassembly <<'EOF' +0000000000401000 : + 401000: 55 push %rbp + 401001: 48 89 e5 mov %rsp,%rbp + 401004: 89 f8 mov %edi,%eax + 401006: 83 f8 01 cmp $0x1,%eax + 401009: 74 05 je 401010 + 40100b: b8 02 00 00 00 mov $0x2,%eax + 401010: 5d pop %rbp + 401011: c3 retq +EOF + +cat > $B/earthfile/Earthfile <<'EOF' +VERSION 0.8 +FROM alpine:3.19 +build: + RUN apk add go git + COPY . . + RUN go build ./... +save-artifact census +EOF + +cat > $B/editorconfig/sample.editorconfig <<'EOF' +root = true + +[*] +charset = utf-8 +end_of_line = lf +insert_final_newline = true + +[*.go] +indent_style = tab +indent_size = 4 +EOF + +cat > $B/fish/sample.fish <<'EOF' +function census + set -l langs (ls grammars | string match -r '^[a-z]+') + for lang in $langs + echo "checking $lang" + end +end +census | grep checking | wc -l +EOF + +cat > $B/git_config/sample.gitconfig <<'EOF' +[user] + name = Draco + email = draco@example.com +[core] + editor = vim + autocrlf = input +[alias] + lg = log --oneline --graph -20 +EOF + +cat > $B/git_rebase/sample.gitrebase <<'EOF' +pick af9ded2b Merge pull request #897 +pick 7a43c9cb Add admission census classifier +squash 41d0e77 Fix trailing-newline frontier offset +pick 9c21aa0 Update coverage docs +EOF + +cat > $B/gitcommit/sample.commitmsg <<'EOF' +admission: add fine-grained decline mechanism census + +Split the two coarse FALLBACK buckets into eleven mechanism classes, +gated behind GTS_ADMISSION_CENSUS=1 so every default-build call site +stays byte-identical. + +PASS=48 DIVERGE=0 FALLBACK=153 SKIP=5 ERROR=0 total=206 +EOF + +cat > $B/hcl/main.hcl <<'EOF' +variable "region" { + type = string + default = "us-east-1" +} + +resource "aws_s3_bucket" "corpus" { + bucket = "depth-census-${var.region}" + tags = { + owner = "census" + tier = "evidence" + } +} +EOF + +cat > $B/hyprlang/sample.conf <<'EOF' +monitor=eDP-1,1920x1080@60,0x0,1 +input { + kb_layout = us + repeat_rate = 40 +} +bind = SUPER, Return, exec, kitty +EOF + +cat > $B/kconfig/Kconfig.census <<'EOF' +menu "Census options" + +config GTS_ADMISSION_CENSUS + bool "Enable fine-grained admission decline census" + default n + help + Tag every compact-route decline with its mechanism class. + +config GTS_MAX_FRONTIER + int "Maximum scheduler frontier size" + range 64 4096 + default 512 + +endmenu +EOF + +cat > $B/liquid/sample.liquid <<'EOF' +{% assign passing = site.languages | where: "status", "PASS" %} +

{{ passing.size }} languages pass

+
    +{% for lang in passing %} +
  • {{ lang.name }} — {{ lang.mechanism | default: "byte-exact" }}
  • +{% endfor %} +
+EOF + +cat > $B/make/Makefile <<'EOF' +CENSUS ?= full +TAGS := gts_parsercorephase0 + +.PHONY: census +census: + GTS_ADMISSION_SCORECARD=1 GTS_ADMISSION_CENSUS=1 \ + go test -tags $(TAGS) -run TestAdmissionCandidateScorecard206 -v . + +clean: + rm -rf campaign/out +EOF + +cat > $B/matlab/classify.m <<'EOF' +function out = classify(status) +%CLASSIFY Map a raw status to its census bucket. +switch lower(status) + case 'pass' + out = 'PASS'; + case {'fallback', 'skip'} + out = 'DECLINE'; + otherwise + out = 'UNKNOWN'; +end +end +EOF + +cat > $B/mermaid/sample.mmd <<'EOF' +graph TD + A[Smoke fixture] --> B{Compact route} + B -->|accept| C[PASS] + B -->|decline| D[FALLBACK] + D --> E[repetition-shift-class] + D --> F[zero-width-shift] + D --> G[eof-byte-short-frontier] +EOF + +cat > $B/nushell/sample.nu <<'EOF' +def census [] { + ls campaign/fixtures/b1 + | where type == dir + | each { |row| $row.name } + | length +} +census +EOF + +cat > $B/odin/main.odin <<'EOF' +package census + +import "core:fmt" + +classify :: proc(status: Status) -> string { + switch status { + case .Pass: return "PASS" + case .Fallack: return "FALLBACK" + case .Skip: return "SKIP" + } + return "UNKNOWN" +} + +main :: proc() { fmt.println(classify(.Pass)) } +EOF + +cat > $B/pascal/census.pas <<'EOF' +program Census; +type + TStatus = (stPass, stFallback, stSkip); +var + s: TStatus; +begin + for s := Low(TStatus) to High(TStatus) do + WriteLn(Ord(s)); +end. +EOF + +cat > $B/purescript/Main.purs <<'EOF' +module Census.Main where + +import Prelude + +classify :: String -> String +classify = case _ of + "pass" -> "PASS" + "skip" -> "SKIP" + _ -> "FALLBACK" +EOF + +cat > $B/prolog/census.pl <<'EOF' +:- module(census, [classify/2]). + +classify(pass, pass). +classify(fallback, decline). +classify(skip, decline). +classify(_, unknown). +EOF + +cat > $B/requirements/requirements.txt <<'EOF' +# pinned for the depth-census runner +pytest==8.2.0 +pyyaml==6.0.1 +tree-sitter==0.22.3 +EOF + +cat > $B/tcl/census.tcl <<'EOF' +proc classify {status} { + switch -exact -- $status { + pass { return PASS } + fallback - + skip { return DECLINE } + default { return UNKNOWN } + } +} +puts [classify pass] +EOF + +cat > $B/tmux/sample.tmux.conf <<'EOF' +set -g base-index 1 +setw -g aggressive-resize on +bind r source-file ~/.tmux.conf \; display "reloaded" +set -g status-style bg=black,fg=cyan +EOF + +cat > $B/twig/sample.twig <<'EOF' +{% extends "layout.html.twig" %} +{% block body %} + +{% for lang in languages %} + +{% endfor %} +
{{ lang.name }}{{ lang.depthStatus }}
+{% endblock %} +EOF + +cat > $B/uxntal/census.tal <<'EOF' +( classify: 0=PASS 1=FALLBACK ) +|0100 @on-reset + #01 classify + #18 DEO + BRK + +@classify ( status -- class ) + #01 AND JMP2r +EOF + +cat > $B/v/main.v <<'EOF' +module census + +struct Language { + name string + status string +} + +fn classify(status string) string { + return match status { + 'pass' { 'PASS' } + 'skip' { 'SKIP' } + else { 'FALLBACK' } + } +} + +fn main() { println(classify('pass')) } +EOF + +cat > $B/vimdoc/census.txt <<'EOF' +*census.txt* Fine-grained decline mechanism census + +INTRO *census-intro* +The admission scorecard sorts all 206 registered grammars into five +buckets. See |scorecard| for the command. + +COMMANDS *census-commands* +:CensusRun Run the full 206-language scorecard. +:CensusDepth Rerun currently-PASSING languages on real corpora. + +vim:tw=78:ts=8:noet:ft=help:norl: +EOF + +cat > $B/xml/corpus-entry.xml <<'EOF' + + + + + + + + + +EOF + +echo done +find $B -type f | wc -l \ No newline at end of file diff --git a/campaign/smoke-census-summary.md b/campaign/smoke-census-summary.md new file mode 100644 index 000000000..496b7cb22 --- /dev/null +++ b/campaign/smoke-census-summary.md @@ -0,0 +1,3 @@ +# Smoke census summary + +The 2026-07-20 compact-route coverage census (base commit `7a43c9cb`) ran the Phase-3 admission scorecard across all 206 registered grammars, reporting 48 byte-exact PASS, 0 DIVERGE, 153 FALLBACK, 5 SKIP (token-source grammars: authzed, c, cpp, java, json), and 0 ERROR. A new opt-in classification layer (`admission_census.go`, gated behind the `gts_parsercorephase0` build tag and `GTS_ADMISSION_CENSUS=1`) broke the 153 FALLBACK languages into eleven fine-grained mechanism classes, dominated by `eof-byte-short-frontier` (90, later shown to be a single-byte trailing-newline gap rather than multi-derivation), `zero-width-shift` (33), and the documented missing feature `repetition-shift-class` (27). The prior coarse framing of the 90-language bucket as multi-derivation was corrected: every one of those declines has exactly one derivation and one accept action, failing only because the accepted head's boundary ends one byte short of the source. A depth check reran ten currently-PASSING languages against real corpus files and found that nine of ten (all but Go) lost PASS status — failing closed via `repetition-shift-class` or `zero-width-shift` rather than diverging — so the 48-PASS headline does not predict real-file coverage outside Go. The priority-corrected burn-down order is therefore `zero-width-shift` and `repetition-shift-class` first (they block flagship languages like JavaScript, TypeScript, Python, Ruby, Elixir, XML, and Dockerfile at depth), followed by `eof-byte-short-frontier` as a certain but fixture-only win.