Repository navigation
Description
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.mdSTABILITY.mdCHANGELOG.mdumbrella 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.mdanddocs/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.txtwhen 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-analysisfeature 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-commitread from itsBCA_GATE:verdict, and relevant test-language membership comparison. Add scaling and chain-audit checks for traversal changes; runmake fuzz-checkand 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.
- The procedure reference paths are now docs/development/{testing,grammar_dispatch,formatting,benchmarking}.md and AGENTS.md temporary/evidence guidance; the former .claude/rules paths are retired.
- Explain the current DocBodyResidual and source-aware role boundary, borrowed chain/caches and exact index completeness contract. Link roles/mod.rs instead of copying its evolving DSL.
- Completed/declined prerequisites must be described accurately: fix(checker): exclude_tests attribute run stops at a comment #1647/fix(metrics/loc): C family, Ruby, Elixir lose a bare
\row #1801/perf(npa/npm/ruby): class-body walk copies the ancestor chain per nested class #1805 fixed, fix(ast): exclude_tests reach keeps an item nested in an attribute value #1786 documented limitation, refactor(roles): emit a per-role profile so a recognition row carries no paying predicates #1792 profiles declined, refactor(roles): decide a Parameter row for the TS/TSX after_code DocTarget subset #1796 subset retained. Remaining fix(tcl): a\-continued comment parses its next row as code #1802/fix(metrics/loc): Python bare\row before a docstring has no node #1825/perf(loc): Python loc is quadratic in the comments opening a block when a bare \ row follows its docstring #1872/perf(parse): tree-sitter-python's scanner is quadratic in comment runs inside a block and in bare \ runs #1873/fix(ast): Node::parent on a deep zero-width node overflows the stack in tree-sitter #1941/perf(ast): export of a wide ERROR node over deep nesting is quadratic #1942 caveats are separate, not claims this epic already resolves. - Record the actual shipped version and pre-implementation base rather than fixed October or November 4 pins. Keep long evidence in durable linked records, and comments short enough for the host proxy.
Activity
dekobon commentedon Nov 4, 2026
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.\row #1801/fix(tcl): a\-continued comment parses its next row as code #1802/perf(npa/npm/ruby): class-body walk copies the ancestor chain per nested class #1805 remain individually tracked caveats to reconcile at closeout.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.
dekobon commentedon Nov 18, 2026
Updated this issue body against
91087f52f5d4a58e31ae320851351990f1436411after 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.
dekobon commentedon Nov 26, 2026
Unit 1 integrated on
feat/1654-documentation(799e655959262731aa57c44db221672100174e8b)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)big-code-analysis-book/src/library/documentation.mdandSUMMARY.mdentrybig-code-analysis-book/src/languages.md,README.md, andREADME.ja.mdtests/api/book_documentation_examples.rs(8 tests)utils/documentation-book-examples-perturb.json(6 cases,6/6 caught,rc=101)make pre-commit:BCA_GATE: pass (gate=pre-commit)(8112 tests run: 8112 passed, 4 skipped)anchor_check.py:manifests=43 cases=688 problems=0sol-review,fable-review,argon-review): unanimousVERDICT: APPROVEonb2019c85.docs: guide consumers through source documentation extraction (#1682)
docs(documentation): update extraction status sentences in developmen…
fix(docs): use repository-relative cwd in book-examples manifest and …
Merge branch 'feat/1654/1682-guide-unit1' into feat/1654-documentation (