fleetwire: the enrolment opener has no test seam — e2e drives fire a real xdg-open on the host #338
Labels
No labels
agent-blocked
agent-working
autopilot
bug
deferred
deploy-pending
enhancement
landing-pr
model-haiku
model-opus
model-sonnet
needs-design
needs-info
needs-triage
no-triage
out-of-scope
priority
ready-for-agent
ready-for-human
ready-for-session
rehearsal-183
snapshot-pending
standing-drive
wayfinder:grilling
wayfinder:map
wayfinder:prototype
wayfinder:research
wayfinder:task
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Matou/idss#338
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
internal/fleetwire/enrolment.go'sRegisterPasskeyopens the kanidm reset url viacfg.Open(default: the helper's own xdg-open). That is ADR 0051's design (the token never crosses the stdio bridge) — butOpenis injectable ONLY in code; production wiring (wiring_prod.go) has no override, so any live drive that reachesenrolPasskeythrows a REAL browser tab at the host's desktop (drive 18 did exactly this mid-drive). Phase 1 now avoids clicking the button (ADR 0132 / Finding L), but phase 2's Chromium leg will need to drive this path deliberately, and until then one stray click in a headed drive still fires it.Fix shape: an env-var-gated override in the helper's wiring (e.g.
OURCLOUD_E2E_OPEN_SINK=<file>— append the url instead of opening it), set by the e2e harness only; production default unchanged; unit test at the wiring seam. This also becomes phase 2's hook for reading the reset url. Never a fake in production paths (ADR 0100) — the knob selects a sink, it does not fabricate success.Blocked — target code is not on
main. This slice cannot be implemented by a main-landing Sandcastle worker as written.The fix's subject files all live only on
origin/private-standup-polish(not merged tomain):internal/fleetwire/enrolment.go— theEnrolmentopener with the injectablecfg.Openfield. Onmainthere is nointernal/fleetwirepackage at all.app/helper/cmd/helper/wiring_prod.go— on the polish branch this wiresfounding.WithEnrolment(fleetwire.NewEnrolment(...))(line ~279). Onmainthe same file marks{name: "enrolment", failLoud: "hand-off — its own slice (identity-handoff-scrub)"}— there is no opener to add an override to.OURCLOUD_E2E_OPEN_SINK(app/playwright.config.ts,app/tests/e2e/…, the drive scripts) exists only on the polish branch;mainhas none of it.535be44(the fleetwire enrolment face) is onorigin/private-standup-polishand is not an ancestor ofmain. SoOURCLOUD_E2E_OPEN_SINKhas nowhere to hook onmain, and porting the whole arc to create one is far out of scope for this slice (it is theidentity-handoff-scrubslice's own work).Decision needed (judgement call):
private-standup-polish(not a main-landing Sandcastle task), orprivate-standup-polish) intomainfirst, then re-arm #338 for a Sandcastle worker.I asked via the Sandcastle human-ask channel; no reply within the window. Moving to
ready-for-human. A human re-arms by resolving the above and re-addingready-for-agent.Approved by Ben 2026-08-08 (decision sweep) as scoped: an env-gated sink in the helper's production wiring (e.g.
OURCLOUD_E2E_OPEN_SINK=<file>— append the url instead of opening), set only by the e2e harness; production default unchanged; unit test at the wiring seam. Doubles as phase 2's hook for reading the reset url. Never a fake in production paths (ADR 0100) — the knob selects a sink. →ready-for-agent.Done in
2e41f82(onorigin/main).Implemented as approved (Ben, 2026-08-08 decision sweep) — the arc is now on
main, so the original not-on-main blocker is resolved.Helper wiring seam (
app/helper/cmd/helper/wiring_prod.go):enrolmentOpener()readsOURCLOUD_E2E_OPEN_SINK. Unset → returns nil, sofleetwire.NewEnrolmentfalls back to its real xdg-open/open (production default unchanged, ADR 0051). Set → appends the kanidm reset URL to that file instead of opening a real browser tab. The knob selects a SINK, never fabricates success —RegisterPasskeystill polls the real kanidm credential status (ADR 0100). Wired into theenrolmentport'sEnrolmentConfig.Open.Unit tests at the wiring seam (
wiring_test.go):TestEnrolmentOpener_ProductionDefaultIsNil(nil with no env → real opener) andTestEnrolmentOpener_SinkAppendsURL(both URLs appended in order to the sink file).E2E harness hook (
app/tests/e2e/fixtures/launch.ts):launchAppsetsOURCLOUD_E2E_OPEN_SINK(e2e-only) under the run dir and exposes the diverted URLs viaresetUrls()— phase 2's Chromium leg reads the reset URL from here rather than firing a real tab. The stale comment on theshell.openExternalstub (Finding L) was updated to point at the new fix.Gate green (gofmt/vet/test/golangci-lint, both build tags, broker) via
nix develop .#go-ci. STATUS.md updated (header + milestone log).Note for the harness: the pre-push gate's
go test ./...includesinternal/vm's payload-assembly test, which shells out topnpm installand aborts on the no-TTY modules-purge guard unlessCI=trueis set — pushed withCI=true. Unrelated to this slice, but worth the gate settingCI=truefor its pnpm-invoking tests.