Skip to content

Add manifest_drift tick check: continuous body-map identity drift#36

Merged
Jammy2211 merged 1 commit into
mainfrom
feature/manifest-drift-check
Jul 8, 2026
Merged

Add manifest_drift tick check: continuous body-map identity drift#36
Jammy2211 merged 1 commit into
mainfrom
feature/manifest-drift-check

Conversation

@Jammy2211

Copy link
Copy Markdown
Contributor

Follow-up to PyAutoLabs/PyAutoMind#36: manifest drift now surfaces without anyone remembering to run the check.

  • heart/checks/manifest_drift.py — runs PyAutoMind/scripts/repos_sync.py --check each tick and parses its per-surface report; the drift logic stays in Mind (Heart only observes and reports).
  • Gate role: YELLOW per drifted surface — identity hygiene that will eventually break a gh call or label sweep, not a release blocker (same stance as URL hygiene, but visible in readiness cautions). Missing PyAutoMind checkout → skipped; unparseable output → available: false, never a hollow green.
  • Wired into tick.sh (guarded), state.aggregate, readiness.compute, and health_agent/capabilities.yaml.
  • Verified live: ~1s standalone, full tick prints ✓ manifest_drift identity in sync (4 surfaces vs repos.yaml) and state.json carries the result. 210 tests pass (5 check tests + 2 readiness tests + parse edge case).

🤖 Generated with Claude Code

Runs PyAutoMind/scripts/repos_sync.py --check every tick and parses its
report — Heart's repos.yaml, pre_build.sh, ensure_workspace_labels.sh and
every checkout's origin vs the PyAutoMind/repos.yaml body map. The drift
logic stays in repos_sync.py (Mind owns the manifest; Heart observes).

Classification: YELLOW per drifted surface (identity hygiene, never RED);
skipped (available:false) when no PyAutoMind checkout, and an unparseable
report surfaces as unavailable rather than hollow green. Wired into tick.sh,
state.aggregate, readiness, and capabilities.yaml; ~1s live, 210 tests pass
(8 new).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 8, 2026 10:50
@Jammy2211 Jammy2211 merged commit 272a9f5 into main Jul 8, 2026
2 checks passed
@Jammy2211 Jammy2211 deleted the feature/manifest-drift-check branch July 8, 2026 10:50

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

Adds a new continuous (“tick”) check that detects body-map identity drift between PyAutoMind/repos.yaml and downstream repo identity surfaces (Heart/Build/labels + local checkout origins). This keeps the drift logic in Mind (repos_sync.py --check) while Heart observes and reports the results into state and readiness.

Changes:

  • Introduces heart.checks.manifest_drift to run PyAutoMind/scripts/repos_sync.py --check, parse its report, and persist manifest_drift.json.
  • Wires the new check into tick.sh, state.aggregate(), and readiness (drift surfaces as YELLOW, never RED).
  • Adds unit tests for report parsing, run behavior, and readiness classification.

Reviewed changes

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

Show a summary per file
File Description
tests/test_readiness.py Adds readiness tests ensuring manifest drift is YELLOW and “unavailable” stays GREEN.
tests/test_manifest_drift.py New tests for parsing repos_sync.py --check output and run-path edge cases.
heart/tick.sh Runs heart.checks.manifest_drift each tick when Mind checkout is present.
heart/state.py Aggregates manifest_drift.json into state.json.
heart/readiness.py Converts manifest drift per-surface failures into readiness YELLOW reasons.
heart/checks/manifest_drift.py Implements the new tick check runner + parser + state writer.
health_agent/capabilities.yaml Documents the new continuous check and its gate role.

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

Comment thread heart/readiness.py
Comment on lines +302 to +310
manifest = snapshot.get("manifest_drift")
if isinstance(manifest, dict) and manifest.get("available"):
for label, chk in (manifest.get("checks") or {}).items():
if isinstance(chk, dict) and not chk.get("ok", True):
n = len(chk.get("problems") or [])
yellow.append(
f"manifest drift: {label} — {n} mismatch(es) vs PyAutoMind/repos.yaml"
)
hit("manifest_drift")
Comment on lines +71 to +75
proc = subprocess.run(
[sys.executable, str(script), "--check", "--root", str(PYAUTO_ROOT)],
capture_output=True,
text=True,
)
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