Skip to content

chore(test): add temp cleanup guard scan#78416

Closed
hxy91819 wants to merge 7 commits into
openclaw:mainfrom
hxy91819:chore/test-temp-cleanup-guard
Closed

chore(test): add temp cleanup guard scan#78416
hxy91819 wants to merge 7 commits into
openclaw:mainfrom
hxy91819:chore/test-temp-cleanup-guard

Conversation

@hxy91819

@hxy91819 hxy91819 commented May 6, 2026

Copy link
Copy Markdown
Member

Summary

  • add scripts/check-test-temp-cleanup.mjs to scan tracked test files for mkdtemp usage without obvious scoped cleanup
  • add test/scripts/check-test-temp-cleanup.test.ts coverage for the scanner and its JSON mode
  • expose the scanner through pnpm lint:tmp:test-temp-cleanup

Why this matters

  • temp test directories under /tmp are easy to forget, but they accumulate across repeated local and CI runs
  • leftover trees can trigger host security scanners, create noisy operational alerts, and make real residue harder to distinguish from harmless test artifacts
  • even when the contents are benign, routine cleanup reduces false alarms and keeps test hygiene visible in code review

Current scan snapshot

  • 38 tracked test files currently match the heuristic
  • 29 are error level (no obvious cleanup signal)
  • 9 are warning level (rm present but no afterEach / afterAll / finally scope)

Current limitations

  • this is intentionally a lightweight heuristic, not a full AST or control-flow proof
  • false negatives are still possible, especially when cleanup exists elsewhere in the file but is unrelated to a specific mkdtemp call
  • false positives are also possible when cleanup happens through helpers or patterns this scan does not recognize yet
  • this PR adds the scan first so we can review the signal/noise tradeoff before tightening the heuristic or wiring it into broader gates

Validation

  • OPENCLAW_VITEST_MAX_WORKERS=1 pnpm test test/scripts/check-test-temp-cleanup.test.ts
  • node scripts/check-test-temp-cleanup.mjs --json

Notes

This PR intentionally adds the guard as a standalone scan first. It does not fix the existing findings yet, so maintainers can review the heuristic and rollout strategy before wiring it into broader gates.

@openclaw-barnacle openclaw-barnacle Bot added scripts Repository scripts size: S maintainer Maintainer-authored PR labels May 6, 2026
@clawsweeper

clawsweeper Bot commented May 6, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed May 27, 2026, 5:51 AM ET / 09:51 UTC.

Summary
Adds a standalone scripts/check-test-temp-cleanup.mjs mkdtemp cleanup scanner, fixture-backed tests, and a lint:tmp:test-temp-cleanup package script.

PR surface: Tests +156, Config +1, Other +187. Total +344 across 3 files.

Reproducibility: not applicable. this is internal test-tooling cleanup rather than a bug report. Source inspection and exact-head CI/check-run evidence are the relevant validation path.

Review metrics: 1 noteworthy metric.

  • Package manifest dependency delta: 0 dependency specs changed; 1 lint script added. The dependency-changed label is caused by package.json, but the diff adds a script entry without changing package resolution.

Merge readiness
Overall: 🐚 platinum hermit
Proof: 🌊 off-meta tidepool
Patch quality: 🐚 platinum hermit
Result: ready for maintainer review.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Rank-up moves:

  • none

Risk before merge

  • One exact-head broad check was still in progress when inspected; merge should wait for required checks to settle.
  • The scanner intentionally remains heuristic and currently reports existing findings, so maintainers still need to accept the signal/noise tradeoff before broadening the gate.

Maintainer options:

  1. Decide the mitigation before merge
    Keep the guard as a standalone lint script first, accept the heuristic only if the current signal is useful, and wire it into broader checks later after the current findings and noise profile are reviewed.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Next step before merge
Human review is the right lane because the PR is maintainer-labeled and the remaining decision is heuristic rollout acceptance, not a concrete code repair.

Security
Cleared: The diff adds a local repository scan script, fixture tests, and one package script; it does not add dependencies, lockfile changes, secrets handling, or new supply-chain execution.

Review details

Best possible solution:

Keep the guard as a standalone lint script first, accept the heuristic only if the current signal is useful, and wire it into broader checks later after the current findings and noise profile are reviewed.

