Repository navigation
Open
Open
Copy link
Labels
Description
Priority
high by depth: the workspace record (app/nullius/workspace.py). P3 is set: a lost root shows as a missing run in the workspace and can be added again; nothing on disk outside the workspace is lost.
Components
- app/nullius (backend)
- app/web (routes)
- templates and static files
- docs and the site
- catalogue (benchmarks, agents, capabilities)
- the standard (ports, kits, relay, runs)
- CI, workflows and skills
Today
<workspaces>/<name>/workspace.json (workspace.save, app/nullius/workspace.py, lines 120-123, on main 3347bf3) holds name, label, roots, created, opened, closed and job_roots. Measured on main:
workspace.json keys: ['closed', 'created', 'job_roots', 'label', 'name', 'opened', 'roots']
- No version.
- The definition (name, label, roots) and the open/closed state share the file: opening a workspace rewrites it (
touch, lines 212-215, called at every open fromapp/web/shared.py, line 310). job_rootsis stored although it follows from the roots and the imports.- Saves are load-modify-save with no lock: filing a run into a closed workspace loads it, adds the root and saves (
app/web/shared.py, lines 329-336), whileforget,renameandtoucheach save the copy they hold. Two of these at once keep only the last, so a root added or removed by the other is lost.
Wanted
workspace.jsoncarries aversionand only what defines the workspace.- The open/closed state and the time it was last opened live in a small file of their own, so opening a workspace does not rewrite its definition.
job_rootsis not stored; it is computed from the roots and imports when the workspace is read.- Every save takes a file lock and re-reads the record before changing it.
workspace.jsonfiles written before this change keep being read.
Acceptance
-
workspace.jsonis written with aversionand withoutopened,closedandjob_roots. - Opening a workspace does not rewrite
workspace.json(test). - A
workspace.jsonwithoutversion, withopened,closedandjob_roots, is still read and opens as today (test). -
adopt_roots(into=),forget,renameandtouchsave underondisk.locked, re-reading first. - A test with a root added and another removed at once keeps both changes.
Dependencies and related
#362 (judgements, which today live in the workspace's folder), #361 (the job index beside it). #186 and #262 (workspace page and renames).
Activity