Repository navigation
feat(inventory): authorized staff hardware directory and manager role - #95
Conversation
|
Addressed all three blocking findings in 5363687 (base feat/manual-inventory-records remains bebb7eb).
Preserved the independent suite and original assertions in the repository: reproduced 3 failures/1 pass before fixes; all now pass. Added same-tick router invalidation, imperative create/edit prerequisites, blur/unmount, repeated sessions, Strict Mode lifecycle, unknown dispatched outcomes, and focus ordering regressions. Validation: 121 tests across 14 files pass; typecheck and production build pass; inventory Go package ordinary/race tests pass; whitespace and documentation links checked. Synthetic desktop/mobile browser checks confirmed zero writes after delayed SSAR/account switch, zero PATCHes for RV1-open/RV2-refreshed edits, retained conflict input, and concealment until fresh focus revalidation. No live API writes were used. Existing role changes remain intact. Needs NEW independent adversarial review and CI for this head; this is not self-approval. No merge, deployment, imports, membership or infrastructure changes. Residual limits: dispatched requests cannot be recalled (outcome stays unknown); idle foreground role changes are enforced at the next server request; staging auth acceptance remains parent-controlled. Native Pencil visual fidelity remains an explicitly documented design gap. |
Stack and rollout boundary
Targets
feat/manual-inventory-recordsatbebb7eba0af040bd1234a736c8a9c8aeee47b5d8(PR #94 merged), not main. Head:0673b82f073ab065327192a14c74d2dc6720b003.Publication is authorized. Do not merge/deploy until independent adversarial review and CI complete. Parent coordinates rollout: deploy Fleet manager role before approved infra #9753 binding, then import/deploy acceptance separately. This PR performs no import, membership changes or infrastructure modifications.
Changes
fleet.datumapis.com-inventory-managerrole (viewer + create/update/patch for six kinds; no delete/status/operational permissions) and exact IAM regression tests. Preserves viewer/editor roles.Host evidence and residual gates
Inspected actual staff-portal HEAD
b1489125fe5b77ea6fc379ad378c8e1951174de5: protectedlayouts/milo.layoutloader identity, logout/login behavior, global QueryClient, catch-all internal proxy, caller-token/method/body/content-type forwarding, same-origin guard and HTTP/error envelopes. SSAR POST and inventory POST/PATCH use that existing route; no new endpoint is invented.Source validation is not live authorization proof: staging acceptance must verify deployed host revision/loader shape, upstream SSAR, same-origin configuration, reader/manager/denied cases and session switching. Background/session boundaries intentionally reset open forms. Foreground idle role revocation is observed at the next read/submit, not claimed instantaneously. No continuous sync/provisioning/readiness logic added.
Pencil file structurally inspected and unchanged; native desktop rendering unavailable. Native visual fidelity remains a documented design gap, not an IAM gate. Scope and evidence:
docs/development/staff-inventory-ui.md.Validation
pnpm --dir ui/provider test: 98 tests in 11 files passpnpm --dir ui/provider typecheckandbuild: pass (existing transitive undici/Zod warnings)go test ./internal/api/inventory/v1alpha1andgo test -race ./internal/api/inventory/v1alpha1: passkustomize build config/milo, documentation links and whitespace: passReview focus
Authorization/cache lifecycle and races, field ownership/preconditions, denial states and exact manager-role grant set. Full management forms for the other four kinds are intentionally out of scope.