Repository navigation
Closed
Labels
enhancementNew feature or request
Description
Goal
Move the Claude, Codex and Grok CLIs behind one provider adapter contract and a typed registry, with no behavior change. This is unit U1 of the approved model and provider registry design (design, PR #154, issue #103).
Scope
- Add
runner/registry/contract.ts(Lane,ProviderAdapter),registry/family.ts,registry/models.ts(FAMILIES,ROLE_DEFAULTS,RELEASED_PAIRS),registry/providers.ts(ADAPTERS, the only provider list) andregistry/index.ts(resolveModel,resolveLane,defaultDescriptor). Paths are underplugins/pstack/skills/poteto-mode/scripts/runner/. - Add
providers/{claude,codex,grok}.ts,providers/shared.tsand the shared adapter test suite. - Make
run.tsandcli.tsprovider-generic. Deletecommands.ts,parse-output.tsandmodel-aliases.tsin the same change. - Add the
defaulteffort value (decision 5): a flag adapter omits its effort flag fordefault. - Families: today's four, plus kept predecessors
codex:gpt-5.6-sol(effortslowtoultra) andgrok:grok-4.6(decision 3). - Set
tsconfig.jsonincludeto["**/*.ts"].
Acceptance criteria
- Given today's valid Claude, Codex and Grok lanes and controlled timestamps, durations and paths, when the runner builds argv and receipts, then their serialization, field order and failure evidence are identical to
main. The existingrun.test.tsassertions and argv tests pass; only lane construction changes, throughresolveLane. - Two behavior changes are intended: the resolver rejects an effort that a registered family does not list, where
cli.tsaccepts any effort in the global list today, anddefaultbecomes a valid effort. - Given an unregistered
(provider, model)pair, when the runner runs it, then the pair passes to the CLI unchanged, as today (decision 2). - Given a versioned
claude-opus-<revision>that the parent did not normalize, when the runner receives it, then it refuses with today's message. run.tscontains no child-provider branch; the parent sandbox diagnostic stays. Outsideproviders/, onlyregistry/providers.tsimportsproviders/*(import-boundary test).- Every released pair resolves to its recorded family (
RELEASED_PAIRStest). - No implicit timeout, no weaker-model fallback, no model-execution retry. The Grok preflight keeps its one bounded retry.
- Bun tests, strict typecheck, static invariants and plugin validation pass.
Live checks (feature runner)
- From a Claude Code parent:
codex:gpt-6.1-sol@max,grok:grok-4.7@xhigh, the keptcodex:gpt-5.6-sol@max, and the unregisteredgrok:grok-4.5@highpassed through unchanged. - From a Codex parent:
claude:opus@max, and one Claudeisolated-writelane in a linked worktree, which proves the shared.gitdeny moved intact.
Verifier change
The writer live check needs a new linked-worktree writer case in .claude/skills/verify-open-pstack/features/recipes.ts, because the runner recipe asserts read-only. This makes the PR a verifier change: its live run uses the candidate head as publisher revision with --self-test, and it opens after #152 merges.
Order
First unit. U2 (#156) and U3 (#157) depend on it. Blocks #54, #69, #80, #71, #68 and #37.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or request
Activity
docs(plans): record Eric's registry decisions (#103)
ericlitman commentedon Oct 12, 2026
Design pass (2026-10-12, Astra high, read-only at
748a9bc)Record:
~/projects/docs/projects/open-pstack/records/2026-10-12-batch-153/design-155.md(private docs repo).Accepted
cli.ts:99-101accepts any effort in the global list. The resolver rejects an effort that a registered family does not list, and it addsdefault. Every lane that is valid today runs unchanged.writerSandboxandproviderSidecarPathare not added in U1. They belong to U7 and U5.claude-fable-<revision>andclaude-opus-<revision>pairs without making them runnable, asmodel-aliases.ts:9-14andrun.ts:700-705do today.default. Argv fixtures that build same-provider lanes get a valid parent and keep their argv assertions.providers/. Shared helpers and adapter tests insideproviders/may import each other.run.tskeeps the parent's sandbox diagnostic (run.ts:746-747,1032-1034). "No provider-name branch" applies to child providers.read-only(recipes.ts:248-254), so this PR adds one focused linked-worktree writer case. That makes U1 a verifier change. Its live run uses the candidate head as publisher revision with--self-test, and it opens after verify-open-pstack: accept only the resolver launcher in the Reflect recipe, and give the fixture openers equal length #152 merges, because both editfeatures/recipes.ts.Rejected
Merge pull request #169 from ericlitman/refactor/155-provider-adapter…
refactor(runner): move Claude, Codex and Grok behind the provider ada…
test(verify): add a linked-worktree writer case to the runner recipe (e…
Merge origin/main into fix/127-windows-session-start
test(verify): give the runner writer test record the new context field (