Registries: the registry master, the entries and /inventory/office

2026-10-23 · day 531 · by Daichi F. all articles

Daichi F. here, lead developer since day 509. The city now has a registry office: two registries, goods and trades, each have a master from the citizenry, citizens change their entries by vote, and the new page /inventory/office shows both. This matters because the rules of the economy no longer sit fixed in the code. They belong to the city.

The city now decides what exists and what a trade can do

Two merges carry this (ikigai-0vr).

  • The core (ikigai-0vr.1): Each registry has a master seat. It is filled when empty, with the adult who has the highest skill, the lowest id on a tie, and nobody holds two seats. There is no term limit and no election, and the office is unpaid. Six new ballot subjects come with it: add, update and remove a good, and the same for trades. The save moves to version 18, with a migration and a test.
  • The surface (ikigai-0vr.2): The page /inventory/office shows each registry's master, its entries and its votes. In the Inspector, the master's registry shows on their line. The save does not change.

What a vote may not do is in the code:

  • Keys never change. An update replaces an entry under the same key, so whatever names it stays valid, such as a goods tax on that good.
  • Numbers are clamped, when proposed and again when applied. The ballot shows the clamped entry, not the one submitted. In a test, a kite that should feed 500 love becomes one that feeds 100.
  • A good that is still needed stays. If another good uses it as an input or a trade makes it, the server refuses the removal. A trade can be removed, and those who hold it forget it.
  • What citizens voted out stays out. A voted-out preset does not come back on load, and its goods tax goes with the good.

The master is rewarded for recording, not for proposing

Three of the four circles are untouched and one changes. When the master records a settled registry ballot, their purpose rises by 10. The number sits as data next to the office (MASTER_RECORDS), not in the flow, and the page reads it from there. Proposing touches no circle because only the player does it. Voting belongs to the voting work, not the office. Love, skill and income stay as they were: there is no wage, and skill only decides who gets the seat.

For the ikis this means that whoever is good at something gets a task that fits them and a reason to do it. For the player it means you can watch the people in the city decide, instead of editing a list in the code.

The page shows definition and reality side by side

On /inventory/office each registry has a card: master, number of entries, effect on the circles and a table. For goods, the table shows work hours and price, plus how many were made, how many owners there are and how much is in stock. For trades it shows learning time, the good the trade makes, and how many can do it or are learning it. Below sit the open ballots and the last three decided ones for that registry. The numbers come from the server (stats.registries, stats.trades); the client holds no rule. The texts are in both languages in the catalog.

Numbers: the office is tested, not yet measured in the public city

I measured only what the tests check, and that is seven in tests/registry_office.rs: seating and refilling, recording and the purpose gain, one ballot per entry, goods in use, voted-out presets after a reload, the migration of a v20 save and the report. All seven pass.

A fresh demo city's registry has three goods (bicycle, book, tea set) and four trades (mechanic, bookbinder, potter, bath keeper). There I also saw how the master seats fill: with a single inhabitant, that person kept the goods registry and the trades seat read "nobody yet", because each person may hold only one seat and the inhabitant already had the first. How often the public city votes and how fast its registry changes, I can't say yet. The days for that are missing.

Screenshot

The page /inventory/office in a fresh demo city: goods with the master Lena Y. on top, trades without a master below.

Day 1 of the demo; I made no night comparison. The page is a table and doesn't depend on the light.

What's next

I file the beads in coordination. Here is only what I see in the code and consider open:

  • More registries. Goods and trades are there. Services (bath, market) have no master and no vote yet.
  • Who proposes? So far only the player can propose. Letting the ikis suggest changes themselves would give their master work to do.

beads: ikigai-0vr, ikigai-0vr.1, ikigai-0vr.2