refactor: batch-simplify sweep, waves 4-12 + deferred-work pass - #3494
Conversation
…ry, claude-ops Repo-wide batch-simplify sweep, wave 4 of 12 (claude-config audit + permission skills, claude-memory, claude-ops hooks/lanes/audits). 121 files read end to end; 9 files edited, every group's diff cleared by a fresh-context refutation verifier - including one refutation that REVERTED two edits before delivery: - claude-config: run-state.sh header usage block synced to its real usage() (comment-only; negative-test sed targets verified untouched); dead grep prerequisite guard removed from conflict-scan.test.sh (nothing in the suite or script invokes grep; skip-discipline gates re-run clean). - claude-memory: memory-dir-stats.test.sh fixture normalized to the file's \n-escape style; fixture bytes sha256-identical. - claude-ops hooks: hook-failure-audit.sh skips its summary jq spawn when the pre-filter matched nothing (one spawn saved per Stop turn; all paths byte-identical). A jq_fields consolidation in the two skill-usage hooks was attempted, refuted by adversarial payload probes (trailing-newline trimming, non-string tostring, two-doc handling), and reverted rather than shipped. - claude-ops lanes/brief: five formerly implicit globals made local in restart-consumer.sh process_lane (full caller-graph and trap audit: no post-return reader); redundant lock_rc defaults dropped; morning-brief.sh scratch array declared local; two test assertions moved to the section whose fixture they read. - claude-ops audits: install_state.py unused os.walk slot renamed to _dirnames per the file's own convention. Version bumps + changelog entries: claude-config 0.40.20, claude-memory 0.11.9, claude-ops 0.38.21. Verification: shellcheck clean on all touched shell; ruff wrapper clean; suites 48+84+12+64+30+28+88+146+83+50 all green plus adapter fan-outs; changelog-parity and catalog gates pass. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01W61wikkiEK5StWgg9rfEQW
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Claude finished @kyle-sexton's task in 2m 14s —— View job Code review complete ✅Tasks
FindingsNo correctness or maintainability issues found. I read every changed hunk end-to-end against
No inline comments filed — nothing rose to a reportable finding. Note on verification depth: this sandbox's Bash tool required approval for running |
|
Claude finished @kyle-sexton's task in 59s —— View job Security review — no issues found
Skip gate: this PR has no security-relevant surface. All 14 changed files are a behavior-preserving refactor sweep (waves 4–12 of the batch-simplify pass): version/changelog bumps, comment wording, Reviewed for the criteria this lane covers (injection surfaces, auth/access-control gaps, unsafe secret/token handling, dangerous Actions patterns, trust-boundary issues):
No security findings to report. |
|
Last security-reviewed head: |
|
Claude has reviewed this PR 5 times. The lane skips further automatic reviews after 5; deleting this comment resets the count. |
…ene race fix, formatter hooks Repo-wide batch-simplify sweep, wave 5 of 12 (code-tidying, context-budget, context-guard, discovery, disk-hygiene, docs-hygiene, ai-slop, and the first five formatter-hook plugins). 89 files read end to end; 3 files edited, each cleared by a fresh-context refutation verifier: - disk-hygiene: the queued wave-1 finding is fixed - both sink tests in lib/test_hook_telemetry.py raced the fire-and-forget sink (the sink's > redirect creates its file empty before cat writes it), failing ~3/4 runs on a fast host at HEAD. They now poll for non-empty, parseable content with a 5s deadline, retrying a truncated mid-write read, mirroring the sibling suites' _wait_for_file discipline. Deterministic over 12/12 runs; production hook_telemetry.py untouched. - markdown-format: two inert hook::ctx_reset calls removed from the hook (nothing in it ever writes or reads the ctx buffer - verified down to the buffer's only readers in hook-utils), and a three-line no-op `for ... do :; done` loop removed from its test. The test-file deletion is deliberate, not a silent revert. Suite 161/161. The other six groups (code-tidying scripts, context-budget + context-guard, discovery gates, docs-hygiene + ai-slop detectors) reviewed clean with zero edits - 1,200+ baseline assertions green, detector-crosswalk gate green. Version bumps + changelog entries: disk-hygiene 0.20.35, markdown-format 0.11.35. Verification: shellcheck clean on touched shell; pinned-ruff clean; disk-hygiene python suites 317+23+17+10 OK; markdown-format fan-out 4 suites incl. shell-portability 345/345; changelog-parity, vendor-bump, and catalog gates pass vs origin/main. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01W61wikkiEK5StWgg9rfEQW
|
Claude finished @kyle-sexton's task in 1m 25s —— View job Code review complete ✅Tasks
ScopeThis lane already reviewed commit FindingsNo correctness or maintainability issues in the new wave-5 changes. I read both non-trivial hunks end-to-end and independently verified the claims rather than trusting the CHANGELOG text:
Verification note: as in the prior run on this PR, this sandbox's Bash tool required approval to run |
|
Claude finished @kyle-sexton's task in 1m 0s —— View job Security review — no issues found
Skip gate: the prior review already covered
No authentication, authorization, injection, secret-handling, or GitHub Actions surfaces touched by this push. Combined with the prior clean review of |
…dead fallback removed Repo-wide batch-simplify sweep, waves 6 and 7 of 12 (formatter/notification hooks second half, guardrails blocking + advisory hooks, instruction-placement, kindle-dedrm, and the whole knowledge plugin: course-digest adapters/lib/ pipeline, docpage-digest, map-corpus, video-digest acquisition/adapters/ harvesting/liveness/transcript). 199 files read end to end across 11 groups. Wave 6 was a pure verification wave: zero edits across all five groups (~1,100 baseline assertions re-proven green; the guardrails enforcement core is deliberately dense and every candidate was incident-pinned). Wave 7 landed one edit: video-digest acquisition acquire.js drops a `?? "staged acquire failed"` default that could never fire (both ok:false sites in acquireFullStaged construct non-empty string errors; old ?? replaced only null/undefined). Enumerated, tsc-checked, and cleared by a fresh-context refutation verifier. The same verifier REFUTED a second candidate - merging the duplicated initial spawn in spawn-yt-dlp-with-auth-fallback.js - with an executed counterexample (the cookie-config probe it would skip emits a once-per-process deprecation warning via env-compat and mutates its dedupe set). That edit was reverted, not shipped. Version bump + changelog: knowledge 0.13.27. Verification: acquisition suite 93/93 post-revert, adapters 112/112, transcript 54/54, course-digest 91/91 x2 runs, docpage/map-corpus python 117 tests + ruff clean; changelog-parity and catalog gates pass. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01W61wikkiEK5StWgg9rfEQW
|
Claude finished @kyle-sexton's task in 58s —— View job Code review complete ✅Tasks
ScopeThis lane already reviewed FindingsNo correctness or maintainability issues in the new wave-6/7 change. Verified the claim rather than trusting the CHANGELOG text:
No inline comments filed — nothing rose to a reportable finding. Verification note: as in prior runs on this PR, this sandbox's Bash tool required approval to run |
|
Claude finished @kyle-sexton's task in 1m 8s —— View job Security review — no issues found
Skip gate: prior runs on this PR already reviewed through
No authentication, authorization, injection, secret-handling, or GitHub Actions surfaces touched by this push. Combined with the prior clean reviews of |
…-health test scaffolding Repo-wide batch-simplify sweep, wave 8 of 12 (video-digest watch halves + watching pipeline; machine-health check tests, lib tests, harness, and check sources). 129 files read end to end across 6 groups; 5 files edited, every diff cleared by a fresh-context refutation verifier: - knowledge video-digest: watch/synthesis-naming.js drops the synthesisDestNameForSlice export nothing imports (introduced Jul 2026, never consumed; proven across code, markdown, and fixtures), its orphaned loadPromotionNameMap import, and the export keyword on the internal-only sourceStem. Watch suites 58/58; tsc clean. - machine-health: tests/helpers/Mock-Helpers.psm1 drops the New-MockWinGetPackage factory nothing references; two suites drop Import-Module lines feeding nothing (mock-target and side-effect angles verified); ConvertFrom-Jsonc.Tests.ps1 inlines a single-use intermediate. All suite counts byte-identical pre/post, including the pre-existing Linux cmdlet-gap failures (reported, unchanged). The other groups (watch-a, watching pipeline, check sources + scaffold) reviewed clean with zero edits. Version bumps + changelog entries: knowledge 0.13.28, machine-health 0.11.17. Verification: watch/watching vitest 48+58+29 pass; machine-health runnable Pester baselines identical pre/post; parse checks clean; changelog-parity and catalog gates pass vs origin/main. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01W61wikkiEK5StWgg9rfEQW
|
Claude finished @kyle-sexton's task in 1m 16s —— View job Code review complete ✅Tasks
ScopeThis lane already reviewed FindingsNo correctness or maintainability issues in the new wave-8 changes. Verified the claims rather than trusting the CHANGELOG text:
No inline comments filed — nothing rose to a reportable finding. Verification note: as in prior runs on this PR, this sandbox's Bash tool required approval to run the co-located watch/Pester suites, and no approval prompt was available, so this conclusion comes from static reading and repo-wide grep against |
|
Claude finished @kyle-sexton's task in 46s —— View job Security review — no issues found
Skip gate: prior runs on this PR already reviewed through
No authentication, authorization, injection, secret-handling, or GitHub Actions surfaces touched by this push. Combined with the prior clean reviews of |
Repo-wide batch-simplify wave 9 (groups 48-53: miro, planning, prototype, plugin-quality, skill-quality, provenance, rate-limit-guard, repo-hygiene clean core). Five groups closed with zero edits; the one shipped edit collapses the duplicate --* arm of from_label() in plugins/provenance/skills/audit/scripts/check-stamps.sh into its identical fallback arm. A fresh-context refutation verifier executed a 25-case old-vs-new input matrix (flag forms, config-layer paths, format-string hazards, whitespace, multi-arg and no-arg calls) plus end-to-end --show-config runs: byte-identical output everywhere. Suite: 71 passed. shellcheck clean. provenance bumped to 0.4.2 with a changelog entry; changelog-parity, vendor-bump, and catalog gates pass. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01W61wikkiEK5StWgg9rfEQW
|
Claude finished @kyle-sexton's task in 46s —— View job Code review complete ✅Tasks
ScopePrior runs on this PR already reviewed through FindingsNo correctness or maintainability issues in the new wave-9 change. Verified the claim rather than trusting the CHANGELOG text:
No inline comments filed — nothing rose to a reportable finding. Verification note: as in prior runs on this PR, this sandbox's Bash tool required approval to run the co-located |
|
Claude finished @kyle-sexton's task in 45s —— View job Security review — no issues found
Skip gate: prior runs on this PR already reviewed through
No authentication, authorization, injection, secret-handling, or GitHub Actions surfaces touched by this push. Confirmed the full PR diff ( |
Repo-wide batch-simplify wave 10 (groups 54-57: repo-hygiene git scripts + repo-fleet-hygiene, session-flow, small skill scripts, small updaters). Three groups closed with zero edits; the one shipped edit removes a stale "shellcheck disable=SC2086" directive above a quoted eval in plugins/repo-hygiene/skills/clean/scripts/git-prune.sh. A fresh-context refutation verifier confirmed the directive was inert: ShellCheck 0.11.0 with the repo rcfile produces identical output and exit code with and without it, no repo tooling inventories or pins disable comments, and the mapped suites (clean-batch 84 checks, git-prune) pass. repo-hygiene bumped to 0.10.19 with a changelog entry; changelog-parity, vendor-bump, and catalog gates pass. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01W61wikkiEK5StWgg9rfEQW
|
Claude finished @kyle-sexton's task in 55s —— View job Security review — no issues found
Skip gate: prior runs on this PR already reviewed through
No authentication, authorization, injection, secret-handling, or GitHub Actions surfaces touched by this push. Combined with the prior clean reviews through Verification note: as in prior runs on this PR, this sandbox's Bash tool required approval to run ShellCheck / the co-located suites, and no approval prompt was available, so this conclusion comes from static reading and repo-wide grep for |
Repo-wide batch-simplify wave 11 (groups 58-62, the source-control
plugin: babysit-prs source and tests, bin + hooks, pull-request skill
scripts, plugin scripts + commit skill). Four groups closed with zero
edits (babysit source 643-test baseline OK; babysit tests likewise; bin
+ hooks and scripts trees confirmed frozen fail-closed surface). The
one shipped edit rewords a comment in
plugins/source-control/skills/pull-request/scripts/fetch-annotations.sh
that misdescribed its own exit-code capture ("captured via PIPESTATUS"
where no pipeline ever existed) to "captured separately".
A fresh-context refutation verifier confirmed the comment was wrong
from the file's first commit, nothing pins the old string, and the
suite passes (8/8). source-control bumped to 0.55.32 with a changelog
entry; changelog-parity, vendor-bump, and catalog gates pass.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01W61wikkiEK5StWgg9rfEQW
|
Claude finished @kyle-sexton's task in 53s —— View job Security review — no issues found
Skip gate: prior runs on this PR already reviewed through
No authentication, authorization, injection, secret-handling, or GitHub Actions surfaces touched by this push — confirmed no |
The repo-wide batch-simplify sweep (68 groups, 12 waves) recorded every deferred finding with a disposition; this commit works all the actionable ones in-branch, per-fix verified with reproduce-then-fix evidence and reviewed as a whole by a fresh-context adversarial pass. Root scripts: check-changelog-parity.sh emits "lists X more than once" with its missing space (test pinned); check-hook-exec-form.test.sh garbled ok-string reworded; generate-cheatsheet.mjs names the offending file on a frontmatter-less SKILL.md instead of a raw TypeError; package.json allowScripts pin restored to the 2.1.246 devDependency. affected-tests.sh gains deletion awareness: a changed path that no longer exists and that nothing claims reports a visible "deleted:" note instead of the UNMAPPED error, while a deletion a surviving suite still names keeps selecting it (two new suite cases; README contract updated). guardrails 0.29.24: verify-cli-flag.sh streams help output through a printf pipe instead of staging it in a here-string (strace-confirmed mechanism; ten-case byte-identical differential), and the require-jq-notice-isolation test no longer emits a two-line count on its zero-match path. machine-health 0.11.18: correlation-rules.md names the real Get-CorrelationRule; Write-ElevationBanner tests capture [Console]::Error output for real; Restart-StoppedService tests run on Linux via the established stub pattern (0 to 10 passing); Scaffold tests pin empty USERNAME/COMPUTERNAME with restore (17+3 to 20). claude-config 0.40.21: duplicate test case labels renumbered. discovery 0.16.18: unreadable-ledger case skips visibly as root. instruction-placement 0.11.14: render-index.sh no longer corrupts brace globs when prettifying rule glob lists (fix plus two test pins). rate-limit-guard 0.7.21 and context-guard 0.7.28: the statusline tees exchange their proven hardening patterns; payloads over 1MiB pass through intact, temp writes refuse pre-planted symlinks, and SIGKILL no longer leaks temp files (traps plus age-filtered sweep). Zero-fork assertions and bench spawn floor unchanged. source-control 0.55.33: three scripts stop truncating --help via the derived header printer babysit-readiness-gate.sh already ships. work-items 0.39.42: conformance e2e-probe drops a vacuous assertion; the linear schema-check tree gets an accurate fidelity.sh comment, an optional catch binding, and a no-suite allowlist entry recording its on-demand lane. knowledge 0.13.29: orphaned promotion-name-map.js removed with independently re-proven zero importers. Adversarial review over the whole diff: both findings fixed (the UNMAPPED deletion via the affected-tests deletion handling above; a too-strong changelog claim reworded); full-suite union run green (146 shell suites), parity/order/vendor/catalog gates green. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01W61wikkiEK5StWgg9rfEQW
testResults.xml is Invoke-Pester run output from the deferred-work verification, not repository content. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01W61wikkiEK5StWgg9rfEQW
|
Claude finished @kyle-sexton's task in 1m 34s —— View job Security review — no issues found
Skip gate: prior runs on this PR already reviewed through
Diffed
The three No authentication, authorization, injection, secret-handling, or GitHub Actions surfaces touched by either commit — no |
The purged-em-dashes hygiene gate failed on the previous push: README.md is a declared-purged surface and the new affected-tests deletion paragraph introduced one em dash. The sentence is now two. check-purged-em-dashes.sh passes locally (21 declared paths, 30 files, no em dashes). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01W61wikkiEK5StWgg9rfEQW
Summary
Second and final delivery of the repo-wide
/code-tidying:batch-simplifysweep (waves 1-3 merged in #3492). This PR carries waves 4-12 of the 68-group sweep plus the deferred-work pass that closes out every actionable finding the sweep recorded.Sweep waves (each edit refutation-verified by a fresh-context verifier before shipping; near-zero yield expected and confirmed after the #3486 sweep two days prior):
check-stamps.shduplicate-branch collapse (25-case executed input matrix, byte-identical).shellcheck disable=SC2086removed fromgit-prune.sh(proven inert under the pinned ShellCheck).fetch-annotations.shcomment-accuracy fix (comment was wrong from its first commit).Fix
Deferred-work pass (commit "Deferred-work pass", reviewed as a whole by a fresh-context adversarial pass): root scripts (changelog-parity message spacing plus test pin, cheatsheet named diagnostic for frontmatter-less SKILL.md, allowScripts lockstep to 2.1.246, deletion-aware
affected-tests.shwith two suite cases and README contract update); guardrails 0.29.24 (verify-cli-flag printf-pipe with ten-case byte-identical differential, require-jq zero-match count fix); machine-health 0.11.18 (doc name fix, real[Console]::Errorcapture in ElevationBanner tests, Restart-StoppedService Linux stubs 0 to 10 passing, Scaffold env pin 17+3 to 20); claude-config 0.40.21 (case-label renumber); discovery 0.16.18 (root-env visible skip); instruction-placement 0.11.14 (render-index brace-glob corruption fix plus pins); rate-limit-guard 0.7.21 and context-guard 0.7.28 (statusline tees exchange proven hardening: >1MiB pass-through, noclobber temp writes, SIGKILL temp reclaim; zero-fork assertions and bench floor unchanged); source-control 0.55.33 (three--helpprinters stop truncating, one recovering 38 lines); work-items 0.39.42 (vacuous conformance assert removed, schema-check tree comment fix plus no-suite allowlist entry); knowledge 0.13.29 (orphanedpromotion-name-map.jsremoved, zero importers re-proven).Verification
--check-bump,--check-order), vendor bump, catalog--check, cheatsheet--check.Related
No linked issue. Follows #3492 (waves 1-3) and the prior repo sweep #3486.
🤖 Generated with Claude Code
https://claude.ai/code/session_01W61wikkiEK5StWgg9rfEQW