Do we have a high-confidence way to reproduce the issue?

Not applicable: this is internal test-tooling cleanup rather than a bug report. Source inspection and exact-head CI/check-run evidence are the relevant validation path.

Is this the best way to solve the issue?

Yes, with maintainer acceptance of the rollout: adding the scan as a standalone script is a narrow way to review the heuristic before wiring it into broader gates.

AGENTS.md: found and applied where relevant.

Codex review notes: model gpt-5.5, reasoning high; reviewed against 8c6da93fdf7c.

Label changes

Label changes:

  • add P3: This is low-risk internal test hygiene/tooling work rather than a user-facing bug or urgent runtime regression.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: Not applicable because this is a repository-member, maintainer-labeled internal tooling PR rather than an external contributor PR subject to the proof gate.

Label justifications:

  • P3: This is low-risk internal test hygiene/tooling work rather than a user-facing bug or urgent runtime regression.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: Not applicable because this is a repository-member, maintainer-labeled internal tooling PR rather than an external contributor PR subject to the proof gate.
Evidence reviewed

PR surface:

Tests +156, Config +1, Other +187. Total +344 across 3 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 156 0 +156
Docs 0 0 0 0
Config 1 1 0 +1
Generated 0 0 0 0
Other 1 187 0 +187
Total 3 344 0 +344

What I checked:

  • Repository policy read and applied: Read the full root AGENTS.md and the scoped scripts guide; the protected maintainer-labeled PR policy and scripts guidance affected the keep-open/manual-review verdict. (AGENTS.md:1, 8c6da93fdf7c)
  • Current main does not already contain this guard: A current-tree search found no check-test-temp-cleanup script or package command, and GitHub exact search for check-test-temp-cleanup found only this open PR plus unrelated temp-cleanup PRs. (package.json:1514, 8c6da93fdf7c)
  • PR source adds the scanner: The PR head lists tracked test roots, detects mkdtemp bindings, skips sparse-missing files on ENOENT, renders JSON/text reports, and keeps the argv fallback inside main. (scripts/check-test-temp-cleanup.mjs:21, 91883310dfb3)
  • PR tests cover the reviewed behavior: The added tests cover obvious leaks, UI test roots, hooks without cleanup, unrelated cleanup, sparse-missing files, and JSON rendering against hermetic temporary git repos. (test/scripts/check-test-temp-cleanup.test.ts:31, 91883310dfb3)
  • Package manifest change is script-only: The only package.json diff adds lint:tmp:test-temp-cleanup; no dependency spec or lockfile changes are present in the PR files list. (package.json:1514, 91883310dfb3)
  • Earlier review comments appear addressed: Review comments flagged broad suppression, sparse checkout ENOENT, live-repo-coupled JSON tests, and binding-aware cleanup; the latest diff includes corresponding fixes and fixture coverage. (scripts/check-test-temp-cleanup.mjs:50, 91883310dfb3)

Likely related people:

  • hxy91819: Authored merged test temp-dir cleanup commits shortly before this PR and carries the current scanner branch, so they have the strongest recent context for the rollout. (role: recent temp-cleanup contributor; confidence: high; commits: cbba122cddeb, bb25e48972a9, 91883310dfb3; files: src/cli/update-cli.test.ts, test/scripts/github-activity-helper.test.ts, scripts/check-test-temp-cleanup.mjs)
  • vincentkoc: Current-main blame shows recent work on scripts/lib/ts-guard-utils.mjs and adjacent package script lines imported/extended by this PR. (role: recent script utility contributor; confidence: medium; commits: ca990f2ce1ca, 1ba4448a60b6; files: scripts/lib/ts-guard-utils.mjs, package.json, scripts/check-no-random-messaging-tmp.mjs)
  • steipete: Recent history includes shared script-helper refactoring that is adjacent to the guard utility pattern this PR follows. (role: adjacent script helper contributor; confidence: medium; commits: 1d7d268a636b, a374c3a5bfd5; files: scripts/lib/ts-guard-utils.mjs, package.json)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

How this review workflow works
  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: defd24a732

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread scripts/check-test-temp-cleanup.mjs Outdated
@hxy91819

hxy91819 commented May 6, 2026

Copy link
Copy Markdown
Member Author

Adjusted the scanner to reduce the false-negative case the bot pointed out, without moving to an AST-heavy approach.

What changed:

  • the guard no longer suppresses a file just because it contains any afterEach / afterAll / finally
  • it now only suppresses when a file has both a cleanup call (rm/rmSync) and a lifecycle/finally cleanup scope
  • files that have hooks but no cleanup call remain flagged, which is the important case for the current rollout

Why this shape:

  • the goal here is lightweight signal, not proof
  • false negatives are acceptable to a point, but the earlier version was too easy to bypass accidentally
  • this keeps the rule simple and cheap while making the most obvious false-negative category harder to miss

Re-ran validation:

  • OPENCLAW_VITEST_MAX_WORKERS=1 pnpm test test/scripts/check-test-temp-cleanup.test.ts
  • node scripts/check-test-temp-cleanup.mjs --json

Current scan after the adjustment:

  • 79 findings total
  • 70 error
  • 9 warning

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8b4a309800

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread scripts/check-test-temp-cleanup.mjs Outdated
@hxy91819

hxy91819 commented May 6, 2026

Copy link
Copy Markdown
Member Author

Addressed the new bot review points.

Changes:

  • made the scanner sparse-safe by skipping tracked test files that are absent on disk (ENOENT), so sparse worktrees do not fail the scan outright
  • replaced the brittle current-main fixture expectations with hermetic temporary git repos inside the test, so the test no longer depends on whichever repo files happen to be clean or dirty today
  • added focused coverage for:
    • obvious leak
    • hooks without cleanup call still being reported
    • lifecycle + cleanup call being suppressed
    • sparse-missing tracked file being skipped

Re-ran:

  • OPENCLAW_VITEST_MAX_WORKERS=1 pnpm test test/scripts/check-test-temp-cleanup.test.ts
  • node scripts/check-test-temp-cleanup.mjs --json

Current scan after this update is unchanged in shape:

  • 79 findings total
  • 70 error
  • 9 warning

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4453d40602

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread test/scripts/check-test-temp-cleanup.test.ts Outdated
@hxy91819

hxy91819 commented May 6, 2026

Copy link
Copy Markdown
Member Author

Handled the last review point.

What changed:

  • kept main() as the CLI entry path
  • extracted renderTestTempCleanupReport(...) so tests can drive JSON rendering against a controlled fixture root instead of the live repo state
  • updated the JSON-output test to use a hermetic temporary git repo fixture, so it no longer depends on whether the current repository happens to have findings

Also retained the earlier sparse-checkout fix:

  • tracked-but-missing files now skip on ENOENT

Re-ran:

  • OPENCLAW_VITEST_MAX_WORKERS=1 pnpm test test/scripts/check-test-temp-cleanup.test.ts
  • node scripts/check-test-temp-cleanup.mjs --json

Current scan remains:

  • 79 findings total
  • 70 error
  • 9 warning

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b58754af5c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread scripts/check-test-temp-cleanup.mjs Outdated
@hxy91819

hxy91819 commented May 7, 2026

Copy link
Copy Markdown
Member Author

Review follow-up: here is the full path from the initial guard to the current heuristic, including what the bot surfaced and why the implementation changed the way it did.

Goal

This guard exists for one practical reason:

  • tests create temp dirs under /tmp
  • cleanup is sometimes missing
  • those leftovers can persist long enough to trigger security scanners and operational noise

So the guard is trying to answer a narrow question:

Does this test file create temp dirs with mkdtemp
and fail to show an obvious cleanup path?

Not a full correctness proof. Just a lightweight repo-local detector that is cheap enough to run regularly.

Review path

1. Initial version

The first pass was intentionally simple:

mkdtemp found
  + no rm(...) in file        => error
  + rm(...) but no lifecycle  => warning
  + rm(...) + lifecycle hook  => suppress

That gave us a usable first signal, but the bot correctly pointed out that the suppression rule was too broad.

2. False negative: file-level suppression was too coarse

The first real issue was:

any rm(...) in file
+
any afterEach/afterAll/finally in file
=> suppress the finding

That can hide a real leak when the cleanup is for some unrelated path.

ASCII shape of the bug:

