Skip to content

Separate shared pstack workflows from harness and lane adapters - #33

Merged
thisguymartin merged 1 commit into
mainfrom
feat/opencode-parent
Oct 6, 2026
Merged

thisguymartin merged 1 commit into
mainfrom
feat/opencode-parent

Conversation

@thisguymartin

@thisguymartin thisguymartin commented Oct 6, 2026 •

Copy link
Copy Markdown
Owner

Refs #3, #34, #35. Historical installed-test debt is tracked in #36.

What changed

pstack-flex now treats the parent coding harness and the lane provider as separate inputs. One shared skill tree uses a small harness table, a shared configuration reader, and explicit provider launch boundaries. Adding a harness means adding metadata and its tool/instruction mapping, without copying skills or setup.

  • harnesses.ts owns native routing, paths, identity, session, and launch metadata. pstack-context reads the selected configuration once; setup uses --paths-only so broken sheets can still be repaired.
  • Descriptor parsing, scope resolution, and model refusal are shared. Project sheets still replace global sheets; linked worktrees use the primary checkout's sheet.
  • OpenCode remains beta. Fresh deny-first lane agents prevent ambient settings from restoring tools. Neither lane mode gets shell access; writers can edit inside their worktree. Preflight rejects unsupported effort variants and wrapped model routers, with typed failure results.
  • Kept upstream workflow bodies. Only the adaptation preamble and setup skill body change; the historical mapping filename stays so upstream links resolve.
  • Deleted seven duplicate/completed Markdown files: README-UPSTREAM.md, UPSTREAM-FLEX.md, docs/LANES.md, docs/USAGE.md, docs/gateway-model-probes.md, and both completed docs/plans/ documents. Durable verification debt moved to Issues.
  • Ordinary documentation is six files: README for installation, reference for diagnosis, UPSTREAM for ownership/sync, NOTICE for attribution, CHANGES for the intentional fork changelog, and LIVE-GATE for installed verification. The other Markdown is consumed skill/agent/hook content or the PR template.

History is one commit, 63e4b337504abb5037c977917b731b2d3d11da09, after b49b15d. Upstream and the independently merged OpenRouter work remain intact. PR base is now main.

Verification

  • Bun tests, strict typecheck, static invariants, and plugin validation pass.
  • The exact candidate is installed in every affected harness with the complete required gate exercised.
  • The changed behavior passes from each real user surface, including setup writes/rollback and mixed dispatch.
  • Installed version, action, and observed partial results appear below.

bash scripts/check.sh: 256 tests pass, strict typechecks pass, manifest/static checks pass, and both Claude plugin validators pass. GitHub CI also passes for this SHA: 254 tests pass and the two installed OpenCode tests are explicitly skipped because that CLI is absent.

Behavior comparison: 36/36 existing non-OpenCode launch contracts are identical across parent/provider/access combinations against the rebased pre-cleanup feature. Six OpenCode cases intentionally change permissions and agent environment. This is a launch-contract comparison, not a substitute for live provider behavior.

Installed OpenCode permission checks passed on 1.18.9 and were rerun on 1.18.34: both modes deny shell/task/web/skill tools despite explicit ambient allows; read-only cannot edit; writers can edit inside the worktree and cannot write outside it. These use the actual CLI without model/network calls.

Interrogate completed with Fable 5.1, GPT-6 Astra, and Opus 5.5. Grok 4.7 was a named unavailable-CLI dropout. Consensus permission findings and substantive configuration/routing findings were fixed. Final frozen-SHA confirmation found no remaining substantive defect. Lead verdict.

Live evidence: Claude Code

Harness: Claude Code 2.1.291
Installed: local pstack 1.5.0 plugin directory @ 63e4b337504abb5037c977917b731b2d3d11da09
Surface: fresh interactive CLI in a synthetic Git repository; older pstack plugin disabled for this invocation
Action: /pstack:setup-pstack, restricted to path inspection before assignments/probes/writes
Observed: loaded the candidate skill; called its packaged pstack-context --parent claude --paths-only; exit 0; correct global/project paths and scope choices
Result: pass for path inspection; complete setup/rollback/mixed-panel gate not run
Transcript: local Claude session 1112544d-8e95-440f-af7f-f59be4efdd1d

Live evidence: Codex

Harness: Codex 0.160.1
Installed: pstack 1.5.0 via isolated local marketplace @ 63e4b337504abb5037c977917b731b2d3d11da09; packaged files compared with candidate
Surface: fresh interactive CLI, isolated CODEX_HOME, synthetic Git repository
Action: setup-pstack, restricted to path inspection before assignments/probes/writes
Observed: discovered and read installed setup skill; ran packaged pstack-context --parent codex --paths-only; correct isolated global/project paths and scope choices
Result: pass for discovery/path inspection; hook trust warning and complete setup/rollback/mixed-panel gate remain unverified
Transcript: local Codex session 01a10f9c-c460-7f13-ac06-c28d055479cc

Live evidence: OpenCode beta

Harness: OpenCode 1.18.34
Installed: candidate skill path and opt-in instructions @ 63e4b337504abb5037c977917b731b2d3d11da09
Surface: fresh interactive CLI, isolated XDG_CONFIG_HOME, synthetic Git repository
Action: setup-pstack path inspection before probes/writes
Observed: default-model session discovered setup-pstack and read candidate harness metadata after correcting its initial relative path; no context-helper result returned. This attempt was manually cancelled as inconclusive. A separate explicitly selected OpenAI GPT-6.1 Sol parent session failed with Token refresh failed: 401.
Result: discovery observed; final parent context/setup/dispatch gate not run
Transcripts: local OpenCode sessions ses_ef0633ba2ffearr5OIuoUUgdn2 and ses_ef05aa05dffeHT6B4u9cPEfBYv

Remaining required gate: opt-in/opt-out, actual setup writes and unchanged reruns, invalid-probe rollback, installed worktree scope behavior, native/external mixed panels, and affected background/cancellation flows in every parent. No merge, tag, release, or rollout until those pass. This PR remains draft.

OpenCode exposed parent and provider assumptions spread across setup,
dispatch, and documentation. Keep one portable workflow tree while making
its configuration and integration boundaries explicit.

- Resolve harness paths, identity, native routes, and launch capabilities
  from a small metadata table and a shared read-only context command.
- Share descriptor parsing, project scope resolution, and model refusal
  between configuration inspection and lane validation.
- Isolate OpenCode lanes behind fresh deny-first agents, refuse unsupported
  efforts and model routers, and expose their lack of shell execution.
- Preserve existing Claude, Codex, and gateway launch contracts, upstream
  skill bodies, and the independent OpenRouter history below this commit.
- Consolidate current usage, ownership, attribution, and verification docs;
  delete seven duplicate or completed historical Markdown files.
- Replace prose-mirroring tests with configuration, routing, worktree, and
  installed OpenCode permission checks; typecheck the shared scripts once.
- Keep the installed live gate explicit and move older verification debt
  to GitHub Issues rather than retaining a repository ledger.

Refs #3, #33, #34, #35, #36.
@thisguymartin thisguymartin changed the title Run pstack from OpenCode, and add OpenCode lanes Separate shared pstack workflows from harness and lane adapters Oct 6, 2026
@thisguymartin
thisguymartin marked this pull request as ready for review October 6, 2026 05:25
@thisguymartin
thisguymartin merged commit 8324c6b into main Oct 6, 2026
1 check 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