feat(agent_provider): migrate tests, drop guest-home/skills-dir env knobs, activate PRD 0050
- tests/unit/test_provision_apply.py covers the new shared apply helpers (apply_skills / apply_prompt / apply_provision) that replace the per-backend modules deleted in the prior commit. - tests/unit/test_contrib_supervise_mcp.py covers both providers' provision_supervise_mcp behavior — confirms the codex bottle now runs `codex mcp add` symmetrically with claude. - tests/unit/test_smolmachines_provision.py drops the four test classes whose subjects moved (TestProvisionPrompt / TestProvisionProviderAuth / TestProvisionSkills / TestProvisionSupervise); the backend-side CA / git / workspace classes stay. - tests/unit/test_docker_provision_provider_auth.py removed; its coverage now lives in tests/unit/test_provision_apply.py (apply_provision is backend-agnostic, one test file suffices). Drops the BOT_BOTTLE_CONTAINER_HOME, BOT_BOTTLE_GUEST_HOME, BOT_BOTTLE_CONTAINER_SKILLS_DIR, and BOT_BOTTLE_GUEST_SKILLS_DIR env knobs the deleted provision modules used to read. /home/node is hardcoded everywhere the knobs lived; the values were effectively constants today and removing them keeps the PRD-0050 surface area honest. Flips PRD 0050 Status: Draft → Active. Closes #177 on merge.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
# PRD 0050: Move provider-specific agent logic into contrib
|
||||
|
||||
- **Status:** Draft
|
||||
- **Status:** Active
|
||||
- **Author:** claude
|
||||
- **Created:** 2026-06-03
|
||||
- **Issue:** #177
|
||||
@@ -363,26 +363,24 @@ Each chunk is one commit on the PR; the PR ships as one cut.
|
||||
6. **Activate.** Flip Status: Draft → Active in this PRD; close
|
||||
#177 on merge.
|
||||
|
||||
## Open questions
|
||||
## Open questions (resolved)
|
||||
|
||||
1. **Does Codex's `claude mcp add` equivalent exist as a CLI verb,
|
||||
or is direct TOML editing the only option?** If a `codex mcp
|
||||
add` (or similar) is in the binary, Option A in the MCP section
|
||||
becomes more attractive. The implementation chunk for Codex MCP
|
||||
should check `codex --help` against the version pinned in
|
||||
`Dockerfile.codex` before committing to TOML editing.
|
||||
2. **Shared apply helper vs. default methods on `AgentProvider`?**
|
||||
Both work. Default methods read cleaner at call sites; a free
|
||||
function in `contrib/_provision_apply.py` is easier to test in
|
||||
isolation. Defer to the implementer; not load-bearing for the
|
||||
PRD.
|
||||
3. **Should `BOT_BOTTLE_CONTAINER_HOME` / `BOT_BOTTLE_GUEST_HOME`
|
||||
/`BOT_BOTTLE_CONTAINER_SKILLS_DIR` env knobs survive the move?**
|
||||
They're only read by the backend-side provision modules being
|
||||
deleted. The provider plugin can take them too, but the values
|
||||
are effectively constants today. Leaving the env-read fall-back
|
||||
in place for compat is one line per knob; this PRD says yes,
|
||||
carry them over.
|
||||
1. **`codex mcp add` exists.** Implementation calls
|
||||
`codex mcp add --transport http supervise <url>` as `node` —
|
||||
symmetric with `claude mcp add` (no `--scope user`; Codex writes
|
||||
`~/.codex/config.toml` by default). Failure logs a warning; the
|
||||
bottle still works without the entry.
|
||||
2. **Default methods on `AgentProvider`.** The base ABC's
|
||||
`provision_skills` / `provision_prompt` / `provision` delegate
|
||||
to a small `bot_bottle/_provision_apply.py` helper. Concrete
|
||||
subclasses don't override the defaults today; the helper exists
|
||||
so a future provider that legitimately needs a different layout
|
||||
can stay declarative.
|
||||
3. **Env knobs removed.** `BOT_BOTTLE_CONTAINER_HOME`,
|
||||
`BOT_BOTTLE_GUEST_HOME`, `BOT_BOTTLE_CONTAINER_SKILLS_DIR`, and
|
||||
`BOT_BOTTLE_GUEST_SKILLS_DIR` are gone; `/home/node` is hardcoded
|
||||
everywhere it was read. The values were effectively constants;
|
||||
the knobs added surface area for no real flexibility.
|
||||
|
||||
## References
|
||||
|
||||
|
||||
Reference in New Issue
Block a user