Repository navigation
Conversation
scotwells
force-pushed
the
feat/device-power-kind
branch
from
November 25, 2026 17:44
c036142 to
f93a539
Compare
scotwells
force-pushed
the
feat/device-power-ui
branch
from
November 25, 2026 18:24
662d262 to
4325eb9
Compare
Power admission reads which ComputerSystem.Reset types each System offers. This adds that field to the observed System in Device status, in the Go type and the CRD schema, so the power kind compiles and its tests can record the field. Nothing writes it here: BMC discovery starts recording it in a separate change. Until then the field is absent and power refuses every action as not offered. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
TestAddingRowsLeavesExistingRowsAlone compared rows with reflect.DeepEqual, which never finds two non-nil functions equal. A row that sets its own Name rule, the per-row naming seam, therefore failed the test even when nothing changed. Compare Name by identity and the rest of the row as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Power is the first real kind on the custody foundation. Staff and the Fleet provider for Metal can request one power action, and the coordinator decides whether it may run, without any change to the coordinator itself. The kind registers its inputs and their digest, an 8-minute deadline, and the two power rows of the operations table. Staff rows use the kind's generated names; the provider row names its operations from the allocation and the Machine generation. Only an operation the provider row admits replaces an older pending one for its allocation. Its admission checks refuse a staff request for a Device with no recorded system UUID or a different one, discovery that did not read the current BMC within twice the discovery interval, and an action the BMC does not offer, each with a declared reason. The snapshot records what the reset-type check read. A power success settles only a power hold, after a Retry. A Settle needs discovery read after the operation ended, at the current BMC endpoint, showing On or Off. Result evidence is typed and bounded in the CRD, required for a success, and checked against the action. A staff power operator role creates only power operations and does not read allocations; a power requester role is the provider's. Nothing wires the kind into a root, and no worker runs it. Implements step P1 of #173 on #174's foundation. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The custody guide gains a short power section: what P1 implements and leaves inert, and the decisions behind its inputs, names, rows, checks, replacement, settle rule, evidence and roles. It lists two places where the foundation still does not fit power: a kind check cannot make a queued operation wait, and the evidence hook does not see the result's phase. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The cutover ships the device-operations component in the Milo roots and its CRDs in standalone, so the power kind now ships with them. Each place that names the operation kinds must name power too, or a power operation's creator goes unchecked and the coordinator cannot list the kind it registers. The creator webhook and standalone's creator policy now govern DevicePowerOperation. The standalone and multi-plane coordinators may read, delete and update the status of power operations, and the multi-plane harness reads them with the other custody records. The standalone smoke expects the CRD fresh and refuses consumer access to it. TestEveryOperationKindIsGoverned requires the webhook's resource list, the packaged webhook and the standalone policy to name every operation kind the CRDs define. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
scotwells
force-pushed
the
feat/device-power-kind
branch
from
November 26, 2026 00:55
f93a539 to
c6dcaa8
Compare
Staff can power a Device on or off, or reset it, from its page. The control creates a staff DevicePowerOperation with a generated name, the caller from a SelfSubjectReview as creator, the Device by name and UID, the reason as the service request, and the recorded system UUID. It offers only the actions discovery lists for the System with that UUID, and destructive actions ask again, naming the server. The button is hidden without create permission on devicepoweroperations. It is disabled, with the reason as its tooltip, when the records show the coordinator would refuse: discovery cannot support the request, identity is not matched, the BMC key is unread or shared, or custody shows the Device allocated, held, busy, retired or unverified. A create whose outcome is unknown after sending keeps the control off until the page is reopened, because a second POST would be a second operation. Session, navigation and Device changes close an open request, as in the location editor. The header shows the observed power state and the latest operation's progress. A new Operations tab lists recent power operations with their result, power before and after, creator and reason. Operations and custody are polled, and keep polling after a failed read. Fixture builds carry synthetic custody and history. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
scotwells
force-pushed
the
feat/device-power-ui
branch
from
November 26, 2026 01:09
4325eb9 to
1134378
Compare
The Device custody refactor keeps object UIDs out of every spec. The Device incarnation is now the fleet.datumapis.com/device-uid label on an operation and on custody, and custody names an operation by kind, name and the fence recorded in its status.admission. The power request now sends the Device's UID as that label and the Device by name only; the creator stays the one UID in the spec. The page lists a Device's power operations with a selector on the label instead of reading every operation in the namespace, and keeps custody only when its label is the Device's UID. A recovery hold is shown only on the operation admitted at the hold's fence, so a same-name operation created later is never shown as held. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
scotwells
force-pushed
the
feat/device-power-kind
branch
6 times, most recently
from
November 29, 2026 02:26
4b0e723 to
cf80de8
Compare
Base automatically changed from
feat/device-power-kind
to
feat/manual-inventory-records
November 29, 2026 03:16
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related to #173, stacked on #179.
Staff can power a server on or off, or reset it, from its Device page, with a reason and a confirmation that names the server.
Only power operators see the button, its tooltip says why it is off, and an Operations tab lists past requests with their results.
Real servers show the button off until #181 records reset actions and a site worker runs requests.
Test plan
Decisions for a person
🤖 Generated with Claude Code