Skip to content

Re-converge drift check on CultureMech hub; extend to mech_shared; retire schema-pin#182

Merged
realmarcin merged 1 commit into
mainfrom
chore/extend-drift-schema-retire-pins
Jul 22, 2026
Merged

Re-converge drift check on CultureMech hub; extend to mech_shared; retire schema-pin#182
realmarcin merged 1 commit into
mainfrom
chore/extend-drift-schema-retire-pins

Conversation

@realmarcin

Copy link
Copy Markdown
Contributor

Two fixes in one: restores CI enforcement of the vendored-drift check (it had silently become a no-op here) and folds mech_shared.yaml into it.

The regression this fixes

TraitMech's check_vendored_sync.sh had diverged from the other spokes to a claw-local-checkout variant that SKIPs and exits 0 when no culturebotai-claw checkout is present — which is always the case in CI. So TraitMech's vendored-sync job 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-mapped src/*/schema/mech_shared.yaml 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 .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

…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>
Copilot AI review requested due to automatic review settings July 22, 2026 03:19

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-mapped mech_shared.yaml entry.
  • Reset .vendored_canon_ref to the CultureMech canonical commit.
  • Removed the verify-/refresh-schema-pin Just 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;
@realmarcin
realmarcin merged commit edf7458 into main Jul 22, 2026
4 checks passed
@realmarcin
realmarcin deleted the chore/extend-drift-schema-retire-pins branch July 22, 2026 03:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants