Skip to content

docs(ast): document documentation extraction and complete release validation #1682

Open

Description

@dekobon

Objective

Complete the consumer guide and reconcile umbrella delivery with implementation and validation evidence.

Umbrella: #1654 · Planning ID: D27
Completion prerequisites: D24: #1681

Shared architecture and constraints

Follow the umbrella's shared contracts. AST recognition serves two consumers: exact legacy convention/coverage streaming for root LOC, and richer source documentation for owner lookup and local text. Source attachment, profile eligibility and physical metric ownership are separate. Preserve the current legacy candidate view before run selection, coverage ordering and metrics-only early exits, including existing logical-line precomputation where required.

Documentation fragments, logical documents and convention-qualified owner edges have separate identities. Source offsets refer to the actual parsed buffer and included ranges. The index is caller-owned, immutable and source-bound; lookup validates tree/index identity. Complete text means local decoded/cleaned content with forward source mapping, not inherited or generator-expanded documentation.

Implementation touchpoints

  • big-code-analysis-book/src/
  • big-code-analysis-ast/README.md
  • STABILITY.md
  • CHANGELOG.md
  • umbrella and sub-issue checklists

Implementation steps

  • Write the final guide against current API/profile/completeness behavior and current developer procedures, with accurately classified prerequisite resolutions.
  • Update the eventual guide from the refreshed architecture and actual implementation, referencing current role/traversal documentation and maintaining the exact source/legacy/text boundary.
  • Document direct AST use and stable root Ast examples with declaration lookup, raw fragments, complete local text, forward mappings and explicit unavailable outcomes.
  • Publish the full language/profile/form matrix, including conventional/inferred ownership, helper capabilities and genuine grammar/prelexing limitations.
  • Explain parsed-buffer coordinates, included ranges, trusted context and caller-owned index identity; local content is not documentation-generator expansion.
  • Provide a small consumer example finding a custom annotation and translating its text range to source, including multi-fragment origin handling.
  • Reconcile re-export/stability/changelog updates already landed in originating API changes; do not defer those to this final issue.
  • Review every child completion criterion and link concrete evidence. Recheck related fix(loc): tool-vs-bca doc-comment attachment divergences left by #1613 #1646/fix(checker): exclude_tests attribute run stops at a comment #1647/refactor(ast): split doc_comment.rs into the binding walker and the text classifiers #1649 outcomes and actual baseline provenance.

Tests and edge cases

  • Examples distinguish empty docs from cancelled/incomplete parses, semantic owners from header spaces and unavailable text from raw fragments; every documentation link names a current path.
  • Runnable examples exercise source-aware row context, new docs unavailable/empty states and real multi-fragment maps; final evidence includes the actual language/corpus sets rather than aggregate pass counts alone.
  • Runnable consumer examples assert actual values and selected owner counts, not merely Ok results.
  • Raw versus decoded/cleaned, virtual/inferred/conditional, empty/metadata-only/unavailable examples match API behavior.
  • Final make worktree-setup and make pre-commit read through BCA_GATE verdict; isolated feature/member comparison, bench-scaling, applicable chain-audit, fuzz-check/replay.
  • Markdown lint, explicit fragment anchors in linked book headings and relevant documentation checks.
  • Baseline/snapshot changes follow project discipline; no unreviewed metric drift or stranded pending snapshots.

Use independently specified expected owners, fragment counts/order, byte ranges, text and availability. Pair them with separate legacy metric assertions where relevant. Do not sort/trim observed results, rely only on facade/delegate equality, or accept generated snapshots without an expected-value anchor. Use verbatim source for EOF/CRLF cases. Perturb the decision-bearing expression and confirm the intended assertion fails; use the maintained utils/perturb.py only on tracked, clean targets, recording or stashing real work first. Multi-target cargo runs require --no-fail-fast; include the mutated crate and dependent crates before claiming a unique guard. Keep irreproducible fixtures/manifests in tests, maintained utils or an issue attachment, following the “Temporary files” and “Evidence for a claim” rules in AGENTS.md.

Acceptance criteria

  • Consumer guide and all-language table match the actual API and tests.
  • All earlier issues are resolved and their validation evidence is linked.
  • Umbrella closes only when every source-language acceptance row and integration gate is satisfied.

