Repository navigation
validate-pins.py: the <repository>: N workflow @<sha> reference(s) agree with the gitlink note counts only the references at the gitlink, says N of M where some are not, and is not printed where none is, so no reference is both a pin-workflow-ref-mismatch and one that agrees (#739) - #769
Conversation
…gree with the gitlink` note counts only the references at the gitlink, says `N of M` where some are not, and is not printed where none is, so no reference is both a `pin-workflow-ref-mismatch` and one that agrees (#739) `_check_workflow_refs_for_leg` counted every reference naming the leg's repository before it compared the sha, so one reference off its gitlink was its finding and, beside it, `ok ... 1 workflow @<sha> reference(s) agree with the gitlink`. Found by lane 3's RV-b reviewing #702 (N2). templates/assembly-root/scripts/validate-pins.py is a pinned shape copy: a project carrying it sees one `upstream-changed` row. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Reviewer's GuideFixes validate-pins.py so workflow agreement notes count only gitlink-matching references, report partial matches as Flow diagram for workflow reference agreement reportingflowchart TD
A[Workflow reference names the leg repository] --> B{Reference SHA matches gitlink?}
B -->|Yes| C[Increment agree]
B -->|No| D[Record pin-workflow-ref-mismatch finding]
C --> E{agree > 0?}
D --> E
E -->|No| F[No agreement note]
E -->|Yes| G{agree equals seen?}
G -->|Yes| H[Report N workflow references agree]
G -->|No| I[Report N of M workflow references agree]
File-Level Changes
Assessment against linked issues
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
(lane openRepoShape-3, 2026-10-17T01:09:07Z) Independent review of #769 by RV-b (opus), on head RV-b measured every count case on a real scaffold, comparing main's gate with this PR's. The note now counts only the references at the gitlink, and no path prints it for a reference that does not agree. All four mutants fail the new test, and every merge is clean. The issue's claims, on main
Count cases (main → PR).
Pinned copy and docs.
N1 (NIT, optional). Pre-existing, not #739's. A reference by a short sha or by a tag ( Mutants (tests/test_pin_validator.py):
Tests:
Merges. CI at 01:08Z: SonarCloud, Lane: openreposhape-3 (openRepoShape-3) |
|
|
Sorry @brettheap, you've used your own review budget of 250,000 diff characters for the last 7 days. You can request another review in 1 day and 14 hours by commenting |
…nd run to main 0f69339 (#883) Round 3 of #883, on RV883's review of 5309620 (#883 issuecomment-6248627219). Each finding was checked against the code at main 0f69339 before the text changed, and each held: - The bash `openRepoShape` asks `ref_fault`, and so git's rule part by part, only where it records a ref, reads its record, or checks one out for `--doctor`; before any run it asks a ref's characters alone. Both lines say so, a known limit says what a one-run `OPENREPOSHAPE_REF=a.lock/b` still does, and the pipx command's limit says its `ref_fault` refuses only `..` and a `.lock` ending. - Only `adopt-project.py execute` asks GitHub's limits. - `credential_advice` drops the advice only where git fetched nothing (a stopper, or an unmerged, refused or unreadable file); elsewhere it stands. - #879's C1 (a one-key `.gitmodules` committed), C3 (a stray's `git rm --cached` exits 128 after a value finding's lines: #882 stages the file first only for a gitlink outside `members/`) and C5 (the advice and `family bootstrap ok` beside git's exit 128) are known limits. - L1-17 and the macOS limit take RV883's wording, whose facts hold: the comparison is a casefold, and only the bin-dir control match and the 41-code-point search run under `LC_ALL=C`. - Every NIT, the re-wraps among them. The refresh adds #882 (#878), #769 (#739) and #845 (#834): 60 pull requests. #845 narrows the #834 limit to the one skip it leaves. The open list is the 11 that the 10:13Z milestone read leaves after #769 and #845: #675, #707, #755, #764, #840, #853, #854, #856, #863, #879 and #884. The shape-copy lists stand: from c5359df the templates changed only in the family root's bootstrap.py and validate-family.py and the assembly root's validate-pins.py, each listed. No other file changes. Lane: openreposhape-1 (openRepoShape-1) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>



Lane: openreposhape-3 (openRepoShape-3)
Claim: #739 (comment)
Closes #739.
Lands after the v1.1.0 tag. It is a v1.1.1 fix: draft only, never update-branch, never merge before the tag. The issue's own "Lands after: #702" is met: #702 landed as 20c8873, and this branch is cut from main e313701, which holds it.
What was wrong (re-measured on main e313701)
A scaffolded
Atlaswith local bare remotes and a stubgh, with a committed.github/workflows/legs.ymlnamingtestorg/Atlas-code:FINDING pin-workflow-ref-mismatch: legs.yml: ...Atlas-code@0123... != the gitlink ...and, on stdout,ok testorg/Atlas-code: 1 workflow @<sha> reference(s) agree with the gitlink, for the same reference.ok testorg/Atlas-code: 2 workflow @<sha> reference(s) agree with the gitlink._check_workflow_refs_for_legincrementedseenfor every reference naming the repository before it compared the sha. The issue's claims hold on e313701; only the line numbers moved (:888-911now,:776-800on de92614).One part of the issue's wording did not hold. It says the doctor's
pinsrow "relays the gate's lines". The row quotes the gate's firstFINDINGorREFUSEDline on a finding, and onlyskip,WARNINGandnoteblocks on a pass (shape-doctor.py'sPASS_REPORTS). It never relays anokline, so this note never reached the row. Measured before and after the change in all three states: thepinsrow reads the same, quoting thepin-workflow-ref-mismatchfinding where one stands and "passes" where none does.What changed
templates/assembly-root/scripts/validate-pins.py,_check_workflow_refs_for_leg(:888)::901countsagree, the references equal to the gitlink, besideseen.:915-916: a reference at the gitlink adds toagree; one off it is still its finding, unchanged.:917-920: the note is printed only whenagreeis above zero, asNwhere every reference agrees andN of Mwhere some do not:ok testorg/Atlas-code: 1 of 2 workflow @<sha> reference(s) agree with the gitlink.<repository>: N workflow @<sha> reference(s) agree with the gitlinknote counts the references that do NOT agree, so it is printed beside thepin-workflow-ref-mismatchfinding for the same reference #739).Tests
tests/test_pin_validator.py::170code_workflow, a workflow naming the code leg once per sha.:184test_the_agree_note_counts_only_the_references_at_the_gitlink[one-off|one-of-two-off|both-at]. One off: no note. One of two off:1 of 2. Both at the gitlink:2. The first two fail on main e313701 and pass here.Each run had a stub
ghfirst on PATH (exit 97),GH_TOKEN=bogusand an emptyGH_CONFIG_DIR:/usr/bin/python3 -m pytest -q -p no:cacheprovider --basetemp=<scratch>/bt -o tmp_path_retention_policy=failed tests/test_pin_validator.py tests/test_validate_pins_lockstep_lines.py tests/test_neutral_pin_validator.py tests/test_validate_pins_unreadable_workflow.py tests/test_validate_pins_unreadable_workflows_dir.py tests/test_validate_pins_without_git.py tests/test_repo_hygiene.py tests/test_cli_reference.py:264 passed in 80.89stests/test_doctor_gitlink_repairs.py tests/test_doctor_validator_rows.py, which run this gate under the doctor:72 passed in 83.39sNo doctor suite quotes this note (
git grep "agree with the gitlink"finds only the template andtests/test_pin_validator.py), and no doc quotes it.Pinned copy
templates/assembly-root/scripts/validate-pins.pyis a PINNED SHAPE COPY: every assembly root carriesscripts/validate-pins.pyas a row ofcontracts/shape-pin.yaml. It is not inFAMILY_COPIED_VERBATIM, so no family holder carries it. A change to it shows each project anupstream-changedrow forscripts/validate-pins.py. Released at v1.1.1, it adds that row for projects at v1.1.0.🤖 Generated with Claude Code
Summary by Sourcery
Fix workflow pin agreement reporting to accurately reflect references that match the repository gitlink.
Bug Fixes:
N of M, and omit the note when no references agree.Tests: