chore(scripts): add build_codegen_audit.sh -- Phase 9a baseline tool (refs #298)#299
Merged
Merged
Conversation
…(refs #298) Phase 9a baseline inventory tool for the workspace's build scripts, proc-macro crates, declarative macros, codegen binaries, and env-var consumption surface. Mirrors the pattern established by: - `scripts/dev/clone_alloc_audit.sh` (Phase 6a) - `scripts/dev/trait_generic_audit.sh` (Phase 7a) - `scripts/dev/feature_dep_audit.sh` (Phase 8a) Output (per recon at SHA `8a672bba7`): - 1 `build.rs` (`crates/uffs-cli/build.rs`, 108 LOC, MSVC-gated) - 0 proc-macro crates - 6 `macro_rules!` declarations (all `uffs-mft`, `pub(crate)`) - 4 workspace-internal codegen binaries (3 drift-detected via gates.toml, 1 release orchestrator) - 36 distinct env-var names consumed across workspace - 2 `include_*!` use sites (case-fold table in `uffs-text`) Modes: - default: rg-only, ~1 s (prod-globs filter; tests/benches/examples excluded) - `--with-cargo`: + cargo build --workspace --timings (~30 s warm) Companion plan: `docs/dev/architecture/code_clean/phase_9_build_scripts_macros_codegen_implementation_plan.md` (local-only, 276 LOC). Tracking issue: #298. Rule-1 adherence: zero `#[allow]` introductions. The script is a read-only inventory tool; emits markdown to stdout. Excludes test files via prod-globs (matching the Phase 6/7/8 audit-script pattern). Caveats documented inline: - env-var detection requires names \u2265 2 chars + filters comment-prefix lines (drops `X` false-positive from rustdoc prose). - macro_rules! parser captures name but does not classify per playbook \u00a71064 (syntax shaping / impl repetition / pattern capture); classification happens in Phase 9d.
This was referenced May 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Phase 9a baseline inventory tool for the workspace's build scripts, proc-macro crates, declarative macros, codegen binaries, and env-var consumption surface. Mirrors the pattern established by Phase 6a / 7a / 8a baseline scripts.
Companion to issue #298.
Output (per recon at SHA
8a672bba7)build.rsfilescrates/uffs-cli/build.rs, 108 LOC, MSVC-gated/DELAYLOAD+winresourcemacro_rules!declarationsuffs-mft, allpub(crate)gen-hooks/gen-workflow/manifest-audit) + 1 orchestrator (ci-pipeline)UFFS_*knobs, 3 XDG, othersinclude_*!use sitesuffs-textcase-fold tableModes
rg+awkonly, ~1 s. Emits markdown to stdout.--with-cargo: +cargo build --workspace --timings(~30 s warm).Filter contract
Prod-only by default — excludes
tests/,benches/,examples/,build.rsfiles (except in the dedicatedbuild.rssection), and files matchingtests.rs/*_tests.rs/*_test.rs/test_*.rs. Mirrors the Phase 6/7/8 audit-script pattern.Caveats documented inline
Xfalse-positive from rustdoc prose like///env::var("X")returnsOk("")...).macro_rules!parser captures name + file:line but does NOT classify per playbook \u00a71064 (syntax shaping / impl repetition / pattern capture). Classification happens in Phase 9d.Rule-1 adherence
Zero
#[allow]introductions; zero suppression hacks. The script is a read-only inventory tool that emits markdown to stdout. No source code modifications.Companion plan + future PRs
docs/dev/architecture/code_clean/phase_9_build_scripts_macros_codegen_implementation_plan.md(local-only, 276 LOC).build_codegen_policy.md+ CONTRIBUTING), 9h (closeout).Total Phase 9 estimate: ~4-5 h.
Closes #298 only at 9h (this PR is 9a only).