Move the housekeeping out of the config module #48
Labels
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Blocks
Depends on
#51 Record how the casino finds its files
rosa/casino
#55 Hand the housekeeping the home it clears
rosa/casino
#45 Give the config module a home to load from
rosa/casino
Reference
rosa/casino#48
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What to build
The config module's own doc gives away that it is two things: the settings read
off the file, and the housekeeping that clears the files away again. The
housekeeping half decides what to take, asks the player about each file, and
prints the outcome, all in the same run of code — so it needs a terminal to
execute and there is no way to assert what it would have done. The case with no
test at all is the interesting one: a config too broken to parse, where the
paths fall back to the standard places.
Split it the way ADR 0003 already splits every prompt the house says, and ADR
0002 splits an engine from its UI. The housekeeping half answers with a plan —
the files it would take, in the order it would take them, each carrying what it
is and whether the config named it or it is a guess at the standard place
because the config could not be read. The crate-level
uiwalks that plan,asks, and says what happened. The wording lives in the half that never touches a
terminal.
Two things resist being planned and stay as execution:
the files come out, and the player may decline a deletion. It runs after
execution rather than being predetermined.
gone, as it does today.
Ordering survives intact: the config goes last, since it is what names the other
two and a run cut short should leave the survivors findable. When the config
cannot be read it goes first instead, because it names nothing. That rule is
currently expressed as control flow around prompts; as a plan it becomes a value
a test can assert directly.
Do not name the new module
discard, the verb the current code uses. In acodebase with five card games that word is going to mean something specific at a
table, and the glossary has not claimed it yet.
Acceptance criteria
entries as standard-place guesses rather than paths it was given
owning a terminal
uioutcomes
Blocked by