THE CHOKE POINT (§2 rules 1-4): resolve one kind's per-space location, migrating a legacy
root-scoped copy into it on first touch, or REFUSING when the move cannot be made honestly.
Returns the canonical path. A caller must obtain the location from here and never build it
itself — that is rule 1, and it is what makes "migrate on first touch" reach every flow rather
than the ones someone remembered to update.
FS COMPOSITION ONLY, and the signature says so rather than the comment alone: this takes a root
PATH and no SecretStore, so a hosted composition cannot call it. Rule 2's atomicity — the move
is one renameSync, so a crash leaves each kind wholly legacy or wholly canonical — is a property
of the filesystem, and the same move against a hosted store would be a get, put and delete with no
atomicity across the three. That is not a gap: a hosted composition provisions these keys
externally and re-keys by the coordinated change of §3.1, never by migrating in place. Taking no
store makes the unsound call impossible to express, the same reason rotateSystemCreds takes none
(the comment on its broker-wide guard in system-rotation.ts says why).
parent is the directory the legacy copy sits DIRECTLY in and under which the segment is created.
It is a parameter rather than cotalDir(root) because §3 settled two different placements for the
two series — P7's segment is a child of .cotal/, P1's a child of .cotal/auth/creds/ — and that
was decided in the plan, not discovered by P1. Everything the rules turn on is the same at both
placements, so parameterizing the parent is what keeps them ONE implementation; a P1-local copy of
rules 2-4 is the second idiom §4 forbids. root stays alongside it because rule 4's tenant count
is a property of the ROOT's account records, not of whichever directory the material sits in.
THE CHOKE POINT (§2 rules 1-4): resolve one kind's per-space location, migrating a legacy root-scoped copy into it on first touch, or REFUSING when the move cannot be made honestly.
Returns the canonical path. A caller must obtain the location from here and never build it itself — that is rule 1, and it is what makes "migrate on first touch" reach every flow rather than the ones someone remembered to update.
FS COMPOSITION ONLY, and the signature says so rather than the comment alone: this takes a root PATH and no
SecretStore, so a hosted composition cannot call it. Rule 2's atomicity — the move is onerenameSync, so a crash leaves each kind wholly legacy or wholly canonical — is a property of the filesystem, and the same move against a hosted store would be a get, put and delete with no atomicity across the three. That is not a gap: a hosted composition provisions these keys externally and re-keys by the coordinated change of §3.1, never by migrating in place. Taking no store makes the unsound call impossible to express, the same reasonrotateSystemCredstakes none (the comment on its broker-wide guard insystem-rotation.tssays why).parentis the directory the legacy copy sits DIRECTLY in and under which the segment is created. It is a parameter rather thancotalDir(root)because §3 settled two different placements for the two series — P7's segment is a child of.cotal/, P1's a child of.cotal/auth/creds/— and that was decided in the plan, not discovered by P1. Everything the rules turn on is the same at both placements, so parameterizing the parent is what keeps them ONE implementation; a P1-local copy of rules 2-4 is the second idiom §4 forbids.rootstays alongside it because rule 4's tenant count is a property of the ROOT's account records, not of whichever directory the material sits in.