Repository navigation
feat: serve the occupation keys at GET /v1/npc/occupations - #2
Merged
Merged
Conversation
This was referenced Nov 14, 2026
GentBajko
marked this pull request as draft
November 15, 2026 00:12
Member
Author
|
Converted to draft: Arda's feature process needs the maintainer's approval of this change's plan before code, and that approval has not been given. The code here was written ahead of it. The maintainer can approve the plan as built (review this PR and mark it ready) or ask for the plan to be redone first. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
For DiceMaster:
POST /v1/npc/generatetakesjob(96 keys) andoffice(21 kinds), and until now no route listed them, so DiceMaster would have had to pin a hand copy.What
GET /v1/npc/occupations, stable, familynpc_format(unchanged at 1).OccupationList(/v1/schema/OccupationList.json), with TS bindingsOccupationList,Occupation,OccupationKindandOccupationTier.{"occupations": [...]}lists every job, then every office, each in key order. Each entry carries:key;kind, eitherjoboroffice;label, a job's title, or an office's title without its place;label_female;category, theJobCategory(jobs only);tiers, a list of{tier, rank}(SocialRank), smallest tier first.tiersare exactly the tiersgenerateaccepts the job in. A{job, tier, rank}taken from one entry always generates, and no unlisted tier does.elder,harbourmaster,high_priest,lord,reeve,shrine_keeper,steward), so(kind, key)is the unique pair.arda_npc::occupations()(crates/arda-npc/src/one/catalog.rs) builds it from the bundled tables and the generator's own tier rule, so it cannot drift from whatgenerateaccepts. It is the same on every world.labelinoccupations.json(itsroles.jsontitle without the place).npc-occupations(61 cases over 48 of 49 stable routes). Theschema-indexgolden gained the entry; no other golden changed.Evidence
crates/arda-npc/tests/occupation_catalog.rschecks two things:world_api/occupations.rs(same bytes with and withoutsociety/, 96 + 21 entries), plus the mirror round-trip test and the inventory probe.cargo fmt --checkandcargo clippy --workspace --all-targets -D warningspass.cargo test --workspace --all-features --releasepasses, including the contract kit and theworld_apisuites.Docs
API.md,logic/13§npc-occupations,logic/16,09-interfaces.md,02-models.md,01-architecture.md,versioning.md(56 rows, 49 stable), the contract-kit README,CHANGELOG.md(Unreleased), and the ledger.Process note
The user was away. The capstone feature chain ran without its approval gates: spec and plan were written from the DiceMaster session's brief and kept locally under
docs/capstone/features/. This PR is the approval gate.This PR, the thicket-obscurement PR and the memory-ceiling PR each add an
## Unreleasedsection toCHANGELOG.mdand an entry at the top ofdocs/capstone/changelog.md, so whichever merges second will need a trivial conflict resolution.