fix: coverage-diff sources ci.env; stamped refs kept in lockstep - #17
Merged
Merged
Conversation
Two bugs in the same place — the local mirror not actually mirroring — both found while bumping intendent to v3.0.0. coverage-diff ran pytest without sourcing .colormath/ci.env, while CI's diff-coverage gate sources it. A consumer whose app needs test config to import at all got a green gate in CI and a collection error locally from the same commit. Now uses the same if/then/fi form as the CI step. The two stamped refs had drifted and nothing noticed. gates.yml's colormath-ref default is how CI fetches its gate scripts; COLORMATH_REF in Makefile.colormath is how preflight fetches the same ones. Releasing step 2 stamped only the first, so COLORMATH_REF sat at v2.0.0 against CI's v3.0.0 — preflight running scripts from three releases back. Harmless purely by luck: audit-deps.sh, migrations-sync.sh and diff-coverage.sh happen to be byte-identical across those tags, so the first script change would have split local from CI with no signal at all. COLORMATH_REF corrected to v3.0.0, LIFECYCLE step 2 now names both refs, and a refs-lockstep job fails the PR when they disagree. Machinery rather than a checklist habit, since the checklist already had the step and it was still missed. Lands under the existing Unreleased section rather than claiming its own version — that release is already MINOR for the three new skills. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01T3dRiaun8tKHmqQWCpMWMo
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.
Two bugs in the same place — the local mirror not actually mirroring — both surfaced while bumping intendent to v3.0.0.
1.
coverage-diffdidn't source.colormath/ci.envCI's
diff-coveragegate sources it before pytest (gates.yml:60). The local mirror of that same gate did not. So a consumer whose app needs test configuration to import at all — a session secret, a provider key — gets a green gate in CI and a collection error locally, from the same commit.make preflightis only worth running if it runs what CI runs. Fixed with the identicalif [ -f … ]; then set -a; . …; set +a; fiform the CI step uses, so the two are literally the same idiom.Scope honesty: this closes the half colormath owns, and only that half. Whether the app also reads a local
.envis the consumer's business — a.envholding container-only paths still leaks into host runs. A consumer workaround can shed its ci.env-sourcing half here, but not necessarily all of it.2. The two stamped refs had drifted, and nothing noticed
gates.yml→colormath-refdefaultv3.0.0✓Makefile.colormath→COLORMATH_REFv2.0.0✗LIFECYCLE's Releasing step 2 stamped only the first, so preflight has been fetching gate scripts from a tag three releases behind CI.
Harmless so far purely by luck.
audit-deps.sh,migrations-sync.shanddiff-coverage.share byte-identical betweenv2.0.0andv3.0.0— verified. The first script change would have split local from CI with no signal whatsoever.Worth noting
Makefile.colormath's own header already claimed both refs are "stamped per release, so the refreshed file pins itself." The intent was documented; it just wasn't happening.Three parts to the fix:
COLORMATH_REFcorrected tov3.0.0refs-lockstepjob in colormath's own CI fails the PR when they disagreeThat last one is deliberate machinery over habit. LIFECYCLE says "this is a checklist habit, not machinery" — but the checklist already had a stamping step and it was still missed for three releases, so the habit demonstrably isn't sufficient here. Verified the guard both ways: PASS on the matched refs, FAIL when
COLORMATH_REFis set back tov2.0.0.Versioning
Lands under the existing
## Unreleasedsection rather than claiming its own version — that release is already MINOR for the three new skills, and these are bug fixes riding along.Verification
sh -non the expandedcoverage-diffrecipe — cleanci.ymlparses; jobs arerefs-lockstep,gatesexample/untouched — neither change alters gate behavior against the fixture🤖 Generated with Claude Code
https://claude.ai/code/session_01T3dRiaun8tKHmqQWCpMWMo