Verification and completion evidence

  • Follow current docs/development/testing.md and docs/development/grammar_dispatch.md. Assert deterministic work counters exactly and measure both cached-state computations and slot searches where relevant.
  • Use the current pre-implementation base and grammar pins; completed fixes and documented retained limitations have different expected outcomes. Do not restore an obsolete baseline to make a migration pass.
  • Follow current role-census/role-coverage/role-bypass requirements and applicable role-parity-corpus checks. Preserve independent semantic fixtures; refresh .role-coverage-observed.txt when any sampled corpus gitlink changes.
  • Put revisions, exact commands, tool versions and durable input links beside parity/coverage claims; host-local evidence paths are not citations.
  • Recheck current source and the prerequisite contracts/baseline applicable to this issue; record intentional changes to the premises.
  • Run focused production-path tests and affected language siblings. Use package-isolated -p big-code-analysis-ast / -p big-code-analysis feature builds; workspace feature unification is not isolation.
  • Run the repository's required checks for the touched surfaces. For implementation changes: make worktree-setup, make pre-commit read from its BCA_GATE: verdict, and relevant test-language membership comparison. Add scaling and chain-audit checks for traversal changes; run make fuzz-check and seed replay for fuzz changes.
  • Record exact test/perturbation/probe evidence in a completion comment and update this body. Review unexpected metric drift before snapshot acceptance; follow baseline and integration-submodule discipline if behavior deliberately changes.
  • Land public API documentation, re-export/stability review and changelog entries with the originating API change. Keep unrelated CLI/web/Python surfaces outside this issue unless explicitly listed.

Current implementation notes (2026-11-17)

Revalidated against 91087f52f5d4a58e31ae320851351990f1436411. These notes replace the November 4 implementation notes; the earlier review is retained in this issue’s comment/edit history. Relevant work: PR #1824, PR #1835, PR #1844, PR #1855, PR #1877, PR #1884, PR #1909, PR #1935.

Activity

  1. added
    documentation
    on Oct 21, 2026
  2. dekobon commented on Nov 4, 2026

    @dekobon
    OwnerAuthor

    Plan refreshed against current main

    Updated this issue body after reviewing changes since #1654 was filed, through 07822c69211fe851c452ac6c0ebbd99cf92589a5. Relevant PRs: PR #1803, PR #1772, PR #1804.

    The original source-documentation scope remains. New tests and current integration touchpoints are in the body; acceptance checkboxes remain open. This is source/history analysis, not a claim that the feature or new validation has run.

  3. dekobon commented on Nov 18, 2026

    @dekobon
    OwnerAuthor

    Updated this issue body against 91087f52f5d4a58e31ae320851351990f1436411 after the November 4 review. Write the final guide against current API/profile/completeness behavior and current developer procedures, with accurately classified prerequisite resolutions.

    Added tests: Examples distinguish empty docs from cancelled/incomplete parses, semantic owners from header spaces and unavailable text from raw fragments; every documentation link names a current path.

    Evidence: PR #1824, PR #1835, PR #1844, PR #1855, PR #1877, PR #1884, PR #1909, PR #1935. The dated body section replaces stale implementation notes and records current source paths and prerequisite outcomes. Original extraction acceptance criteria and issue status remain open; this was source/history review, not an implementation or gate run.

  4. dekobon commented on Nov 26, 2026

    @dekobon
    OwnerAuthor

    Unit 1 integrated on feat/1654-documentation (799e655959262731aa57c44db221672100174e8b)

    • Commits merged:
      • 63d2d0c4: test(documentation): pin the book chapter examples and their defect manifest (#1682)
      • bad862de: docs(documentation): add the consumer guide and update language status tables (#1682)
      • b2019c85: test(documentation): fix perturbation manifest cwd and tighten prose wording (#1682)
    • Deliverables:
      • New mdBook chapter big-code-analysis-book/src/library/documentation.md and SUMMARY.md entry
      • Updated language support tables and prose in big-code-analysis-book/src/languages.md, README.md, and README.ja.md
      • Runnable integration test suite tests/api/book_documentation_examples.rs (8 tests)
      • Perturbation manifest utils/documentation-book-examples-perturb.json (6 cases, 6/6 caught, rc=101)
    • Verification:
      • make pre-commit: BCA_GATE: pass (gate=pre-commit) (8112 tests run: 8112 passed, 4 skipped)
      • anchor_check.py: manifests=43 cases=688 problems=0
      • Three-seat review (sol-review, fable-review, argon-review): unanimous VERDICT: APPROVE on b2019c85.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentation

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions