Skip to content

workspace.json has no version, is rewritten at every open, and its saves are not locked #363

Description

@harenome

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 from app/web/shared.py, line 310).
  • job_roots is 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), while forget, rename and touch each 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.json carries a version and 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_roots is 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.json files written before this change keep being read.

Acceptance

  • workspace.json is written with a version and without opened, closed and job_roots.
  • Opening a workspace does not rewrite workspace.json (test).
  • A workspace.json without version, with opened, closed and job_roots, is still read and opens as today (test).
  • adopt_roots(into=), forget, rename and touch save under ondisk.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

  1. added
    enhancement
    P3
    on Nov 23, 2026
  2. added theissue type on Nov 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3enhancement

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions