Repository navigation
feat(cortex): drift check between the Science tree and projects.yaml - #544
Merged
Merged
Conversation
New read-only `cortex drift [--science-root PATH] [--json]` verb: compares the laptop Science tree (<root>/<category>/<project>, root derived from the rows' local_path) with projects.yaml. Errors: unregistered folder in active/ or development/, a non-retired row whose folder is gone, category vs status, a derived root that no longer exists while other rows' folders do. Warnings: unregistered complete/archive folders (storage), a ral_root in a different category. census and checkin (dry-run and apply) print a one-line summary; census() itself stays drift-free so the CI-rendered board is machine-independent. Paths compare after realpath, so the ~/Science/Science launch symlink matches. Refs #543 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 29, 2026
Merged
This was referenced Oct 29, 2026
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.
Closes #543 (phase 1 of making the Cortex the Science project manager; phase 2,
cortex birth, follows as its own issue).Summary
pyauto-brain cortex drift [--science-root PATH] [--json]compares the laptop Science tree (<root>/<category>/<project>) withprojects.yaml. The root is derived from the rows'local_paths.active/ordevelopment/with no row;Workspace\\, andpullreached 3 of 12 active projects.complete/orarchive/folder (storage);ral_rootin a different category from itslocal_path.censusandcheckin(dry-run and apply) print a one-line summary.census()itself stays drift-free, so the board rendered in CI doesn't depend on the machine.API Changes
None to the library API. The conductor gains a verb:
cortex drift.census --jsongains a top-leveldriftkey (CLI output only, not incensus()).Review findings addressed
--science-root(~/Science/Science) produced falseunregisterederrors and skipped the category checks. Paths now compare afterrealpath; there's a test.checkin --dry-run(the default) didn't print the drift line. It does now; there's a test.local_pathand for an explicitly given root.~/Coderows provide that today.euclidandeuclid_dr1RAL categories, and 5 unregistered storage folders.Validation
Against the real tree with PyAutoCortex#77's register: 0 errors, 11 warnings, exit 0. Against the pre-#77 register: 12 errors, exit 1.
Companion: the PyAutoCortex PR on the same branch (docs, decision 62). Land PyAutoLabs/PyAutoCortex#77 first.
Heart RED override (development only)
Authorized by the live human on 2026-10-29: "I authorize" (for PyAutoBrain#543, after the exact RED reasons were shown). Development ship only: commit, push, PR-open. Merge needs a separate human
/prmwith every required check green. No release.Exact RED reasons (
pyauto-heart readiness, 2026-10-29):None of these involves PyAutoBrain or PyAutoCortex. This branch does not fix them.
Passed branch gates: Brain
tests/test_cortex_conductor.py71 passed (12 new); Cortexcortex check: OK+ 65 tests; no new ruff findings; no smoke leg applies (no workspace or library code); independent review FINDINGS, all addressed (see below).🤖 Generated with Claude Code