The OS improving itself (evolve)
NanumOS can change its own programs for better versions. A model (or a person) edits the source; NanumOS builds it inside itself, tests it in a separate small NanumOS (a child VM), and swaps it in if it passes. If not, the change is dropped, and a swap can be undone with one line. Today one program changes this way: the calculator (calc).
One turn
- Change — edit files there with
vmx exec ub1 'command'. Raise the version line (such asZEUSAPP calc 1.0.1) on every change. - Build —
evolve build calcbuilds inside the workbench VM and brings the file and its sha256 back to NanumOS. - Test —
evolve try calc FILE SHA256(orevolve build calc --tryin one go) starts a child NanumOS with no disk and no network and runs the 17 calculator tests on the current and the new version alike. - Swap or drop — if every test passes and it is not slower or bigger, the new version is used at once (no restart). Otherwise you get the reason and nothing changes.
- Roll back —
evolve rollback calcgoes back to the version before; doing it again goes forward.
Commands
| Command | What it does |
|---|---|
evolve | Current and previous version of each app. |
evolve build calc [VM] [--try] | Build in the workbench VM and bring it back; --try goes on to the test. |
evolve try calc FILE SHA256 | Test in a child VM; swap if it passes. |
evolve rollback calc | Back to the version before. |
vmx exec VM [-t SECONDS] 'command' | Run one command in a VM; shows its output and exit status. |
vmx pull VM GUESTFILE FILE | Copy a file out of a VM into NanumOS (sha256 checked). |
The record
Every attempt writes a start line first and an end line last to /var/log/evolve.log. The end line has the result, the reason, the times, the source version (src=) and a place for the cost (`tokens=? The "진화" (evolve) row of the system check (os_check) shows the last attempt and the version in use; a start with no end is a warning (it was cut off).
Safety
- The child VM has no disk and no network. The tests are the OS's own table, never the new version's.
- Nothing of this computer — files, keys, disks — is attached to the workbench VM. Only command lines and result lines go between them.
- Anything that stalls is cut at its time limit, the reason is logged and the child VM is removed. The same source gives the same result again.
- Who may change an app: root, or a user named for it in
/etc/evolve/allow.
NanumOS 0.1.8349 · 2026-11-16