fix(vm): preserve nested sessions in parallel block invocations (#17) - #178
Open
Adityakk9031 wants to merge 1 commit into
Open
fix(vm): preserve nested sessions in parallel block invocations (#17)#178Adityakk9031 wants to merge 1 commit into
Adityakk9031 wants to merge 1 commit into
Conversation
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.
Summary
Addresses #17 by specifying and standardizing execution semantics for block invocations inside parallel contexts (
parallel:orparallel for).Context & Root Cause
When executing a named block containing sequential
session:orcall:statements (such as appending start and completion markers to an event ledger before and after work steps) inside aparallel:block orparallel forloop:Previous VM specifications did not define execution semantics for parallel block invocations. As observed by @MattKotsenas in #17, executing agents and VMs collapsed the block into a single natural-language directive for a subagent (e.g. "process item X through all phases"). This caused:
session:orcall:child sessions.Key Changes
skills/open-prose/prose.md):### Block Invocation in Parallel Contextsunder### Parallel Execution.session:/call:statement must be spawned as an independent, discrete session with its own prompt and completion barrier.workspace/{node}/__scope/{execution_id}/).#### 4d. Parallel Execution.skills/open-prose/prosescript.md):### Parallel Block Invocationsunder## Parallel Blocks, defining invariants: no statement collapsing, discrete nested sessions, contemporaneous updates, and isolated scope.## Blocks And 'do'to emphasize that parallel block invocation preserves statement sequences and nested session boundaries.skills/open-prose/guidance/authoring.md):## Anti-Patterns:skills/open-prose/state/filesystem.md):workspace/{node}/__scope/{execution_id}/*to the canonical directory artifacts table.## Scoped Execution Frameswith per-branch isolation, scratch isolation, and contemporaneous progress progression.tests/open-prose/primitives/parallel-blocks.test.ts):Verification
pnpm vitest run tests/open-prose/primitives/parallel-blocks.test.ts(17/17 passed)pnpm vitest run tests/open-prose/primitives/(29/29 passed)pnpm vitest run tests/open-prose/state/ tests/open-prose/forme/ tests/open-prose/compiler/ tests/open-prose/concepts/ tests/open-prose/skill-meta/ tests/open-prose/tenets/(127/127 passed)Closes #17