Skip to content

Extension-index completeness gate + fix stale extension table — P2.5#29

Merged
LayerDynamics merged 3 commits into
mainfrom
docs-pipeline-p25-ext-index
Jun 7, 2026
Merged

Extension-index completeness gate + fix stale extension table — P2.5#29
LayerDynamics merged 3 commits into
mainfrom
docs-pipeline-p25-ext-index

Conversation

@LayerDynamics

Copy link
Copy Markdown
Owner

Phase 2.5. Stacked on #27 (uses the shared markers/infra); retarget to main once #27 merges.

The drift this caught

architecture.md's "Extension Crates" table had silently gone incomplete — 27 of 37 extensions listed, missing console, dock, encoding, image_tools, svelte, web_inspector, codesign, etcher (the same class as the old hardcoded EXTENSIONS array).

What

  • extindex.rsext-index rule: every crates/ext_* extension must appear in the architecture overview table. A completeness check, not a generator — the Purpose column is authored prose and only 13/37 crates carry a Cargo.toml description, 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 + etcher in the Forge Tool table).
  • Unit tests: flags a missing extension; passes when all are listed.

Baseline stays 0; full forge-docs-check suite + fmt + clippy pass; site build verified (91 pages).

🤖 Generated with Claude Code

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>

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry @LayerDynamics, you have reached your weekly rate limit of 500000 diff characters.

Please try again later or upgrade to continue using Sourcery

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines +28 to +39
// 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
),
));
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

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
                ),
            ));
        }

@LayerDynamics LayerDynamics changed the base branch from docs-pipeline-p4-example-blocks to main June 7, 2026 16:02
@LayerDynamics LayerDynamics merged commit 5ae4a6f into main Jun 7, 2026
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant