Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions REFERENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -823,6 +823,15 @@ What blocks, and what does not:
sides changed differently is the only conflict — takes `main`'s copy of the
renders, and leaves `autonomy_log.md` to git's `merge=union` driver
(`.gitattributes`; it is append-only). What that cannot settle blocks.
- **Branches the workflow never touches sync locally the same way.** A session
branch (`ccr-*` and the like) or a PR branch holding code must catch up with
`main` by hand, and its generated files conflict on almost every concurrent
push. `git fetch origin main && python3 scripts/ledger_merge.py sync` runs the
same merge: `--no-commit` merge of `origin/main`, `resolve`, then
`complete/index.md` and the dashboard re-rendered on the merged tree (the
Brain renderer from `$PYAUTO_BRAIN` or a sibling `PyAutoBrain`), staged for
you to commit. It refuses a dirty tree and stops, merge in progress, on
anything the grammar cannot settle.
- **A blocked branch is written on an issue** titled ``ledger merge: `<branch>`
needs a human`` (label `ledger-merge`), updated on every further attempt and
closed by the run that finally lands it. A red run nobody is subscribed to
Expand Down
30 changes: 30 additions & 0 deletions complete/2026/11/bootstrap-test-root-skip.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
- summary: fixed in commit 748f8c0bb (this PR). `test_the_hook_survives_an_unwritable_tools_dir` probes `os.access(bin, W_OK)` after the chmod and skips with "cannot make a directory unwritable here (running as root?)" when root ignores the mode bits. As a normal user it still drives the failure path.
- witness: in this cloud container (root), `pytest tests/test_session_bootstrap.py -rs` reports 1 skipped with that reason. Mind suite 728 passed, 1 skipped.

## Original prompt

# `test_the_hook_survives_an_unwritable_tools_dir` fails when the suite runs as root

Type: bug
Target: PyAutoMind
Repos:
- PyAutoMind
Themes:
- ci
Difficulty: small
Autonomy: safe
Priority: low
Status: formalised
Filed: 2026-11-05
Consequence: glance
Witness: `pytest tests/test_session_bootstrap.py` reports the test as SKIPPED with a reason when run as root (cloud containers) and still drives the failure path as a normal user.
Review-minutes: 2
Unattended: ready

The test chmods a tool env's `bin/` to 0o500 to force `repair_uv_tools` down its "could not
repoint" path. Root ignores mode bits, so in a cloud session (tests run as root) the path is never
taken and the test fails on the environment, not on the code. Every Mind suite run in the
2026-11-05 queue session reported it as a known failure. Fix: probe `os.access(..., W_OK)` after
the chmod and skip with a reason when the directory is still writable.

<!-- formalised by the Intake (Conception) Agent on 2026-11-05 from file:/tmp/claude-0/-home-user/ad8c6486-73f7-504b-b742-a7b629366ade/scratchpad/intake/a_bootstrap_root.md -->
36 changes: 36 additions & 0 deletions complete/2026/11/ledger-merge-sync.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
- summary: shipped in commit 748f8c0bb (this PR). `scripts/ledger_merge.py sync [--base origin/main] [--root]` / `sync_with_base()` does what `mind_ledger_merge.yml` does, for branches it never touches. It refuses a dirty tree; runs `git merge --no-commit --no-ff <base>`; uses `resolve_conflicts` (registries merge by entry, renders conflict-free); stops as `blocked` with the merge in progress on anything the grammar cannot settle; otherwise re-renders `complete/index.md` (`lifecycle.py index --apply`) and the dashboard (the Brain renderer from `$PYAUTO_BRAIN` or a sibling/organs `PyAutoBrain`, else a NOT-regenerated note) on the merged tree; and stages them for the caller to commit. Documented in REFERENCE.md "How the ledger lands".
- witness: 3 new tests in tests/test_ledger_merge.py: ready + entry merge + injected re-render + MERGE_HEAD staged; up-to-date no-op and dirty-tree refusal; a non-ledger conflict blocked before rendering. 31 passed in that file.
- not done: extending the auto-merge workflow to `ccr-*` session branches. That is a policy decision for the human.

## Original prompt

