Skip to content

fix(pre_build): black only the dirs it stages (slam_pipeline only for slam=true) - #315

Merged
Jammy2211 merged 2 commits into
mainfrom
fix/pre-build-black-only-staged-dirs
Oct 26, 2026
Merged

Jammy2211 merged 2 commits into
mainfrom
fix/pre-build-black-only-staged-dirs

Conversation

@Jammy2211

@Jammy2211 Jammy2211 commented Oct 16, 2026 •

Copy link
Copy Markdown
Collaborator

Why

pre_build.sh runs black on slam_pipeline/ in every workspace, but stages it only when slam=true (autolens_workspace). In the 2026.10.16.2 pre-build, black reformatted autolens_workspace_developer/slam_pipeline/mgl_slam_batch.py and 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 when slam=true, so the black set now equals the stage set.
  • New witness test_black_touches_only_what_is_staged: a black stub that really reformats leaves every workspace clean and touches slam_pipeline only where slam=true. It fails on main (autofit_workspace: M slam_pipeline/pipe.py) and passes with the fix.
  • test_pre_build_wip_preflight_precedes_every_mutation located the black call by its old literal text; it now anchors on black "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 unmodified main in 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=false workspaces 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:

  • Staging and pre-build skill tests: 11 passed.
  • Full local suite: 511 passed (145.95 s).
  • Tenant firewall against the isolated task root: OK.
  • Executable AST equivalence excluding docstrings: passed; git diff --check: passed.
  • Current-head GitHub Python matrix remains the merge gate; no merge or release performed by this update.

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):

  • release validation FAILED (stage integrate)
  • PyAutoHeart/workflows/Release Integrate: failure
  • PyAutoHeart/workflows/Workspace Smoke: failure
  • manifest_drift/checks/workspace checkouts (manifest ↔ disk): red
  • Release readiness: release validation FAILED (stage integrate)
  • autolens: red
  • Workspace validation: NOT ready — 1429p / 1f / 125s @ cloud#40294511523
  • test_run: red
  • Release validation: NOT release_ready — v? profile=? (2026-10-26T07:48:52+00:00)
  • validation_report/stages/integrate: fail
  • PyAutoBrain: red
  • PyAutoLens: red
  • autolens_profiling: red
  • Worktree drift: 1 orphan / 0 missing / 3 dirty

Passed branch gates are listed above. This correction does not claim to repair Heart, authorize a release/rehearsal, or bypass any CI check.

Jammy2211 and others added 2 commits October 16, 2026 22:19
…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
@Jammy2211
Jammy2211 merged commit f8f8d43 into main Oct 26, 2026
3 checks passed
@Jammy2211
Jammy2211 deleted the fix/pre-build-black-only-staged-dirs branch October 26, 2026 16:38
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