Skip to content

docs(m3-exit): M3 retrospective + TODO closure#52

Merged
UnbreakableMJ merged 1 commit into
mainfrom
chore/m3-exit
Apr 28, 2026
Merged

docs(m3-exit): M3 retrospective + TODO closure#52
UnbreakableMJ merged 1 commit into
mainfrom
chore/m3-exit

Conversation

@UnbreakableMJ

Copy link
Copy Markdown
Contributor

Summary

Closes M3 — User Environment (Plan §7.4).

Phase 7 is wired end-to-end:

  1. pearlite-userenv adapter (HomeManagerBackend + NixInstaller)
  2. Diff classifier emits UserEnvSwitch when HM-enabled users drift (sha256 over the config dir)
  3. Engine dispatches the switch via HomeManagerBackend
  4. state.toml's [[managed.user_env]] upserts the (user, generation, config_hash) triple
  5. Next plan re-reads, sees no drift, emits no action — loop closes.

M4 carry-overs

  1. Wire LiveNixInstaller as the apply-time / bootstrap caller (PR feat(userenv): NixInstaller trait + LiveNixInstaller + MockNixInstaller #45 shipped the adapter without a wired caller). Needs an ADR for where the installer script + SHA come from.
  2. apply_plan parameter struct (9-arg signature past the comfort line).
  3. Per-user nix.conf ADR.

Test plan

  • pearlite-audit check . passes.
  • SPDX clean.
  • T1/T2/T3 CI tiers green (no Rust changes).
  • After merge: git tag -s m3-exit -m "M3 — User Environment" on the merge commit per Plan §3.4.

🤖 Generated with Claude Code

Closes M3 — User Environment (Plan §7.4). 8 PRs since m2-exit
(#44#51), 303 workspace tests passing (up from M2's 267).

Phase 7 is wired end-to-end: pearlite-userenv adapter (HM + Nix
installer) → diff classifier emits UserEnvSwitch when HM-enabled
users drift → engine dispatches the switch via HomeManagerBackend
→ state.toml's [[managed.user_env]] upserts the (user, generation,
config_hash) triple. The next plan re-reads, sees no drift, emits
no action — the loop closes.

Three M3 carry-overs roll into M4:
1. Wire LiveNixInstaller as apply-time / bootstrap caller; ADR for
   where the installer script + SHA come from.
2. apply_plan ApplyOpts struct (9-arg signature past comfort).
3. Per-user nix.conf ADR.

Other TODOs remain: forgotten_count field, envelope-shape freeze,
fork-based fs crash tests, state.toml parse benchmark, KernelInfo
population, ADR-001..007 backfill.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@UnbreakableMJ
UnbreakableMJ merged commit cba4c11 into main Apr 28, 2026
3 checks passed
@UnbreakableMJ
UnbreakableMJ deleted the chore/m3-exit branch April 28, 2026 21:28
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.

1 participant