feat: an All jobs page in the app, and Run on this PC for any queued job #29

Merged
HumanBean merged 2 commits from HumanBean/Beanstalk:feat/all-jobs into main 2026-11-15 23:58:14 +00:00
Owner

Why: testers could only see the jobs that came to their own PC, with no way to run one that wasn't meant for it. Now the app shows everything on the farm, and a tester can run any queued job on their PC.

What the tester sees

  • On the main screen, All jobs on the farm next to RECENT TESTS opens a page with Queued (the default), Running and Done chips, Only this PC, Refresh and Back.
  • Queued: the PR and title (linked), estimate, age, target, then "For this PC" or the farm's reason it isn't. Each has Run on this PC.
    • On a PC outside the target, a confirm says it will run outside its target, post to the PR marked "off target", and not count toward that target; the queued job stays for a matching PC.
    • The job then runs on the main screen like any other. It runs even while automatic testing is paused, and testing stays paused afterwards.
  • Running: who has it (a hidden tester stays hidden), the stage and %. Done: the result and See results.

How it works

  • GET /api/v1/jobs?state=queued|running|done (agent token) lists jobs with fits, why, can_run/run_blocked for this agent.
  • POST /jobs/{id}/accept with {"manual": true} is a manual take.
    • On a PC that matches the target, it takes the queued job itself and counts normally.
    • On one that doesn't, it creates a separate off-target job row (negative slot), already leased to this agent. The reply carries the new job_id, and the ticket signs off_target and for_job_id.
    • Still enforced: approval, a working sandbox, the plan schema, the Windows gameplay gate, one job at a time, and not a job this PC failed, skipped or already ran.
    • Skipped: the target's tags and limits, and the tester's allowed_authors.
  • Off-target runs:
    • A failure, a Stop or a lost lease cancels them rather than putting them back in the queue.
    • Their reports (reports.off_target) are left out of the target's pass/fail/min_reports, its commit status, the state label, the dashboard counts and the outlier check.
    • The PR comment lists them in their own table, "Run by hand on PCs that don't match their target (not counted toward it)", and the dashboard shows an "off target" chip.
  • Agent: an off-target ticket is accepted only for the job this PC asked for by hand (for_job_id, and the job id from the accept reply). Every other ticket check is kept.
  • Migration 0010: jobs.off_target and reports.off_target, default false.
  • Docs: docs/protocol.md, docs/using.md, docs/architecture.md, agent/README.md.

Screenshots (this PR's app against the coordinator's dev server and its made-up data, a Linux build, 1180 × 860):

After: this PR, the main screen, with "All jobs on the farm" beside RECENT TESTS
main screen with the All jobs link

After: this PR, Queued: one job for this PC, two for other hardware
All jobs, Queued

After: this PR, Run on this PC on a job for other hardware asks first
Run outside its target?

After: this PR, Done: the result, the tester and See results
All jobs, Done

Testing

  • The coordinator tests pass (407 passed, 1 skipped). The new test_all_jobs.py covers the listing, the manual take, every refusal, the separate job, the report left out of counts, status and label, cancelling rather than requeuing, the migration, and HTTP.
  • The agent checks pass (1666), with 58 new ones: the ticket rule, the client calls, the page's words and filter, and the runner taking a manual job with testing off.
  • The win-x64 build compiles.
  • Migration 0010 applies cleanly to a copy of the production database (schema 9 → 10; the 26 existing jobs are untouched).
  • The page was opened in a headless compositor (the screenshots). While taking them I found and fixed a bug: a filter picked while the first load was still on its way left the page empty, with no message. The load now retries for the newest filter.
  • Not tested: no full off-target job has run on a real agent (build, game, report).

Also in this PR: CONTRIBUTING.md and AGENTS.md now ask for screenshots in any pull request that changes what shows on screen (the second commit).

Known gap: while an off-target run is still going, @Beanstalk on that PR says the round is still running. That is on purpose for now: a new start doesn't cancel someone's manual run.

