Skip to content

chore(comments): remove comments at the necessary posture in harness-ops (part 1) - #18329

Merged
kyle-sexton merged 2 commits into
mainfrom
chore/comment-sweep-B015
Nov 23, 2026
Merged

kyle-sexton merged 2 commits into
mainfrom
chore/comment-sweep-B015

Conversation

@kyle-sexton

@kyle-sexton kyle-sexton commented Nov 23, 2026 •

Copy link
Copy Markdown
Member

No related issue: ADR 0110 bulk comment sweep, batch B015

Summary

Removes code comments at the necessary posture (ADR 0110, owner-approved bulk removal) from the first 150 files of plugins/harness-ops. No behavior change. A bump: none changelog fragment covers the plugin.

Counts:

  • 150 files in the batch: 41 touched, 0 held by open PRs.
  • 606 full-line comment runs (1,533 lines) deleted, plus 44 trailing comments stripped.
  • 43 reshape flags (23 findings rows) and 8 root-cause rows.
  • 1 ADR candidate, listed but not recorded.

Fix

/code-tidying:remove-comments necessary override plugins/harness-ops, limited to the batch list. Eight code-tidying:comment-reviewer agents ran it, one per directory group.

Kept in every file:

  • the floor: shebangs, shellcheck directives with their justifications, test-scope: and portability-ok: markers, and gitleaks:allow;
  • exit-code lists;
  • headers that a script's usage() prints for --help: lane-launcher.sh, restart-consumer.sh, telemetry-upsert.sh, machine-behavior.sh, probe-lane-config.sh, profile.sh and mod-posture.sh;
  • public-API headers of sourced libraries: lib/python-probe.sh, the 12 behavior-probes/cases/lib/*.sh files, net-probe.sh, broker.mjs and driver.mjs;
  • exported JSDoc;
  • outside-party constraints of two lines or fewer;
  • comment-plus-regression-test pairs;
  • comments inside heredocs and strings, which are data.

A comment run is kept or removed whole. After review, nine runs that a first pass had partly deleted were restored byte-identical from the base: the headers of fetch-changelog.sh, changelog-releases.sh, mod-posture.sh, overlap.test.sh, probe.test.sh, native_drift.test.sh and discover-surfaces.sh; the leak-scan block in telemetry-upsert.sh; and the account-section block in driver.test.mjs. The lane-launcher.test.sh block that carries the # portability-ok: marker for the 'back\slash' test input is also restored, after the Lint Shell check flagged it; scripts/check-shell-portability.sh origin/main now reports no unexcused constructs. Every comment a first pass had rewritten or moved is back in its original words and place, so the diff only deletes.

Override: the GLOBAL HARD path list was lifted by the override argument. No batch file is hook-wired or sits under .claude/, .github/ or a lefthook directory, so no path was actually lifted.

Not changed:

  • UNPROVABLE (HEAD has tree-sitter-bash parse errors), so left as they are: lanes/scripts/lane-launcher.sh, restart-consumer.sh, machine-behavior.sh, machine-profile/scripts/profile.sh, observability/otel/net-probe.sh, audit-skill-visibility/scripts/skill-pair-cooccurrence.sh and its .test.sh.
  • No grammar mapping, so no proof: observability/otel/cc-otel.sql, hook-latency.sql, item-rollup.sql and lane-runs.sql.
  • inventory/scripts/js/parser_helper.cjs was triaged with zero deletions. Its comments are the wire-protocol contract that inventory.py reads, and ECMAScript and engine behavior. About 100 function-contract comments share one shape, so they are proposed, not applied.
  • retirements.yaml: its header is repeated in four plugins, a shape used at scale, so it is proposed, not applied.

Verification

  • change-shape.sh against the base returns COMMENT-ONLY for all 41 files, apart from the one added test-scope line, and the diff holds no file outside the batch list.
  • The pre-commit code-tidying-remote-comment-lint and guardrails-remote-pre-commit-content hooks passed.
  • scripts/selection-audit.sh trace --strict --jobs 3 --budget 720 ran over the 23 suites that selection-audit.sh changed --base origin/main lists, which runs each suite under strace. All 23 exited 0. The one gap it found was already on main: driver.test.sh reads plugins/harness-ops/prerequisites.json and no rule selected it. It is now declared in a # test-scope: line, and affected-tests.sh --explain selects the suite for that file.
  • Findings file (gitignored): .work/reviews/chore-comment-sweep-B015/20261123T034425Z-remove-comments.md.

Related

Follow-ups

  • Pre-existing (advisory): known-issues/scripts/check-all.sh omits set -e so that expected per-row gh failures (rate limit, deleted issue) do not abort the loop. Encode that with an explicit || true on the per-row call.
  • Pre-existing (advisory): control-claude-code/driver/driver.mjs IN_SANDBOX_FLAGS drops --restricted and the scrub because the caller's sibling bwrap cannot start a nested PID-namespace bwrap (ENOSPC, test(pr-verify): probe Bash for the capture's driven session in the sibling sandbox #13711). Cause not located.
  • Pre-existing (advisory): driver.mjs holder start: /proc/<pid>/environ still shows the key the holder started with (feat(pr-pipeline): run the project's app-control skill in pr-verify after the deterministic tests #8651 covers it).
  • Pre-existing (advisory): machine-profile/scripts/profile.sh:167 checks -w only. An immutable attribute on a writable-looking file is not detected; add lsattr where a host needs it.
  • Pre-existing (advisory): observability/otel/net-probe.sh deliberately treats an ambiguous curl result (exit 28) as "free". No test pins that bias.
  • Pre-existing (advisory): the WindowsApps App Execution Alias stub workaround in overlap.test.sh, probe.test.sh and native_drift.test.sh (an outside-party stub that opens the Store or hangs).
  • Pre-existing (advisory): install_state.test.sh runs the suite by module name because unittest reads an absolute .py path as a module name on Windows.
  • Pre-existing (advisory): retirements.yaml is append-only, and nothing checks it. Add that check to lib/check-retirements.sh.
  • Pre-existing (advisory): ADR candidate. restart-consumer.test.sh section 20 said the morning-brief discovery literals are duplicated on purpose, not moved to a shared source, because the two skills install independently, and that this test is the gate.

Removed narrative

The rationale the deleted comments carried. This body is the squash commit message.

lib and scripts

  • retirements.test.sh: it runs harness-ops' own retirements.yaml through its check-retirements.sh copy against fixture repos. The morning_brief records clean only the block, the file's other keys are kept, and the demoted records stay report-only. Inherited GIT_* variables would redirect git init.
  • spawn_noise.test.sh: a cross-platform wrapper. The lib is imported by the audit-performance engine and by the performance plugin, so its tests sit beside the canonical copy. The Python floor comes from MIN_PYTHON in the engine.
  • registry-dir.mjs:
    • The contract: cascade layers, the JSON output shape and usage flags.
    • data_dir is pasted into a double-quoted shell argument, so its character set and containment rule are stricter than the hooks' rule.
    • A scratch directory stands in for home.
    • Errors are filtered per key.
  • registry-dir.test.sh: 18 numbered cases covering layer precedence, invalid values, a placeholder read as unset, symlink containment, shell-metacharacter rejection, and parity with the hooks' containment rule inside the safe set.
  • session-telemetry-state.mjs, .test.mjs and .test.sh: the output format and the read-only contract. The .test.sh wrapper exists because run-plugin-tests.sh discovers only *.test.sh.
  • fetch-changelog.sh: each source is read in turn. No claude_version is read from the manifest, so the fetcher runs no claude.

audit skills

  • audit-mod-posture/scripts/mod-posture.sh:
    • The name grammars; a name that fails its grammar prints as a fixed word (<event>{redacted} or redacted).
    • Helper signatures (filter_list, after_marker) and section dividers.
    • Guard seating: managed settings, managed-mcp.json beside managed-settings.json, or a Team or Enterprise plan. An OS policy store can also set prependPlugins, and this script reads none.
    • Installed tier: one line per installPath, enabled scoping, tier order, and - for a missing id because IFS=$'\t' would merge an empty field. Validate errors mean unknown, not none.
    • Built-in tier: can_disable comes from the overview table. enabled is the setting AND the gate; any false tengu_ flag closes the gate.
  • mod-posture.test.sh: the suite description, fixture notes, section dividers, the gate-flag rationale and the managed-mcp cleanup warning.
  • audit_performance.test.sh, landscape_ages.test.sh and install_state.test.sh: wrapper descriptions and the end-to-end contract rationale (the --note and --skip-fan-out cases).
  • audit_skill_visibility.test.sh:
    • The Python floor is parsed from the engine.
    • The fresh-install fixture must resolve every row to not-observable, so a cold report cannot libel the fleet as unused.
    • --installed counts one entry per plugin across scopes, because the fleet is the budget denominator.
    • projectPath and CLAUDE_PROJECT_DIR share one spelling, and CLAUDE_CONFIG_DIR points at the fixture, never the real ~/.claude.

behavior-probes

  • cases/lib/autocompact-project.sh: the model id goes unescaped into a JSON key, and the guard regex below enforces it.
  • cloud-routine/state-read-back-next-run/scaffold.sh: a unique run id, so the read-back skips earlier runs' comments.
  • plugin-eval/unlisted-tools-offered/scaffold.sh: allowed_tools omits Skill and Task.
  • subagent/skill-tool-skill-placeholder-effort/scaffold.sh: the shared agents preload print-effort, so only an agent without a skills key is a valid driver.

changelog

  • changelog-status.test.sh:
    • Coverage list: marker precedence, the subject fallback, body mentions never read, caps and ranges, the --no-fetch fallback chain, repo-first then docs-page fetch, page-identity refusal, the installed-version warning, env versus --ledger, and the **X.Y.Z** release format.
    • The docs cache is per fixture variant.
    • changelog-current.md 2.1.310 has 26 bullets, 2 of them [VSCode].
  • discover-surfaces.sh: helper signatures for count_depth2, emit_file and emit_tree.
  • discover-surfaces.test.sh: the coverage list. The empty-directory case guards a past set -e abort on a zero count, and the fixture needs no git or network.

control-claude-code

  • cli/account.mjs: prints the driven session's email and organization for drive's mask post-check, read in the holder's own launch environment.
  • broker.test.sh and driver.test.sh: run-plugin-tests.sh discovers only *.test.sh, so these wrappers keep the .mjs suites running in CI.
  • broker.mjs: dummy key only, so a real-key shape is refused and a misconfigured job cannot pass the real one. It also carried the KINDS, answer and listening docs.
  • broker.test.mjs: no node_modules, and expected values come from the broker contract. The read-only driver copy mirrors how the workflow mounts the base checkout.
  • driver.mjs:
    • --unattended reads credentials.ci.
    • CCD_RUNTIME_DIR is read before XDG_RUNTIME_DIR.
    • reserve takes an exclusive lock file and reclaims a dead owner after a re-read.
    • Constants: REPLY_LINE_MAX applies to holder and broker replies alike. REPLY_GRACE_MS is the wait beyond the verb timeout. LAUNCH_MS is the launch wait plus one engine install. MASK_CHAR is a value the credential pattern cannot match.
    • Masking: a masked cell also loses its style, because a meter's colors leak its level. Wide glyphs become stars.
    • Holder lifecycle: it checks for a stale socket before claude starts and frees the session before replying to stop. The lock is released last. A holder that never answers is killed.
    • O_NOFOLLOW makes a path swapped after the broker's check fail to open. Print-mode children run in their own process group.
    • Dry run: the dry-run broker request stops at the broker's unknown-option refusal.
  • driver.test.mjs:

known-issues, machine-profile, observability

  • check-all.sh:
    • The output directory is keyed per project, because CLAUDE_PLUGIN_DATA has no project segment and an unkeyed directory served one project another project's rows. It fails closed rather than falling back to the unkeyed path, names an unkeyed leftover and never reads it.
    • set -e is omitted so that expected per-row gh failures do not abort.
    • The gh/jq check comes after --print-output-dir.
    • grep -c is used, not wc -l, because the final line may have no newline.
  • check-all.test.sh: coverage and per-case notes for keying, separator safety, collision, leftover, fail-closed, no-gh, mkdir failure, foreign data directory, and unset HOME.
  • profile.test.sh: header, sections 1 to 7, and fixture HOME/OUT notes.
  • claude-observability.test.sh:
    • Header, numbered tests, helper Args: docs, and the OTEL-store isolation note.
    • A delete path is never derived from CLAUDE_PLUGIN_DATA in a skill subprocess, which once pointed at an unrelated plugin.
    • An empty window would reach find -mmin +0 and delete every session file.
  • cc-otel.test.sh: header, section headings and signature comments.
  • net-probe.test.sh: the MSYS2 no-/dev/tcp condition cannot be reproduced, so the curl and /dev/tcp branches are tested separately. It also carried the python3 dependency note and the empty-PATH fallback note.

lanes

  • telemetry-upsert.sh:
    • Argument parsing: a lone trailing flag would make shift 2 spin forever, and - must stay valid for stdin.
    • Gates before writing: the pre-write gate runs before any gh call. A hostname-shaped marker is refused before the body scan, and $REPO is validated against .. traversal.
    • Comment listing: --paginate with jq -s add. An unparseable list is an error, not an empty one.
    • Marker detection: the sentinel is matched first, then a token-boundary fallback, so lane:triage does not adopt lane:triage-old or @instance.
    • Read-back: the comment is re-read after the write. The GET is retried once, and a 404 reads as not retrievable.
    • Exit handling: INT and TERM are trapped separately. The final exit 0 keeps the last [[ ]] && from failing a verified upsert.
  • telemetry-upsert.test.sh:
    • Coverage and stub knob docs.
    • Identity resolution: User login, else SLUG[bot], else the reported Bot login.
    • Marker adoption rules.
    • A null, false or unparseable comment list exits 5.
    • Body-file containment, symlink, .., CDPATH, home path and fleet-hostname checks.
    • Oversized bodies are refused, and MIN_BODY_BYTES is pinned.
    • GitHub stores comment bodies with CRLF, so the stub emits CRLF in pure bash, because BSD sed has no \r in replacements.
  • lane-launcher.test.sh: the coverage list, the stub explanations (git, claude, gate-arm), the hermetic environment, the reasons behind claude-ops: lane-launcher never captures launch commit, leaving refresh.md's staleness probe unfillable #792, autonomy: lane-stop gate reads its enable flag off channel B, plus two stranded defects from #969 #1784, claude-ops/restart-consumer: six post-merge review findings on #1720 never reached triage #1759, fix(claude-ops): correct six restart-consumer defects found after #1720 merged #1760 and fix(harness-ops): restart-consumer reads restart_request from any sentinel comment #7203, and per-case intent: launch-commit marker naming, repo-key injectivity, cloud and untrusted-stage rules, lock/reboot/pid reclaim, schedule entries, the plugin-profile stub and the mods probe.
  • restart-consumer.test.sh:
    • Coverage and the gh stub, which fails loudly unless GH_LOG is set.
    • The breaker counts attempts, and read failures spend no budget.
    • Instance-suffixed markers surface unbound-instance.
    • Locks are reclaimed by liveness and boot id, not age.
    • The morning-brief literals are duplicated on purpose, with this test as the gate.
    • uutils mkdir (Ubuntu 25.10+) lets two racers both win, and only a tight loop reproduces it.
    • The lanes skill always passes the rendered lane_app_slug (feat(harness-ops): supply the restart consumer's and lanes telemetry's --app-slug from a lane_app_slug userConfig key #8002). Empty or a literal placeholder reads as no slug.
  • machine-behavior.test.sh, probe-lane-config.test.sh and probe-lane-config.sh:
    • Coverage lists and section banners.
    • Each probe-lane-config case asserts both the literal and the inline-equivalent output, and cases run in the current shell so the failure counter is shared.
    • run_both strips CRs because native-Windows jq emits CRLF.
    • probe-lane-config.sh takes no options, so every branch ends the run.

🤖 Generated with Claude Code

https://claude.ai/code/session_01RMa43yt8jZqGJ5kzhzjRAX

@kyle-sexton
kyle-sexton marked this pull request as ready for review November 23, 2026 03:57
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-23T03:58:59.587406Z afd2d1d Draft marked ready
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

…ops (batch B015)

ADR 0110 bulk comment sweep, batch B015: the first 150 files of
plugins/harness-ops. 41 files touched, every one COMMENT-ONLY by
change-shape.sh. The removed narrative is in the pull request body.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01RMa43yt8jZqGJ5kzhzjRAX
@kyle-sexton
kyle-sexton force-pushed the chore/comment-sweep-B015 branch from afd2d1d to 11eb932 Compare November 23, 2026 04:15
@github-actions

github-actions Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

claude-security-review reviewed 7328e7099c059b41ccb7b474605d0b804e4f3add: read 42 of 42 changed file(s); 0 finding(s), 0 as inline comments.

Chunk 1 of 2 (37 files)

Security review: chunk 1 of 2 (37 files)

No security issues found in this chunk. This review was blocking only: this lane already reviewed an earlier head, 11eb9323.

What was checked

I read every hunk of the 37 chunk-1 files in .claude-lane/chunks/chunk-1.patch:

  • New changelog fragment. .changes/harness-ops/chore-comment-sweep-b015-1a531b43.md is set to bump: none.
  • Comment-only edits in 36 files under plugins/harness-ops/:
    • Whole comment lines and runs are deleted.
    • Trailing comments are stripped from these lines: flag: () => undefined,, WHOLE, MASK_CHAR, verifyInstall(target, repair);, continue;, blank(cell);, free();, release(lock, process.pid);, buildLaunch(...), show(mirror, frame);, MAX_BODY_BYTES/MIN_BODY_BYTES, make_gh_stub "", seed_lock ..., : >"$NOTADIR", mkdir -p "$LEDGER_AS_DIR", MISSINGTEL=..., and the test helper function headers.
    • I compared each stripped line with the base line it replaces. The code is byte-identical apart from the comment.
  • One added non-comment line: # test-scope: plugins/harness-ops/prerequisites.json in driver.test.sh. It only changes which tests are selected and has no runtime effect.

Security code whose comments were removed (code unchanged)

  • registry-dir.mjs: shell-metacharacter rejection and containment.
  • telemetry-upsert.sh:
    • the owner/repo regex check, so .. cannot be injected into the API path;
    • the numeric comment-id check;
    • the pre-write body size and leak gates, and the instance check;
    • comment filtering by write identity;
    • the marker-boundary regex;
    • the INT/TERM traps.
  • broker.mjs: the ccd-dummy- key-prefix rule and the refusal of real sk-ant- keys.
  • driver.mjs:
    • the O_NOFOLLOW open;
    • the private runtime directory check;
    • lock reserve and reclaim;
    • masking;
    • clearing the CI credentials after launch;
    • the broker-socket check.
  • check-all.sh: the fail-closed state key and the foreign CLAUDE_PLUGIN_DATA guard.
  • autocompact-project.sh: the model-id regex guard.

Instruction-surface lens

The deleted text is comments in scripts and tests, not standing model instructions. The diff touches no CLAUDE.md, AGENTS.md, rules file, skill or agent body, or hook block list or allowlist. Every behaviour a removed comment described is still enforced by the unchanged code beside it. I did not consult the protected-class register, because the lens does not apply to code comments.

Other checks

  • --help output: usage() in probe-lane-config.sh and telemetry-upsert.sh prints the leading header block, and the diff removes only comments below that header.
  • Trusted paths: none of the 37 files matches a TRUSTED PATHS glob.
  • Trust controls: no trust control, token scope, kill switch or merge hold is touched.
  • Plugin manifests: no plugin.json or marketplace.json changes.
  • PR description: no embedded directives aimed at this lane.
  • Spend: none.
  • Prior findings: the only earlier post is this lane's clean whole-PR summary, so there is nothing to repeat.

Chunk 2 of 2 (5 files)

Security review: chunk 2 of 2 (5 files)

I found no security issues in this chunk. This was a blocking-only review, because the lane already reviewed head 11eb9323, so only CRITICAL and IMPORTANT findings would have been reported.

I read every hunk of the five test scripts in .claude-lane/chunks/chunk-2.patch:

  • plugins/harness-ops/skills/lanes/scripts/telemetry-upsert.test.sh
  • plugins/harness-ops/skills/machine-profile/scripts/profile.test.sh
  • plugins/harness-ops/skills/observability/claude-observability.test.sh
  • plugins/harness-ops/skills/observability/otel/cc-otel.test.sh
  • plugins/harness-ops/skills/observability/otel/net-probe.test.sh

What changed

Every hunk deletes something; nothing is added except the shortened lines below.

  • Whole comments removed. These are coverage headers, section banners, stub-knob docs and the security rationale above test cases.
  • Trailing comments stripped. These are refuse() { # NAME RECORD, accept() { # NAME RECORD, emit_hook_rows() { # <file> <count> <ts>, q() { # …, metric_point() { # …, log_record() { # …, and the counts after three assert_eq lines. I checked each new line against the line it replaces, and the code is identical.

Test assertions are unchanged

The security cases in telemetry-upsert.test.sh still run as before. They cover:

  • the --repo traversal check;
  • body-file containment, the .. escape, the symlink leaf and CDPATH;
  • the foreign CLAUDE_PLUGIN_DATA check;
  • the credential-shaped body and home-path gates;
  • the hostname marker refusal;
  • the oversized-body and under-floor gates;
  • the non-numeric id check;
  • the outsider-sentinel cases.

In claude-observability.test.sh, the empty-window find -mmin +0 guard, the data-dir refusal and the traversal refusal still run. The shellcheck directives, the # shellcheck source= line and the MSYS ln -s comment are kept.

Other checks

  • Instruction surfaces: the deleted text is code comments in test scripts. No CLAUDE.md, AGENTS.md, rules file, skill or agent body, or hook list is touched, so the instruction-surface lens does not apply. I did not consult the protected-class register.
  • Trusted paths: none of the five files matches a trusted-path glob.
  • Plugin manifests: none changed.
  • Trust controls: no token scope, kill switch or merge hold is touched.
  • Spend: none.
  • PR description: it contains no embedded directives aimed at this lane.

critical-findings: 0

@github-actions

github-actions Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

claude-review reviewed 7328e7099c059b41ccb7b474605d0b804e4f3add: read 42 of 42 changed file(s); 0 finding(s), 0 as inline comments.

Chunk 1 of 2 (37 files)

Code review: chunk 1 of 2 (37 files), blocking only

No findings. I read every hunk of the 37 files in this chunk. This lane already reviewed an earlier head (blocking only: yes), so this pass looked only for blocking problems.

Almost every changed line deletes a comment. Three kinds of line are added:

  • The changelog fragment .changes/harness-ops/chore-comment-sweep-b015-1a531b43.md, with bump: none. That fits a change that alters no behavior.
  • A new # test-scope: plugins/harness-ops/prerequisites.json line in driver.test.sh. It is correct: driver.mjs fontProbe() reads that file.
  • Lines where only a trailing comment was stripped, such as flag: () => undefined,, validate_json() {, MAX_BODY_BYTES=65536 and : >"$NOTADIR". The code on these lines is byte-identical to the base.

Checks I made on the deletions:

  • Heredocs and template literals. No deleted line sits inside a heredoc or a JS template literal.
  • Empty bodies. No function, case arm or block is left empty.
  • --help output. Scripts that print their own header as help keep that header:
    • In mod-posture.sh, probe-lane-config.sh and telemetry-upsert.sh, every edit comes after the header block that usage() reads.
    • check-all.sh prints its help from a heredoc, so removing its header comment changes nothing.
  • Tests that read source text.
    • restart-consumer.test.sh greps restart-consumer.sh, morning-brief.sh and lane-launcher.sh, and none of them changes here.
    • lane-launcher.test.sh copies lane-launcher.sh and edits the copy with sed, and that file is not changed either.
    • MIN_BODY_BYTES is pinned through the script's output, not by grepping its source, so removing the trailing comment from telemetry-upsert.sh:174 breaks nothing.
  • Markers. Every remaining # shellcheck, # test-scope: and # portability-ok: line is kept.

Closing issue: none. The PR body says "No related issue: ADR 0110 bulk comment sweep, batch B015", so there are no acceptance criteria to check.

Loosened checks: none. No test is skipped or deleted, no assertion or expected value changes, and no threshold, suppression or retry changes. The added test-scope line makes test selection stricter. Loosened checks would be marked: fail. That is the default, because the prompt has no loosened_check_verdict: or loosened_check_patterns: line; patterns: 0. The prompt has no loosened_check_decision_record: line either, so I did not check the citation requirement.

Plugin manifests: this chunk changes no plugin.json or marketplace.json.

Embedded text: nothing in the PR context file tells the lane to approve the PR, skip a check, drop a finding or post elsewhere.

Verification: I only read the diff and ran no tests. The PR body's claims are the author's and I have not checked them: change-shape.sh returning COMMENT-ONLY, the selection-audit.sh trace of 23 suites, and the shell-portability check.

Verifier dropped 0 of 0 candidates.

Chunk 2 of 2 (5 files)

Code review, chunk 2 of 2 (5 files): no findings

This lane already reviewed an earlier head of this pull request, so this review reports blocking findings only. I found none.

I read every hunk of all five files in this chunk:

  • telemetry-upsert.test.sh
  • profile.test.sh
  • claude-observability.test.sh
  • cc-otel.test.sh
  • net-probe.test.sh

Every - line removes a comment. Every + line is a base line with only its trailing comment removed, such as refuse() {, accept() {, emit_hook_rows() {, q() {, metric_point() {, log_record() { and the assert_eq lines whose # 12 + 5 + 3-style notes were dropped. The code on those lines matches the base.

What I checked in the deletions:

  • Heredocs. No deleted line sits inside the <<'STUB', <<'GETENT' or <<'JSON' heredocs in telemetry-upsert.test.sh. Each removed run is outside the data block: the stub knob notes come before cat >"$STUB_BIN/gh" <<'STUB', and the passwd-stub note comes after the STUB terminator.
  • Empty bodies. No function, if branch or loop body is left empty. In net-probe.test.sh, the if [[ "$bound" == "1" ]] branch still holds its three asserts.
  • Markers. The # shellcheck source=net-probe.sh directive, the SC2016 disable in profile.test.sh, the SC2329 trap note and the MSYS ln -s comment are all still there.
  • Readers of these files' text. I searched the repository outside markdown. No script or test reads these test files' comments: the remaining hits are only lists of suite or file names.

Closing issue: none. The PR body says "No related issue: ADR 0110 bulk comment sweep, batch B015", so there are no acceptance criteria to check.

Loosened checks: none. No test was skipped or deleted, no assertion or expected value changed, and no threshold, suppression or retry changed. Loosened checks would be marked: fail (the default, because the prompt has no loosened_check_verdict: or loosened_check_patterns: line); patterns: 0. The prompt has no loosened_check_decision_record: line, so I did not check the citation requirement.

Plugin manifests: this chunk changes no plugin.json or marketplace.json, so there are no manifest lines.

Embedded text: nothing in the PR context file or the prior-findings file tells the lane to approve the PR, skip a check, drop a finding or post somewhere else.

Verification: these results come from reading the diff and from one repository search only. I ran no tests. The PR body's verification (change-shape.sh COMMENT-ONLY, the selection-audit.sh trace of 23 suites) is the author's claim and I have not verified it.

Verifier dropped 0 of 0 candidates.

critical-findings: 0

@kyle-sexton
kyle-sexton added this pull request to the merge queue Nov 23, 2026
Merged via the queue into main with commit e70143f Nov 23, 2026
47 checks passed
@kyle-sexton
kyle-sexton deleted the chore/comment-sweep-B015 branch November 23, 2026 05:23
@github-actions github-actions Bot added the merge-path: owner-agent Post-merge accounting record (README.md, Merge paths) label Nov 23, 2026
github-merge-queue Bot pushed a commit that referenced this pull request Nov 23, 2026
…edrm, markdown-format, mcp-tools, miro, multi-agent, mutation-testing, performance (#18403)

No related issue: ADR 0110 bulk comment sweep, batch B022

## Summary

Removes code comments at the `necessary` posture (ADR 0110,
owner-approved bulk removal) from batch B022: kindle-dedrm,
markdown-format, mcp-tools, miro, multi-agent, mutation-testing and
performance. No behavior change. One `bump: none` changelog fragment per
touched plugin.

Counts:
- 98 files in the batch: 20 touched, 0 held by open PRs among the
touched files.
- 91 comment runs deleted (99 lines), 11 of them trailing signature
comments stripped from a function's opening line.
- 0 reshape flags and 0 root-cause rows.

## Fix

`/code-tidying:remove-comments necessary override` over the batch's
directory groups, with read-only triage by an external agent and a
scripted apply, then a full review of the applied diff against the keep
rules.

What was deleted: section and case labels no kept comment cites,
function signature notes (`# rec <name> <sha> [rows...]`), and comments
that restate the next line or the assertion label beside them.

Review restorations, byte-identical from the base:
- Restored whole, because their deletions removed reasons, design
decisions, outside-party constraints or oracle derivations:
`kindle-dedrm` `check-drift.sh`, `check-drift.test.sh`,
`sync-prep.test.sh`; `markdown-format` `markdown-format.test.sh`;
`mcp-tools` `inventory.test.sh` (its `Run N` label series was partly
deleted); `miro` `launcher.ts`, `launcher.test.ts`; `multi-agent`
`workflows/drift-audit.js`, `scripts/allowed-tools-pairing.test.sh`;
`mutation-testing` `suppression-lint.test.sh`; and 15
`performance/scripts` files (`ab.test.sh`, `differential.test.sh`,
`discriminate.test.sh`, `findings.test.sh`, `harness-lib.sh`,
`harness-lib.test.sh`, `pathfix.test.sh`, `ratchet.test.sh`,
`ratio.test.sh`, `resolve-python.test.sh`, `run-spawn-census.test.sh`,
`spawn-census.sh`, `spawn-census.test.sh`, `summarize.test.sh`, and
`test-helpers.sh`, a sourced library whose per-function docs are its
public API).
- Single runs restored: the glob-array rationale in `cleanup.sh`, the
cached-installer note in `sync-finalize.sh`, the one-line defect
statement in `firewall.Tests.ps1`, the escape-key fixture note in
`compare-records.test.sh`, the fixture inventory in
`dotnet-test-selection.test.sh`, the two hand-derived expectations in
`estimate-run.test.sh`, and the fixed-volume `df` shim note in
`untracked-cache-probe.test.sh`.

Override: the `override` argument lifted the GLOBAL HARD path list. The
batch's hook-wired files were `plugins/markdown-format/git-hooks/*`,
`plugins/markdown-format/hooks/markdown-format.sh`,
`plugins/markdown-format/git-hooks/lefthook-remote.yml` and
`plugins/multi-agent/hooks/drift-checker-fetch-gate.mjs`; of the lifted
paths, only
`plugins/markdown-format/hooks/markdown-format-end-of-turn.test.sh` (a
test beside a hook) is changed.

## Not changed

- UNPROVABLE (tree-sitter-bash parse errors), so restored whole:
`plugins/markdown-format/git-hooks/markdown-gates.sh`,
`plugins/mutation-testing/scripts/suppression-lint.sh`,
`plugins/performance/scripts/ab.sh`.
- `plugins/multi-agent/scripts/allowed-tools-pairing.test.sh` is also
touched by open PR #18395.
- No batch file is a copy in `scripts/shared-copies.txt` or a
destination in melodic-software/standards'
`distribution/sync-manifest.yml`.

## Verification

- `change-shape.sh` against the base returns COMMENT-ONLY (exit 0) for
all 20 touched files; the diff holds no file outside the batch list.
- A scan of every deletion hunk finds no deleted line adjacent to a kept
comment line, so no comment run is left partly deleted.
- `scripts/check-shell-portability.sh origin/main`: no unexcused
GNU-only constructs.
- The pre-commit `code-tidying-remote-comment-lint` and
`guardrails-remote-pre-commit-content` hooks passed.
- `scripts/selection-audit.sh trace --strict --jobs 3 --budget 720` over
the 9 suites `selection-audit.sh changed --base origin/main` lists: all
9 traced and exited 0, 37 tracked files read, no gap. Nothing went under
`## Not changed` for a gap.

## Related

- ADR 0110 (bulk comment removal).
- Sibling sweep PR: #18329.

## Removed narrative

What the deleted comments said. This body is the squash commit message.

- `kindle-dedrm` `cleanup.sh`: the `MODE` value list (`confirm | soft |
full`), the `rm_or_show` signature, and step labels 1 to 7 (firewall
rule, ICACLS deny, cached installer, key finder, downloads, uninstall,
Calibre reminder). `lock-updates.sh`: the `icacls_updates` signature.
`status.sh`: that paths resolve through Windows env vars (the header's
shellcheck note says the same), and the Probes and Compose JSON labels.
`sync-prep.sh`: the pre-flight label. `firewall.Tests.ps1`: what
`Get-EnabledGuard` returns.
- `markdown-format` `markdown-format-end-of-turn.test.sh`: the `expect`,
`stop` and `report` signatures and the hooks.json row note.
- `mcp-tools` `inventory.sh`: the `JQ_NORM`, `add_rows` and
`add_file_source` contracts and the user/local scope label.
`discover.sh`: signatures of `derive_server`, `lines_after`,
`to_project_rel` and `add_record`, and the TypeScript, Python and .NET
section labels. `discover.test.sh`: fixture and case labels, the
depth-cap fixture note, and the unscoped and outside-path case notes.
- `miro` `overlaps.test.ts`: the 4-choose-2 pair count.
- `multi-agent` `drift-checker-fetch-gate.test.mjs` and
`drift-audit.test.mjs`: suite descriptions, the `rawPage` and
default-stub notes, and section labels. `list-pointers.sh`: the role and
fan-out key prefixes. `list-scripts.test.sh`: two script labels.
- `mutation-testing` `compare-records.test.sh`: the `row`, `rec`,
`expect` and `expect_absent` signatures and the per-case notes that
restate each assertion. `dotnet-test-selection.sh`: the `classes_of`
output line. `dotnet-test-selection.test.sh`: the `expect` and `src`
signatures and per-case notes. `estimate-run.test.sh`: the `expect` and
`refuse` signatures.
- `performance` `untracked-cache-probe.sh`: the `not_checked` and
`volume_of` signatures. `untracked-cache-probe.test.sh`: the `probe` and
`left_in` signatures and case labels 1 to 11.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_01RMa43yt8jZqGJ5kzhzjRAX

Co-authored-by: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-path: owner-agent Post-merge accounting record (README.md, Merge paths)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant