Extension-index completeness gate + fix stale extension table — P2.5#29
Conversation
The architecture.md "Extension Crates" table had silently gone incomplete — it listed 27 of 37 extensions (missing console, dock, encoding, image_tools, svelte, web_inspector, codesign, etcher), the same class of drift the old hardcoded EXTENSIONS array had. - src/extindex.rs: `ext-index` rule — every crates/ext_* extension must be listed in architecture.md's overview table. A completeness CHECK, not a generator: the Purpose column is authored prose and only 13/37 crates have a Cargo.toml description, so generating it would fabricate/degrade text. The check keeps the authored table from going silently incomplete. - architecture.md: add the 8 missing extensions with accurate authored Purpose labels (7 runtime in the main table, etcher in the Forge Tool table). - Unit tests: flags a missing extension, passes when all are listed. Baseline stays 0; site build verified (91 pages). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Sorry @LayerDynamics, you have reached your weekly rate limit of 500000 diff characters.
Please try again later or upgrade to continue using Sourcery
There was a problem hiding this comment.
Code Review
This pull request introduces a new completeness check (ext-index) to ensure all extension crates are listed in the architecture.md overview table, and updates the documentation to include several missing crates. Feedback suggests making the check more robust by verifying that the crate name is specifically listed within a markdown table row, preventing false negatives from prose mentions.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| // The table references each extension by its crate name in a code span, | ||
| // e.g. `| `ext_console` | … |`. Require that exact token to be present. | ||
| let needle = format!("`{}`", krate.dir_name); | ||
| if !page.contains(&needle) { | ||
| findings.push(Finding::new( | ||
| "ext-index", | ||
| format!( | ||
| "extension crate `{}` is not listed in {}'s extension overview table", | ||
| krate.dir_name, INDEX_PAGE | ||
| ), | ||
| )); | ||
| } |
There was a problem hiding this comment.
The current check only verifies if the backticked crate name (e.g., `ext_window`) is present anywhere in the document. However, some extension crates are also mentioned in prose (for example, ext_window is mentioned on line 60 of architecture.md). If such an extension were accidentally removed from the overview table, this check would still pass (a false negative).
To make this check robust, we should verify that the crate name is actually listed within a markdown table row (i.e., a line starting with |).
// The table references each extension by its crate name in a code span
// within a table row. To avoid false positives from prose mentions,
// we require a table row (starting with `|`) containing the backticked crate name.
let needle = format!("`{}`", krate.dir_name);
let in_table = page.lines().any(|line| {
let trimmed = line.trim();
trimmed.starts_with('|') && trimmed.contains(&needle)
});
if !in_table {
findings.push(Finding::new(
"ext-index",
format!(
"extension crate `{}` is not listed in {}'s extension overview table",
krate.dir_name, INDEX_PAGE
),
));
}
Phase 2.5. Stacked on #27 (uses the shared
markers/infra); retarget tomainonce #27 merges.The drift this caught
architecture.md's "Extension Crates" table had silently gone incomplete — 27 of 37 extensions listed, missingconsole,dock,encoding,image_tools,svelte,web_inspector,codesign,etcher(the same class as the old hardcodedEXTENSIONSarray).What
extindex.rs—ext-indexrule: everycrates/ext_*extension must appear in the architecture overview table. A completeness check, not a generator — thePurposecolumn is authored prose and only 13/37 crates carry aCargo.tomldescription, so generating it would fabricate or degrade text. (This is the honest form of "module-list generator" given the data: gen would lie, a check can't.)architecture.md— added the 8 missing extensions with accurate authored Purpose labels (7 runtime +etcherin the Forge Tool table).Baseline stays 0; full
forge-docs-checksuite +fmt+clippypass; site build verified (91 pages).🤖 Generated with Claude Code