Skip to content

feat(run-once): support concurrent explicit issue runs - #295

Merged
rochecompaan merged 42 commits into
mainfrom
agent/issue-226-support-concurrent-explicit-run-once-invocations-implementation
Oct 8, 2026
Merged

rochecompaan merged 42 commits into
mainfrom
agent/issue-226-support-concurrent-explicit-run-once-invocations-implementation

Conversation

@rochecompaan

@rochecompaan rochecompaan commented Oct 7, 2026 •

Copy link
Copy Markdown
Owner

Closes #226

Summary

  • Allow concurrent explicit Run attempts for independent issues in one local clone, across planning, legacy workflows, and supported recovery commands.
  • Keep automatic selection serial. Reject duplicate issue ownership without changing the losing issue's resources.
  • Bind the canonical repository namespace. Isolate state writes, logs, sessions, workspaces, artifacts, and shared-root todos.
  • Serialize short shared Git transactions. Require owned-command shutdown evidence and expected-OID mutations.
  • Require implementation PRs. Verify saved PR identity and merge evidence before Issue run completion.
  • Preserve interrupted ownership evidence. Add linked, fingerprinted recovery for the approved filesystem-only repair protocol.
  • Document operator responsibilities, unsupported concurrency, intentional resume, and workflow-specific cleanup timing.

Design: docs/specs/2026-10-03-issue-226-support-concurrent-explicit-run-once-invocations-design.md

Plan: docs/plans/2026-10-03-issue-226-support-concurrent-explicit-run-once-invocations.md

Human review is required for ownership safety, recovery compatibility, Git mutation authority, and dependency changes. No PR merge or release is authorized.

Main reconciliation

A normal merge incorporated origin/main at 83846f0 into the preserved implementation branch. No history rewrite or force push occurred.

The seven skill conflicts are resolved:

  • Remove the six retired source and installed workflow wrappers.
  • Retain the current inline wrapper, Native execution integration, and Pi runtime changes from main.
  • Preserve Support concurrent explicit run-once invocations #226 PR-only config, runtime contracts, and landing policy.
  • Regenerate managed installed metadata through updateProjectSkills.
  • Keep the actual upstream pack version, 2026.10.1, and matching file hashes.

Dependency manifests, lockfiles, shrinkwrap, and the Nix dependency hash match main exactly. Runtime pins are Pi 1.0.2 and pi-subagents 0.75.0.

Superpowers remains 6.4.2. Simple English remains 1.2.0. No additional dependency resolution occurred during reconciliation.

Validation

Refreshed immutable head: c8a3c4a500ea53205e632353ee827e3f3203fe3a.

All local commands ran in the preserved issue implementation worktree:

  • taskset -c 0-7 npm test: 2,323/2,323 passed.
  • taskset -c 0-7 npm run test:run-once: 896/896 passed.
  • Required namespace, admission, issue-ownership, Git-guard, and concurrent-process suites: 38/38 passed.
  • Config, generated prompts, PR-only rejection, installer, Native execution, migration, and skill update suites: 252/252 passed.
  • npm run check:types, npm run check:architecture, npm run lint, and npm run build: passed.
  • npm --prefix site ci and npm --prefix site test: passed, 13/13 tests.
  • npm --prefix site audit --audit-level=high: passed, zero high or critical findings. Eleven moderate findings remain.
  • npm run site:build: passed, 18 pages.
  • Installed skill paths, executable Native scripts, metadata hashes, source versions, and live dependency references agree.
  • Bun 1.3.13: pi-subagents 0.75.0 completed the existing one-child compatibility contract.
  • node scripts/smoke-packed-artifact.mjs: passed, including installed Pi extension loading.
  • nix build .#patchmill --print-build-logs: passed, 2,301 tests passed and two project-file-dependent tests skipped.
  • Nix install checks loaded the installed Run-once extensions. The committed-state build repeated from cache.
  • scripts/update-npm-deps-hash.sh: passed without changing the dependency hash. Nix CLI help smoke passed.
  • git diff --check and git diff --cached --check: passed.

Local evidence is retained under /tmp/issue-226-refresh-*.log and the plan's progress ledger. Prior evidence and interrupted ownership records remain intact.

Real-process tests use IPC barriers, real Git, local bare remotes, and controlled host/Pi effects. They require no paid agents or live host mutations.

Coverage includes mixed-workflow overlap, same-issue contention, unrelated recovery, cancellation/resume, automatic exclusion, and expected-base host merges.

Documentation and mechanical skill updates use formatting, Markdown lint, direct review, installer checks, and builds. No new test asserts static text or dependency versions.

All three PR checks passed for this exact head in CI run 37623595991:

  • Node test and lint: passed.
  • Site audit and build: passed.
  • Nix package build: passed.

GitHub reports the open PR as MERGEABLE with a CLEAN merge state. No PR merge or release occurred.

Security dependency amendment

The site audit gate initially failed on two pre-existing high advisories. The approved compatible lockfile update changes only:

Astro, Starlight, site dependency ranges, and supported runtimes are unchanged. No force update or audit-gate bypass occurred.

Eleven moderate site findings remain for separate triage.

The refreshed root audit reports 15 existing findings: nine high, three moderate, and three low. Root dependencies match current main exactly.

The required CI audit gate covers the site. This reconciliation does not expand the approved dependency remediation scope or conceal the root findings.

Independent review and fixes

One fresh, shell-less reviewer inspected cddfd6e..06eeb0f, the approved artifacts, all five Review Focus cases, and the complete change inventory.

