Containerized provider login: login panes and every provider-CLI invocation become podman run against the master store (ADR-0057) #234
No reviewers
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Cloonar/coding-lab!234
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "afk/206"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
With container wiring present, provider login sessions and every non-interactive provider-CLI invocation (auth status, logout, the ADR-0055 refresh poke, codex's catalog probe) now run in containers from the agent-tools image against the rw-mounted master credential store — a container-mode host needs no provider CLIs on PATH. Host-mode login stays byte-for-byte unchanged on servers with no container config, and there is never a silent host fallback.
Design (per the grilled 2026-07-25 brief + ADR-0057)
tmuxx.SessionRunner(providercli.LoginRunner): for login sessions only, the adapter's CLI argv is wrapped into thepodman runpane command; the adapters' scrape/paste/poll/teardown flows are untouched. The decorator's Stop runs thepodman rmbackstop and wipes the per-attempt scratch HOME under<state>/logins/.AuthStatusbefore every spawn, login completion polls it, and the refresh loop pokes the CLI. All adapter exec sites moved behind an injectableprovider.CLIRunner(host default preserves pre-seam behavior byte-for-byte;providercli.ContainerCLIruns each invocation as an ephemeral non-ttypodman run --rm). podman exit 125/126/127 is classified as could-not-run, never as a CLI verdict — a missing image can never read as "logged out".MasterStoreSpec(the same override-aware resolver every other master-store op uses), so$CLAUDE_CONFIG_DIR/$CODEX_HOMEare honored in container mode (the #211 criterion, conformance-pinned); the config-dir var is pinned explicitly inside the container.--container-image) wrap the newprovider.ErrLoginUnavailableand surface as a 400 with the actionable text verbatim. Global dev image only (login is repo-less); globalcontainer_*limit rows; per-attemptEnsureImage. No new knobs, no new flags.labrun-name derived from the session name, so a pending login survives a restart (idempotent re-join) and the startup orphan sweep accounts for it by construction; ephemeral CLI containers arelabrun--prefixed so wedged ones are reaped at the next boot.Verification
MasterStoreSpec, HostCLI byte-for-byte semantics, httpapi 400 mapping. Full suite: 46 packages green; vet + gofmt clean (golangci-lint unavailable in this sandbox — CI runs it).LAB_TEST_PODMAN=1, model of podmanx's): a real containerized login pane driven through real tmux — URL scraped via CapturePane, a write landing in the host master dir through the rw bind, Stop reaping container + scratch — plus a ContainerCLI round-trip. They skip where rootless podman is absent (this sandbox, CI).Notes for review
--container-imagegets the knob-naming refusal for login/CLI ops by design.internal/instanceandinternal/providerclias exported consts.Closes #206
[autoland] verdict: pass
PASS with CONCERNS (non-blocking). Signal: CI aggregate success — 'ci / native (pull_request)' run #310 (7m52s), the repo's full build/test/vet/gofmt/golangci-lint gate; not re-run.
Conventions verified:
CONCERN (non-blocking): the PR TITLE 'Containerized provider login: …' is not Conventional-Commits shaped (no type(scope): prefix). The single commit is conventional (feat(provider,runner): …), but Forgejo embeds the PR title as the merge-commit subject, and every recent merge here (#233 fix(deploy):, #231 feat(nix):) uses a conventional title — so merging as-is breaks that history pattern. Not fixable inline (no labctl pr title-edit; not a commit-level fix). Suggest retitling to e.g. 'feat(provider,runner): containerize provider login and the provider-CLI surface' before merge.
Per autoland policy, any CONCERNS caps at approve-only: validated, NOT merged — awaiting a human to retitle+merge or accept.