[GH-ISSUE #486] Pixelforge 0.9.0: cast bindings, a city scale, and four placement bugs #246

Closed
opened 2026-10-20 17:25:44 +07:00 by bsakaguchi · 0 comments
Owner

Originally created by @kolacheee on GitHub (Aug 21, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Agents/issues/486

Originally assigned to: @kolacheee on GitHub.

What

Pixelforge 0.9.0 — cast bindings: make it possible to say where a person is during the day, and fix the placement, keeper and contract bugs that fell out of doing so.

Why

0.8.0 gave the world interiors, beds, rooms and floors — somewhere for people to be. 0.9.0 is about who is in them.

The blocker was that only ONE relation could put a person in a building: ownership. Ownership is structurally one building per person and one person per building (seenSpecial dedupes the special, b.owner is a single reference). So every named building had room for exactly one working adult and no staff. A sanctuary with two acolytes, a market with several sellers, a shop with an assistant — none of it was expressible at any price, and everyone past the owner stood in the plaza.

Scope

Bindings

  • workplace on the sealed brief — an optional zone-NAME reference resolved exactly like home, except that an unresolved one falls to NONE rather than to the settlement root, because "works at the settlement" is not a box anyone can stand in. Recorded in _repairs instead of vanishing. Emitted only when it resolves, so a brief that never names one compiles unchanged.
  • A worker schedule tier, keyed on having been named rather than on a cast kind — the same way the keeper tier is keyed on holding a building. Six of the twelve cast kinds have no row of their own and fall to *:resident, whose day entry is the plaza, so without this a named worker held their post at dawn and dusk and left it for the eleven hours of daylight.
  • Keeper widened past "the one sanctuary owner in the world" (PLACE_BOUND_SPECIALS was {sanctuary}, so exactly one keeper was possible per world), then narrowed to one head per building.
  • CAPS.household reframed as an ID SPACE. It was answering two unrelated questions with one constant — which group you are in, and how many may share it — which made a convent, a barracks and a boarding house inexpressible.

Scale

  • A city scale at 96×72: the first scale where the ground outruns the cast, so scale.buildings can finally bind and the constraint moves from the map to the people standing on it. The numeric foldScale bucket topped out at town, so a model writing a very large number could never reach a city.

Bugs fixed along the way — three of the four were not what this release set out to do:

  • Nobody loses their bed to somebody who is also leaving. Placement read "is this tile taken" against the previous daypart's positions, in a single pass, while half of those people were on their way out. A sleeper whose bed was still warm under a housemate got shunted to the nearest free tile and stayed there. Ordering-dependent, so a different NPC order stranded a different person.
  • One head per building, not everyone under its roof. Measured on a ten-lodger inn: 10/10 held indoors at midday, two standing on their own bunks.
  • A live contract violation. The oversized-household split escaped its own cap and sealed household numbers above the maximum schema() itself publishes — 263 members over 400 seeds — and mutated a Map while iterating it.
  • Settlements silently dropped the features the model authored. With four declared together: outpost 2/4, hamlet 2/4, village 0/4, town 2/4, city 4/4. The roomiest map was the only one that worked. Now 3/4, 4/4, 3/4, 4/4, 4/4, with bed counts unchanged at every scale.

Also

  • An unknown room purpose now throws, as an unknown feature tag already did at startup. It used to carve the walls, cut the door, and furnish nothing — a sealed empty box that looks deliberate.

Out of scope, deliberately

  • The address field (separating kinship from residence). Shipped alone it is invisible — nothing consumes it until the unit room purpose exists, and unit keys on the (address, household) pair. It opens the room-zoning release instead.
  • The haunt visitor handle. public is hardcoded to the plaza, so new place kinds get keepers and no users — worth doing when there are new place kinds to populate.
  • The lodging split. Guest berths key on kind === "gathering", so a diner compiles a hotel over itself. Wants either a new place kind or program-keyed berths.

Notes

Every change ships with a regression verified failing before the fix, and where a case could have passed on a technicality it was re-checked with its schema/flag assertions stripped so the behavioural assertion had to fail on its own.

Originally created by @kolacheee on GitHub (Aug 21, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Agents/issues/486 Originally assigned to: @kolacheee on GitHub. ### What Pixelforge 0.9.0 — **cast bindings**: make it possible to say where a person *is* during the day, and fix the placement, keeper and contract bugs that fell out of doing so. ### Why 0.8.0 gave the world interiors, beds, rooms and floors — somewhere for people to be. 0.9.0 is about who is in them. The blocker was that only ONE relation could put a person in a building: ownership. Ownership is structurally one building per person and one person per building (`seenSpecial` dedupes the special, `b.owner` is a single reference). So every named building had room for exactly one working adult and no staff. A sanctuary with two acolytes, a market with several sellers, a shop with an assistant — none of it was expressible at any price, and everyone past the owner stood in the plaza. ### Scope **Bindings** - `workplace` on the sealed brief — an optional zone-NAME reference resolved exactly like `home`, except that an unresolved one falls to NONE rather than to the settlement root, because "works at the settlement" is not a box anyone can stand in. Recorded in `_repairs` instead of vanishing. Emitted only when it resolves, so a brief that never names one compiles unchanged. - A `worker` schedule tier, keyed on having been *named* rather than on a cast kind — the same way the keeper tier is keyed on holding a building. Six of the twelve cast kinds have no row of their own and fall to `*:resident`, whose day entry is the plaza, so without this a named worker held their post at dawn and dusk and left it for the eleven hours of daylight. - Keeper widened past "the one sanctuary owner in the world" (`PLACE_BOUND_SPECIALS` was `{sanctuary}`, so exactly one keeper was possible per world), then narrowed to one *head* per building. - `CAPS.household` reframed as an ID SPACE. It was answering two unrelated questions with one constant — which group you are in, and how many may share it — which made a convent, a barracks and a boarding house inexpressible. **Scale** - A `city` scale at 96×72: the first scale where the ground outruns the cast, so `scale.buildings` can finally bind and the constraint moves from the map to the people standing on it. The numeric `foldScale` bucket topped out at `town`, so a model writing a very large number could never reach a city. **Bugs fixed along the way** — three of the four were not what this release set out to do: - **Nobody loses their bed to somebody who is also leaving.** Placement read "is this tile taken" against the *previous* daypart's positions, in a single pass, while half of those people were on their way out. A sleeper whose bed was still warm under a housemate got shunted to the nearest free tile and stayed there. Ordering-dependent, so a different NPC order stranded a different person. - **One head per building, not everyone under its roof.** Measured on a ten-lodger inn: 10/10 held indoors at midday, two standing on their own bunks. - **A live contract violation.** The oversized-household split escaped its own cap and sealed household numbers above the maximum `schema()` itself publishes — 263 members over 400 seeds — and mutated a Map while iterating it. - **Settlements silently dropped the features the model authored.** With four declared together: outpost 2/4, hamlet 2/4, **village 0/4**, town 2/4, city 4/4. The roomiest map was the only one that worked. Now 3/4, 4/4, 3/4, 4/4, 4/4, with bed counts unchanged at every scale. **Also** - An unknown room purpose now throws, as an unknown feature tag already did at startup. It used to carve the walls, cut the door, and furnish nothing — a sealed empty box that looks deliberate. ### Out of scope, deliberately - The `address` field (separating kinship from residence). Shipped alone it is invisible — nothing consumes it until the `unit` room purpose exists, and `unit` keys on the `(address, household)` pair. It opens the room-zoning release instead. - The `haunt` visitor handle. `public` is hardcoded to the plaza, so new place kinds get keepers and no users — worth doing when there are new place kinds to populate. - The `lodging` split. Guest berths key on `kind === "gathering"`, so a diner compiles a hotel over itself. Wants either a new place kind or program-keyed berths. ### Notes Every change ships with a regression verified failing *before* the fix, and where a case could have passed on a technicality it was re-checked with its schema/flag assertions stripped so the behavioural assertion had to fail on its own.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Agents#246
No description provided.