Skip to content

feat: cortex.py birth — append a project's row and open its ledger - #79

Merged
Jammy2211 merged 1 commit into
mainfrom
feature/cortex-birth
Oct 29, 2026
Merged

Jammy2211 merged 1 commit into
mainfrom
feature/cortex-birth

Conversation

@Jammy2211

Copy link
Copy Markdown
Contributor

Companion to PyAutoLabs/PyAutoBrain#546 (PyAutoLabs/PyAutoBrain#545).

Summary

  • scripts/cortex.py birth <key> --local-path … --ral-root … --sync-verbs a,b --summary … appends one row and opens its ledger. With retire, these are now the only commands that write projects.yaml, and birth is the only one that adds a row.
  • It refuses:
    • a key or local_path that's already registered;
    • an invalid key;
    • a value holding a double quote, a backslash or a newline (the restricted YAML quotes with no escapes).
  • It writes the row in PROJECT_FIELDS order, reads it back comparing every field, and restores projects.yaml on any problem or a failed ledger.
  • A birth diff (one row plus projects/<key>.md) is classified as a birth by ledger_merge.py --base, so it lands by itself. Verified on a throwaway clone.
  • Docs: AGENTS.md, REFERENCE.md "Birth", schema decision 63.

API Changes

A new cortex.py command, birth. No schema change. 70 tests pass; cortex check: OK.

Heart RED override (development only)

Authorized by the live human on 2026-10-29: "I authorize development only heart override" (for PyAutoBrain#545, after the exact RED reasons were shown). Development ship only: commit, push, PR-open. Merge needs a separate human /prm with every required check green. No release.

Exact RED reasons (pyauto-heart readiness, 2026-10-29):

  • PyAutoArray: 4 uncommitted source change(s)
  • PyAutoGalaxy: 9 commit(s) behind origin
  • PyAutoLens: 7 commit(s) behind origin
  • release validation incomplete: no rehearsal for current source
  • release push credential check stale (pyautolabs-bot, 49h old)

None of these involves PyAutoBrain or PyAutoCortex. This branch does not fix them.

Passed branch gates: Brain tests/test_cortex_conductor.py 80 passed (3 end-to-end tests skip cleanly against a Cortex without birth); Cortex 70 tests + cortex check: OK; no new lint beyond the file's existing idiom; smoke n/a (organ tooling); independent review FINDINGS, all addressed (below).

🤖 Generated with Claude Code

The second verb that writes projects.yaml (with retire), the only one that
adds a row. Refuses a taken key or local_path, a double quote, backslash or
newline; appends the row in PROJECT_FIELDS order, reads it back and
compares every field, restoring projects.yaml on any problem or a failed
ledger. The diff is a birth to ledger_merge.py, so it lands by itself.
Docs: AGENTS.md, REFERENCE.md "Birth", schema decision 63.

Refs PyAutoLabs/PyAutoBrain#545

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Jammy2211
Jammy2211 merged commit ef65d2c into main Oct 29, 2026
1 check passed
@Jammy2211
Jammy2211 deleted the feature/cortex-birth branch October 29, 2026 13:57
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.

1 participant