fix(docs-hygiene): speed audit-noise detect hot path (0.14.4) - #2792
Conversation
Hoist convention-root resolution once per run so AUDIT_NOISE_CONTRACT_ROOT survives (F6), replace per-line command substitutions with nameref helpers, and add --offset/--limit chunking for repo-wide orchestration. Closes #2741 Co-authored-by: Kyle Sexton <kyle-sexton@users.noreply.github.com>
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
|
Claude finished @kyle-sexton's task in 1m 19s —— View job Security review (
|
|
Last security-reviewed head: |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b2e47ac278
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
Claude finished @kyle-sexton's task in 4m 42s —— View job Code review —
|
|
Claude has reviewed this PR 2 times. The lane skips further automatic reviews after 5; deleting this comment resets the count. |
…rmalize chunks Co-authored-by: Kyle Sexton <kyle-sexton@users.noreply.github.com>
…2794) ## Summary - Skip YAML frontmatter and fenced code blocks during scans. - Opt-out markers must be well-formed HTML comment lines (prose mentions no longer swallow following content). - Section exemption toggles on any ATX heading level (`### Sources` exempts; an H1 after `## Sources` ends it). - Inline `` `code` `` spans are stripped for citation/enum/scope matching; ghost-ref still sees unwrapped path text. - Resolve relative targets before `cd` to repo root; parse spaced filenames from porcelain without `$NF`. - Bump docs-hygiene to 0.14.5. Stacked on #2792 (path mutex — both touch `detect.sh`). ## Test plan - [x] `bash plugins/docs-hygiene/skills/audit-noise/scripts/detect.test.sh` — 59/59 pass Closes #2742 ## Related - Stacked on #2792; continues docs-hygiene audit-noise work toward #2795. --------- Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: Kyle Sexton <kyle-sexton@users.noreply.github.com>
|
Claude finished @cursor[bot]'s task in 5m 2s —— View job Code review —
|
| # Strip leading zeros so values like 08 are decimal, not octal, under arithmetic. | ||
| OFFSET=$((10#$OFFSET)) | ||
| LIMIT=$((10#$LIMIT)) |
There was a problem hiding this comment.
Nit (test coverage): this fixup commit resolves both prior review findings (missing-value guard at require_opt_value() line 37, and this leading-zero decimal-normalization) correctly — traced by hand, both are sound. But unlike the rest of this PR, which added a dedicated regression test per fix (F6 contract-bare, chunk affordance, negative-offset), neither new fix gets a test:
- No test exercises
--offset/--limit/--paths-fileas the last CLI token with no following value (the hang scenariorequire_opt_valueguards against). - No test exercises a leading-zero value like
--offset 08(the octal-misparse scenario the10#$OFFSETstrip guards against).
Both are exactly the "green CI, silently wrong" class — a hang wouldn't fail a test that doesn't invoke that path, and the octal bug degrades to scanning the whole list without erroring, so a regression here wouldn't be caught by the existing suite. Since detect.test.sh already has the harness for this (assert_exit, chunk fixtures at the block above), two more assert_exit/assert_contains cases would close the gap.
….0) (#2814) Closes #2745 ## Summary Re-lands docs-hygiene 0.15.0 compress caveman/taxonomy audit remediations on main after #2812. Replaces #2805/#2811, which were auto-closed when stack bases were deleted. ## Related - Completes the docs-hygiene stack after #2792 → #2794 → #2795 → #2812. - Supersedes closed #2805 and #2811. --------- Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: Kyle Sexton <kyle-sexton@users.noreply.github.com>
Summary
detect.shrun soAUDIT_NOISE_CONTRACT_ROOTis not lost to command-substitution subshells (auditor F6: configured contract root barereviews//handoffs/no longer falsely exempt).detect_shapes_into,shape_tier_into,trim_excerpt) instead of 2+$()forks per markdown line.--offset/--limitso repo-wide orchestration can chunk without a per-file shell loop; document in SKILL.md clean-tree defaults.Test plan
bash plugins/docs-hygiene/skills/audit-noise/scripts/detect.test.sh— 48/48 pass (includes F6 contract-bare regression + chunk affordance)parse-concern-value.shforks; 40×885-line corpus ~7.8s in this environmentCloses #2741
Related