Skip to content

Backend: the standard's 36 modules share one folder, and files are written, locked and digested in hand-written copies #289

Description

@aitianshi

Priority

extreme, by the form: most of the change moves the standard's modules, which run and prove. It is a reorganisation: no module changes what it does.

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

  • app/nullius/standard/ holds 36 modules side by side, beside cli.py and kits/: the contract, the installs, the protocols, the relay, the backends, the runner, the proofs and the builder's pages share one folder. Nothing keeps a new module out of it: main gained five there in five days.
  • 13 backend modules each write a file under a temporary name and rename it into place, in three different ways. Four of them use one fixed temporary name, on which two writers at once collide. Three modules take the same file lock by hand, and a file's sha256 is read by more than one hand-written loop.
  • app/nullius/traces/trace.py is 1,447 lines doing five jobs: the span tree, the fold of request spans, the time accounting, the waterfall's layout and the reader itself.
  • In app/web/, the loopback-client guard lives in the settings module and five other route modules reach in for it. A plan is checked and started in four places, and two of them (the Agents page's check, the Benchmarks page's proof) do not ask whether a run of that name is still going.

Wanted

  • app/nullius/standard/ sorted into one folder per purpose, with cli.py and kits/ left at the top: contract/, requirements/, protocols/, calls/, backends/, runner/, proofs/, pages/. No module renamed, none changing what it does. A test keeps the sorting.
  • One module, nullius/ondisk.py, that writes a file whole, takes a lock and digests a file. Every site calls it and keeps its bytes and its permissions.
  • The trace reader as five modules, its code moved whole.
  • In app/web/, the guard beside the form-token guard, and one function that checks and starts plans.
  • Import addresses change without aliases (the project is in early development): everything in the repository that names a moved module follows.

Acceptance

  • app/nullius/standard/ holds only __init__.py, cli.py, kits/ and the eight folders, and no module is renamed
  • a test fails when a module is added at the top of the package or when two folders import each other
  • nothing in the repository names a moved module by its old address: imports, docs, skills, AGENTS.md, workflows, pyproject.toml
  • nullius/ondisk.py writes a file whole, locks and digests for the sites it replaces, and each site keeps its bytes, its permissions and its refusal of a missing folder
  • traces/trace.py is split into spans, fold, breakdown, waterfall and trace with no statement edited, and the field contract pins the same fields
  • the builder's Run, the Agents page's check and the Benchmarks page's proof start through one function, which refuses a run still going under the same name
  • both suites pass

Dependencies and related

Activity

  1. self-assigned this
    on Nov 23, 2026
  2. added
    enhancementNew feature or request
    P0Fix now: unsafe, loses money or data, or nothing runs
    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

Labels

P0Fix now: unsafe, loses money or data, or nothing runsenhancementNew feature or request

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions