Skip to content

feat(api): record which setting a case came from - #17

Merged
Madeuss merged 1 commit into
mainfrom
feat/record-case-setting
Aug 30, 2026
Merged

feat(api): record which setting a case came from#17
Madeuss merged 1 commit into
mainfrom
feat/record-case-setting

Conversation

@Madeuss

@Madeuss Madeuss commented Aug 30, 2026

Copy link
Copy Markdown
Owner

One field, added now because it is five minutes today and a migration later.

The gap

Case records seed and generator_version. It does not record which world it
was built from — and today that is fine, because there is exactly one.

The day a second setting exists, seed 42 means two different mysteries. That
breaks something load-bearing rather than cosmetic:

  • ADR-0004 rests
    on determinism. Every eval runs five times because temperature makes a single
    run inconclusive; that only isolates the model if the case underneath is
    fixed.
  • Eval baselines would compare cases that are not the same case, and report the
    difference as a model regression.
  • A stored case would have no way to say which catalog renders it.

CaseVeneer carries it for the same reason: prose is written for one world, and
a cached veneer must not be reused for another that shares a seed.

What it does not do

It does not build the feature. The generator still knows exactly one world, and
its constants — rooms, cast, means, secrets — stay module-level. Grouping them
into a Setting object is phase 8, now written into the roadmap alongside
"cenários além da mansão (outros países e épocas)".

Worth restating from the conversation that prompted this: the solver, the
validator and the rules need no change for a second setting.
They reason over
ids and never over what a room is. That is why this is one field and not a
refactor.

The test

It asserts a habit rather than catching a bug — there is one setting, so nothing
can be wrong yet. The docstring says so plainly, because a test that looks
tautological deserves an explanation of the failure it is placed there to catch.

64 passed · ruff clean · mypy strict: 16 files, no issues

openapi.json is unchanged: Case is not on the API surface yet.

Closes #5.

A seed identifies a case only together with the generator version and the
setting. There is one setting today, so nothing is ambiguous yet — which is
exactly why this is cheap now and a migration later.

The moment a second setting exists, seed 42 means two different mysteries.
Reproducibility is the whole premise of ADR-0004: every eval runs five times
because temperature makes one run inconclusive, and that only measures the model
if the case underneath is fixed. Without the setting recorded, baselines would
silently compare cases that are not the same case, and a stored case would have
no way to say which catalog renders it.

CaseVeneer carries it too, for the same reason: prose is written for one world,
and a cached veneer must not be reused for a different one that happened to
share a seed.

Nothing else changes. The generator still builds only the manor, and grouping
its constants into a `Setting` object is phase 8 work — recorded in the roadmap,
along with the glossary entry that gives the term a name in both vocabularies.
@Madeuss
Madeuss merged commit 21d449d into main Aug 30, 2026
4 checks passed
@Madeuss
Madeuss deleted the feat/record-case-setting branch August 30, 2026 22:05
@Madeuss Madeuss added this to the Phase 1 — Case generator milestone Aug 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

E1 — Generate a playable case

1 participant