| 1 | package park |
| 2 | |
| 3 | import "github.com/carlosframework/platform/internal/regionname" |
| 4 | |
| 5 | // HomeRegion is the engine region of the home placement (home-region parks, |
| 6 | // part 1, Paul 2026-10-11). The home's placement code is "", and "" already |
| 7 | // means unset to the engine and to the claim: an engine, view, chore or |
| 8 | // admission with region "" is refused or read as "holds nothing anywhere". |
| 9 | // So home is never "" here. It is this token, mapped once from the placement |
| 10 | // code by PlacementRegion where a box's or a record's code becomes an engine |
| 11 | // region. |
| 12 | // |
| 13 | // The "@" is outside the placement-code alphabet (provision.ValidRegion: |
| 14 | // lowercase a-z, 0-9 and hyphen), so no named region, one named "home" |
| 15 | // included, can ever equal it. It reaches the claim's obligation region, its |
| 16 | // "region:" owner, its quiet_after key and one control key, the home lane's |
| 17 | // staging lease (control/staging-leases/@home/<host>, keyed in the host's |
| 18 | // wiring). It never reaches an archive path: the archive is |
| 19 | // parked/<incarnation>/<host>/<retirement>/. |
| 20 | const HomeRegion = regionname.HomeRegion |
| 21 | |
| 22 | // PlacementRegion is the engine region of a placement code: HomeRegion for |
| 23 | // the home's "", a named code unchanged, and "" (unset, which every engine |
| 24 | // entry refuses) for anything that is not a placement code, HomeRegion |
| 25 | // itself included. |
| 26 | func PlacementRegion(code string) string { return regionname.PlacementRegion(code) } |
| 27 | |