Repository navigation
Read a Compose Container Path and a Renamed File in the Prose Gate - #3685
Conversation
The home-path rule now skips the container side of a Compose volume entry, the part after the host path's colon or a long-syntax target, since an image ships that path and it names no account on a host. The host side, and the same text in any other file, still report. The diff now pins --no-renames, so a moved file reaches the scope as a whole addition. A file renamed out of a generated tree was otherwise never read by any run. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Reading every rename whole put each pure move of an already-checked file fully in scope, so a moved commented code file needed the comment label and every older finding blocked the move. The diff now pins rename detection on, and a rename credits its destination in full only where it left a generated tree or an excluded path, the paths no run reads. A move between read paths adds only what it changed. Also covers the Compose volume block closing on a dedent. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
|
A recorded local strict-review pass covers head |
The copy case now edits its source, the only file copy detection searches, and the move between read paths runs under each diff.renames setting. Removing --find-renames now fails both. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
A recorded local strict-review pass covers head |
There was a problem hiding this comment.
🟡 Changes recommended
The test changes leave copy-detection coverage ineffective and incomplete, with a misleading fixture explanation and no read-path checks across host settings.
3 open issues
What changed in this PR
This pull request fixes two prose-gate defects: false home-path findings for Compose container mount targets and missing diff scope for renamed files.
Changes:
- Excludes recognized Compose volume container paths from host-home checks.
- Pins Git rename detection and scopes renamed destinations when their sources were unread.
- Adds regression tests for Compose mounts and rename-based diff scoping.
| File | Description |
|---|---|
tests/test_prose_lint.py |
Adds regression coverage for Compose paths and renamed-file scope behavior. |
.github/actions/prose-gate/prose_lint.py |
Adds Compose container-path detection and rename-aware diff scoping. |
Review effort: Lite
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #3685 +/- ##
========================================
Coverage 81.74% 81.74%
========================================
Files 27 27
Lines 9139 9139
========================================
Hits 7471 7471
Misses 1668 1668
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:
|
…de, Read Compose and Renamed Paths, and Exempt a Delete-Only Push (#3693) Promotes the changes merged into `develop` since promotion #3681 to `main`, the first round of a backlog burndown. - [#3683](#3683) Carries a newly declared verbatim section in `carry.py` instead of refusing. The missing section is inserted in hub order: after the nearest preceding held section, else before the nearest following one, else at the end of the file. A rename is refused only for an unchanged body under a target H2 the hub does not carry, and the plans apply in two phases. - [#3689](#3689) Reads a null GraphQL node in `pr_review.py` as unread, re-reading and then exiting 1 naming the path. Names a closed pull request's state in the digest, and ends `wait` on a pull request that is no longer open the way `status` does. `merge-and-release` step 2 stops on `state=MERGED`. - [#3685](#3685) Skips the container side of a compose volume entry in the prose gate's home-path rule. Pins `--find-renames` in the gate's diff, and reads a renamed file whole only when it came from a generated tree or an excluded path. - [#3691](#3691) Exempts a delete-only push from the write guard's primary-checkout rule: a named remote, every refspec a delete of a branch other than `main`, `master` or `develop`, and only the delete, dry-run, quiet and verbose options. The branch's live protection rules still apply. Adds regression cases for #1628. Deferred review findings: #3694 (a YAML block scalar in a Compose file's volume scan) and #3690 (the `scripts/README.md` apply-time refusal sentence). #3695 records a pre-existing write-guard question raised while verifying them. Fixes #3614 Fixes #3392 Fixes #3677 Fixes #3220 Fixes #1586 Fixes #1642 Fixes #1628 🤖 Generated with [Claude Code](https://claude.com/claude-code)

Summary
Fixes two prose-gate defects in
.github/actions/prose-gate/prose_lint.py, each with constructed test cases.Container side of a Compose mount (#3220)
The
home-pathrule flagged the container side of a Compose volume mapping as a person's home. A mount target is a path the image ships, and it names no account on any host. The rule now skips a match on the container side of a mount inside avolumes:block, in a file namedcompose.yml,docker-compose.yml, their.yamlforms, or an override variant such ascompose.override.yml:${...}expansion and a drive letter in the host part are kept whole, so neither colon splits the entry.target:.The host side still reports, and so do a long-syntax
source:, a${VAR:-...}default on the host side, aC:/Users/...drive path, the same line in a file that is not a Compose file, and a colon-joined value after thevolumes:block closes, whether a sibling key or a dedent closes it.This takes the issue's recommended option, which covers every image instead of adding accounts one at a time. One correction to the issue's reasoning:
service_accountsis already an override key, so a downstream.prose-gate.jsoncould add an account with no hub release. The class-wide fix still holds, since it needs no per-repository entry for each image.Shapes still flagged, all in the safe direction: an anonymous volume with no colon (
- /home/<account>/cache), a flow-stylevolumes: [...]list, and atarget:undersecrets:,configs:, ordevelop.watch.A renamed file gets no diff scope (#1586)
With rename detection on, git reports a pure move with no
+++header and no hunk, so the destination got no scope. A file moved out of a generated tree into a checked path was never read, and the run exited 0.The issue offered two directions. This takes the second one, reading
rename to:DIFF_ARGSpins--find-renames, so the host'sdiff.renamessetting (true,false, orcopies) decides nothing. Copy detection stays off, since a pure copy would leave the same hole.changed_linesreads each block'srename fromandrename to. When the source sat under a generated tree or matched an--exclude, the destination is read in full, since no run read it there.mainnow passes its excludes in.The first direction,
--no-renames, was tried first and dropped after the local review. It reads every rename whole, so a pure move of any commented code file would need thecommentslabel, and every older finding in a moved file would block the move, in every carrying repository.undiffable_pathskeeps its rename handling. Its--numstat -zparse already records a renamed undiffable file at its destination.Verification
reports/andgit mv'd todocs/, gavescope: 0 of 1 file(s) readand exit 0. After the fix the same run reports the finding and exits 1, underdiff.renamesset totrue,false, andcopies.--find-renamespin removed.python3 tests/test_prose_lint.pypasses, and so dotest_repo_gate,test_cli_usage,test_pre_commit_hook, andtest_tooling_encoding. Ruff format and check, and mypy, are clean. The prose gate is clean on the diff.--no-renamesand two test gaps. Pass 2 found test gaps and the item filed below. Pass 3 found that no rename case failed with the--find-renamespin removed: the copy fixture left its source unedited, and copy detection searches only the files a change modifies, and the move between read paths ran only underdiff.renames=true. Each was fixed in the next push. Pass 4 found nothing. Stripping the pin now fails the generated-tree case and the between-read-paths case.Pre-existing findings, filed
changed_lines(.github/actions/prose-gate/prose_lint.py),pre-existing: a move out of ahome_path_exemptfile or from outside a narrowedpathsinput still adds only its hunks, sohome-pathnever reads it. Filed as Read a File Moved Out of a home_path_exempt Path or a Narrowed Scope in Full in the Prose Gate #3684.Declined
prose-gate.json. It names a file format, not an exemption a repository tunes.TestVocabularyLivesInTheDatadoes not flag it.Closes on promotion: #3220, #1586
🤖 Generated with Claude Code