Add a bring-up script and a transcript dump; let nisse-dev install on its own VM (M0.2) #86

Merged
dev-agent merged 1 commits from bringup-script into main 2026-10-01 16:18:15 +00:00
Collaborator

Development Plan M0.2, pre-approved.

scripts/bringup.sh (run as root):

  • start [REF] sets the previous run aside (state, workspace, collected output → /root/nisse-e2e/runs/<time>/), exports the ref under test (default HEAD) to /root/nisse-e2e/code with its own venv, and starts the agent as the transient systemd unit nisse-bringup. The agent outlives the shell that started it, which fixes run 2's agent being killed with my background job.
  • stop: SIGTERM, so the agent shuts down cleanly.
  • status, logs, and collect: collect saves the journal log and a readable transcript into the run's directory.

nisse_dev.dump (python -m nisse_dev.dump STATE_DB [--full]): a readable dump of a state store (state, pending intents, the canonical log). It opens the store read-only, so it's safe against a live agent. This replaces the ad-hoc dumps from run 2. Four unit tests, including one that the store is never written.

Root, and installs: the agent runs as root on this development VM, as it will on its own VM in production. An unprivileged-user version was built and removed again after the operator pointed out this is a dev VM. docs/Architecture.md is corrected to the operator's intent:

  • D3: the agent installs missing packages and toolchains on its own VM (class 2), records each install so the environment can be rebuilt, and recurring needs go into the VM image.
  • D6: installing on its own VM moves to class 2; installing on a host it doesn't own stays class 3 (P3's example says so).
  • D7: egress names OS package mirrors as well as language registries.
  • Q: the toolchain-provisioning question is dropped.

The plan's M0.2, M4.1, M4.2 and bring-up guards are updated to match.

Acceptance: a smoke run started, answered status in the test room, stopped cleanly, and collect produced the log and the transcript. Lint and 503 unit tests pass.

Also on this box, outside the repo:

  • uv installed from the astral-uv snap and held, so it won't auto-update;
  • a stale root-owned /home/nisse-dev from 2026-09-08 (an early slugify test) moved to /root/nisse-e2e/home-nisse-dev-20260908.

🤖 Generated with Claude Code

https://claude.ai/code/session_01PPQ14L3LikyefCMFBqEbKE

Development Plan **M0.2**, pre-approved. **`scripts/bringup.sh`** (run as root): - **`start [REF]`** sets the previous run aside (state, workspace, collected output → `/root/nisse-e2e/runs/<time>/`), exports the ref under test (default `HEAD`) to `/root/nisse-e2e/code` with its own venv, and starts the agent as the **transient systemd unit `nisse-bringup`**. The agent outlives the shell that started it, which fixes run 2's agent being killed with my background job. - **`stop`:** SIGTERM, so the agent shuts down cleanly. - **`status`, `logs`, and `collect`:** `collect` saves the journal log and a readable transcript into the run's directory. **`nisse_dev.dump`** (`python -m nisse_dev.dump STATE_DB [--full]`): a readable dump of a state store (state, pending intents, the canonical log). It opens the store **read-only**, so it's safe against a live agent. This replaces the ad-hoc dumps from run 2. Four unit tests, including one that the store is never written. **Root, and installs:** the agent runs as root on this development VM, as it will on its own VM in production. An unprivileged-user version was built and removed again after the operator pointed out this is a dev VM. **`docs/Architecture.md` is corrected to the operator's intent:** - **D3:** the agent installs missing packages and toolchains on its own VM (**class 2**), records each install so the environment can be rebuilt, and recurring needs go into the VM image. - **D6:** installing on its own VM moves to class 2; installing on a host it doesn't own stays class 3 (P3's example says so). - **D7:** egress names OS package mirrors as well as language registries. - **Q:** the toolchain-provisioning question is dropped. The plan's **M0.2**, **M4.1**, **M4.2** and **bring-up guards** are updated to match. **Acceptance:** a smoke run started, answered `status` in the test room, stopped cleanly, and `collect` produced the log and the transcript. Lint and 503 unit tests pass. **Also on this box, outside the repo:** - uv installed from the `astral-uv` snap and held, so it won't auto-update; - a stale root-owned `/home/nisse-dev` from 2026-09-08 (an early slugify test) moved to `/root/nisse-e2e/home-nisse-dev-20260908`. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01PPQ14L3LikyefCMFBqEbKE
dev-agent added 1 commit 2026-10-01 16:16:33 +00:00
Add a bring-up script and a transcript dump; let nisse-dev install on its own VM (M0.2)
CI / checks (push) Skipped
CI / checks (pull_request) Successful in 1m16s
a18321b4b0
Development Plan M0.2.

- scripts/bringup.sh: start [REF] sets the previous run aside under
  /root/nisse-e2e/runs/, exports the ref under test and starts the agent
  as the transient systemd unit nisse-bringup, so it outlives the shell
  that started it; stop (SIGTERM, clean shutdown), status, logs, and
  collect (the journal log and a readable transcript).
- nisse_dev.dump (python -m nisse_dev.dump STATE_DB [--full]): a readable
  dump of a state store's state, pending intents and canonical log. Opens
  the store read-only, so it is safe against a live agent.
- The agent runs as root on this development VM, as it will on its own
  VM. Architecture D3/D6/D7 corrected to match the operator's intent:
  installing packages and toolchains on its own VM is class 2, recorded
  so the environment can be rebuilt (it was class 3 with provisioning an
  open question); egress names OS package mirrors. The plan's M0.2, M4.1,
  M4.2 and bring-up guards follow.

Acceptance: a smoke run started, answered status in the test room,
stopped cleanly, and collect produced the log and transcript.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PPQ14L3LikyefCMFBqEbKE
dongar approved these changes 2026-10-01 16:17:09 +00:00
dev-agent merged commit e6aaa4783d into main 2026-10-01 16:18:15 +00:00
dev-agent deleted branch bringup-script 2026-10-01 16:18:15 +00:00
Sign in to join this conversation.
No Reviewers
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: dev/nisse#86