Its first deadline expired without a verdict. The same retained reviewer continued through the governed tool and completed the original review.

One ordered fix pass addressed three Important findings with exact-head reproductions and RED→GREEN regressions:

  1. Common ownership publication: Complete owner records now publish atomically. Partial records no longer produce premature repair advice.
  2. Legacy PR validation recovery: A proven open PR without validation can resume checks through owned-workspace gates. Replacement PRs remain prohibited.
  3. Merged planning cleanup: Verified merges select existing merged-terminal cleanup authority after remote head deletion.

A cleanup-hook documentation finding was regraded Important because it defines external-service lifetime. The text distinguishes planning publication-time and legacy merge-time hooks.

The reviewed state, fixes, and original report remain preserved. These records are historical and are not relabeled as a review of the refreshed head.

Baseline reconciliation did not trigger an automatic second review. All local validation ran again after incorporation. Human PR review remains the final review gate.

Structure and deferred work

No unresolved Critical or Important finding remains from the independent review. New ownership, PR evidence, and cleanup responsibilities use focused adapters.

The legacy orchestrator exceeds 1,000 lines. A later narrow extraction of pre-agent ownership and selection is recommended.

A broad rewrite risks compatibility recursion and durable checkpoint order. No Minor finding remains deferred.

Rulings and residual risks

  • Use the configured inline parent as sole writer, not the earlier stalled-worker topology. Cost if wrong: execution topology, not safety gates.
  • Keep CommandRunner explicit in the mutation context. Cost if wrong: a narrow caller signature change.
  • Require runner-issued stopped-command receipts. PID or process-group absence is insufficient. Cost if wrong: unknown interrupted commands require operator reconciliation.
  • Verify mechanical skill-policy edits with runtime contracts, installer hashes, and lint. Cost if wrong: human review must detect wording gaps.
  • Retain legacy workspaces until verified merge. Cost if wrong: owned local disk remains allocated longer.
  • Use verified local death only for the linked filesystem-only repair protocol. Cost if wrong: unverified guards remain blocked.
  • Use controlled planning/legacy process fixtures and host-side CAS merges. Cost if wrong: provider-specific behavior depends on existing provider suites.
  • Use bounded sequential local test concurrency. Cost if wrong: CI can need separate resource-limit follow-up.
  • Keep arbitrary agent containment outside scope. Custom commands and hooks must obey ownership. Cost if wrong: unmanaged tools can violate operator boundaries.
  • Keep separate clones, hosts, and manual concurrent shared edits unsupported. Cost if wrong: external changes require operator reconciliation.
  • Retain moderate site findings for separate triage. Cost if wrong: their existing security risks remain.
  • Do not infer a product defect from load-only timeouts without a reproduction. Cost if wrong: resource-sensitive regressions can need further investigation.
  • Defer broad oversized-module rewrites and legacy extraction. Cost if wrong: the larger orchestrator remains harder to maintain.
  • Preserve this worktree and interrupted evidence. Cost if wrong: local scratch storage remains allocated until operator cleanup.
  • Preserve the completed single review during PR-readiness reconciliation. Cost if wrong: human PR review must inspect baseline integration seams.
  • Keep main's actual pack version and regenerate hashes. Cost if wrong: file hashes, not version alone, identify this policy update.
  • Report root audit findings without unrelated remediation. Cost if wrong: upstream dependency risks remain for separate triage.

Human reviewer callouts

  • Stop affected runners before upgrade or namespace/state migration.
  • git.allowDirectLand: true is rejected. Custom skills cannot authorize target-branch updates or agent-supplied merge completion.
  • Older unverifiable direct-land or completion receipts need operator migration. They do not become verified PR completion automatically.
  • PR merge evidence requires host access and an identity-verified, preconfigured target fetch remote. No URL synthesis or Git config mutation occurs.
  • Unknown active Git commands remain fail-closed. Owned-command shutdown does not provide general agent containment.
  • The managed workflow uses inline execution with one final review. Retired customized skills require an operator migration decision.
  • Runtime pins from current main are Pi 1.0.2 and pi-subagents 0.75.0. Installed extension loading passed in packed and Nix artifacts.
  • Cleanup removes only validated owned workspaces and expected-head branches. External hooks must remain issue-scoped and idempotent.
  • Operators manage spending, CPU, ports, databases, services, and semantic issue independence.
  • No application UI component or layout changed. This delivery changes CLI behavior and operator documentation.
  • Review the remaining site and root audit findings separately. No audit gate was weakened.

Patchmill run cost

Stage Model Prompt tokens Output tokens Estimated cost (USD)
Development environment gpt-6.1-sol 152,417 1,027 $0.1006
Implementation gpt-6.1-sol 5,284,355 16,839 $1.0203
Total 5,436,772 17,866 $1.1209

Prompt tokens include uncached input, cache reads, and cache writes. Cost is an estimate based on Pi's recorded model pricing and includes parent and subagent sessions.

@rochecompaan
rochecompaan force-pushed the agent/issue-226-support-concurrent-explicit-run-once-invocations-implementation branch from c8a3c4a to cbb4a43 Compare October 7, 2026 16:49
@rochecompaan
rochecompaan merged commit 520b181 into main Oct 8, 2026
3 checks passed
@rochecompaan
rochecompaan deleted the agent/issue-226-support-concurrent-explicit-run-once-invocations-implementation branch October 8, 2026 07:29
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.

Support concurrent explicit run-once invocations

1 participant