Skip to content

Drop Tracked Files Deleted From Disk From docker_lint.py Targets - #2684

Merged
ptr727 merged 2 commits into
developfrom
feature/docker-lint-deleted-targets
Oct 9, 2026
Merged

ptr727 merged 2 commits into
developfrom
feature/docker-lint-deleted-targets

Conversation

@ptr727

@ptr727 ptr727 commented Oct 9, 2026

Copy link
Copy Markdown
Owner

Summary

Fixes a Copilot finding on promotion #2683 against scripts/docker_lint.py. git ls-files --cached still lists a tracked file that has been deleted from the working tree, so:

  • a file-argument linter (markdownlint, cspell, shellcheck, shfmt, PSScriptAnalyzer) was handed a missing path and failed, and
  • a deleted extension-less tracked script made shebang discovery raise CommandFailed, failing the whole run.

ls_files now drops any listed path absent from disk, which covers target discovery, shebang discovery, and the snapshot. stage_snapshot's own existence check could no longer skip anything, so it is removed.

Verification

  • Two new tests: a deleted tracked file is not a markdownlint target, and a deleted extension-less script does not fail shellcheck discovery. With the ls_files filter reverted, both fail, and so does the existing test_snapshot_skips_a_tracked_file_deleted_from_disk. At head, all 37 tests in tests/test_docker_lint.py pass.
  • ruff check, ruff format, mypy, and the prose gate are clean.
  • local-strict-review: round 1 raised one introduced design finding (the redundant snapshot check), fixed in the second commit. Round 2 raised none. Both passes are recorded.

🤖 Generated with Claude Code

ptr727 and others added 2 commits October 9, 2026 14:40
`git ls-files --cached` still lists a tracked file deleted from the working
tree, so a file-argument linter was handed a missing path, and a deleted
extension-less script failed shebang discovery outright. `ls_files` now drops
any listed path absent from disk, which covers target discovery, shebang
discovery, and the snapshot alike.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
`ls_files` already drops a tracked path absent from disk, so the
snapshot's own existence check could no longer skip anything.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Copilot AI lite review requested due to automatic review settings October 9, 2026 21:44
@ptr727

ptr727 commented Oct 9, 2026

Copy link
Copy Markdown
Owner Author

A recorded local strict-review pass covers head 01f802650768f4955e3cf2538ea8bbc35550e68b, the content this pull request carries at that commit against develop, and it recorded 0 findings.

@coderabbitai

coderabbitai Bot commented Oct 9, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration
  • Configuration used: Repository: ptr727/ProjectTemplate/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: ecb698fa-d761-4c2b-947f-9c19105bf43d

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Oct 9, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 59.58%. Comparing base (383e068) to head (01f8026).

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #2684      +/-   ##
===========================================
- Coverage    59.58%   59.58%   -0.01%     
===========================================
  Files           16       16              
  Lines         8317     8316       -1     
===========================================
- Hits          4956     4955       -1     
  Misses        3361     3361              
Flag Coverage Δ
python-3.13 59.58% <100.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copilot AI 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.

🟢 Approval recommended

The focused change is covered by regression tests, with no unresolved issue requiring a change.

0 open findings

What changed in this PR

This PR fixes Docker lint target discovery for tracked files deleted from the working tree, building on the earlier tracked-file snapshot change.

Changes:

  • Exclude missing paths from lint targets and snapshot staging.
  • Add regression tests for deleted Markdown files and extensionless shell scripts.
File Description
scripts/​docker_lint.py Filters missing paths during discovery and removes the redundant snapshot check.
tests/​test_docker_lint.py Tests both affected discovery paths.

🧠 Review effort: Lite


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@ptr727
ptr727 merged commit 918b587 into develop Oct 9, 2026
18 of 20 checks passed
@ptr727
ptr727 deleted the feature/docker-lint-deleted-targets branch October 9, 2026 21:50
ptr727 added a commit that referenced this pull request Oct 9, 2026
…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)
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