file
├─ const tempDir = mkdtemp(...)
├─ afterEach(() => rm(cacheDir))
└─ no cleanup for tempDir

old heuristic: "looks cleaned up"
actual state:  tempDir still leaks

That was the main behavioral flaw in the original rule.

3. Sparse checkout failure

The bot also found that git ls-files can list tracked test files that are absent in a sparse worktree.

git ls-files -> path exists in index
fs.readFile  -> ENOENT in sparse worktree

The fix there was straightforward: skip tracked-but-missing files on ENOENT instead of aborting the whole scan.

4. JSON test was coupled to live repo state

The earlier JSON-output test called the CLI path against the current repository and asserted that findings existed.

That meant the test would eventually fail for the wrong reason:

repo gets cleaner
=> fewer findings
=> JSON test fails
=> output code is fine, test is wrong

So the test was changed to run against a hermetic temporary git fixture instead of the live repository.

5. Remaining false negative: cleanup must match the same mkdtemp binding

The last bot point was the important one and is what the latest commit addresses.

The scanner now looks for variable bindings created from mkdtemp(...) / mkdtempSync(...), and only treats cleanup as relevant when the cleanup call references that same binding.

before
------
mkdtemp + any rm + any lifecycle = maybe suppressed

after
-----
mkdtemp bound to tempDir
cleanup must reference tempDir
and file must still show lifecycle/finally scope

ASCII view:

before

mkdtemp(tempDir)
     |
     +---- any rm(...) anywhere ------------------+
     +---- any afterEach/afterAll/finally -------+--> suppress


after

mkdtemp(tempDir)
     |
     +---- rm(... tempDir ...)? ---- yes ----+
     |                                       |
     +---- lifecycle/finally scope? -- yes --+--> suppress
     |
     +---- otherwise ----------------------------> report

That keeps the implementation lightweight, but removes the most obvious source of false negatives.

Important decisions

Decision 1: stay heuristic, do not jump to AST parsing yet

We explicitly kept this as a regex/string-based guard instead of moving straight to AST/dataflow analysis.

Reason:

  • this is a repo hygiene detector, not a production parser
  • we wanted to improve signal quickly without turning the script into a complex static-analysis subsystem
  • false negatives are somewhat acceptable here
  • high noise would be worse than imperfect coverage

So the design target is:

cheap to run
easy to understand
good enough to catch the common leaks

Decision 2: bias against noisy suppression

The review path made it clear that broad suppression is more dangerous than broad reporting.

So the current heuristic prefers this tradeoff:

if cleanup is not clearly tied to the mkdtemp binding
=> keep the finding

That may still leave some warnings/errors that a smarter analyzer could dismiss, but it avoids silently hiding obvious leaks.

Decision 3: keep fixture-backed tests for scanner behavior

The scanner tests now validate behavior through tiny temporary git repos.

That gives us deterministic coverage for:

  • leaking temp dirs
  • lifecycle hooks without cleanup
  • unrelated cleanup not suppressing another temp dir
  • sparse-missing tracked files
  • JSON output shape

Current boundary / limitation

This is still not full semantic analysis. The scanner can miss or over-report more complex patterns.

Examples of remaining boundaries:

  • aliasing or re-exported helper cleanup paths
  • cleanup hidden behind helper functions the regex cannot connect back to the binding
  • destructuring or more complex dataflow around temp-dir ownership
  • non-standard lifecycle shapes that do not resemble afterEach, afterAll, or finally

So the rule should be read as:

obvious cleanup shown inline or near-inline => likely suppressed
non-obvious cleanup                         => likely still reported

That is deliberate for this rollout.

Why this matters beyond the script

The underlying operational issue is not just test neatness.

Residual temp directories can:

  • create noisy vuln or secret-scan findings because extracted packages remain under /tmp
  • make local and CI environments harder to reason about
  • hide real cleanup regressions until they accumulate

So this guard is part of keeping test residue from becoming a security and operations distraction.

Validation rerun

Re-ran after the binding-aware fix:

  • OPENCLAW_VITEST_MAX_WORKERS=1 pnpm test test/scripts/check-test-temp-cleanup.test.ts
  • pnpm exec oxfmt --check --threads=1 scripts/check-test-temp-cleanup.mjs test/scripts/check-test-temp-cleanup.test.ts
  • node scripts/check-test-temp-cleanup.mjs --json

