Repository navigation
feat(drift): squabble drift, a read-only caller drift comparator (S9) - #180
Conversation
squabble-core::drift compares a repository's workflow callers with the layer-3 templates: a caller is matched by the reusable workflow in its uses: line, the template is rendered with the caller's own pin, and the bytes are compared. Findings: EditedCaller (certain at the latest pin, unknown-cause at an older one, since the template at the old pin is not available), StalePin, NotFullShaPin, LeftoverGuardCaller and MissingLockEntry. Checks that could not run are listed in not_checked and never read as passed. `squabble drift [--json] [--repo DIR] [--templates DIR] [--latest-suite-sha SHA] [--latest-proven-sha SHA]` exits 0 clean, 4 drift found, 2 bad usage or unreadable input. It reads files and writes nothing (tested by snapshotting the repository and the templates before and after). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01J4QvDgb6vQnxAZ8czX8SLb
|
Review these changes at https://app.gitnotebooks.com/hyperpolymath/cicd-squabbler/pull/180 |
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the
|
SonarCloud on #180 raised four findings: three minor (closures that are method references) and one critical (analyse had cognitive complexity 59 against 30). analyse is now a short driver over check_guard, check_caller, check_stale, check_exact_copies and check_lock, collected in a small accumulator. Behaviour is unchanged: the 12 core and 11 binary-level drift tests pass, the workspace is 500 passed / 0 failed, and re-running the six detection mutations fails the same number of tests as before (7, 6, 4, 4, 4, 5). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01J4QvDgb6vQnxAZ8czX8SLb
… releases exist Hub request on #180. Until release tags exist, the default "latest suite pin" is the vendor-time branch tip, so a stale pin only means "behind vendor-time main". The output now carries latest.stale_pin_means, which reads "behind vendor-time main (a branch tip, not a release; no release tags exist yet)" for the default, "behind the pin given with --latest-suite-sha" for a flag, and "not checked" with no pin. Two binary-level tests pin the wording. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01J4QvDgb6vQnxAZ8czX8SLb
Owner ruling 2026-11-30 ("keep them out of the lock, follow the template"):
gate callers are DE-ONBOARDED from actions.lock. A template says so with the
marker "DE-ONBOARDED from actions.lock" (11 vendored templates carry it), and
the rule is driven by that text, not a list. De-onboarded means the file's key
is present with an empty list ('<file>': []): a missing key is already
MissingLockEntry, and the repo's own lock-sync checker treats a missing key as a
defect. A gate caller whose key lists any leaf record is the new
OnboardedGateCaller finding. The umbrella proven.yml caller has no marker and
may keep its leaf.
lock_record() reads one workflow's list (absent / empty / leaves). Tests: five
core unit tests, three binary-level tests (one data-driven over every marked
vendored template, with a leaf and with the empty entry). Mutation check: four
mutations of the rule fail 4, 6, 4 and 2 tests.
Note for the owner: scripts/check-lock-sync.sh clause 1 requires every uses: to
be locked under its own workflow, so the de-onboarded shape fails that gate in
this repository. The two rules conflict; this commit only reports.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01J4QvDgb6vQnxAZ8czX8SLb
|
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |



Summary
S9 of the CI programme W49:
squabble drift, a read-only comparison of a repository's workflow callers against the layer-3 templates, with a pure core insquabble-core::drift.Stacked on
vendor/ci-design-w49(the hub's read-only vendored design, corpus and templates), which must land first. Independent of #178 and #179.What it reports
EditedCallercertainty: certainonly when the pin is the latest known; otherwiseunknown-cause, because an edit and a template change since the old pin look identical and the template at the old pin is not availableStalePinlatest.stale_pin_meansin the output says soNotFullShaPin(provisional: not one of the four kinds in design 6.1 S9)LeftoverGuardCallerci-gate-tamper-guardcaller is still present (by file name or by calling a tamper-guard reusable; notespull_request_target)MissingLockEntry.github/workflows/actions.lockbut it has no record for a workflowOnboardedGateCalleractions.lockstill has a leaf record in the lock (owner ruling 2026-11-30: keep gate callers out of the lock, follow the template). De-onboarded = the file key present with an empty list ('<file>': []); a missing key isMissingLockEntry. Driven by the marker in the template text (11 vendored templates carry it)squabble drift [--json] [--repo DIR] [--templates DIR] [--latest-suite-sha SHA] [--latest-proven-sha SHA]. Exit 0 no drift, 4 drift found, 2 bad usage or unreadable input (nothing on stdout). Never writes.Evidence (run here)
cargo test --workspace: 500 passed, 0 failed on this base (479 baseline + 21 new: 10 core unit, 11 binary-level).cargo fmt --checkandcargo clippy --workspace --all-targets -- -D warningsclean.creusot.ymlis stale (pinned6a35e51…, latest0e7c81b…) and differs from its template, reportedunknown-causeas designed;proven-coverage-collect.ymldiffers from its exact-copy template. Every workflow has a lock record.Limits, stated plainly
--latest-suite-shais given it is the SHA the vendored templates were taken at (0e7c81b…, read from the vendor README); the output says so (suite_sha_source). The owner has not cut release tags, so there is no released pin to compare against yet. The umbrella pin has no default and is reported as not checked.RSR Quality Checklist
unsafe, no banned functions, no secrets; SPDX headers present; no new dependenciesdocs/and STATE not updatedUpdates since opening
analysehad cognitive complexity 59 against 30; three minor method-reference nits).analyseis now a short driver over named checks; Sonar's API reports 0 open issues for this PR after the refactor. Behaviour is unchanged: re-running the six detection mutations fails the same number of tests as before.latest.stale_pin_meanslabelsStalePinas "behind vendor-time main (a branch tip, not a release; no release tags exist yet)" by default. Two more binary-level tests pin the wording (workspace now 502 passed, 0 failed).NotFullShaPinand the matching rules are mine where the design is silent. At an old pin, differences stayunknown-cause; the proper fix is at source (proven-cicd publishing a templates manifest per release, template path to sha256), which the hub has put on the estate list.Owner decision needed: this rule conflicts with this repo's own lock-sync gate
OnboardedGateCallerimplements the 2026-11-30 ruling as written. Butscripts/check-lock-sync.sh(the Lock Sync Gate) has a clause that everyuses:in a workflow, job-level reusable refs included, must be locked under its own workflow path. Tested on a scratch copy withcreusot.ymlset to[]and nothing else changed: the checker fails (refs missing from the lockfile: hyperpolymath/proven-cicd-and-workflows@6a35e51…, exit 1). On this repo,creusot.ymlis the only workflow calling a proven-cicd reusable; it has been onboarded since it was added and it starts and runs (4 Creusot jobs on today's PR heads), which is evidence against the template's claim that an onboarded cross-repo reusable startup-fails here.So today
squabble driftflagscreusot.ymlasOnboardedGateCallerwhile the Lock Sync Gate requires exactly that leaf. Options, for the owner: (a) change the checker to exempt de-onboarded gate callers (a gate-file change, not mine to make); (b) keep onboarded here and correct the template comments; (c) neither, and treat the finding as advisory. No PR de-onboardingcreusot.ymlhas been opened, because it would turn the Lock Sync Gate red.Evidence for the new rule
Workspace 510 passed, 0 failed; fmt and clippy clean. Five core unit tests plus three binary-level tests, one data-driven over every marked vendored template (leaf recorded: flagged, exit 4; empty entry: clean, exit 0). Four mutations of the rule fail 4, 6, 4 and 2 tests.
https://claude.ai/code/session_01J4QvDgb6vQnxAZ8czX8SLb
Generated by Claude Code