Skip to content

fix(judge): keep a job's judgements in the workspace that holds it - #273

Merged
harenome merged 1 commit into
ThinkFlowLab:mainfrom
harenome:fix/judge-job-workspace
Nov 20, 2026
Merged

harenome merged 1 commit into
ThinkFlowLab:mainfrom
harenome:fix/judge-job-workspace

Conversation

@harenome

Copy link
Copy Markdown
Collaborator

Closes #252

What

The job and trial pages can show a job of another workspace (?workspace=), and Compare takes columns from several workspaces. All judgement reads and writes used the open workspace's store. The page did not show the judgement kept with the job, and a Judge click wrote one into the open workspace, where it is lost when that workspace is deleted.

  • web.judge.ws_dir(name=None) takes the directory from the workspace that holds the job on screen. It uses shared._record_workspace, the same lookup that the pages use to find the job: the request's ?workspace=, else the open workspace. reconcile uses the same function and no longer has a copy of it.
  • Compare's sides read and write in the workspace of their own column. side_of, judge_side and _sides_todo carry the column's store, and the v1 pair records are read from column A's workspace.
  • The Judge, Judge all, task and feasibility forms, and the reconcile and feasibility links, keep ?workspace=, so the POST finds the same job.
  • Judgements stay inside the workspaces.

Touches

routes (web/judge.py, web/reconcile.py, web/shared.py) · tests

Verified

  • New app/ui_tests/test_judge_other_workspace.py: with workspace A open, B's trial page shows B's judgement; judging that trial writes into B, not A; the Judge forms carry ?workspace=B; each Compare column reads its own workspace; a job of the open workspace keeps its store. On the base, the first four fail (B's judgement of B's trial is not shown, a judgement of B's trial was written into A), and the last passes.
  • test_every_route's stub of _sides_todo carries the column's store.
  • In a rootless podman python:3.12 container with Node: python3 app/tests/parallel.py: 3118 tests in 162 modules, OK. pip install -r app/requirements.txt, then python3 app/tests/parallel.py app/ui_tests: 714 tests in 61 modules, OK.

Risk

  • Judgements of jobs from another workspace, written before this change, are in the store of the workspace that was open at the time. Those pages no longer show them. They stay on disk, and nothing moves them.
  • A job of the open workspace reads and writes as before.

A job opened from another workspace (`?workspace=`) and a Compare
column of another workspace read and wrote their judgements in the open
workspace's store: the page did not show the judgement kept with the
job, and a Judge click wrote one where deleting the open workspace would
lose it.

The judge's store directory now comes from the workspace that holds the
job on screen: the request's `?workspace=` (the same lookup the pages
use for the job), else the open workspace. Compare's sides use each
column's own workspace. The Judge, Judge all, task and feasibility
forms, and the reconcile and feasibility links, keep `?workspace=` so
the post finds the same job. Judgements stay inside workspaces.
@harenome
harenome merged commit 3bf7446 into ThinkFlowLab:main Nov 20, 2026
2 checks passed
@harenome
harenome deleted the fix/judge-job-workspace branch November 20, 2026 15:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Judge: a job opened from another workspace reads and writes the open workspace's judgements

1 participant