Repository navigation
fix(pre_build): black only the dirs it stages (slam_pipeline only for slam=true) - #315
Merged
Merged
Conversation
…r slam=true pre_build black'd slam_pipeline/ in every workspace but staged it only for slam=true (autolens_workspace), so autolens_workspace_developer was left with an unstaged formatting diff after every release (2026.10.16.2) — Heart worktree_drift. The black set now equals the stage set, as the existing comment already claimed. Witness test: a reformatting black stub leaves no workspace dirty and touches slam_pipeline only where slam=true. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q5cb9GpAGUL2EMedWRexHh
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.
Why
pre_build.shruns black onslam_pipeline/in every workspace, but stages it only whenslam=true(autolens_workspace). In the 2026.10.16.2 pre-build, black reformattedautolens_workspace_developer/slam_pipeline/mgl_slam_batch.pyand then logged "No changes to commit". That leaves the canonical checkout dirty after every release, which Heart reports as worktree drift. The comment above the loop already said "Format only the dirs this script stages"; the code didn't do that.Change
scripts/is black'd as before.slam_pipeline/is black'd only whenslam=true, so the black set now equals the stage set.test_black_touches_only_what_is_staged: a black stub that really reformats leaves every workspace clean and touchesslam_pipelineonly whereslam=true. It fails onmain(autofit_workspace: M slam_pipeline/pipe.py) and passes with the fix.test_pre_build_wip_preflight_precedes_every_mutationlocated the black call by its old literal text; it now anchors onblack "scripts/". Same ordering assertion.Tests
tests/test_pre_build_staging.py+tests/test_pre_build_skill.py: all pass. Full suite from a worktree outside the workspace layout: 496 passed, 14 failed, against 495 passed and the same 14 failed on unmodifiedmainin the same location (board theme and grouped-path discovery are environmental). CI is the authoritative run.Mind draft:
draft/bug/pyautohands/pre_build_blacks_unstaged_slam_pipeline.md.🤖 Generated with Claude Code
https://claude.ai/code/session_01Q5cb9GpAGUL2EMedWRexHh
CI correction — 2026-10-26
The staging witness now describes
slam=falseworkspaces without embedding an instance repository name in test code. The shell stub uses a valid Python escape while emitting the identical shell command. Existing assertions and production behavior are preserved.Validation on the updated branch:
git diff --check: passed.Heart RED development override
Live human authorization on 2026-10-26: "Authorize development override", responding to the question specifically naming Hands #315, Memory-template #3, and release-blocker development. This permits development only; publication must still pass the release gate. The human separately requested completing and merging the backlog, excluding Pulse #79; the main session owns merge decisions and requires green CI.
Published RED reasons retained verbatim (local cached YELLOW is not evidence that the newer published RED cleared):
Passed branch gates are listed above. This correction does not claim to repair Heart, authorize a release/rehearsal, or bypass any CI check.