chore(lib): drop dead helpers, document schema boundary #2

Merged
bernardo merged 1 commits from wave/qa-lib-schema into main 2026-05-19 18:48:31 +01:00
Owner

Two unused helpers and a missing comment in the lib/ surface, found
during the Pillar 8 sweep.

  • readState in lib/default.nix was exported but has no external
    callers — only readHomeState and readSystemState use it
    internally. Removed from the export list; the function stays in the
    let-block (still wraps the two public readers).

  • getWithDefault in lib/state-schema.nix was a complete dead
    function: declared as a path-walking fallback helper but never called
    anywhere in the tree. core/{system,home}/state.nix use inline
    togglesState.<key> or schema.<scope>.<key> instead. Removed.

  • Added a header comment to lib/state-schema.nix explaining the
    schema's boundary — it lists every state.json field consumed by a
    Nix option, but state.json may also hold runtime-only fields
    (welcome_done from nomarchy-welcome) that are intentionally
    off-schema because no Nix option reads them. Future readers will
    otherwise think welcome_done is an orphan.

Logged a Later-column roadmap row for consolidating flake.nix's
palette/themeNames re-imports with nomarchyLib so the theme list has
one source of truth instead of two.

Two unused helpers and a missing comment in the lib/ surface, found during the Pillar 8 sweep. - `readState` in `lib/default.nix` was exported but has no external callers — only `readHomeState` and `readSystemState` use it internally. Removed from the export list; the function stays in the let-block (still wraps the two public readers). - `getWithDefault` in `lib/state-schema.nix` was a complete dead function: declared as a path-walking fallback helper but never called anywhere in the tree. core/{system,home}/state.nix use inline `togglesState.<key> or schema.<scope>.<key>` instead. Removed. - Added a header comment to `lib/state-schema.nix` explaining the schema's boundary — it lists every state.json field consumed by a Nix option, but state.json may also hold runtime-only fields (`welcome_done` from `nomarchy-welcome`) that are intentionally off-schema because no Nix option reads them. Future readers will otherwise think welcome_done is an orphan. Logged a Later-column roadmap row for consolidating `flake.nix`'s palette/themeNames re-imports with `nomarchyLib` so the theme list has one source of truth instead of two.
bernardo added 1 commit 2026-05-19 18:48:24 +01:00
Two unused helpers and a missing comment in the lib/ surface, found
during the Pillar 8 sweep.

- `readState` in `lib/default.nix` was exported but has no external
  callers — only `readHomeState` and `readSystemState` use it
  internally. Removed from the export list; the function stays in the
  let-block (still wraps the two public readers).

- `getWithDefault` in `lib/state-schema.nix` was a complete dead
  function: declared as a path-walking fallback helper but never called
  anywhere in the tree. core/{system,home}/state.nix use inline
  `togglesState.<key> or schema.<scope>.<key>` instead. Removed.

- Added a header comment to `lib/state-schema.nix` explaining the
  schema's boundary — it lists every state.json field consumed by a
  Nix option, but state.json may also hold runtime-only fields
  (`welcome_done` from `nomarchy-welcome`) that are intentionally
  off-schema because no Nix option reads them. Future readers will
  otherwise think welcome_done is an orphan.

Logged a Later-column roadmap row for consolidating `flake.nix`'s
palette/themeNames re-imports with `nomarchyLib` so the theme list has
one source of truth instead of two.
bernardo merged commit 94927952db into main 2026-05-19 18:48:31 +01:00
bernardo deleted branch wave/qa-lib-schema 2026-05-19 18:48:31 +01:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: bernardo/Nomarchy#2