Skip to content

Extend drift check to mech_shared.yaml; retire schema-pin#247

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

Extend drift check to mech_shared.yaml; retire schema-pin#247
realmarcin merged 2 commits into
mainfrom
chore/extend-drift-schema-retire-pins

Conversation

@realmarcin

Copy link
Copy Markdown
Contributor

Folds mech_shared.yaml into the shared-reference drift check and retires its self-referential sha256 pin — same fix applied to the id-label set.

  • check_vendored_sync.sh: path-mapped entry so src/*/schema/mech_shared.yaml is diffed against the hub's src/culturemech/schema/mech_shared.yaml. Now 6 files; no .vendored_canon_ref bump (the pinned ref already carries it). Verified OK: all 6 vendored files match ...@6be694f3.
  • Retire verify-/refresh-schema-pin + SHARED_SCHEMA_MODULE; delete .mech_shared.sha256.

Companion PRs: CultureMech #112, MIM #157, TraitMech.

🤖 Generated with Claude Code

realmarcin and others added 2 commits July 21, 2026 20:15
Add directed `downstream` causal edges to the four existing
ecological_interactions of CommunityMech:000268, from the Edison
causal-graph run (PaperQA3; PMID:25814583 Byrne et al. 2015 Science,
+ doi:10.1126/science.aaa4834).

Wiring — the reversible magnetite "battery" loop:
- Phototrophic Magnetite Fe(II) Oxidation -> Anaerobic Magnetite Fe(III)
  Reduction (TIE-1 photo-oxidation of Fe(II) supplies the Fe(III) acceptor
  G. sulfurreducens reduces).
- Anaerobic Magnetite Fe(III) Reduction -> Phototrophic Magnetite Fe(II)
  Oxidation (Geobacter regenerates the Fe(II) donor for TIE-1; reversible
  in co-cultures) — closing the 2<->3 redox loop.
- Phototrophic ... Oxidation, Anaerobic ... Reduction, and Magnetite-Mediated
  Electron Sharing all -> Biogeochemical Battery Function (the two
  half-reactions + electron sharing constitute the emergent, reusable
  mineral electron store).

InteractionDownstream carries target + causal description only; evidence
stays on the parent nodes (existing PMID:25814583 snippets). Schema
validates; no new snippets or terms. Record HTML page regenerated.

First causal record curated via a normal `just research-community-causal`
run after the .env-precedence fix (#245) — no `env -u` workaround.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Fold the shared LinkML module mech_shared.yaml into the shared-reference drift
check and retire its self-referential sha256 pin (same fix as the id-label set):

- check_vendored_sync.sh: add a path-mapped entry for src/*/schema/mech_shared.yaml
  (local glob -> hub src/culturemech/schema/...). Now diffs 6 files against
  CultureBotAI/CultureMech@<.vendored_canon_ref>; pinned ref already carries it,
  no ref bump. Verified 6-file OK.
- Retire verify-/refresh-schema-pin + SHARED_SCHEMA_MODULE; delete
  src/communitymech/schema/.mech_shared.sha256.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 22, 2026 03:18

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

This PR updates CommunityMech’s “hub-and-spoke” vendoring guardrails by extending the drift check to include mech_shared.yaml and removing the now-redundant self-referential sha256 pin mechanism.

Changes:

  • Extend scripts/check_vendored_sync.sh to diff src/*/schema/mech_shared.yaml against the hub’s src/culturemech/schema/mech_shared.yaml, and report a total checked-file count.
  • Retire the verify-schema-pin / refresh-schema-pin just targets and delete src/communitymech/schema/.mech_shared.sha256.
  • Add “downstream effects” edges to one community record and update the rendered HTML page accordingly.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
scripts/check_vendored_sync.sh Adds path-mapped vendored-file drift checks for mech_shared.yaml and improves reporting.
src/communitymech/schema/.mech_shared.sha256 Removes the self-generated sha256 pin file.
justfile Removes schema-pin recipes and documents the new drift-check coverage.
kb/communities/Rhodopseudomonas_Geobacter_Magnetite_Redox_Coculture.yaml Adds downstream: causal links for several ecological interactions.
docs/communities/Rhodopseudomonas_Geobacter_Magnetite_Redox_Coculture.html Updates rendered docs to reflect the new downstream interaction flows.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +59 to +70
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
checked=$((checked + 1))
Comment on lines +146 to +150
downstream:
- target: Biogeochemical Battery Function
description: >
Magnetite-mediated electron sharing between the phototrophic Fe(II)
oxidizer and the anaerobic Fe(III) reducer manifests as the emergent,
@realmarcin
realmarcin merged commit 0b515c9 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