Skip to content

feat(inventory): expand manual physical inventory and optional review aids - #94

Merged
scotwells merged 7 commits into
feat/manual-inventory-recordsfrom
feat/physical-netbox-inventory
Nov 20, 2026
Merged

scotwells merged 7 commits into
feat/manual-inventory-recordsfrom
feat/physical-netbox-inventory

Conversation

@scotwells

@scotwells scotwells commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

Stack and scope

Stacks on feat/manual-inventory-records (#90) at 42086bbe2cf05f5d09362fbc777e514907d64462. Dependent PXE/runtime work and all existing inventory bindings are preserved; this PR does not retarget or modify its base.

Manual entry, operator review, and explicit GitOps ownership are the primary workflow. NetBox, bulk conversion, continuous source reconciliation and credentials are not prerequisites. There are no scheduled imports, discovery/sync controllers, background NetBox updates, auto-apply or auto-delete. Flux remains the sole staging inventory writer. Nothing in this work deploys, changes infrastructure tags, imports live records, touches hardware, publishes eligibility, or releases customer capacity.

Implementation

  • Six provider-project Milo kinds: Facility, Rack, DeviceClaim, Device, Cable and PowerFeed, with CRDs, local CEL validation, Go types and scoped IAM.
  • Separate source identity, serials, asset tags and provider host IDs; typed components, internal panel/power mappings, cable lanes and service-owner demarcations. No Circuit kind, new backend, IPAM or routing ownership.
  • Preserve legacy slots, immutable Device identity/claimRef, historical bindings and MachineCapacity references. New typed installations support partial placement and Cable-only expected topology without invented occupancy or readiness.
  • Read-only staff browsing across all six paginated collections. Multiple historical registrations do not identify an active Device by edit time.
  • A complete synthetic manual six-kind example and offline private-record schema compatibility check; all real source data stays outside Git.
  • Retained optional operator-run review aids: GET-only sanitized snapshots and offline report/candidate generation. --handoff only writes private review files; it never applies, commits, pushes or hands execution to Flux. The historical imported classification means representable candidate, not applied record. The UI labels this comparison optional.
  • Product proposal, technical reference, manual operations guide, and explicit staging acceptance/rollback checklist.

Start with manual entry and review, not the optional NetBox workflow. The staging checklist separates implementation evidence from deployment and physical acceptance.

CI blocker diagnosis and fix

The original head's manager code is identical to the stacked base. The reported active-custody test passed 30 isolated race repetitions, but a new deterministic blocked-handler reproducer failed on the original code in both direct and dependency-route paths: runtime removal could finish while an already-resolved handler could still write. This is an inherited lifecycle race, not an inventory schema regression or a reason to relax the assertion.

Commit 180e438 adds a per-runtime draining barrier before unbinding and rejects new work through retained stopped-runtime pointers. No safety assertion or timeout was weakened. Both the new reproducer and existing custody test pass 50 race repetitions. Commit 8007368 supplies the manual-first workflow, tests and operational evidence.

Validation

  • go test ./..., go test -race ./..., go vet ./..., go build ./cmd/...: passed with real Kubernetes 1.37.0 envtest assets.
  • Both previously skipped tests passed explicit uncached race runs: TestManagerEndToEndAgainstSyntheticMilo and TestConsumerDiscoveryIgnoresOtherServicesAndBacksOff; no envtest skips in that run.
  • Manual six-kind fixture and current applied Git-source compatibility: 3 DeviceClaims and 1 Device pass create/unchanged-update schema validation; existing immutable-binding negative tests pass.
  • Optional review-aid suite: 24 tests passed.
  • Provider UI: typecheck, 58 tests, production build passed. Consumer UI: typecheck, 44 tests, build passed. Existing nonfatal dependency/Module Federation build warnings remain.
  • Milo packaging, all five CI Kustomize renders, overlay isolation, standalone render/source/preflight and mocked smoke tests, multi-plane harness, shellcheck, documentation links and whitespace checks passed.
  • Local Docker daemon unavailable: hack/test-standalone-build-context.sh could not complete; real disposable standalone smoke was not run locally. Fresh CI remains required for these gates, not the previous head's results.

Read-only staging evidence and remaining gates

On November 20, 2026, read-only staging queries observed both OCI sources and applied Milo configuration at the manual-inventory artifact sha256:45dfd12971b44a92d3d078007cfd41dcb23f4d278d17e3c5ea8f02c65d3f2fdc. Manager/UI Deployments use the manual-inventory build ending 20261120-165214. Provider inventory reports Ready at infra 3bde916629c7b6c49a6820bc40c2546bbf2afdc1, with prune: false and deletionPolicy: Orphan. This is the base, not deployment of this PR.

Direct live provider-record comparison through the attempted management-cluster project route was unavailable; Git-source schema compatibility is not a live-object audit. An authorized operator must compare live immutable identities/bindings before any separately approved rollout. No production context was substituted. No live NetBox audit or parity claim exists; it is not required for manual feature evaluation.

Cross-object existence/exclusivity, reservations, deletion safety, physical qualification, move/replacement handover, adoption and electrical budgets remain outside this milestone. Keep unknowns unknown. Rollback must retain additive schemas and records, never delete/recreate occupied Devices or release capacity; see the checklist.

Ready for separate independent adversarial review, not adversarially approved. Parent coordinates that reviewer and fresh CI/staging gates. No staging deployment is authorized or performed by this PR work.

@scotwells
scotwells requested a review from a team as a code owner November 20, 2026 18:10

@kevwilliams kevwilliams left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hold: validate fails in go test -race ./....

  • TestDisengageWithActiveCustodyStopsReconcilingWithoutReleaseOrRewrite in internal/manager fails on this head.

@scotwells scotwells changed the title feat(inventory): add observational physical NetBox import feat(inventory): expand manual physical inventory and optional review aids Nov 20, 2026

@scotwells scotwells left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Independent adversarial review result: SIGN OFF for staged manual observational evaluation of exact head 7efdde1 against base 42086bb. This records an independent agent review, not a human approval or deployment authorization.

All prior blockers were independently verified resolved: admitted predecessor work drains before successor reconciliation; downstream setup cannot replace successor watches; invalid front-port positions and rear-port capacities remain quarantined and cannot produce partial handoff artifacts. Independent controller tests used the actual multicluster-runtime controller and required bounded completion/cancellation, not a timeout counted as success. No remaining blocking code defect was found within the manual observational scope.

Independent validation included 200 concurrency scenario executions under race detection, both Kubernetes 1.37.0 envtests without skips, 31 adversarial topology scenarios, the 29 optional-tool tests, provider UI tests/typecheck/build, Go tests/vet/build, packaging/renders and documentation checks. Coordinator subsequently verified all 11 exact-head checks complete: required workflows successful, Polylane checks neutral, CLA successful.

Predeployment gates remain: directly compare live provider DeviceClaims/Devices, immutable bindings and MachineCapacity references through an authorized project route; confirm current source/applied revisions; separately approve selection of the exact reviewed build. Preserve Flux as sole writer, non-pruning/orphan behavior and additive schemas/occupied records on rollback. Manual record entry/review remains primary; no automated import/sync/apply or hardware action is authorized. No live NetBox parity, physical verification, reservation coordination, electrical qualification, lifecycle handover or eligibility claim follows. Any changed head requires review of the new revision.

@scotwells
scotwells merged commit bebb7eb into feat/manual-inventory-records Nov 20, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants