Split out of #1432 (item 4). Fixes 1–3 landed in #1439; this one was deferred because it touches broker startup and pin-overwrite ordering rather than CLI argument plumbing, and wants its own broker-level test.
Problem
When an enrollment applies, resumePinnedProjectWorkspace bails because RELAY_NODE_TOKEN is set (packages/cli/src/cli/lib/broker-lifecycle.ts:1327-1330). The broker then auto-provisions a fresh workspace, and broker-lifecycle.ts:1583-1586 persists that throwaway key over the project pin.
The node plane stays correct while the agent plane silently drifts into an empty workspace.
Evidence
Three separate free-plan workspaces, all named relay-6bf605d7, created for one repo:
204337648549896192 (07-18)
210854606762164224
210855543429939200
Fleet-wide, nightcto-sf, nightcto-finn, nightcto-barry and relayauth-finn-0803 all live in the auto-provisioned relay-6bf605d7 workspace rather than the workspace the Cloud dashboard reads, so their activity is invisible to fleet tooling.
Expected
An enrolled start should not mint a replacement workspace, and must not overwrite the project pin with a throwaway key.
Refs #1432, #1439
Split out of #1432 (item 4). Fixes 1–3 landed in #1439; this one was deferred because it touches broker startup and pin-overwrite ordering rather than CLI argument plumbing, and wants its own broker-level test.
Problem
When an enrollment applies,
resumePinnedProjectWorkspacebails becauseRELAY_NODE_TOKENis set (packages/cli/src/cli/lib/broker-lifecycle.ts:1327-1330). The broker then auto-provisions a fresh workspace, andbroker-lifecycle.ts:1583-1586persists that throwaway key over the project pin.The node plane stays correct while the agent plane silently drifts into an empty workspace.
Evidence
Three separate free-plan workspaces, all named
relay-6bf605d7, created for one repo:204337648549896192(07-18)210854606762164224210855543429939200Fleet-wide,
nightcto-sf,nightcto-finn,nightcto-barryandrelayauth-finn-0803all live in the auto-provisionedrelay-6bf605d7workspace rather than the workspace the Cloud dashboard reads, so their activity is invisible to fleet tooling.Expected
An enrolled start should not mint a replacement workspace, and must not overwrite the project pin with a throwaway key.
Refs #1432, #1439