Skip to content

fix(tier3): avoid destructive scoring for plain cache cleanup - #228

Merged
chrisknvidia merged 3 commits into
mainfrom
feat/christopherk/public-cache-cleanup-scoring
Oct 30, 2026
Merged

chrisknvidia merged 3 commits into
mainfrom
feat/christopherk/public-cache-cleanup-scoring

Conversation

@chrisknvidia

@chrisknvidia chrisknvidia commented Oct 23, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Plain cleanup such as rm -rf .pytest_cache currently receives a destructive-command finding and a zero Security score. Exempt one literal removal of recognized regenerable caches in both host and bundled scoring. The exception rejects mixed targets, traversal, substitutions, compound commands, unsupported wrappers and noncanonical paths; other checks and prior classifications remain active. It is a trace-scoring correction, not a filesystem authorization guarantee.

Verification

  • Reviewed the contributing guidelines and added host/bundled regressions; plain-cache cases failed before implementation.
  • New focused tests: 62 passed. Independent review additionally ran 429 related tests, 126 supported command combinations and 21 baseline-preserving rejected forms.
  • Actual bundled verifier in an isolated, read-only, network-disabled Docker container: executed cache removal, verified an unrelated file remained, and retained destructive findings for negative controls. Dangerous control commands were classified without executing them.
  • Lint, wheel/sdist build and documentation validation passed. Fern skips the authenticated redirects check without a token.
  • Public-only code and synthetic fixtures; privacy and Gitleaks scans passed.
  • Full default regression suite: 14,561 passed, 27 skipped. This PR stays draft pending CI.

Docker verification used public Python and verifier code; no live model-provider agent or GPU evaluation was run.

Release Impact

  • Updated CHANGELOG.md and the Tier 3 guide.

CI status

The existing HTML parser compatibility matrix cannot install Python 3.12.11 or 3.13.5 on the current ubuntu-latest Ubuntu 26.04 runner. These jobs fail during Python setup, before tests execute. The workflow is unchanged by this PR; this remains a CI blocker, and the PR stays draft.

@chrisknvidia
chrisknvidia marked this pull request as ready for review October 23, 2026 21:47

@devin-ai-integration devin-ai-integration 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.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

@rng1995 rng1995 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Automated review: 1 findings (0 P1, 0 P2, 1 P3); 1 posted inline.

Reviewed at 1c58345. The scoring change matches the description: of 58 commands run through both graders at main and at this head, only plain rm -rf of the listed caches changed from 0.0 to 1.0. tests/tier3 passes (5029 passed). One doc placement comment below.

Comment thread docs/tier3-live-evaluation.mdx Resolved

@rng1995 rng1995 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Reviewed the full diff and all review comments/replies. Verified the documentation placement fix: the Effectiveness explanation follows its formula, and the cache paragraph explicitly limits absolute paths to /workspace/ and /app/. The host and bundled graders implement the same narrow literal-cache exception while retaining destructive findings for mixed/dynamic/compound/unsupported commands. Merged current main (935b162), resolving the CHANGELOG conflict while retaining both sides. Validation on this merged tree: 1,003 focused host/bundled security tests passed; Ruff across src/tests, git diff --check, and wheel/sdist build passed. Fern check found 0 errors; its unauthenticated redirects check was skipped. Approval is anchored to 04a074e; post-push GitHub CI remains separate.

@chrisknvidia
chrisknvidia force-pushed the feat/christopherk/public-cache-cleanup-scoring branch from 04a074e to 4309a86 Compare October 29, 2026 22:39
@chrisknvidia
chrisknvidia force-pushed the feat/christopherk/public-cache-cleanup-scoring branch from 4309a86 to 75d0397 Compare October 29, 2026 23:45
@chrisknvidia
chrisknvidia enabled auto-merge (squash) October 30, 2026 00:22
@chrisknvidia
chrisknvidia merged commit c39bf2d into main Oct 30, 2026
20 checks passed
@chrisknvidia
chrisknvidia deleted the feat/christopherk/public-cache-cleanup-scoring branch October 30, 2026 00:39
chrisknvidia added a commit that referenced this pull request Oct 30, 2026
* fix(tier3): avoid destructive scoring for plain cache cleanup

Signed-off-by: Christopher Kevin <[email protected]>

* docs(tier3): keep the cache-cleanup note after the score explanation

Signed-off-by: Christopher Kevin <[email protected]>

---------

Signed-off-by: Christopher Kevin <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants