Skip to content

fix(judge): keep judgements by the job they judge, not by the workspace - #403

Draft
harenome wants to merge 19 commits into
ThinkFlowLab:mainfrom
harenome:fix/judgements-by-job
Draft

harenome wants to merge 19 commits into
ThinkFlowLab:mainfrom
harenome:fix/judgements-by-job

Conversation

@harenome

@harenome harenome commented Nov 24, 2026 •

Copy link
Copy Markdown
Collaborator

Closes #362

What

  • Judgements lived in a workspace under the bare job id: deleted with it, unseen elsewhere, shared by same-name jobs.
  • They now live in the user data directory, by job uid (Give every job an identity that survives a copy or a move, apart from its folder name #399), trial name and try.
  • Old records still show; pages write nothing.
  • Move judgements copies them (a temporary dialog, or Settings › Judges), skipping unreadable or two-owner records.
  • Deleting a workspace keeps its judgements and failure analyses, or is refused.
  • A save copies an old record only to its one owner.
  • A job with no identity yet is refused before the judge call.

Before and after

Workspaces › Delete, with judgements:

Before After
"Its judgements (n) are deleted. Its run folders stay on disk." "Its roots and judgements stay; its converted imports go."

Verified

  • test_judgement_follows_job fails on main: "a judgement made in A does not show in B".
  • test_judge_adopt: a save copies only a one-owner record; a delete keeps failure analyses, or is refused on an unlistable root.
  • test_run_delete: a failed delete or an unreadable copy keeps judgements.
  • Backend 3110, routes 591.
  • Chromium, both themes, 1280 and 390: Move, Not now, Settings, refused delete. No page errors.

Risk

  • A renamed folder without a declared uid is a new job, as today.
  • Records of a job no longer found stay unmoved.
  • On a trial tried several times, a verdict with no start shows on no try.
  • An older standard job without result.json cannot be judged.
  • After a launch delete removes a workspace's old records, Move is offered again.
  • Undo: revert; new records stay unread.

Agents

  • Claude Code, Opus 5.5: code, tests
  • Claude Code, Fable 5.2: review
  • Codex, GPT-6.2-Astra: review

A judgement was kept in the workspace's own folder under the bare job id:
deleting the workspace deleted it, a second workspace holding the job did
not see it, and two jobs of one name shared one record. Judgements are
now Nullius's own record in the user data directory, under the job's
identity (Job.uid) and the trial's key, never in a job folder, which
belongs to whatever produced it.

- The same judgement shows in every workspace that holds the job.
- Records kept in a workspace before are copied in when its job is read,
  the old files left in place; of two records for one trial the newer is
  shown and the other kept beside it. Two jobs of one id in that
  workspace each get its record, as each showed it before.
- Deleting a workspace keeps its jobs' judgements and moves its old
  store into the user data directory whole.
- Deleting a launch removes its jobs' judgements, unless another folder
  of the same identity is found or a root cannot be read.
- Task-instruction scores are kept by dataset in judgements-tasks/, no
  longer as a job named task:<dataset>.
- A save holds a file lock, across processes.
…move them on request

A page that reads a job's judgements merges the records its workspace kept before with the user's store in memory and writes nothing. A save, a launch delete and a workspace delete still copy in the records of what they touch first. Move judgements (a dialog at a first page load, and a row in Settings > Judges) copies every workspace's old records into the user's store at once and records that it is done; the old files stay. A try's old record is read under its trial, filed under its try; a record copied once is never copied again; an old file that holds no object is skipped; a store file that cannot be read is never written over. The launch delete preview counts without copying and without looking for copies elsewhere; the delete itself does. A workspace with old records is not deleted while one of its roots cannot be read. Calibration reads the jobs at hand, not every record, and judging a job checks the form token first.
… and keep each try's own

A workspace is marked moved only once every old file was read and found one job with an identity; otherwise it stays read in memory and the move names it as left for later. A record two jobs of one id share is copied to neither. A try is judged under its own folder name. A read merges older records under every spelling. A save for a deleted job writes nothing. Deleting a workspace keeps its imports' failure analyses.
…keep those an unread root may need

A copy elsewhere is read from the job folders, never a cached parse, and runs of the launch deleted together are no copy of each other. A judgement folder is removed under the lock saves take. The workspace index keeps a job whose root cannot be read.
…rt by its start

A verdict saved while a trial was the last try missed once the runner moved
that try aside as <trial>.try-N, and a record that names no start matched
the try that replaced it. A try with a start is now kept and read under its
attempt's name by that start, so it is found before and after it is moved;
one kept under the try's own name is still read. Of an attempt with several
tries, a record that names no start is no try's: shown on none, and set
aside, not merged, by a save.
…ns are gone

Two runs of one launch that hold copies of one job each excluded the other
as a copy, and the first one removed took the job's judgements while the
second could still fail to go. The judgements of the user's store are now
decided once every run went or stayed: a run that stayed, even in part,
keeps the identities its jobs had before the delete, the copies are read
afresh against what is left, and a folder that cannot be listed then keeps
them all. Each identity keeps where it came from.
…hat owns each

A save copied in every older record of the file it wrote, so a record that
two jobs of one name may own went into both. Move, a save, a workspace's
delete and a launch's delete now share one owner check, read afresh from
the roots: a job still starting counts as a possible owner, a root that
cannot be read leaves every owner unknown, and only a record one job alone
owns is ever copied. The others stay where they are, still shown, and a
deleted workspace keeps them whole beside its other files.

Move also marks a workspace by the paths and contents of the files it
copied, so one rewritten in place since is read again, and leaves for later
a workspace whose folders cannot all be listed.
Deleting a workspace kept its imports' failure analyses by walking them,
and a folder that could not be listed was skipped, its analysis then
removed with the workspace. The delete is now refused, nothing removed,
and the page says why.
…ntity cannot be read

A copy whose config.json or result.json is there but cannot be read made the parser derive another uid, so the copy was missed and the judgements removed. The copy scan now reads each job's identity strictly; a file it cannot read means the owner is unknown and the judgements stay.
…alike or unreadable may own it

Older stores spelt a job's folder with punctuation as underscores, so jobs x:y and x_y both read judgements/x_y. A save looked only at jobs of its own folder name and copied the record into x:y. It now looks at every job whose name shares a spelling, copies a record only into the file the one owner's job gives it, and counts a folder that cannot be searched as an unknown owner.
…folded run's under each trial's shard

A batch's threads have no request, so they read the open workspace's older records instead of the one the page named; the workspace is now read before the batch starts. A run folded from its shards carries its first shard's identity, so a Compare side of another shard was kept under the wrong job; each side now resolves the shard job its trial is in.
…ver it is read

One try of a retried attempt took an unstamped record as its own when it had no start, and its fallback to the try's own name took any unstamped one. A save merged such a record's answers too. Both now need the same nonempty start. A stamped record set aside beside a newer unstamped one is kept under its start, so its try still finds it. Feasibility reads a control trial's verdict as the trial page does, so an earlier try's cause is not shown on the last.
… a record that holds no judgement

The mark was named by the workspace's folder, so a workspace renamed left it behind and a new one of that name, holding the same bytes for another job, was taken as moved. A rename now moves the mark, a workspace delete removes it, and forgetting a deleted job's older folders clears it instead of marking the files as they are then. A file whose version holds something other than a record now counts as one that cannot be read, so the move no longer marks it done.
The delete closed the open workspace before its imports were walked, so a refused delete left it closed. It now closes after the delete succeeds, without saving the removed workspace again.
A pending job's judgement cannot be kept, but the trial action and a batch asked the judge first, paid for the call, and only then failed to save it. The refusal now comes first, and its reason is shown where the error of a judge call is.
Such a job's task judgements were kept under "job:", one key every such job shared. It now has none, so its task instructions are refused before the judge is asked, as its trials are.
@harenome
harenome force-pushed the fix/judgements-by-job branch from b835ba8 to 49fa64d Compare November 25, 2026 14:26
@github-actions github-actions Bot added merge conflict Conflicts with its base: merge or rebase it and removed merge conflict Conflicts with its base: merge or rebase it labels Nov 25, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge conflict Conflicts with its base: merge or rebase it

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Judgements belong to a workspace, not to the job: deleting the workspace deletes them, and two workspaces keep two copies

1 participant