Skip to content

Pi mutation-scope integration - #278

Merged
davidabram merged 10 commits into
opencode-mutation-scope-integrationfrom
pi-mutation-scope-integration
Sep 30, 2026
Merged

davidabram merged 10 commits into
opencode-mutation-scope-integrationfrom
pi-mutation-scope-integration

Conversation

@davidabram

Copy link
Copy Markdown
Member

No description provided.

@davidabram
davidabram added this pull request to stack #240 September 11, 2026 18:48
@davidabram
davidabram force-pushed the pi-mutation-scope-integration branch 11 times, most recently from 7c01646 to 84f2a2f Compare September 13, 2026 14:24
@davidabram
davidabram force-pushed the pi-mutation-scope-integration branch from 84f2a2f to f9788c8 Compare September 13, 2026 14:40
@davidabram
davidabram force-pushed the pi-mutation-scope-integration branch 2 times, most recently from d55cb15 to a77e42e Compare September 16, 2026 14:48
@davidabram
davidabram force-pushed the pi-mutation-scope-integration branch from a77e42e to f2c4230 Compare September 16, 2026 15:25
@davidabram
davidabram force-pushed the pi-mutation-scope-integration branch 2 times, most recently from 56856c1 to a77e42e Compare September 16, 2026 16:24
@davidabram
davidabram force-pushed the pi-mutation-scope-integration branch 6 times, most recently from 4f4e425 to d4ba553 Compare September 17, 2026 12:04
@davidabram
davidabram force-pushed the pi-mutation-scope-integration branch 5 times, most recently from 56fde7b to 00622cb Compare September 18, 2026 12:47
@davidabram
davidabram force-pushed the pi-mutation-scope-integration branch 2 times, most recently from 78ae561 to 70a5477 Compare September 29, 2026 12:10
davidabram and others added 10 commits September 29, 2026 21:49
Define the stacked Pi 0.80.6 integration across lifecycle evidence, confirmation-required protocol semantics, the Rust adapter, conservative recovery, extension wiring, and production regressions. Preserve false-positive safety while reusing the existing mutation-scope runtime without schema migrations.

Plan: pi-mutation-scope-integration; Tasks: T01-T06
Record reproducible captures and probe plugins for the pinned Pi 0.80.6 runtime so lifecycle, blocking, failure, ordering, signal, session, and mutation behavior can be reviewed before implementation. Update the integration plan to mark T01 complete and preserve the two design corrections discovered during probing.

Plan: pi-mutation-scope-integration.md (T01)

Co-authored-by: SCE <sce@crocoder.dev>
Prevent denied Pi tool calls from being treated as confirmed at unrelated mutation boundaries. Apply the confirmation rule across the Rust and Quint protocols, extend MBT fixtures and scenarios, add recovery coverage, and fix Scope6 exclusive attribution; record the completed plan task.

Plan: pi-mutation-scope-integration, task T02

Co-authored-by: SCE <sce@crocoder.dev>
Track Pi's bash, edit, and write tool lifecycles through the mutation-scope
runtime with durable attempt state, fail-closed admission, terminal cleanup,
and provenance. Add the hidden Pi ingress and a harness-neutral external
mutation supervisor that keeps the worktree lock held across a spawned shell,
streams status, handles explicit cancellation, and recovers or clears taint
only after shell termination.

Document the lifecycle contract and supervisor design across the shared context
surfaces.

Plan: pi-mutation-scope-integration, task T03

Co-authored-by: SCE <sce@crocoder.dev>
Preserve Pi's actual user_bash execution context while keeping guard containment fail-closed. Validate the requested cwd within the canonical worktree, mirror pinned Pi shell resolution, and drain reader threads to EOF before delivering queued output. Update the lifecycle documentation, ADR follow-up, and T03 plan evidence with contract citations and regression coverage.

Plan: pi-mutation-scope-integration (T03)

Co-authored-by: SCE <sce@crocoder.dev>
Recover orphaned PendingStart attempts only when the recorded Pi owner is positively dead, using PID liveness and Linux process start-time checks to avoid TTL- or sweep-based false positives. Route stale-owner admission through the existing flush/abandon/flush recovery sequence, and add regression coverage for duplicate events, sibling isolation, interrupted recovery, external-guard reconciliation, and lock contention.

Update the Pi integration context and plan to record the D10 implementation, its conservative tradeoffs, and verification results.
Plan: pi-mutation-scope-integration, task T04

Co-authored-by: SCE <sce@crocoder.dev>
…egration

Add fail-closed tracked-tool lifecycle forwarding, terminal retry and recovery with explicit ToolExecutionAbandon handling, and supervisor-backed user_bash operations. Cover the extension and Rust adapter behavior with Bun and Rust tests, including Windows refusal and unresolved terminal delivery cases.

Update plan `pi-mutation-scope-integration` for T05 and T06 to record the ordinary Pi integration path and accepted extension-order limitation.

Co-authored-by: SCE <sce@crocoder.dev>
Expand production-path coverage for Pi mutation scopes across confirmed, failed, rejected, concurrent, and stale-process executions, including cross-harness guard races and post-recovery behavior. Replay pinned Pi captures through the real extension handlers against temporary Git repositories, and document the Linux/Windows test dispositions and competing-extension limitation.

This test-only change validates session and model provenance, conservative exclusion of ambiguous writes, guard recovery, and continued fresh-work attribution without changing production behavior, schemas, or migrations.

Ref: context/plans/pi-mutation-scope-integration.md (T06)

Co-authored-by: SCE <sce@crocoder.dev>
Add a credential-free end-to-end smoke that builds the current CLI, installs the real Pi extension through setup, and drives an SDK session with a faux provider through normal extension discovery and tool dispatch. Record durable Agent Trace evidence for bash attribution and session/model provenance while distinguishing runtime execution from capture-replay coverage.
Plan: pi-mutation-scope-integration (T06)

Co-authored-by: SCE <sce@crocoder.dev>
Pin the Quint runner seed so generated mutation traces are reproducible across runs.

Co-authored-by: SCE <sce@crocoder.dev>
@davidabram
davidabram force-pushed the pi-mutation-scope-integration branch from 70a5477 to f026e2b Compare September 29, 2026 19:50
@davidabram
davidabram merged commit 7ae9f76 into main Sep 30, 2026
11 of 21 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