**Why:** testers could only see the jobs that came to their own PC, with no way to run one that wasn't meant for it. Now the app shows everything on the farm, and a tester can run any queued job on their PC. **What the tester sees** - On the main screen, **All jobs on the farm** next to RECENT TESTS opens a page with **Queued** (the default), **Running** and **Done** chips, **Only this PC**, Refresh and Back. - **Queued:** the PR and title (linked), estimate, age, target, then "For this PC" or the farm's reason it isn't. Each has **Run on this PC**. - On a PC outside the target, a confirm says it will run outside its target, post to the PR marked "off target", and not count toward that target; the queued job stays for a matching PC. - The job then runs on the main screen like any other. It runs even while automatic testing is paused, and testing stays paused afterwards. - **Running:** who has it (a hidden tester stays hidden), the stage and %. **Done:** the result and **See results**. **How it works** - `GET /api/v1/jobs?state=queued|running|done` (agent token) lists jobs with `fits`, `why`, `can_run`/`run_blocked` for this agent. - `POST /jobs/{id}/accept` with `{"manual": true}` is a manual take. - On a PC that matches the target, it takes the queued job itself and counts normally. - On one that doesn't, it creates a separate off-target job row (negative slot), already leased to this agent. The reply carries the new `job_id`, and the ticket signs `off_target` and `for_job_id`. - Still enforced: approval, a working sandbox, the plan schema, the Windows gameplay gate, one job at a time, and not a job this PC failed, skipped or already ran. - Skipped: the target's tags and limits, and the tester's `allowed_authors`. - **Off-target runs:** - A failure, a Stop or a lost lease cancels them rather than putting them back in the queue. - Their reports (`reports.off_target`) are left out of the target's pass/fail/min_reports, its commit status, the state label, the dashboard counts and the outlier check. - The PR comment lists them in their own table, "Run by hand on PCs that don't match their target (not counted toward it)", and the dashboard shows an "off target" chip. - **Agent:** an off-target ticket is accepted only for the job this PC asked for by hand (`for_job_id`, and the job id from the accept reply). Every other ticket check is kept. - **Migration 0010:** `jobs.off_target` and `reports.off_target`, default false. - **Docs:** `docs/protocol.md`, `docs/using.md`, `docs/architecture.md`, `agent/README.md`. **Screenshots** (this PR's app against the coordinator's dev server and its made-up data, a Linux build, 1180 × 860): After: this PR, the main screen, with "All jobs on the farm" beside RECENT TESTS ![main screen with the All jobs link](https://git.magicbean.dev/attachments/d8cf83b1-92fc-488c-aa7b-240df8f34a4d) After: this PR, Queued: one job for this PC, two for other hardware ![All jobs, Queued](https://git.magicbean.dev/attachments/262945f4-0666-424b-903f-68ae4774024d) After: this PR, Run on this PC on a job for other hardware asks first ![Run outside its target?](https://git.magicbean.dev/attachments/1793130b-ef12-4f4b-897e-d28544b1cd87) After: this PR, Done: the result, the tester and See results ![All jobs, Done](https://git.magicbean.dev/attachments/b463b63e-d6e2-419e-9ab9-ffd3bef716c9) **Testing** - The coordinator tests pass (407 passed, 1 skipped). The new `test_all_jobs.py` covers the listing, the manual take, every refusal, the separate job, the report left out of counts, status and label, cancelling rather than requeuing, the migration, and HTTP. - The agent checks pass (1666), with 58 new ones: the ticket rule, the client calls, the page's words and filter, and the runner taking a manual job with testing off. - The `win-x64` build compiles. - Migration 0010 applies cleanly to a copy of the production database (schema 9 → 10; the 26 existing jobs are untouched). - The page was opened in a headless compositor (the screenshots). While taking them I found and fixed a bug: a filter picked while the first load was still on its way left the page empty, with no message. The load now retries for the newest filter. - **Not tested:** no full off-target job has run on a real agent (build, game, report). **Also in this PR:** CONTRIBUTING.md and AGENTS.md now ask for screenshots in any pull request that changes what shows on screen (the second commit). **Known gap:** while an off-target run is still going, `@Beanstalk` on that PR says the round is still running. That is on purpose for now: a new start doesn't cancel someone's manual run.
feat: an All jobs page in the app, and Run on this PC for any queued job
Some checks failed
CI / Conventional Commit title (pull_request) Successful in 3s
CI / Workflow lint (actionlint) (pull_request) Successful in 3s
CI / Coordinator tests (pull_request) Has been cancelled
CI / Agent build and checks (pull_request) Has been cancelled
CI / Coordinator image (pull_request) Has been cancelled
5e07938352
The app's main screen links an All jobs page: every job on the farm,
Queued / Running / Done, with Only this PC. A queued job says whether it
is for this PC or why not, and has Run on this PC.

Run on this PC takes the job as a real one. On a PC that matches the
target it takes the queued job itself. On one that doesn't, after a
confirm, the farm makes a separate off-target job for it (the queued
job stays for a matching PC); its report posts to the PR marked off
target and counts toward nothing: not the target's results, its status,
the state label or the outlier check. Approval, the sandbox, the plan
schema, the Windows gameplay gate, one job at a time and the tester's
own failed/skipped/ran jobs still apply; the target's tags and the
tester's allowed_authors don't. A manual run works while automatic
testing is paused.

- Coordinator: GET /api/v1/jobs?state=, accept with {"manual": true},
  signed off_target and for_job_id in the ticket, migration 0010
  (jobs.off_target, reports.off_target), off-target runs cancelled
  rather than requeued, an off-target table in the PR comment and chips
  on the dashboard.
- Agent: the ticket check accepts an off-target ticket only for the job
  this PC asked for by hand; the client calls; JobRunner.RunNowAsync;
  the page, its confirm and the history's (off target).

Assisted-by: Claude Opus 5.5
Co-Authored-By: Claude Opus 5.5 <[email protected]>
HumanBean force-pushed feat/all-jobs from 5e07938352
Some checks failed
CI / Conventional Commit title (pull_request) Successful in 3s
CI / Workflow lint (actionlint) (pull_request) Successful in 3s
CI / Coordinator tests (pull_request) Has been cancelled
CI / Agent build and checks (pull_request) Has been cancelled
CI / Coordinator image (pull_request) Has been cancelled
to dbc53ccdac
Some checks failed
CI / Conventional Commit title (pull_request) Successful in 3s
CI / Workflow lint (actionlint) (pull_request) Successful in 3s
CI / Coordinator tests (pull_request) Has been cancelled
CI / Agent build and checks (pull_request) Has been cancelled
CI / Coordinator image (pull_request) Has been cancelled
2026-11-15 23:53:10 +00:00
Compare
Author
Owner

Rebased onto main bd292bbd (#31 merged). The conflict was in Envelope.cs, where #31 and this PR both changed the ticket target check: an off-target ticket skips it, and otherwise tester- tags are left to the coordinator, as #31 does. Added screenshots of the page (main-screen link, Queued, the off-target confirm, Done). Taking them showed a bug, now fixed: a filter picked while the first load was still on its way left the page empty. Also added the screenshots rule to CONTRIBUTING.md and AGENTS.md. Coordinator tests 407 passed, agent checks 1670 passed.

Rebased onto main bd292bbd (#31 merged). The conflict was in Envelope.cs, where #31 and this PR both changed the ticket target check: an off-target ticket skips it, and otherwise tester- tags are left to the coordinator, as #31 does. Added screenshots of the page (main-screen link, Queued, the off-target confirm, Done). Taking them showed a bug, now fixed: a filter picked while the first load was still on its way left the page empty. Also added the screenshots rule to CONTRIBUTING.md and AGENTS.md. Coordinator tests 407 passed, agent checks 1670 passed.
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
MagicBeanDev/Beanstalk!29
No description provided.