What happens
polylane map --domain api.pr-1365.baseberry.cc --workspace <ws> --api-key <stage-key> prints the stage console URL and finishes with "✓ Mapped this repository" — but nothing lands in the target environment. The spawned coding agent is wired with the persisted mcp_api_key (and default MCP endpoint) from ~/.polylane/config.json, so all startMapping/advanceMapping submissions go to prod regardless of the global --domain/--api-key/--workspace flags. Observed 2026-08-24 while trying to map a repo into a nominal preview stage (preview:full): stage graph stayed empty, CLI reported success with the stage URL.
Expected
Global --domain, --api-key, and --workspace flags should govern the agent's MCP wiring for the run, not just the CLI's own HTTP calls. If a run cannot honor them (e.g. no MCP endpoint on the target), fail loudly instead of submitting to a different environment and printing the target's URL.
Why it matters
Success output naming environment A while data went to environment B is silent cross-environment write — it defeats preview-stage e2e testing (see coreplanelabs/nominal#1507) and could put test mappings into prod workspaces.
🤖 Generated with Claude Code
What happens
polylane map --domain api.pr-1365.baseberry.cc --workspace <ws> --api-key <stage-key>prints the stage console URL and finishes with "✓ Mapped this repository" — but nothing lands in the target environment. The spawned coding agent is wired with the persistedmcp_api_key(and default MCP endpoint) from~/.polylane/config.json, so allstartMapping/advanceMappingsubmissions go to prod regardless of the global--domain/--api-key/--workspaceflags. Observed 2026-08-24 while trying to map a repo into a nominal preview stage (preview:full): stage graph stayed empty, CLI reported success with the stage URL.Expected
Global
--domain,--api-key, and--workspaceflags should govern the agent's MCP wiring for the run, not just the CLI's own HTTP calls. If a run cannot honor them (e.g. no MCP endpoint on the target), fail loudly instead of submitting to a different environment and printing the target's URL.Why it matters
Success output naming environment A while data went to environment B is silent cross-environment write — it defeats preview-stage e2e testing (see coreplanelabs/nominal#1507) and could put test mappings into prod workspaces.
🤖 Generated with Claude Code