provisioning: provision-assess-recommend — assess a device and recommend the services that fill gaps #41
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.
Blocks
Depends on
Reference
Matou/idss#41
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?
Parent
Feature spec: #17 (provisioning).
What to build
The first two screens of the P4 setup journey, driven by the
provisionorchestrator seam (ADR 0058) over the connection device-add already established.
When an operator opens setup on a
connected — not set updevice, the controlplane assesses what the machine offers — its resources (a VM-mode device counts
its allocated resources), its network and public reachability, and its uptime
pattern — against what the community needs right now, expressed as named HA and
backup gaps computed from live fleet state (P4-S1). It then recommends a role and
services that fill those gaps first: on the select screen (P4-S2) the recommended
services are pre-selected and each one names the gap it closes, while services the
device cannot run appear under Available, gated, with the reason stated in the
device's own numbers ("needs 8 GB — this device has 4", "needs a public
address"). The operator may accept the recommendation or adjust it freely — the
system advises, it never vetoes (ADR 0015) — and may assign the device a fleet
role, which re-filters the available services.
Two resting states must be first-class, never dead ends. When assess finds every
catalogue service out of reach for the device, P4-S1x is shown instead of P4-S2,
naming the device unusable in its own numbers and always offering a real next
step: the lowest-floor job it can still do (an extra backup copy, never the sole
copy of anything) or removal from the fleet. When the community already has no HA
or backup gaps left, P4-S2 replaces the recommended block with a plain "your
community has no gaps right now — nothing needs filling", still allowing the
operator to add any available service.
Notes: this slice builds the shared fleet-state reader both seams — and backups'
coverage map — read from (specs, reachability, uptime, roles, quorum membership,
dataset homes, coverage/HA gaps). Multi-arch is deferred (x86_64 only at v1). The
spec-gate floor's coupling to device-add (ADR 0064) is via the catalogue's
per-service minima — a single source, so the available-list and device-add's gate
cannot disagree; there is no build edge for it. Flow:
docs/ux/flows/p4-provisioning.mermaid.Acceptance criteria
connected — not set updevice, when the operator opens its setup, then P4-S1 shows what the device offers — resources (a VM-mode device counts its allocated resources), network and public reachability, and uptime pattern — and what the community needs, as named HA and backup gaps.Blocked by
Task manifest
clanpackage + fake adapter behind DDR 0010Done in commit
f1fd88aon main (sandcastle: provisioning:provision-assess-recommend #41).What was built
internal/fleetstate— the shared fleet-state reader the manifest notes this slice builds: specs (a VM-mode device counts its allocated resources), reachability, uptime pattern, roles/quorum membership, dataset homes and verified coverage, with the community's HA and backup gaps computed from live state at read time (ComputeGaps: one live home = single-copy gap, zero verified copies = no-backup gap). TheFakeruns the same rule over injected state — the seam test moves the fleet and watches the gaps move (story 1's "computed from live fleet state, not a fixed list").internal/provision— the ADR 0058 orchestrator (control plane only), assess/recommend face:Assess(device)returns what the device offers, the named gaps, the routing verdict, and the S2 selection;ForRolere-filters for the role selector (story 6). Recommended rows are pre-selected and each names the gap it closes; gated rows carry the reason in the device's own numbers ("needs 8 GB — this device has 4", "needs a public address — this device has none", "needs a device that stays on — this one comes and goes").NeedsPublic/AlwaysOn) plusLowestFloorJob(); floors untouched, so ADR 0064's single source still holds and the available-list and device-add's spec gate cannot disagree (no build edge, as the manifest notes).AssessScreen(P4-S1),AssessNothingAvailableScreen(P4-S1x),SelectRoleServicesScreen(P4-S2), composed bySetupSurfaceunder the Fleet mount (DF → P4-S1), backed bydashboard/src/lib/provision.tsmirroring the seam's JSON shapes. Review impact (S2→S3) and removal (S1x→REM) emit onward to provision-review-impact's slice per out_of_scope.Evidence: 11 Go seam tests in
internal/provision/assess_test.go(fake fleet-state reader, fake clan adapter, real brandkit — the manifest's harness) and 14 Vue tests indashboard/tests/unit/provisionSetup.test.ts. Full Go suite + vet, all TS suites, vue-tsc builds and eslint green. STATUS.md updated in the same commit.