You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Promote Develop to Main: Pin Dropped Carries and Scope Keep Rows - #4274
Dropped carries. A carried baseline file that the manifest drops, and that the audit's hub-only check cannot see, owes a fleet-wide retire or accepted gaps row. spec/validate.py pins every path the baseline has ever declared, and codecov.yml takes an accepted row.
Per-repository keeps. A gaps row may carry repos, accepted only and cataloged repositories only. The audit and the divergence report honor it for those repositories alone.
Unreadable retired copies. They are reported as unread. One history_keys helper serves the three history comparisons.
#4275 fixes three findings this promotion's first Copilot round raised: a malformed keep row is dropped before the report reads it, tracked paths decode with surrogateescape, and the carried.hubonly.absent assertion states the new cases. The gap_rows thread resolved itself when its line moved, and this line is its outcome.
…ad (#4271)
## Summary
The retired-path lane: #4251, #4253 and #4254 together, since all three
edit the hub-only check or its helpers.
- **#4251.** A carried baseline file that the manifest drops, and that
the audit's hub-only check cannot see, owes a fleet-wide `retire` or
`accepted` row in `spec/divergences.json` `gaps`. The audit sees a
tracked regular file outside every tree source and repo-owned tree.
`spec/validate.py` reads that set from `git ls-files -s` and pins every
path the baseline has ever declared (`CARRIED_PATH_PINS`, 39, checked
against the full history of `spec/files.json`), since the validate job
runs on a shallow clone. A new baseline path must be pinned. A file
moved into a tree takes an `accepted` row, with no exemption, since
every exemption tried leaked copies. `codecov.yml` takes an `accepted`
row, per the no-stale-name-guard decision on its rename in #4077.
- **#4253.** A `gaps` row may carry `repos`, accepted only and cataloged
repositories only, recording that they keep their own copy.
`audit.gap_rows` splits fleet-wide from scoped rows once.
`check_hubonly_carried` and the divergence report honor a keep, and the
report shows it live, unverified, now resolved, or resolved. The gate
and a schema conditional (`scopedGapAccepts`) hold the shape, and a path
holds at most one fleet-wide row.
- **#4254.** An unreadable retired copy is reported through `run.unread`
rather than as one matching no past hub version. One helper,
`history_keys`, serves `matches_hub_history`, `classify_verbatim` and
`fidelity_pass`, each keeping its own normalization. The deletion check
normalizes line endings only, on purpose.
The maintainer chose the pinned table, the `accepted` row for
`codecov.yml`, scoped `accepted` rows, and the stop rule below.
`spec/audit.py` is 2983 lines, under its 3000-line ceiling.
#4251, #4253 and #4254 stay open until the promotion carries their
closing lines.
## Verification
- Full suite: 4500+ tests OK, 12 skipped, on the push-5 head. The
affected modules pass on the final head.
- `spec/validate.py` OK on the shipped ledger. Before the `codecov.yml`
row it failed on exactly that path.
- `ruff format --check`, `ruff check`, `mypy` (109 files),
`prose_lint.py --diff origin/develop` and `build_dist.py --check` are
clean.
- Local strict review: twelve recorded passes across six pushes, with
findings per pass of 9, 4, 5, 3, 2, 2, 2, 4, 2, 3, 4, then 0 real in
each of the last two. From pass 4 on, most findings were edges in the
previous fix. The maintainer's stop rule after pass 11: fix the cheap
real ones, file the rest. The last pass found no real defect.
## Filed
- #4272: dropping a whole `trees` declaration leaves its target's copies
unreported.
- #4273: two latent edges in the drop check (the `retire` remedy for a
moved file, strict UTF-8 decoding). The third, a missing ledger skipping
the check, was CodeRabbit's finding and is fixed here.
## Open Edge, Not Filed
- **tests/test_fidelity_honesty.py (edge, test layout).** The two new
test classes sit above
`test_main_spec_carries_the_ledger_retired_paths`, so that method now
belongs to `ScopedKeepReportCase`. It runs and passes. Listed per the
stop rule.
## Declined
- **spec/audit.py `gap_rows` isinstance guards (over-hardening).** They
follow the degrade pattern `load_ledger` documents, and live once.
`spec/validate.py` and the schema refuse a malformed scoped row in CI.
- **`hub_tracked_paths` returning None rather than raising
(over-hardening).** A fixture test runs `validate.py` in a scratch tree
outside git and asserts no traceback, so the gate reports that case.
## Dropped Findings
- spec/fidelity_honesty.py `fidelity_pass`: its match/stale/differs
classification restates `classify_verbatim` (pre-existing,
consolidation, untouched text).
- spec/validate.py `tree_carrying`: its include test repeats
`scripts/carry.py` `included` and `audit.tree_path_included`
(consolidation, dropped by the maintainer's stop rule).
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---------
Co-authored-by: Claude Opus 5.5 <[email protected]>
Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
Approval is blocked by an undocumented audit assertion gap and two moderate robustness issues: malformed scoped rows can crash report rendering, and invalid UTF-8 tracked paths can crash validation.
This PR promotes retired-path handling from develop to main, strengthening validation, auditing, divergence reporting, and documentation for dropped carries and repository-scoped keeps.
Changes:
Pins historically carried paths and requires appropriate gap decisions when they are dropped.
Supports repository-scoped accepted keeps for cataloged repositories.
Reports unreadable retired copies and consolidates shared history matching.
Review findings identify remaining validation issues for malformed scoped rows, invalid UTF-8 paths, and dropped tree declarations.
File
Description
tests/test_spec_validate.py
Tests dropped-carry validation, scoped gap rows, tracked-path handling, and validator wiring.
tests/test_fidelity_honesty.py
Tests repository-scoped keeps, resolved states, and divergence report output.
tests/test_audit.py
Tests unreadable retired copies and repository-scoped keeps during audits.
tests/test_audit_helpers.py
Tests scoped disposition parsing and shared history-key behavior.
spec/validate.py
Adds carried-path pins, dropped-carry checks, scoped gap validation, and Git-tracked path discovery.
spec/fidelity_honesty.py
Incorporates repository-scoped keeps into live gap and divergence reporting.
spec/divergences.schema.json
Defines scoped gap rows and restricts them to accepted dispositions.
spec/divergences.json
Records the accepted retirement decision for the legacy codecov.yml path.
spec/audit.py
Adds scoped keep handling, unreadable retired-copy reporting, and shared history matching.
RESYNC.md
Documents dropped baseline paths, unreadable copies, and repository-scoped keep decisions.
AUDIT.md
Documents the updated carried-scope audit behavior.
❌ Patch coverage is 95.72650% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 79.21%. Comparing base (c76e275) to head (349b4e6). ⚠️ Report is 509 commits behind head on main.
Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.
…4275)
## Summary
Three findings Copilot raised on the develop -> main promotion #4274,
fixed on develop since the promotion's head is develop.
- **spec/audit.py `gap_rows`.** A `repos`-scoped row is admitted only
where every entry is a string, so the divergence report's set of them
cannot raise on a hand-malformed ledger. `spec/validate.py` refuses such
a row in CI.
- **spec/validate.py `hub_tracked_paths`.** Paths decode with
`surrogateescape`, as `audit.hub_tracked` does, so a tracked path that
is not valid UTF-8 no longer ends the gate on a traceback.
- **spec/project-types.json `carried.hubonly.absent`.** The assertion
states the retire-outright and per-repository keep cases AUDIT.md
"carried-scope" already states.
## Verification
- New tests: a malformed scoped row is dropped, and a non-UTF-8 tracked
path is listed.
- `spec/validate.py` OK. `ruff`, `mypy`, `prose_lint.py --diff
origin/develop` and `build_dist.py --check` are clean.
`test_spec_validate`, `test_audit`, `test_audit_helpers`,
`test_fidelity_honesty` and `test_audit_size` pass.
- Local strict review: three recorded passes. The first found one
sentence over 25 words, now split. The second found no real defect. The
third, over Copilot's rewording fix, found a test docstring claiming the
audit decodes the same listing, fixed in 0d28345. The fourth found
nothing.
## Filed
Two edges the second pass found are added to #4273: the dispositions
filter in `render_report` admitting non-string `repos` entries, and a
`retire` row under a repo-owned tree entering the hub-only set.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---------
Co-authored-by: Claude Opus 5.5 <[email protected]>
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
Approval is blocked by active correctness issues where malformed scoped rows and dropped tree targets or scoped keeps can be silently treated as resolved, and one regression fixture does not exercise the dropped-carry validation path.
[P1] Drop empty scoped rows before rendering. spec/validate.py rejects repos: [], but this branch admits it as a scoped row. render_report then sees no live or unreadable repositories and marks the malformed row resolved, hiding the ledger defect instead of leaving it visible for repair. Require a non-empty list here, matching the gate's shape check.
Ensure the fixture reaches the dropped-carry check
tests/test_spec_validate.py:2917
[P2] Make this fixture reach the dropped-carry call. Because root is outside a Git worktree, hub_tracked_paths(root) returns None, so validate.main() takes the error branch at lines 2243-2247 and skips dropped_carry_errors entirely. A regression that removes the missing-ledger call site would therefore still pass this test. Initialize a temporary Git tree or stub hub_tracked_paths with tracked files, then assert the dropped-carry result.
Answering the two findings with no thread on this head: "Reject empty repository lists in scoped rows" (spec/audit.py:175) and "Ensure the fixture reaches the dropped-carry check" (tests/test_spec_validate.py:2917). Both are filed in #4273. No current input reaches the first, since spec/validate.py refuses an empty repos list in CI. The second is a test that proves the check runs outside the ledger guard but not the call itself. #4273 asks for a git-initialized fixture.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Promotes
developtomain. It carries these changes:retireoracceptedgaps row.spec/validate.pypins every path the baseline has ever declared, andcodecov.ymltakes anacceptedrow.repos, accepted only and cataloged repositories only. The audit and the divergence report honor it for those repositories alone.history_keyshelper serves the three history comparisons.surrogateescape, and thecarried.hubonly.absentassertion states the new cases. Thegap_rowsthread resolved itself when its line moved, and this line is its outcome.Closes #4251
Closes #4253
Closes #4254
🤖 Generated with Claude Code