Repository navigation
Mount a Tracked-Files Snapshot Into docker_lint.py Lint Containers - #2675
Conversation
docker_lint.py bound the live --root checkout into every third-party lint container, so a git-ignored file on disk, such as a local secrets file beside a tracked placeholder, was readable inside each image. It now copies the tracked and unignored files into a temporary snapshot and binds that read-only instead, keeping target discovery on the host against the real checkout. The snapshot carries an empty .git so actionlint still finds its project, and it is removed when the run ends. editorconfig-checker walks the mounted tree, so git-ignored build output such as .artifacts/ no longer reaches it either. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The system temporary directory sits outside Docker Desktop for Linux's default file sharing, so a snapshot there could not be mounted where the live checkout could. The checkout's own git directory is reachable by any Docker setup that mounts the checkout, and git never lists it. Also split two over-long doc sentences and name the PSScriptAnalyzer install as running without any repository mount, since no checkout mount remains. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Python exits on SIGTERM without unwinding, so a run stopped by timeout or an agent harness left a full copy of the tracked files under the git directory, where nothing ever clears it. A SIGTERM handler now raises SystemExit so the snapshot's cleanup runs. The git directory lookup reuses local_review.git_dir() rather than a second copy of the same rev-parse call. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
⛔ Files ignored due to path filters (3)
📒 Files selected for processing (5)
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe Docker lint wrapper now stages tracked and unignored files in a temporary snapshot and mounts the snapshot in lint containers. It removes the snapshot when execution ends, including after SIGTERM. Tests and documentation cover snapshot contents, mount behavior, and cleanup. ChangesDocker lint snapshot flow
Priority: ➖ Normal Estimated code review effort: 3 (Moderate) | ~20 minutes Severity of issue fixed: Medium Merge Risk: ⚪ Minimal · up to The snapshot change appears ready to merge after normal checks; no actionable issue remains from this review. Pre-merge checks |
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #2675 +/- ##
==========================================
Coverage ? 59.58%
==========================================
Files ? 16
Lines ? 8317
Branches ? 0
==========================================
Hits ? 4956
Misses ? 3361
Partials ? 0
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
🟡 Changes recommended
Snapshot staging fails for read-only checkout roots, and SIGTERM handler registration lacks main-level test coverage.
2 open findings
What changed in this PR
Updates Docker linting to mount a temporary snapshot containing only tracked, unignored files, preserving symlinks and cleaning up on termination.
Changes:
- Adds snapshot staging, filtering, cleanup, and SIGTERM handling.
- Expands tests for ignored files, symlinks, deleted files, and cleanup.
- Updates documentation and generated skill copies.
| File | Reviewed changes |
|---|---|
tests/test_docker_lint.py |
Tests snapshot contents and cleanup behavior. |
scripts/README.md |
Documents snapshot-based mounts. |
scripts/docker_lint.py |
Implements snapshot creation and mounting. |
GOVERNANCE.md |
Updates local linting guidance. |
.github/skills/comment-and-doc-style/SKILL.md |
Updates generated skill guidance. |
.claude-plugin/fleet-skills/skills/comment-and-doc-style/SKILL.md |
Updates generated plugin guidance. |
.claude-plugin/fleet-skills/.source-digests/comment-and-doc-style |
Updates the generated source digest. |
.agents/skills/comment-and-doc-style/SKILL.md |
Updates Docker authorization guidance. |
🧠 Review effort: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
The existing test drives exit_on_sigterm directly, so removing the registration in main() left the suite green. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Copying the checkout root's mode onto the snapshot before staging made a read-only root's snapshot read-only too, so the first copy into it failed. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Answers for the findings this pull request carries outside a review thread. The body's "Local review findings still open" list (1).
|
|
A recorded local strict-review pass covers head |
|
@coderabbitai review |
✅ Action performedReview finished.
|
|
CodeRabbit's pre-merge "Docstring Coverage" warning (36.84% against an 80% threshold, 19 functions across 2 files): Disproven as a defect in this change. Every function in |
…ain (#2683) ## Summary Promotes develop to main. It carries five changes: - #2673 Adds the removal of the `push:` block to the Docker delta list in `docs/reusable-workflows.md` "Adopting the Release Chain". - #2675 Mounts a snapshot of tracked files, rather than the live checkout, into `docker_lint.py` lint containers, so git-ignored files and build output never reach a linter. - #2684 Drops tracked files deleted from disk from `docker_lint.py`'s lint targets, answering this pull request's review finding. - #2678 Reads an absolute-URL thread link in `pr_review.py`'s overview sections. - #2661 Stops calling closed issues #699 and #700 open in `docs/fleet-map.md`. Fixes #1497 Fixes #1090 Fixes #1185 Fixes #2676 Fixes #2659 🤖 Generated with [Claude Code](https://claude.com/claude-code)


Summary
scripts/docker_lint.pybound the live--rootcheckout read-only into every third-party lint container. Read-only stops a container writing back, not reading, so a git-ignored file on disk, such as a local secrets file beside a tracked placeholder, was readable inside each image.The wrapper now copies the tracked and unignored files into a temporary snapshot and binds that instead. Target discovery stays on the host against the real
--root, sogit ls-filesstill has its.git. The snapshot is staged under the checkout's own git directory, since the system temporary directory sits outside Docker Desktop for Linux's default file sharing, and the lookup reuseslocal_review.git_dir(). It carries an empty.gitso actionlint still finds its project, copies a symlink as a link without following it, and skips a tracked path missing from disk. It is removed when the run ends, and aSIGTERMhandler turns a termination into an exit so a run stopped bytimeoutor a harness removes it too.editorconfig-checker walks the mounted tree, so git-ignored build output such as
.artifacts/no longer reaches it either. That closes #1185 as a side effect.The doc surfaces that described a checkout mount now describe the snapshot:
GOVERNANCE.md"Running the Linters Locally (Known-Working Invocations)",scripts/README.md"docker_lint.py", and thecomment-and-doc-styleSkill's "Docker lint authorization", with its generated copies rebuilt.Verification
rootrather than the snapshot tocontainer_command) fails all four..artifacts/, editorconfig-checker fails on the old wrapper and passes on this one.OPERATIONS.mdpasses.timeout -s TERMduring the lint phase leaves no snapshot behind, and the same run with the handler registration removed leaves one.Local review findings still open
The
local-strict-reviewedit budget for the first push was spent with one finding open:introduced:tests/test_docker_lint.pydrivesexit_on_sigtermdirectly, so nothing tests thatmain()registers it. Removing the registration line leaves the suite green.Closes on promotion: #1090, #1185
🤖 Generated with Claude Code
Summary by CodeRabbit