In short:

v1: detect mkdtemp broadly
v2: sparse-safe
v3: hermetic JSON test
v4: suppression tied to the same temp-dir binding

That is a materially better floor without over-engineering the rule.

@github-actions github-actions Bot added the dependencies-changed PR changes dependency-related files label May 16, 2026
@github-actions

github-actions Bot commented May 16, 2026

Copy link
Copy Markdown
Contributor

Dependency Changes Detected

This PR changes dependency-related files. Maintainers should confirm these changes are intentional.

Changed files:

  • package.json

Maintainer follow-up:

  • Review whether the dependency changes are intentional.
  • Inspect resolved package deltas when lockfile, shrinkwrap, or workspace dependency policy changes are present.
  • Treat package-lock.json and npm-shrinkwrap.json diffs as security-review surfaces.
  • Run pnpm deps:changes:report -- --base-ref origin/main --markdown /tmp/dependency-changes.md --json /tmp/dependency-changes.json locally for detailed release-style evidence.

@hxy91819
hxy91819 force-pushed the chore/test-temp-cleanup-guard branch from 0b29216 to 9188331 Compare May 27, 2026 09:43
@hxy91819

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented May 27, 2026

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: the existing ClawSweeper review comment will be edited in place when the review finishes.

Re-review progress:

@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. labels May 27, 2026
@clawsweeper

clawsweeper Bot commented May 27, 2026

Copy link
Copy Markdown
Contributor

ClawSweeper PR egg

✨ Hatched: 🥚 common Mossy Proofling

Hatch command

Comment @clawsweeper hatch when this PR is hatchable.

Hatchability rules:

  • Merged PRs are hatchable.
  • Open PRs are hatchable when they are status: 👀 ready for maintainer look, status: 🚀 automerge armed, or labeled clawsweeper:automerge.
  • Closed unmerged PRs are hatchable only when one of those hatchable labels is still present in the durable record.

Rarity: 🥚 common.
Trait: sleeps inside passing CI.
Image traits: location release reef; accessory CI status badge; palette violet, aqua, and starlight; mood mischievous; pose sitting proudly on a smooth stone; shell paper lantern shell; lighting cool dashboard glow; background small review tokens.
Share on X: post this hatch
Copy: My PR egg hatched a 🥚 common Mossy Proofling in ClawSweeper.

What is this egg doing here?
  • Eggs appear after the PR passes real-behavior proof. It is here for vibes, not verdicts: it does not change labels, ratings, merge decisions, or automation.
  • The shell reacts to review momentum: open follow-up work warms it up, re-review makes it wobble, and a clean final review lets it hatch.
  • Hatchability usually comes from sufficient real-behavior proof, no blocking P0/P1/P2 findings, no security attention needed, and clean correctness. A merged PR is already final, so merge makes the egg hatchable independently.
  • The hatch is seeded from this repository and PR number, so the same PR keeps the same creature; the reviewed head SHA can only change safe visual details.
  • Rarity is just collectible sparkle: 🥚 common, 🌱 uncommon, 💎 rare, ✨ glimmer, and 🌈 legendary.

@socket-security

Copy link
Copy Markdown

@hxy91819

Copy link
Copy Markdown
Member Author

Closing this PR in favor of a lower-noise helper-first design.

The cleanup scanner proved too strong for a CI gate: it has to infer whether arbitrary temp-dir cleanup patterns are sufficient, which turns into heuristic data-flow analysis and can force contributors to rewrite existing reasonable cleanup code just to match the scanner's recognized shape.

We'll replace this with a repo-local approach:

  • extend the existing test temp helper pattern instead of adding a cleanup-sufficiency scanner;
  • document the recommended helper usage for new tests;
  • add, at most, a low-noise added-line report for new bare temp-dir creation;
  • avoid blocking CI on existing cleanup style or requiring mechanical rewrites of touched files.

Thanks for iterating on this. The problem is real; the enforcement shape needs to be more conservative.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies-changed PR changes dependency-related files maintainer Maintainer-authored PR P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. scripts Repository scripts size: M status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant