pool: bring-up — reserve, provision, and wait for a person #38
No reviewers
Labels
No labels
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Meta/Campaign
Meta/Epic
Meta/Session
Priority/Critical
Priority/High
Priority/Low
Priority/Medium
Reviewed/Confirmed
Reviewed/Curated
Reviewed/Duplicate
Reviewed/Invalid
Reviewed/Won't Fix
Scope/Campaign
Status/Abandoned
Status/Blocked
Status/Conflicted
Status/In Progress
Status/In Review
Status/Need Grooming
Status/Need More Info
Status/Ready
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Ting/Vedanta!38
Loading…
Reference in a new issue
No description provided.
Delete branch "pool/30-bring-up"
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?
Session #30's three Deliverables, under OpenSpec 30 v0.1.1.
src/pool.rs, new module. The steady-state cycle is #31 and is not here.What it does
#32 — reserve before create. A four-word name under the
swarm-alpha-drone-prefix is written to a durable ledger before anything exists in the directory, and the returned UUID is pinned to name and slot in one call with no rename pass.The ordering is the requirement, not a preference. A create-then-record flow that dies in the middle leaves an account under a name nothing recorded, and the next run cannot tell whether that account is one it just made or one that was always there — the only behaviours left are refuse-forever or risk-a-duplicate. Reserving first makes the retry's question answerable: adopt what matches this name and this slot; anything else is a collision to deny or re-reserve.
Slot metadata is what makes adoption safe. A name alone cannot say whether the account under it is this slot's. An account with no slot is someone's hand-made one. Adopting either silently takes over another principal, so both are collisions.
#33 — ten principals, one grant each, nothing else. No Forge account, no standing token, no active lease: those belong to a lease at checkout, and a pool that issues them at birth has ten standing credentials nobody is using. Distinct UUIDs and distinct grants, so the pool is not one identity wearing ten names.
#34 — activation waits for a person. Per Ting/Ting#2 Q4, ratification is presence, not channel — so
Gateholds a recorded act, and there is deliberately no method a notification could call. Presenting the mapping and ratifying it are different verbs; only the second opens the gate.is_activere-derives the digest from what exists now rather than trusting the stored one. The question is not "was something ratified" but "is what exists the thing that was ratified", so a mapping that drifts afterwards closes the gate with nobody having to notice the drift.Design notes worth arguing with
PoolDirectoryhas four methods and that is the entire authority provisioning holds — no delete, no rename, no credential mint. It also makes the state machine testable without a wire.operations.rsfor the same reason: the last append may not have completed, but a damaged line anywhere else means the file is not what it claims.POOL_SIZE = 10is a constant, not a knob. Ten is the number the realized mapping gets ratified against; a different size is a different ratification.Verification
nix developgate green:cargo fmtstable,cargo clippy --workspace --all-targets -D warningsclean,cargo test --workspacepassing — 85 lib tests, up from 71.The 14 new tests assert behaviour rather than return values, using a capture double that records calls:
found_slot: NoneNot here
PoolDirectoryhas no kanidm implementation yet — that lands whensa-vedantaexists, which is flake-ops#98's owner act.Closes #32
Closes #33
Closes #34
Refs #30