Skip to content

feat(nickel): emit services block from probed inventory#62

Merged
UnbreakableMJ merged 1 commit into
mainfrom
feat/nickel-emit-services
Apr 29, 2026
Merged

feat(nickel): emit services block from probed inventory#62
UnbreakableMJ merged 1 commit into
mainfrom
feat/nickel-emit-services

Conversation

@UnbreakableMJ

Copy link
Copy Markdown
Contributor

Summary

Continues M4 W1 reconcile (Plan §7.5). The services block is the last per-subsystem table that maps cleanly from the probed inventory. Emits enabled/disabled/masked Vec<String> from the ServiceInventory's BTreeSet members; the active set is dropped since it represents runtime drift, not declaration.

Empty-block emission when probe.services is None — keeps the schema's #[serde(default)] entry points consistent with what the imported file declares.

Per the module-level doc, the emitter does NOT try to filter "noisy" defaults out of services.enabled — guessing wrong silently drops state that ought to be declared. Operator review of the imported.ncl is the curation step; reconcile is just providing a starting draft.

Three new unit tests:

  • enabled/disabled/masked arrays in sorted order
  • empty inventory case (no probed services) → empty arrays
  • service block appears after packages for stable golden-fixture diffs

Test plan

  • cargo test --workspace --all-features — 327 passing (+3 new)
  • cargo clippy --workspace --all-targets --all-features -- -D warnings — clean
  • cargo fmt --all -- --check — clean
  • scripts/ci/check-spdx.sh — clean
  • pearlite-audit check . — 1 check, 0 violations
  • CI green on T1 / T2 / T3

🤖 Generated with Claude Code

Continues M4 W1 reconcile (Plan §7.5). The services block is the
last per-subsystem table that maps cleanly from the probed
inventory. Emits enabled/disabled/masked Vec<String> from the
ServiceInventory's BTreeSet members; the active set is dropped
since it represents runtime drift, not declaration.

Empty-block emission when probe.services is None — keeps the
schema's #[serde(default)] entry points consistent with what the
imported file declares.

Per the module-level doc, the emitter does NOT try to filter "noisy"
defaults out of services.enabled — guessing wrong silently drops
state that ought to be declared. Operator review of the imported.ncl
is the curation step; reconcile is just providing a starting draft.

Three new unit tests:
- enabled/disabled/masked arrays in sorted order
- empty inventory case (no probed services) → empty arrays
- service block appears AFTER packages for stable golden-fixture
  diffs

Tests: 327 passing (+3). Clippy clean. fmt clean. audit clean.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@UnbreakableMJ
UnbreakableMJ merged commit 571b5e5 into main Apr 29, 2026
3 checks passed
@UnbreakableMJ
UnbreakableMJ deleted the feat/nickel-emit-services branch April 29, 2026 08:12
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