Re-converge drift check on CultureMech hub; extend to mech_shared; retire schema-pin#182
Merged
Merged
Conversation
…tire schema-pin TraitMech's check_vendored_sync.sh had diverged to a claw-local-checkout variant that SKIPS (exit 0) when no culturebotai-claw checkout is present — i.e. it enforced NOTHING in CI, silently. Since claw is private, public CI can never fetch from it, so that design can't enforce. Restore the enforcing hub-fetch design used by the other spokes and fold in the schema module: - check_vendored_sync.sh: replace with the canonical CultureMech-fetch version (byte-identical to MIM/CommunityMech) + the src/*/schema/mech_shared.yaml path-mapped entry. Now diffs 6 files against the public hub and fails on drift. - .vendored_canon_ref: reset from the claw commit (1ad5d408) back to the CultureMech canon commit (6be694f3), matching the other spokes. - Retire verify-/refresh-schema-pin + SHARED_SCHEMA_MODULE; delete src/traitmech/schema/.mech_shared.sha256. Verified: check now reports "OK: all 6 vendored files match ...@6be694f3". Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Restores enforceable vendored-drift checking in CI by switching check_vendored_sync.sh back to the canonical hub-and-spoke raw-fetch approach (public CultureMech as hub), extends the drift check to include mech_shared.yaml, and retires the self-referential sha256 pin workflow for the shared schema module.
Changes:
- Replaced the local-claw-checkout drift check with a pinned raw-fetch + byte-compare against
CultureBotAI/CultureMech@<scripts/.vendored_canon_ref>, and added a path-mappedmech_shared.yamlentry. - Reset
.vendored_canon_refto the CultureMech canonical commit. - Removed the
verify-/refresh-schema-pinJust recipes and deleted.mech_shared.sha256.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/traitmech/schema/.mech_shared.sha256 | Deletes the retired sha256 pin for mech_shared.yaml. |
| scripts/check_vendored_sync.sh | Replaces drift-check logic with hub raw-fetch comparison and adds mech_shared.yaml mapping. |
| scripts/.vendored_canon_ref | Updates the pinned hub commit used by the drift check. |
| justfile | Removes schema-pin recipes and documents new drift-check coverage for mech_shared.yaml. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+59
to
69
| glob="${entry%%|*}"; hubf="${entry#*|}" | ||
| local="" | ||
| for cand in $glob; do [ -f "$cand" ] && local="$cand" && break; done | ||
| if [ -z "$local" ]; then echo "MISSING: no local file matching $glob"; fail=1; continue; fi | ||
| url="https://raw.githubusercontent.com/${CANON_REPO}/${REF}/${hubf}" | ||
| if ! curl -fsSL "$url" -o "$tmp"; then | ||
| echo "ERROR: could not fetch $hubf from ${CANON_REPO}@${REF:0:8} ($url)"; fail=1; continue | ||
| fi | ||
| if ! cmp -s "$tmp" "$local"; then | ||
| echo "DRIFT: $local differs from ${CANON_REPO}@${REF:0:8}:$hubf"; fail=1 | ||
| fi |
Comment on lines
+9
to
+12
| # The hub is the PUBLIC CultureBotAI/CultureMech (culturebotai-claw is private, | ||
| # so public Mech CI cannot fetch raw content from it). Dependency-free: bash + | ||
| # curl + diff only (no uv/OAK), so it runs as a fast blocking CI job before any | ||
| # heavy setup. The pinned canonical commit lives in scripts/.vendored_canon_ref; |
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 fixes in one: restores CI enforcement of the vendored-drift check (it had silently become a no-op here) and folds
mech_shared.yamlinto it.The regression this fixes
TraitMech's
check_vendored_sync.shhad diverged from the other spokes to a claw-local-checkout variant thatSKIPs and exits 0 when noculturebotai-clawcheckout is present — which is always the case in CI. So TraitMech'svendored-syncjob was passing without checking anything. Because claw is private, public CI can never fetch from it, so that design cannot enforce drift.Fix
check_vendored_sync.sh: replaced with the canonical CultureMech raw-fetch version (byte-identical to MIM/CommunityMech), extended with the path-mappedsrc/*/schema/mech_shared.yamlentry. Now diffs 6 files against the public hub and fails on drift..vendored_canon_ref: reset from the claw commit (1ad5d408) back to the CultureMech canon commit (6be694f3), matching the other spokes.verify-/refresh-schema-pin+SHARED_SCHEMA_MODULE; delete.mech_shared.sha256.Verified locally:
OK: all 6 vendored files match CultureBotAI/CultureMech@6be694f3.Companion PRs: CultureMech #112, MIM #157, CommunityMech #247. Reconciles with claw #19 (CultureMech confirmed as the fetch-hub; claw stays private).
🤖 Generated with Claude Code