Skip to content

repos_sync: one declaration per generated block; register 5 organ tasks - #528

Closed
Jammy2211 wants to merge 5 commits into
mainfrom
ccr-7e6b22c0-04av9i
Closed

Jammy2211 wants to merge 5 commits into
mainfrom
ccr-7e6b22c0-04av9i

Conversation

@Jammy2211

Copy link
Copy Markdown
Collaborator

Closes #527

Refactor of scripts/repos_sync.py (commit 73e7ddc)

The script had 8 marker-block check/write pairs. They are now 8 GeneratedBlock declarations, and those declarations drive both the check registry and --write.

  • Shared code replaces the duplicates:
    • check_block replaces seven check_* functions and _check_required_block;
    • insert_block_markers replaces the two marker-insert functions;
    • write_blocks replaces the 7 write_block call sites.
  • The functions that existing callers use (tests, session_hook_propagate.yml) stay as one-line wrappers.
  • Removed: check_map_blocks, check_history_blocks, check_public_tables and insert_filing_markers. Nothing in the four organ repos calls them; PyAutoHeart and PyAutoHands were not searched.
  • Legs with a different shape are left as they were: heart, hygiene, firewall, standards, hooks, pointers and lints.
  • Size: 3190 → 3161 lines.

Behaviour is unchanged. 185 captured invocations are byte-identical before and after. They cover:

  • every --only and --skip leg, on a tree as-is and on one made stale on purpose;
  • --repo and every error path;
  • every --write mode, run on a copied tree, with the resulting diff captured.

The new hermetic test tests/test_repos_sync_generated_blocks.py pins the declarations and the check/write transcripts.

Registry (commit 112bacb)

Five prompts are moved from draft/ to active/ and registered in active.md, with their issues and PRs:

Tests

  • pytest -q -n auto: 715 passed, 1 failed. The failure is test_session_bootstrap.py::test_the_hook_survives_an_unwritable_tools_dir, which also fails on the code before this change.
  • All test_repos_sync_* tests pass, and the firewall_gate legs pass.

Generated by Claude Code

Eight check/write pairs collapse into GeneratedBlock declarations driving
both the check registry and --write. 185 captured CLI invocations (every
--only/--skip leg, error paths, every --write mode on a copied tree) are
byte-identical before and after. New hermetic test pins the declarations
and the check/write transcripts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016nhQ8REafSSE74S71P4set
…d#527); draft -> active

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016nhQ8REafSSE74S71P4set
…stale-done prompts; file+register project-discovery bug (Brain#565)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016nhQ8REafSSE74S71P4set
…; 3 glance shadow rows (72/20)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016nhQ8REafSSE74S71P4set
@Jammy2211

Copy link
Copy Markdown
Collaborator Author

Closing as superseded; nothing from this PR is lost.

  • Refactor (73e7ddc): on 2026-11-05 the task was re-sized and the human chose the narrower option (a): one OptInBlock declaration for the map/history/remote blocks. It shipped as Draft-queue sweep: close 27 shipped drafts, re-scope 24; repos_sync OptInBlock refactor #539 (dc471e1); record: complete/2026/11/repos-sync-optin-block.md. This PR is option (b), the full one-declaration-per-surface collapse. The record says to re-file it only if a new generated surface makes it worth it.
  • Registry (112bacb, efc2cbf): the 5 organ tasks it registered were closed after PyAutoBrain#564 and PyAutoMemory#143 merged (ca0f232).
  • The branch now conflicts with main.

Closed during a release check-in to clear Heart's "PyAutoMind: open PR 7d old" reason.

@Jammy2211 Jammy2211 closed this Nov 11, 2026
Jammy2211 added a commit that referenced this pull request Nov 12, 2026
…ide)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.

refactor: repos_sync.py — one declaration per generated marker block

2 participants