# `ledger_merge.py sync`: bring a non-`claude/**` Mind branch up to date with main…

Type: feature
Target: PyAutoMind
Repos:
- PyAutoMind
Themes:
- mind-workflow
Difficulty: small
Autonomy: supervised
Priority: medium
Status: formalised
Filed: 2026-11-05
Consequence: judge
Witness: tests drive a fixture repo — a session branch behind main with entry-level registry changes on both sides and conflicting renders — through `sync_with_base`: status `ready`, registries merged by entry, renders regenerated on the merged tree by the (injected) renderer, merge left staged; `up-to-date` is a no-op; a dirty tree is refused; a non-ledger conflict stops as `blocked` before rendering.
Review-minutes: 5
Unattended: ready

`mind_ledger_merge.yml` settles concurrent-push conflicts for `claude/**`, `codex/**` and
`chatgpt/**` branches (`ledger_merge.py resolve`, then re-render). Session branches (`ccr-*`) and
PR branches holding code get none of that: PyAutoMind#539 needed three rounds of hand conflict
resolution on `dashboard.md` / `dashboard.html` / `state.json` / `complete/index.md` as other
sessions pushed to main every few minutes, and one round kept main's stale index because the
manual regen was a dry run (red `drift` check). A `.gitattributes` merge driver does not help:
GitHub ignores custom drivers. Add `ledger_merge.py sync [--base origin/main]` — merge with
`--no-commit`, `resolve`, re-render the generated files on the merged tree, stage, let the caller
commit — and document it beside the workflow in REFERENCE.md "How the ledger lands".
Extending the auto-merge workflow to `ccr-*` branches is a separate policy decision (not here).

<!-- formalised by the Intake (Conception) Agent on 2026-11-05 from file:/tmp/claude-0/-home-user/ad8c6486-73f7-504b-b742-a7b629366ade/scratchpad/intake/c_sync.md -->
30 changes: 30 additions & 0 deletions complete/2026/11/root-default-test-env-leak.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
- summary: fixed in commit 748f8c0bb (this PR). The module's autouse `forget_the_resolver` fixture now deletes `PYAUTO_ROOT` and `PYAUTO_ROOT_REASON` via monkeypatch. `test_an_explicit_override_is_never_second_guessed` still sets its own value.
- witness: `PYAUTO_ROOT=/home/user pytest tests/test_repos_sync_root_default.py` passes. The full suite gives 728 passed, 1 skipped, with and without the variable exported.

## Original prompt

# `test_repos_sync_root_default` inherits an exported `PYAUTO_ROOT` and fails

Type: bug
Target: PyAutoMind
Repos:
- PyAutoMind
Themes:
- ci
Difficulty: small
Autonomy: safe
Priority: low
Status: formalised
Filed: 2026-11-05
Consequence: glance
Witness: `PYAUTO_ROOT=/somewhere pytest tests/test_repos_sync_root_default.py` passes.
Review-minutes: 2
Unattended: ready

`workspace_root()` treats an exported `PYAUTO_ROOT` as "the operator's word" and never second-
guesses it, so `test_a_root_that_does_not_hold_this_checkout_is_refused` fails whenever the shell
running the suite has it exported — which the Brain CLI does for its children (observed
2026-11-05 after a `pyauto-brain intake` run in the same shell). Fix: the module's autouse fixture
clears `PYAUTO_ROOT` / `PYAUTO_ROOT_REASON` via monkeypatch; the override test sets its own.

