Hand the housekeeping the home it clears #55

Open
opened 2026-08-15 20:03:31 +00:00 by rosa · 0 comments
Owner

What to build

Opening the casino takes a home now, but clearing files still doesn't. reset
and purge each ask the system where the player's files are, and the binary
asks a third time on its way to opening the casino. Whose directories these
are is one decision written down in three places, and two of those places are
the ones that delete things: the only files they can be run against are a real
person's.

Hand them a home the same way. Clearing takes the home it clears, the program
constructs the single home a run uses at the point it starts, and
Home::for_user is called once.

This is the other half of the seam #48 opens. That ticket makes purge answer
with a plan instead of driving prompts, so its decisions can be asserted as a
value; a plan is only worth asserting against a home the test picked. Land it
after #48, so the change goes into whatever module ends up owning the
housekeeping rather than into the config module it is on its way out of.

Acceptance criteria

  • Clearing files is handed the home it works on rather than asking where
    one is
  • Home::for_user is called in exactly one place, where the program starts
  • A purge plan and a reset plan can both be produced against a temp
    directory, with the real home unreachable from the test
  • Behavior at the terminal is unchanged — same questions, same files, same
    order
  • No CHANGELOG entry — nothing here is visible to a player

Blocked by

## What to build Opening the casino takes a home now, but clearing files still doesn't. `reset` and `purge` each ask the system where the player's files are, and the binary asks a third time on its way to opening the casino. Whose directories these are is one decision written down in three places, and two of those places are the ones that delete things: the only files they can be run against are a real person's. Hand them a home the same way. Clearing takes the home it clears, the program constructs the single home a run uses at the point it starts, and `Home::for_user` is called once. This is the other half of the seam #48 opens. That ticket makes purge answer with a plan instead of driving prompts, so its decisions can be asserted as a value; a plan is only worth asserting against a home the test picked. Land it after #48, so the change goes into whatever module ends up owning the housekeeping rather than into the config module it is on its way out of. ## Acceptance criteria - [ ] Clearing files is handed the home it works on rather than asking where one is - [ ] `Home::for_user` is called in exactly one place, where the program starts - [ ] A purge plan and a reset plan can both be produced against a temp directory, with the real home unreachable from the test - [ ] Behavior at the terminal is unchanged — same questions, same files, same order - [ ] No CHANGELOG entry — nothing here is visible to a player ## Blocked by - #48
Sign in to join this conversation.
No description provided.