Repository navigation
chore(comments): remove comments at the necessary posture in disk-hygiene through firecrawl - #18293
Conversation
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 Chunk 1 of 3 (40 files)Security review: chunk 1 of 3 (40 files)No security issues found in this chunk. This lane already reviewed an earlier head ( Scope. I read every hunk of
The ten copies listed in What I checked
Chunk 2 of 3 (40 files)Security review: chunk 2 of 3 (40 files)No security issues found in this chunk. This lane already reviewed an earlier head ( Scope. I read every hunk of
What I checked
Chunk 3 of 3 (7 files)Security review: chunk 3 of 3 (7 files)No security issues found in this chunk. This lane already reviewed an earlier head ( Scope. I read every hunk of
What I checked
critical-findings: 0 |
|
claude-review reviewed Chunk 1 of 3 (40 files)Code review: chunk 1 of 3 (40 files: disk-hygiene, display-redaction, docs-hygiene, and docs-naming
|
48a1982 to
d74ed75
Compare
|
The pr-verify verifier failed head What it wrote (75 lines)This pull request leaves the merge queue, and ci-status holds it out while it carries |
d74ed75 to
0c4179d
Compare
…iene through firecrawl ADR 0110 bulk comment sweep, batch B012: 86 files across 11 plugins, every file COMMENT-ONLY by change-shape.sh. The removed narrative is staged in the pull request body, which becomes the squash commit message. After review, 12 comment runs that the sweep had partly deleted were kept whole: test-wrapper-lib.sh's library header, and runs in uncommitted-md.sh, audit-encapsulation/detect.sh, audit-noise/emit-findings.sh, audit-progressive-disclosure/detect.sh, articles-setting.sh, audit-scan.sh, emit-verify-facts.sh, resolve-config.sh, emit-gate.test.sh (two), apply-rename.sh and firecrawl update.test.sh. After pr-verify, 4 exit-code contract runs were kept whole: the detect-caveman.sh header (Output and Exit), the exit-code pointers in the docs-hygiene and education setup-apply.mjs, and the contract line of dometrain update.test.sh. The emit-gate.test.sh header run naming its template basenames for the affected-tests mapping was also kept whole. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01RMa43yt8jZqGJ5kzhzjRAX
0c4179d to
1e457c8
Compare
No related issue: ADR 0110 bulk comment sweep, batch B012
Summary
Removes code comments at the
necessaryposture (ADR 0110, owner-approved bulk removal) from 86 files in 11 plugins: disk-hygiene, display-redaction, docs-hygiene, docs-naming, domain-driven-design, dometrain, education, eol-normalizer, event-storming, external-agents and firecrawl. No behavior change. Each touched plugin gets abump: nonechangelog fragment.Counts: 115 files in the batch, 86 touched, about 3,394 comment lines deleted, 34 reshape flags, 13 root-cause rows, 7 ADR candidates listed but not recorded, 0 held by open PRs.
Fix
/code-tidying:remove-comments necessaryover four plugin groups, run bycode-tidying:comment-revieweragents. Kept in every file: shebangs,shellcheckdirectives with their justifications,test-scope:,portability-ok:,discriminating-skip-ok:andspellchecker:markers, exit-code lists, public-API doc comments, outside-party constraints of two lines or fewer, and the comment headers that seven docs-naming scripts print as--helpthroughsed -n '2,/^set -uo/p'.The GLOBAL HARD path list (hook-wired scripts) was lifted by the
overrideargument, on an owner decision, for these batch paths. All four were triaged and edited, with the behavioral guards and COMMENT-ONLY still in force:plugins/disk-hygiene/hooks/resume-notice.mjsplugins/disk-hygiene/hooks/run-python-hook.shplugins/display-redaction/hooks/register.tsxplugins/eol-normalizer/hooks/eol-normalizer.shNo lefthook or other git-hook config is in this batch.
Not changed:
plugins/docs-hygiene/skills/audit-noise/scripts/detect.shis UNPROVABLE because its HEAD has tree-sitter parse errors, so it stays as it is.build-explainer.test.shandbuild-report.test.sh) are data, and deleting them reads CODE-CHANGED.docs-naming/skills/setup/scripts/setup-apply.shline 183 is kept because of a parser quirk.Verification
change-shape.shagainst the merge base returns COMMENT-ONLY for all 86 files, and the diff holds no file outside the batch list.plugins/disk-hygiene/scripts/test-wrapper-lib.sh(that file is now unchanged), and runs inuncommitted-md.sh,audit-encapsulation/detect.sh,audit-noise/emit-findings.sh,audit-progressive-disclosure/detect.sh,articles-setting.sh,audit-scan.sh,emit-verify-facts.sh,resolve-config.sh,emit-gate.test.sh(two),apply-rename.shand firecrawlupdate.test.sh. The branch is one commit on the merge base, so no restored line is an addition.detect-caveman.shheader (its Output block andExit: always 0), the exit-code pointers in the docs-hygiene and educationsetup-apply.mjs, and the exit-code contract line of dometrainupdate.test.sh. Every touched script keeps its ownExit:line or exit-code list.emit-gate.test.shheader run naming its template basenames (check-file-names.sh.tmpl,check-file-names.test.sh.tmpl,file-names-rule.md.tmpl) for the affected-tests mapping is kept whole. No other deleted comment in a touched test file is a mapping marker:scripts/affected-tests.shcounts no comment-only line as naming a file (its COMMENTS rule), and the floor directives it does read (# shellcheck source=,test-scope:) were all kept..test.shsuites;run-python-hook.test.shandresume-notice.test.sh;update.test.sh(95/95);runner.test.mjs(87 passed).code-tidying-remote-comment-lintandguardrails-remote-pre-commit-contenthooks passed.Related
Removed narrative
The rationale the deleted comments carried. This body is the squash commit message.
disk-hygiene
run-python-hook.sh
python3(fix(disk-hygiene): guard-launch detector shares the guard's interpreter, so it is blind to the interpreter fail-open #1504, disk-hygiene: skill-scoped guard hook still launches via barepython3in exec form (latent Windows fail-open) #2568, fix(repo-hygiene): destructive-guard fail-open on Windows — shell-form hook launch + jq fail-closed degraded mode #1006). Callers use node exec form via exec-bash.mjs (Adopt exec-form hook rows fleet-wide once upstream #90495 is ruled out on Windows #3686). Skill-frontmatter args may substitute only${CLAUDE_PLUGIN_ROOT}(fix(disk-hygiene): stop guard hook fail-open on skill-hook data-root token #1014).hygiene.py, or an empty payload, denies. Engine-gate with a marker-free payload proceeds with a notice, because anaskon every PowerShell call is a work stoppage. engine_context blocks expansion. The monitor emits a once-per-run systemMessage.Bash|PowerShell, process spawns cost a lot on Windows, a floor probe reads the engine'sMIN_PYTHONinside each candidate (one spawn per candidate), andsys.executableis printed as filesystem-encoded bytes.$(...)forks a subshell, which costs a process on MSYS.--marker-root,--launch-marker,--skip-unless-marker,--only-skill): Stop rows accept neithermatchernorif, so the gate lives here..launchedand from the monitor to.seen. A launch removes.seen, truncates.launched, then writes the token.--marker-rootis passed explicitly, not read fromCLAUDE_PLUGIN_DATA, which can name another plugin's data directory.${key: -96}is avoided because a negative offset past the length yields an empty string in bash.mvpublishes the cache record atomically, andchmodis close to a no-op on MSYS.run-python-hook.test.sh
MIN_PYTHON(refactor(disk-hygiene): derive the Python version floor from one origin #1028, guardrails: block-windows-drive-tmp misses a write utility invoked by absolute path #3502), proven with a decoy second line and a recordingsedshim.sys.executable;written=epoch, since an env knob is deliberately absent.strace -ftakes the process census because a PATH shim andset -xmiss forks that never exec.mkdir -punder a regular file stages "unwritable" structurally, because MSYS cannot set permission bits. The ownership cases need root.resume-notice.mjs and its test (#9853)
--resumestarts a new process. The marker is written by the UserPromptExpansion and PreToolUse Skill rows. The notice is not a gate and always exits 0. On Windows the tmp fallback is a Git Bash path, so only the marker root counts there.python3_alias_probe.test.sh
display-redaction
blankrenders every string whole with no pattern run./clearhas no session.start.docs-hygiene
allowed-tools-pairing.test.sh
bashis not a stripped wrapper. Only direct invocation in the body with a direct path in the rule is both live and not interpreter-led. Quoted body paths do not match unquoted rules.${CLAUDE_SKILL_DIR}is a repo convention.${CLAUDE_PLUGIN_ROOT}does substitute; runtime matching is the unverified part.expected_grantedguards a deliberate grant narrowing that the pairing checks cannot catch.note()avoids theSKIP:prefix becauserun-plugin-tests.shcounts that prefix as an absent-tool skip.uncommitted-md.sh
$0.audit-encapsulation/detect.sh
../context/public-surface-contract.md.grep -oemits one record per cite, so co-cited private cites survive.audit-noise/emit-findings.sh
negationis emitted, because the other eight shapes have no crosswalk row. They are counted as declined, never dropped silently.description:orwhen_to_use:, because check-skill.sh treats losing a trigger phrase as an auto-invocation regression.branch:must match fix-pass-mode exactly. The script refuses when the branch cannot be resolved (a detached HEAD in CI).noise-shapes.sh and its tests
.work/*/roots are exempt only in bare form.'veand'dare admitted before a participle.'reis excluded because it would match the generic "as you're asked". Apostrophes are literal alternatives, not a bracket class, because a C locale is byte-based.e.g.cannot suppress a later prohibition.secretarycontainssecret.don.tmatchesdonut.>and)are unescaped in bracket expressions because\>is a GNU word boundary and the portability lint rejects it. The[[ =~ ]]pattern is held in a variable because an unquoted>parses as a redirection.audit-noise/detect.test.sh
flush_negationoverwrites it.-zdiscovery is tested with->, backslash, octal-escaped, control-byte and newline paths (fix(docs-hygiene): audit-noise porcelain parse mangles paths containing " -> " and leaves \\ escaped #3143, fix(docs-hygiene): audit-noise silently skips uncommitted paths git quotes or renders with an arrow #3164, fix(docs-hygiene): gate the porcelain rename split and unescape \\ (0.19.1) #3171).fixture_landedguards filesystems that rename>or a tab.esc_discriminatorsguards do the same.${record:3}, must resolve to a real committed file or the assertion is vacuous.audit-progressive-disclosure/detect.sh and its tests
at_repo_root. A nested CLAUDE.md or AGENTS.md is invocation tier.md_linksneeds|| trueon grep, because exit 1 under pipefail otherwise reported every backtick-cited spoke as an orphan (82 of 133 corpus orphans).compress, extract-ssot and setup
compress_articlesis read from the repository layer only. audit-scan.sh counts occurrences, not lines, and lists@-prefixed alternatives first.set -e. It requiresenabled=truebecause a disabled plugin loads no skills.-eand pipefail so a partial grep failure does not abort a fact run.docs-naming
redirect_map: nullandexempt_paths: []are restored. An empty value must error rather than inherit a lower layer.[[ -e ]]lies on case-insensitive checkouts. The collision pass folds files and parent directories (pre-commitcheck-case-conflict). A pathspec outside the repo makesgit ls-filesprint nothing, so it is validated.\b, because\bmatches inside hyphenated names. A one-word stem is review-only, and the stem is ERE-escaped.-v, and single-quoting everything that reaches the emitted shell. Also:bash -n;@@SHEBANG@@to avoid the exec-bit gate;mvloses the exec bit.applyingstatus.-vis avoided for escape processing because gawk and mawk differ.GIT_DIRand related variables);$HOME;assert_*cases cover the injection hazards.domain-driven-design
dometrain
--applyis maintainer-only: use a clone, never the installed cache. There is no CLI to install, only vendored prose to diff.education
escapeHtml. A page is stamped, then refused unlessvalidateRenderedPageaccepts it. Pages are self-contained: inline style, with no script, image or link. build-lesson relies on the raw concept name appearing in the concept meta tag for its slug-collision guard.click,style,classDef).%%{}%%directives, HTML and#are written as entity codes. Mermaid refuses an empty quoted label, so an empty one becomes a single space.$-expansion.${user_config.*}must never reach the pre-compute line, because a surviving literal is a bash bad-substitution that kills the call.canonicalizeusescd+pwd -Pbecause Git for Windows returns the same directory in three forms (C:/repo,/tmp/x,/c/repo) andrealpathpasses them through unchanged.--git-common-dircan come back in drive-letter form on Windows, which a/*test reads as relative.≠ $HOMEguard exists because a headless box answers the Documents query with$HOME.lsparse, to survive whitespace. Roots are scanned highest precedence first, so the 20-line cap keeps those.[[:space:]]*$absorbs CRLF.grep -o, not-c, because two markers on one line would otherwise pass and silently drop the second asset. A marker line is replaced whole, so it must hold the marker alone. Whitespace is stripped from both sides, which also covers CRLF.BINMODE=3is passed (the reason is in the header ofsplice-assets.awk). Each spliced asset ends with a guaranteed final newline.tr, notgrep, because Git Bash's grep opens files in text mode and would report 0.eol-normalizer
git check-attr eol textcall. There is no extension fast-path list, because a hardcoded list brings back the bug this lib removes.* text=auto eol=lfmakes check-attr reporteol: lffor binaries too. It mirrors gitattributes:textis trusted,-textskips,text=autocontent-sniffs, andeolwithtextunset implies text.read -N(bash 4.1+) is absent.readcounts characters, so the probes run underLC_ALL=C, which is restored afterwards.buffer_is_binarywindow) with NUL as the delimiter, which gives three distinguishable states. It must use-n, never-N:-Nignores the delimiter and would report every binary file as text.-N. It is deliberately broader than the rewrite (a lone CR answers true), so at worst it costs one needless rewrite and never misses one. NULs are dropped from the chunk but still consumed. Withoutread -Nthe probe answers true.crlfarm always carries needed=1, because proving "no bare LF" would need logic for lines that straddle chunks.cp -pfirst becausechmod --referenceis GNU-only. The no-perl fallbacks usetr -d '\r'(text files carry no lone CR) and an awk that handles bare LF only.file_path, and the script returns unless a Write, Edit or MultiEdit is present, so a Bash-only batch costs one node process..gitattributesdecides.git check-attris anchored at the file's directory, so it works for clones, linked worktrees and bare-hub clones..githooks/and gitignored files are skipped unlesseol_normalizer_lint_gitignoredis true, and that check runs only for files with something to rewrite.if(hooks reference). Anifwould narrow the.gitattributesfile set (formatter hooks: applicability is decided three times per plugin while the declarative manifest filter is used by one sibling (deepening candidate) #3411), andasynccould race the next Edit.--run-if-unset-or-truein exec-bash.mjs, and the expected verdict comes from the script's own line.commandto force the mktemp fallback; without mode preservation a 755 script comes back non-executable.set -u(through SHELLOPTS or BASH_ENV) must not turn an unset option into a failed row.git addapplies the same.gitattributesto the stored bytes, so re-staging a rewritten file can never change a commit. Each shape is staged raw and again afternormalize_eol_file. The two blobs must match, and theeol=arms must carry no CR.event-storming
escapeHtml, and the page is self-contained.external-agents
fact: returns a cached fact for this version, or the command's output cached now; throws when the CLI gives none.checkAddDirsrefuses an--add-dirvalue that is not an existing directory named by an absolute path.fenceForreturns the mode's spec with any--unsandboxedvariant applied, plus the fence name the job records.settle: arunningjob is over once both the CLI and the runner that writes its result are gone, because the runner may still be recording a CLI that has finished.firecrawl
update.sh
--applyand--record-upstreamrewrite upstream.md. Consumers update through/plugin marketplace update.--checkis read-only.--applyinstallsfirecrawl-cli@latest, turns off the CLI's self-update, and records the CLI version and the rollback target. It keeps the recorded upstream SHA and never touches SKILL.md.--record-upstreamrecords the fetched SHA and installs nothing. It runs only after Gate 2 or when there is no content delta, so a declined integration keeps showing as drift.firecrawl init, never installs upstream bundled skills, and never writes upstream SKILL.md content beyond a temporary fetch.set -eis deliberately absent so exit codes are captured explicitly. The source guard runs main only when the script is executed, not when the tests source it.--failstops an HTTP error page from being hashed as SKILL.md, which would poison upstream.md on--applyand mask drift on--check.recorded_fieldreturns empty when the file or line is absent, or when the value is a never-synced placeholder.rewrite_upstream_mdwrites an unrecorded value as that placeholder, so--checkstill reads the skill as never synced.require_npm_owned_command: an install changes whatfirecrawlruns only when npm's global bin holds the command. No command at all counts as a fresh install.run_apply:--record-upstreamafter Gate 2 advances them.update.test.sh
--checkcases the network is stubbed. Drift outranks unverifiable, so the upstream check still runs when npm is down. A trailing space is not part of a recorded value.--applycases run a copy of the script in a fixture skill directory.--applyleaves the SHA alone;ADR candidates (listed, not recorded: unattended run)
--marker-rootis passed explicitly, rejecting a read ofCLAUDE_PLUGIN_DATA.ENVIRON[]and single-quoting, rejecting awk-vor sed substitution.git addalready applies.gitattributes.Reshape flags
Moves that would make each deleted comment unnecessary. None is applied here.
TTLto say it is compiled in, for examplereadonly CACHE_TTL_COMPILED_IN.cleanup().SKIP:.CROSSWALK_SHAPESconstant and extract arequire_branchfunction.is_entry_surface_cite.md_links || truein agrep_or_emptyhelper.usage()functions print their own comment header throughsed. Moving the help into a heredoc would let the header go.quotedandhumantosh_single_quote_listandprose_list.read -nversus-Nsemantics ofnormalize_eol_is_binaryandnormalize_eol_has_crin the names or a test.canonicalize: a regression test per path alias form.settletosettleOnceCliAndRunnerGone.facttocachedFactOrFetch.curl --failflag in a variable.require_npm_owned_commandto say that it refuses a foreign owner.disable_cli_self_update,registry_preflightandrewrite_upstream_mdfromrun_apply, and name its keep-SHA and keep-date arguments.recorded_field.run_stubbednamed variables, and extractinstall_test_cleanup_trap.Follow-ups
exec-bash.mjsmakes its own skip before bash starts and does not check marker-directory ownership.python3is exec'd and the guard never runs.HOMEis an input to a security control through the cache path.tempfile.gettempdir()differs from${TMPDIR:-/tmp}.tr -d '\r', a workaround nothing tracks.${CLAUDE_SKILL_DIR}convention rests on runtime matching nobody has verified. Verify it, then keep or drop the convention.[[ =~ ]]), so no comment pass can prove an edit to it.curl --faildefense against hashing an HTTP error page.run_apply: only test section 10 covers "--apply never advances the upstream SHA".settle: no named test covers "a running job is not settled while the runner is still recording".🤖 Generated with Claude Code
https://claude.ai/code/session_01RMa43yt8jZqGJ5kzhzjRAX