<!-- formalised by the Intake (Conception) Agent on 2026-11-05 from file:/tmp/claude-0/-home-user/ad8c6486-73f7-504b-b742-a7b629366ade/scratchpad/intake/b_root_env_leak.md -->
5 changes: 4 additions & 1 deletion complete/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Token-light navigation over the finished-work records (schema:
only then grep a dated bucket. Curators: edit the band between the CURATED
markers; everything below GENERATED is rebuilt.

2172 records across 11 buckets.
2175 records across 11 buckets.

<!-- CURATED:START -->
## Highlights
Expand Down Expand Up @@ -136,6 +136,7 @@ markers; everything below GENERATED is rebuilt.
- [autonomous-orchestrators-p4b](2026/11/autonomous-orchestrators-p4b.md) — phase 4b of 4a–4c; epic draft/feature/pyautobrain/autonomous_orchestrators_epic.md
- [batch-watch-live-view](2026/11/batch-watch-live-view.md) — pilot 4c follow-up; issue PyAutoBrain#575
- [board-without-gh-phase2-legs](2026/11/board-without-gh-phase2-legs.md) — already shipped, closed as a stale draft. PyAutoBrain 15317af (merged via #564, 2026-11-03) "phase 2 — the rem…
- [bootstrap-test-root-skip](2026/11/bootstrap-test-root-skip.md) — fixed in commit 748f8c0bb (this PR). `test_the_hook_survives_an_unwritable_tools_dir` probes `os.access(bin, W…
- [brain-hygiene-cleanup-bugs](2026/11/brain-hygiene-cleanup-bugs.md)
- [chapter2-continuation](2026/11/chapter2-continuation.md) — All continuation scope merged: Tutorials 5 and 6, optional speed and runnable model_centred prior passing, sum…
- [cloud-validation-rehearsal-clock-skew](2026/11/cloud-validation-rehearsal-clock-skew.md)
Expand Down Expand Up @@ -168,6 +169,7 @@ markers; everything below GENERATED is rebuilt.
- [intake-memory-line-organ-targets](2026/11/intake-memory-line-organ-targets.md) — already shipped — closed as stale draft. The `_with_memory` gate in `agents/conductors/intake/_intake.py` land…
- [jax-joss-benchmark-repo](2026/11/jax-joss-benchmark-repo.md) — already shipped — PyAutoLabs/autolens_jax_joss: 9c66b020 (birth, 10 benchmark scripts), 64204f69 (A100 sweep o…
- [latest-per-test-tie](2026/11/latest-per-test-tie.md) — test_autofit/results/test_identity.py::test_latest_per_keeps_the_latest_sibling flaked (main red at 963ff296a,
- [ledger-merge-sync](2026/11/ledger-merge-sync.md) — shipped in commit 748f8c0bb (this PR). `scripts/ledger_merge.py sync [--base origin/main] [--root]` / `sync_wi…
- [lifecycle-p3-designation-proposals](2026/11/lifecycle-p3-designation-proposals.md) — decided and shipped — the human approved all 39 designations (datacube/delaunay gpu_a100 held provisional); Py…
- [likelihood-lifecycle-p3-day-zero-pages](2026/11/likelihood-lifecycle-p3-day-zero-pages.md)
- [likelihood-lifecycle-p3-day-zero-stamp](2026/11/likelihood-lifecycle-p3-day-zero-stamp.md)
Expand Down Expand Up @@ -204,6 +206,7 @@ markers; everything below GENERATED is rebuilt.
- [results-library-p3-exports](2026/11/results-library-p3-exports.md) — phase 3; ledger draft/feature/autofit/results_library_epic.md
- [results-library-p4-package](2026/11/results-library-p4-package.md) — phase 4; ledger draft/feature/autofit/results_library_epic.md
- [results-library-p5b-cortex](2026/11/results-library-p5b-cortex.md) — phase 5b; ledger draft/feature/autofit/results_library_epic.md
- [root-default-test-env-leak](2026/11/root-default-test-env-leak.md) — fixed in commit 748f8c0bb (this PR). The module's autouse `forget_the_resolver` fixture now deletes `PYAUTO_RO…
- [rtd-organism-currency](2026/11/rtd-organism-currency.md) — already shipped, closed as a stale draft. PyAutoBrain 1aa2ed4 (#563) renamed `docs/organs/build` to `organs/ha…
- [scientist-minimal-starter](2026/11/scientist-minimal-starter.md) — already shipped — Mind#502 / PR #503, record `complete/2026/10/scientist-starter-acceptance.md`; slices PyAuto…
- [search-seed-reproducibility](2026/11/search-seed-reproducibility.md) — already shipped — PyAutoFit#1686 (5bf057f2, 2026-10-14; search-ext A4b), record `complete/2026/10/search-ext-a…
Expand Down
Loading
Loading