Skip to content

fix: isolate reusable bundle plans from session mutations - #404

Merged
Brian Krabach (bkrabach) merged 1 commit into
mainfrom
fix/isolate-session-mount-plans
Sep 21, 2026
Merged

Brian Krabach (bkrabach) merged 1 commit into
mainfrom
fix/isolate-session-mount-plans

Conversation

@bkrabach

Copy link
Copy Markdown
Collaborator

Modules can add runtime defaults to their configuration while mounting. Foundation's shallow mount-plan copies allow these changes to alter the reusable Bundle, so a later child can inherit its parent's working directory. Reusing a PreparedBundle also passes the same mutable plan into multiple sessions.

Return an independent nested configuration from Bundle.to_mount_plan(), and copy the prepared plan for each create_session() before injecting observability events or mounting modules. Session-specific configuration changes remain local; declared settings and observability subscriptions are preserved.

Validation:

  • All seven new regressions fail on unchanged main and pass with this fix. They cover nested configuration across mount-plan sections, future child composition, repeated prepared sessions with different directories, and per-session event subscriptions. The prepared-session regression uses a real Core session/coordinator with a simulated mutating module initializer.
  • 106 focused bundle/session/observability/mention tests pass.
  • Full suite: 2,268 passed, 50 skipped, one pre-existing failure in TestVerifyModuleType.test_non_isinstance_object_with_mount_passes. Its isinstance check raises because Core's Tool protocol is not runtime-checkable; the same node fails against unchanged Foundation3a5aa568 with both Core112 Python and installed Core1.6.1. This PR does not alter that unrelated test or interface.
  • Disposable integration with the current unmodified filesystem module verifies real child reads/writes/edits and Bash all use the child directory, and the parent Bundle stays unchanged. Also verified with the companion filesystem fix.
  • Ruff checks on changed files and wheel/sdist builds pass.

No host deployment or live-session changes. Integration used Core112 Python source at e2cf2a6f with the installed Core1.6.1 native extension; it was not a native rebuild at that commit.

@bkrabach
Brian Krabach (bkrabach) merged commit f5309a9 into main Sep 21, 2026
7 checks passed
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