Skip to content

Release v1.48.0 - #295

Merged
professorpalmer merged 4 commits into
mainfrom
dev
Oct 24, 2026
Merged

professorpalmer merged 4 commits into
mainfrom
dev

Conversation

@professorpalmer

Copy link
Copy Markdown
Owner

Release v1.48.0.

  • An inline run binds its store per context (state.bind_state_dir), not in os.environ. Two inline runs on different stores in one process no longer write into each other's store. Readers use state.state_dir_from_env. The inline role pool and the agentic parallel tool pool copy the context. Child processes get the bound dir through stamp_worker_env.
  • Opt-in in-process map walks (defaults.inprocess or PUPPETMASTER_FLOW_INPROCESS=1).

Local: full unittest suite 4298 tests, one old test updated to the binding contract. New tests/test_state_dir_binding.py (5 tests). A race script reproduces the wrong store on 1.47.0 and is clean on this tree. Python 3.9 floor run of the new tests passes.

See docs/CHANGELOG.md.

With defaults.inprocess or PUPPETMASTER_FLOW_INPROCESS=1, a map walks its
items as threads of the parent walker, not as new walker processes. Run
locks, markers, stop and resume do not change. A thread walk that raises
leaves the run interrupted, and the map starts it again.
_run_inline_workers set PUPPETMASTER_STATE_DIR in the process env for the
whole run. Two inline runs on different stores in one process (Marionette
runs swarms inline in its backend) then saw each other's state dir: a
worker of one run wrote deltas, stdout sidecars and tool offloads into the
other run's store, and the restore order could leave the wrong value.

- state.bind_state_dir sets a ContextVar. state_dir_from_env reads it
  first, then the env. Every in-process reader uses it.
- The inline role pool and the agentic parallel tool pool copy the context
  into their threads.
- stamp_worker_env and the agentic shell env export the bound dir, so
  child processes see the same value as before.
- A subprocess worker still sets the env in its own process.

Repro: two concurrent inline runs held inside their workers with a
barrier. Before, the plain run's worker resolved the other store. After,
each resolves its own, and os.environ does not change.
@professorpalmer
professorpalmer merged commit 61e901a into main Oct 24, 2026
18 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