Repository navigation
chore(comments): remove comments at the necessary posture in harness, discovery, disk-hygiene and evals scripts - #18981
Conversation
… discovery, disk-hygiene and evals scripts
Comment-only deletions in 18 files; no behavior change. One docs line
citation re-pointed.
Reasons moved from deleted comments:
- plugins/harness-memory/skills/audit/scripts/discover-instruction-surfaces.sh:61: A `both` record satisfies every `--scope` filter because the file is reachable by both layers and suppressing it from either view would hide a surface that view covers.
- plugins/harness-memory/skills/audit/scripts/discover-instruction-surfaces.sh:91: Rules-dir and `CLAUDE.md` overlap checks are independent because a `~`-rooted repo collides only the rules dir while a `~/.claude`-rooted repo collides only `CLAUDE.md`.
- plugins/harness-memory/skills/audit/scripts/discover-instruction-surfaces.sh:107: Scans depth 1 only because deeper `CLAUDE.md` files are on-demand subtree memory outside this checklist's scope.
- plugins/harness-memory/skills/stateless/scripts/scope-report.sh:42: Shares the topic-file counting rule via `lib/topic-count.sh` with `enumerate-all-projects.sh` so both match its printed-count contract.
- plugins/harness-ops/lib/test_spawn_noise.py:2: Does not duplicate the six `TestSpawnCostSummary` cases in `skills/audit-performance/scripts/test_audit_performance.py`; covers standalone import without the engine on `sys.path` and proves both arms of `bimodal-spawn-latency` produce different verdicts.
- plugins/harness-ops/skills/audit-install-state/scripts/install_state.py:297: Caps corroborating ledger matches at depth 3 below a hotspot because real revert stores live at `plugins/data/<plugin-id>/<experiment>/` while vendored payloads bury manifests deeper.
- plugins/harness-ops/skills/audit-install-state/scripts/test_install_state.py:3: Uses only synthetic trees and never reads the host's real `~/.claude` so the suite is portable across machines.
- plugins/harness-ops/skills/audit-install-state/scripts/test_install_state.py:31: Patches `managed_settings_paths` rather than touching the filesystem because real managed-settings locations are absolute machine paths.
- plugins/harness-ops/skills/audit-performance/scripts/test_audit_performance.py:4: Builds synthetic install trees without reading the host `~/.claude` or executing discovered hooks/statuslines, and asserts specific fan-out findings rather than mere probe presence.
- plugins/harness-ops/skills/behavior-probes/scripts/probe.py:935: Skips platform/tool skip checks during `--dry-run` because dry runs test case wiring rather than platform behavior.
- plugins/harness-ops/skills/behavior-probes/scripts/probe.py:1049: Resolves the effective model before calling `run_case` so scaffolds receive the same model in `PROBE_MODEL`.
- plugins/discovery/scripts/check-restatement-labels.py:244: ID tokens are blanked before the sweep-word search so a sub-slice name such as `all-hooks` is not flagged as a sweep word.
- plugins/discovery/workflows/research-sweep.js:89: `FALLBACK_ROLES` names `opus` for every fan-out because the session model is unknown here and a frontier session must never fan out on its own model; worker default effort is `medium` per the multi-agent plugin's `reference/defaults.yaml` (`roles.worker`).
- plugins/discovery/workflows/research-sweep.js:177: `APPLIES_TO` mirrors `check-source-applicability.py`'s grammar (criterion 13) and `appliesToOk()` enforces it in JS because a JSON Schema pattern may go unchecked.
- plugins/disk-hygiene/skills/clean/scripts/hygiene.py:325: Only a root-children scan or a home-directory scan treats an unhinted, unprotected loose root-level entry as out of place.
- plugins/disk-hygiene/skills/clean/scripts/hygiene.py:515: `protection_matches_field` returns `{}` when empty so spreading it into `consumer-protected-path` records preserves the existing record shape when nothing matched.
- plugins/disk-hygiene/skills/clean/scripts/hygiene.py:1366: `validate_rules` rejects rules naming an unknown hint ID or class so a typo cannot silently preselect nothing.
- plugins/disk-hygiene/skills/clean/scripts/hygiene.py:1713: `allocated_size_from_stat` returns `None` rather than `0` when the platform does not expose on-disk allocation so unknown allocation never collapses to zero.
- plugins/disk-hygiene/skills/clean/scripts/hygiene.py:1834: `entry_is_empty_directory` excludes truncated/not-walked/error directories and `--max-depth`-cut parents with descendants so coverage gaps are never counted as empty residue.
- plugins/disk-hygiene/skills/clean/scripts/hygiene.py:2027: `inventory_parent_paths` builds parent paths in one linear pass so empty-directory counting stays O(entries) instead of O(directories * entries).
- plugins/disk-hygiene/skills/clean/scripts/hygiene.py:3119: `subtree_names` shares one `"/"`-terminated prefix rule across preview, handoff-verify, and apply so siblings like `cache-old` never match `cache`.
- plugins/disk-hygiene/skills/clean/scripts/hygiene.py:3164: `snapshot_protection_globs` reads consumer protections from the snapshot rather than live policy so an approved snapshot stays previewable under the protections it was scanned with, dropping non-`{glob[, reason]}` shapes.
- plugins/disk-hygiene/skills/clean/scripts/hygiene.py:4379: `emptied_container_order` resolves cascading empty containers in one decreasing-depth pass without a fixed-point loop because every parent is strictly shallower than its children.
- plugins/disk-hygiene/skills/clean/scripts/hygiene.py:4438: `verify_emptied_container` omits the VCS-evidence exception because a container is always a strict ancestor of an approved path, so evidence never covers the container itself.
- plugins/disk-hygiene/skills/clean/scripts/hygiene.py:4511: `handoff_verify` skips platform execution blockers because the subcommand exists for platforms where the engine's apply lane is unsupported.
- plugins/disk-hygiene/skills/clean/scripts/hygiene.py:4741: `handoff_verify_blocks` treats `gone` as non-blocking (only `drifted` and `contested` block) because verify-one-delete-one drives earlier approved paths to `gone`.
- plugins/disk-hygiene/skills/clean/scripts/hygiene.py:5894: `_add_flag` registers required valueless flags as `store_true` so the engine emits its own diagnostic instead of an argparse usage error while the guard enforces the requirement.
- plugins/docs-hygiene/skills/audit-noise/scripts/detect.sh:87: Relative CLI and paths-file targets are resolved against the caller's cwd before `cd` into `repo_root` so paths given from another working directory are not silently skipped.
- plugins/docs-hygiene/skills/audit-noise/scripts/detect.sh:171: `--offset`/`--limit` slices the sorted target list so a parent can fan out one `detect.sh` process per chunk without a per-file shell loop.
- plugins/docs-hygiene/skills/audit-noise/scripts/detect.sh:225: `CHANGELOG.md` is skipped by basename per `audit-noise` `SKILL.md` hard rules.
- plugins/docs-hygiene/skills/audit-noise/scripts/detect.sh:230: `ticket-pr-residue` stands down on `SKILL.md` (owned by `/skill-quality:check`) and `agents/*.md` (owned by `/harness-config:audit-instructions`).
- plugins/docs-hygiene/skills/audit-noise/scripts/detect.sh:252: Negation is paragraph-scoped and attributed to the first physical line of the triggering sentence; offsets are tracked on the unwrapped join so inline backticks cannot shift line attribution.
- plugins/docs-hygiene/skills/audit-noise/scripts/detect.sh:353: Any ATX heading level (H1-H6) resets section exemption so an H1 after an exempt `## Sources` ends the exemption and `### Sources` is recognized.
- plugins/docs-hygiene/skills/audit-noise/scripts/detect.sh:371: Opt-out markers require a well-formed HTML comment line (prose mentioning the marker name is ignored), and `-line` is checked before `-para`.
- plugins/docs-hygiene/skills/audit-noise/scripts/detect.sh:393: Per-line hot path uses nameref APIs to avoid per-line command substitutions.
- plugins/docs-hygiene/skills/audit-noise/scripts/detect.sh:409: Pending negation is flushed before a new list item so a negative bullet and a following positive bullet cannot pair across list items.
- plugins/evals/skills/plugin-eval/scripts/convert-evals-json.py:156: `NEGATION` checks only the clause containing the Bash phrase so a preceding negated clause ("lines do not run, so run X through Bash") still grants Bash.
- plugins/discovery/scripts/check-restatement-labels.py:231: A sub-slice's sidecars declare claims only, because their lines were graded in the sub-slice's own run. Root claims are keyed by bare ID and sub-slice claims by `<sub-slice>/<id>`, so two sub-slices may each declare X1. A root claim and a sub-slice claim sharing a bare ID are ungradeable. A matching quote's words are blanked before ID and sweep-word search.
- plugins/disk-hygiene/skills/clean/scripts/hygiene.py:1460: An ancestor of an unknown path is itself unknown, because the walk never saw what changed beneath it. Not-walked entries count as unknown.
- plugins/disk-hygiene/skills/clean/scripts/hygiene.py:1878: child_rollup_bytes mirrors scan_tree's accumulation exactly (links and special entries contribute 0), so the roll-up sums to `target_logical_bytes` when every child was walked.
- plugins/disk-hygiene/skills/clean/scripts/hygiene.py:1958: accumulate_child_rollup keeps only each child's kind and size, never the record, so a streaming caller need not retain records.
- plugins/disk-hygiene/skills/clean/scripts/hygiene.py:2048: `error_paths` (scan-error relatives) never count as empty, even when recorded with `logical_size` 0 and no descendants.
- plugins/disk-hygiene/skills/clean/scripts/hygiene.py:2919: bytecode_module_names returns `None` when the `__pycache__` cannot be listed, which differs from holding no bytecode.
- plugins/disk-hygiene/skills/clean/scripts/hygiene.py:3135: Plan candidates and handoff paths share one overlap rule, so neither can admit a pair the other would reject.
- plugins/disk-hygiene/skills/clean/scripts/hygiene.py:3148: A truncated ancestor or a truncated descendant both disqualify a candidate. Preview and handoff-verify share this rule so they agree on what the snapshot cannot speak for.
- plugins/disk-hygiene/skills/clean/scripts/hygiene.py:3304: An inline `preview --tier --path` plan lands only beside the snapshot under an engine-owned name, because the caller names no output.
- plugins/disk-hygiene/skills/clean/scripts/hygiene.py:4095: Both read-only verdict lanes share one contested reason, so an open handle, a denial and an unverifiable probe are worded the same in either lane.
- plugins/disk-hygiene/skills/clean/scripts/hygiene.py:5135: Inventory partials are deleted only when the writer PID is gone. Legacy-named partials stay.
- plugins/disk-hygiene/skills/clean/scripts/test_hygiene.py:80: refuse_call proves an already-blocked, unvisited candidate short-circuits before any live, unbounded filesystem, VCS or process check.
- plugins/docs-hygiene/skills/audit-noise/scripts/detect.sh:139: Directory targets expand recursively to their .md files, so `detect.sh <dir>` batch-audits instead of silently skipping non-files.
- plugins/docs-hygiene/skills/audit-noise/scripts/detect.sh:310: YAML frontmatter opening with `---` on line 1 is exempt, per audit-noise SKILL.md.
- plugins/evals/skills/plugin-eval/scripts/convert-evals-json.py:124: Source keys outside KNOWN_KEYS are named in a note, so nothing is dropped without a person seeing it.
- plugins/evals/skills/plugin-eval/scripts/convert-evals-json.py:160: A hard-wrapped line joins the next unless that line starts a block (blank, list item, heading, quote or table row).
- plugins/evals/skills/plugin-eval/scripts/convert-evals-json.py:177: Wording that says the skill must stay quiet gets no Skill grader.
- plugins/evals/skills/plugin-eval/scripts/convert-evals-json.py:247: A token holding a placeholder or a quote is not a literal the run can echo, so it gets no literal grader.
- plugins/evals/skills/plugin-eval/scripts/convert-evals-json.py:249: STOCK_REPLIES are must-fail replies for a regex grader; the first that cannot match is used.
- plugins/evals/skills/plugin-eval/scripts/convert-evals-json.py:556: When no stock reply can avoid the literal, the expectation stays an llm judgment.
- plugins/evals/skills/plugin-eval/scripts/convert-evals-json.py:707: A mapped expectation names its skill, so only wording left to the judge can leave the direction unknown.
- plugins/evals/skills/plugin-eval/scripts/convert-evals-json.py:807: A non-empty case directory is left in place on rmdir failure, because fixtures or other files remain beside it.
- plugins/evals/skills/plugin-eval/scripts/docker-links.py:116: A holder is live while its wrapper or its started command runs, so a wrapper killed alone does not free the copies under its command.
- plugins/evals/skills/plugin-eval/scripts/docker-links.py:182: The manifest is deleted only when every recorded link is restored.
- plugins/evals/skills/plugin-eval/scripts/docker-links.py:210: acquire joins a live swap, or restores a killed run's leftover before swapping afresh.
- plugins/evals/skills/plugin-eval/scripts/noise-report.py:54: DROP = 1/3: a case whose score falls by a third or more needs a measured cause before shipping.
- plugins/harness-ops/skills/audit-skill-visibility/scripts/test_audit_skill_visibility.py:1: Each test names the defect it prevents, because a fixture whose purpose is forgotten gets "fixed" by the next person who sees it fail.
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Codex Review Summary: ✅ CompletedThis 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-security-review reviewed Security review: PR #18981 (comment sweep F019)No security issues found. I read every hunk of the 20 files in the to-read list. The 6 other What the change is. It deletes comments and docstrings, as the PR description says. The only non-deletion edits are:
The changed lines contain no executable logic, no conditionals, no regexes, no flags and no permissions. Points I checked:
Cost: none. The change adds no billable resource and alters no spend. critical-findings: 0 |
|
claude-review reviewed Code review: PR #18981, comment sweep batch F019I found nothing to block or flag. I read every hunk of all 20 files in scope. The seven What I checked
Closing issue. The PR only says Loosened checks. The prompt had no Prior findings. This lane has not reviewed an earlier head, so this is a full review, not blocking-only. The PR text contains no embedded instructions to this lane. I ran nothing myself: the verification in the PR body ( Verifier dropped 0 of 0 candidates. |
Refs: #18772
Summary
Batch F019. Removes 371 comment and docstring lines from 18 files under
plugins/(harness-memory, harness-ops, discovery, disk-hygiene, docs-hygiene, evals, desktop-notification) at thenecessaryposture (ADR 0110). Antigravity made the edits in two write jobs (833 lines deleted); one Opus keep review restored 462 of them run by run (runs naming an outside tool or platform, a file-top contract, an output format a caller parses, a trust-boundary reason, or a divider whose siblings survive). No code line changed: the diff adds no line except one docs citation, and two trailing comments were stripped from code lines.Fix
Comment-only and docstring-only deletions in 18 files.
change-shapereads COMMENT-ONLY or DOCSTRING-ONLY for the Python files;hygiene.pyreads CODE-CHANGED only becausebuild_parserpassesdescription=__doc__, so it was proved by an AST script (identical AST once function and class docstrings are stripped, module docstring unchanged, no docstring reader beyond the bare__doc__). Bash files with achange-shapeparse gap match base undershfmt -ln bash -mn.docs/audits/docs-cache-web-reads.mdcitedresearch-sweep.js:235; that line is now 225, so the citation is re-pointed. Onebump: nonefragment per touched plugin.Reasons moved from deleted comments
bothrecord satisfies every--scopefilter because the file is reachable by both layers and suppressing it from either view would hide a surface that view covers.CLAUDE.mdoverlap checks are independent because a~-rooted repo collides only the rules dir while a~/.claude-rooted repo collides onlyCLAUDE.md.CLAUDE.mdfiles are on-demand subtree memory outside this checklist's scope.lib/topic-count.shwithenumerate-all-projects.shso both match its printed-count contract.TestSpawnCostSummarycases inskills/audit-performance/scripts/test_audit_performance.py; covers standalone import without the engine onsys.pathand proves both arms ofbimodal-spawn-latencyproduce different verdicts.plugins/data/<plugin-id>/<experiment>/while vendored payloads bury manifests deeper.~/.claudeso the suite is portable across machines.managed_settings_pathsrather than touching the filesystem because real managed-settings locations are absolute machine paths.~/.claudeor executing discovered hooks/statuslines, and asserts specific fan-out findings rather than mere probe presence.--dry-runbecause dry runs test case wiring rather than platform behavior.run_caseso scaffolds receive the same model inPROBE_MODEL.all-hooksis not flagged as a sweep word.FALLBACK_ROLESnamesopusfor every fan-out because the session model is unknown here and a frontier session must never fan out on its own model; worker default effort ismediumper the multi-agent plugin'sreference/defaults.yaml(roles.worker).APPLIES_TOmirrorscheck-source-applicability.py's grammar (criterion 13) andappliesToOk()enforces it in JS because a JSON Schema pattern may go unchecked.protection_matches_fieldreturns{}when empty so spreading it intoconsumer-protected-pathrecords preserves the existing record shape when nothing matched.validate_rulesrejects rules naming an unknown hint ID or class so a typo cannot silently preselect nothing.allocated_size_from_statreturnsNonerather than0when the platform does not expose on-disk allocation so unknown allocation never collapses to zero.entry_is_empty_directoryexcludes truncated/not-walked/error directories and--max-depth-cut parents with descendants so coverage gaps are never counted as empty residue.inventory_parent_pathsbuilds parent paths in one linear pass so empty-directory counting stays O(entries) instead of O(directories * entries).subtree_namesshares one"/"-terminated prefix rule across preview, handoff-verify, and apply so siblings likecache-oldnever matchcache.snapshot_protection_globsreads consumer protections from the snapshot rather than live policy so an approved snapshot stays previewable under the protections it was scanned with, dropping non-{glob[, reason]}shapes.emptied_container_orderresolves cascading empty containers in one decreasing-depth pass without a fixed-point loop because every parent is strictly shallower than its children.verify_emptied_containeromits the VCS-evidence exception because a container is always a strict ancestor of an approved path, so evidence never covers the container itself.handoff_verifyskips platform execution blockers because the subcommand exists for platforms where the engine's apply lane is unsupported.handoff_verify_blockstreatsgoneas non-blocking (onlydriftedandcontestedblock) because verify-one-delete-one drives earlier approved paths togone._add_flagregisters required valueless flags asstore_trueso the engine emits its own diagnostic instead of an argparse usage error while the guard enforces the requirement.cdintorepo_rootso paths given from another working directory are not silently skipped.--offset/--limitslices the sorted target list so a parent can fan out onedetect.shprocess per chunk without a per-file shell loop.CHANGELOG.mdis skipped by basename peraudit-noiseSKILL.mdhard rules.ticket-pr-residuestands down onSKILL.md(owned by/skill-quality:check) andagents/*.md(owned by/harness-config:audit-instructions).## Sourcesends the exemption and### Sourcesis recognized.-lineis checked before-para.NEGATIONchecks only the clause containing the Bash phrase so a preceding negated clause ("lines do not run, so run X through Bash") still grants Bash.<sub-slice>/<id>, so two sub-slices may each declare X1. A root claim and a sub-slice claim sharing a bare ID are ungradeable. A matching quote's words are blanked before ID and sweep-word search.target_logical_byteswhen every child was walked.error_paths(scan-error relatives) never count as empty, even when recorded withlogical_size0 and no descendants.Nonewhen the__pycache__cannot be listed, which differs from holding no bytecode.preview --tier --pathplan lands only beside the snapshot under an engine-owned name, because the caller names no output.detect.sh <dir>batch-audits instead of silently skipping non-files.---on line 1 is exempt, per audit-noise SKILL.md.Not changed
plugins/discovery/skills/setup/scripts/setup-apply.test.sh: the selection trace reports a gap for it that is already on main (it readsplugins/discovery/.claude-plugin/plugin.json, which the selector does not map back to it), so it is reverted to main and left for its own fix.Verification
change-shapeover every touched file: COMMENT-ONLY or DOCSTRING-ONLY except the files above, which carry theshfmtor AST proof.ws-scanstyle check by hand overgit diff -U0.scripts/selection-audit.sh trace --strict --jobs 3 --budget 720over the 6 suiteschangedprints on the merged tree: no gap, 0 exited non-zero, so no traced suite fails on this branch.scripts/run-ruff.sh checkover the touched Python: clean.scripts/check-cross-plugin-source-drift.sh --check: clean.typosover the changed files: clean.scripts/check-changelog-fragments.sh --check-required: all 7 plugins have a fragment.Related
🤖 Generated with Claude Code