Add typed diagnostic zara-sysadmin service #502

Open
nsaspy wants to merge 6 commits from rage/6-sysadmin into main
Owner

Implements #6.

TDD begins at d744141d6f82259344ba4395247a3e8a858db184 with a fake-backend contract for service/journal/process/resource/network/Nix diagnosis, typed mutation allowlists, expert-system rule chains, and mandatory post-change verification. The branch was then reconciled onto canonical main after #61 so the compatibility gate validates the full browser + files catalog too.

The plugin exposes structured Linux/NixOS observations and only typed mutations: service start|stop|restart and Nix check|build|switch. There is no shell/eval/sudo/privilege-escalation surface. Backend acceptance is not treated as success: service actions preserve before/action/after evidence and require both accepted=true and observed post-state; Nix switches require an observed generation change. A regression test explicitly prevents a denied mutation from becoming verified=true merely because the post-state coincidentally matches.

rules/sysadmin.pl records portable symptom → hypothesis → next diagnostic → verification chains for failed services, running-without-listener, DNS-upstream failure, and Nix activation failure. The Python domain mirrors them for deterministic tests without requiring SWI-Prolog or host system state.

No production backend is fabricated: without a configured bounded backend the plugin reports system-backend-not-configured. Tests require no root, systemd daemon, network, credentials, or Nix mutation. Zara Core remains authoritative for standard tool authorization/approval.

Candidate head: a70837bd3282f7fb38f8b0f4361c0d67e3853a2e. Merge only after exact-head registry/unit/pinned-Zara compatibility/Nix/package/runtime-layout gates and review/thread state are green.

Implements #6. TDD begins at `d744141d6f82259344ba4395247a3e8a858db184` with a fake-backend contract for service/journal/process/resource/network/Nix diagnosis, typed mutation allowlists, expert-system rule chains, and mandatory post-change verification. The branch was then reconciled onto canonical main after #61 so the compatibility gate validates the full browser + files catalog too. The plugin exposes structured Linux/NixOS observations and only typed mutations: service `start|stop|restart` and Nix `check|build|switch`. There is no shell/eval/sudo/privilege-escalation surface. Backend acceptance is not treated as success: service actions preserve before/action/after evidence and require both `accepted=true` and observed post-state; Nix switches require an observed generation change. A regression test explicitly prevents a denied mutation from becoming `verified=true` merely because the post-state coincidentally matches. `rules/sysadmin.pl` records portable symptom → hypothesis → next diagnostic → verification chains for failed services, running-without-listener, DNS-upstream failure, and Nix activation failure. The Python domain mirrors them for deterministic tests without requiring SWI-Prolog or host system state. No production backend is fabricated: without a configured bounded backend the plugin reports `system-backend-not-configured`. Tests require no root, systemd daemon, network, credentials, or Nix mutation. Zara Core remains authoritative for standard tool authorization/approval. Candidate head: `a70837bd3282f7fb38f8b0f4361c0d67e3853a2e`. Merge only after exact-head registry/unit/pinned-Zara compatibility/Nix/package/runtime-layout gates and review/thread state are green.
Some checks failed
CI / test (pull_request) Failing after 18s
This pull request has changes conflicting with the target branch.
  • plugins.json
  • plugins/zara-sysadmin/lib/zara_sysadmin/domain.py
  • plugins/zara-sysadmin/lib/zara_sysadmin/plugin.py
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin rage/6-sysadmin:rage/6-sysadmin
git switch rage/6-sysadmin

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch main
git merge --no-ff rage/6-sysadmin
git switch rage/6-sysadmin
git rebase main
git switch main
git merge --ff-only rage/6-sysadmin
git switch rage/6-sysadmin
git rebase main
git switch main
git merge --no-ff rage/6-sysadmin
git switch main
git merge --squash rage/6-sysadmin
git switch main
git merge --ff-only rage/6-sysadmin
git switch main
git merge rage/6-sysadmin
git push origin main
Sign in to join this conversation.
No description provided.