fix(ci): drift detector — real repo slugs, no banner pollution, error≠drift - #826
Merged
Merged
Conversation
…≠drift (refs #708 residuals) Three residual defects from #708, re-measured at HEAD and in the 2026-09-15 artifact (351/351 rows said _w; 67 of 418 'drifted entries' were [drift] clean banner lines): 1. Anonymised rows: the script wrote $(basename "$REPO_DIR") = _w. It now takes an optional REPO_SLUG arg 2 (documented in the header, stdout-versus-stderr contract included), and the workflow passes it the real repo slug. 2. Banner pollution: the trailing '[drift] clean' echo went to STDOUT, landing in drift-report.tsv and inflating the row count. It now goes to stderr (stdout is data-only by contract), and the workflow's rows count counts tab-bearing lines minus the header, so a future banner can never inflate the number again. 3. Error-as-drift: exit 2 (usage/env error) was counted identically to exit 1 (drift). Now split: rc=1 → drifted, anything else → errors, with the count surfaced in the step summary AND the tracking-issue table ('check errors (rc≠0,1)' row). Validation: bash -n on script + extracted sweep block; PyYAML parse; fixture test — drifted fixture emits 'owner/myrepo<TAB>ci.yml…' and exits 1; clean fixture emits empty stdout with banner on stderr and exits 0. Does NOT close #708 (estate re-run pending) but completes its standards-side remainder.
Contributor
|
Warning Review limit reachedNext included review available in 46 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (2)
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. Comment |
|
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.



Refs #708 (residual defects — schedule and issue-updating halves were fixed earlier; this PR completes the standards-side remainder).
Residual defects re-measured today (2026-09-17)
Evidence: downloaded the run's own
drift-report.tsvartifact (2026-09-15):_w_w(script writes$(basename "$REPO_DIR"); workflow clones into_w)[drift] cleanbanner lines — the summary's "drifted entries 418" counts banners because the clean-banner echo goes to stdoutif ! script …; then drifted++— exit 2 (usage/env error) and exit 1 (drift) folded togetherFix
check-lockfile-drift.shtakes optionalREPO_SLUG(arg 2, documented in the header, stdout-vs-stderr contract stated); the workflow passes the real repo slug for every clone.drifted entries.rc=1 → drifted, anything else → a newerrorscounter, surfaced in both the step summary and the tracking-issue table (check errors (rc≠0,1)row).Validation
bash -non the script AND on the extracted sweep step block; PyYAML parse of the workflowowner/myrepo<TAB>ci.yml<TAB>…and exits 1; clean fixture emits empty stdout (banner on stderr) and exits 0Not closing #708 on merge: its last acceptance piece is an estate re-run under the repaired detector — that happens automatically next Tuesday cron, and the resulting artifact should then show real slugs and truthful counts.