fix: scheduled runs take at most 8 testers, a long log no longer loses its report, and a hidden window is Windows only #128
No reviewers
Labels
No labels
kind
bug
kind
chore
kind
docs
kind
feature
kind
performance
kind
question
priority
critical
priority
high
priority
low
risk
high
risk
low
risk
medium
status
blocked
status
confirmed
status
duplicate
status
invalid
status
needs-info
status
wontfix
ci: approved
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Beanstalk!128
Loading…
Reference in a new issue
No description provided.
Delete branch "HumanBean/Beanstalk:fix/schedule-cap"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Three farm problems found in the status checks, fixed:
target must have 1 to 8 entries, every ~40 s), and no nightly was tested. It now picks 8 of them, a different 8 for each nightly (regression.some_testers, by the candidate's commit).log_tailat 64 KB, then hid names in it. A short name becoming<user>made it longer again, and the farm refused the whole report (#1813, nightly-217).linux+windowtargets. #1282's plan hadlinux+windowtargets, which can never match, since only Windows testers have thewindowtag. Both plan readers now refuse a window scenario whose target haslinux, and the planner is told.Also seen: the first hidden-window run (#1282, an NVIDIA RTX 4050 Laptop GPU) measured normally. 3 of 4 game starts ran and presented to the window, which never showed on screen.
Tests on throwaway containers: the coordinator, 614 passed and 1 skipped; the agent, 2303 checks passed. Nothing on screen changes.
🤖 Generated with Claude Code
- regression.some_testers: a scheduled run had one target per connected tester, and a plan takes at most 8. With 9 online every look failed from 01:19 UTC, every 40 s, and no nightly was tested. Now 8 of them, a different 8 for each nightly (by the candidate's commit). - The agent caps log_tail again after its scrub: a short name it hides becomes a longer one (<user>), and the farm refused the whole report ("report.log_tail must be a string of at most 64 KB", #1813). The farm now keeps the last 64 KB instead of refusing, for the apps out there, and reads a lone surrogate as ?. - A window scenario's target never has the linux tag: only Windows testers have the window tag, and #1282's linux+window jobs would wait for ever. Both plan readers refuse it (fixture bad-window-linux.toml) and the planner is told. Assisted-by: Claude Code Co-Authored-By: Claude Opus 5.5 <[email protected]>WIP: fix: scheduled runs take at most 8 testers, a long log no longer loses its report, and a hidden window is Windows onlyto fix: scheduled runs take at most 8 testers, a long log no longer loses its report, and a hidden window is Windows onlyRecommendation: Request changes. The eight-target cap restores scheduling, but the report fallback can still lose a report at database insertion, and the agent can reject runnable Windows jobs from already-queued plans. The three independent fixes also need separate pull requests under Beanstalk’s contribution rules.
Scheduled comparisons can queue when more than eight tester accounts are eligible. The patch also caps scrubbed logs and rejects impossible Linux targets in hidden-window plans. With nine eligible accounts, each comparison omits one account and its PCs, so a regression specific to that hardware can go untested.
@fixwill do (9)coordinator/beanstalk/reports.py:163: The fallback caps the displayed report, but a legacy submission still stores the original base64 payload in reports.envelope at line 414. (more on the line)coordinator/beanstalk/reports.py:156: UTF-8 encoding leaves NUL intact, and PostgreSQL rejects it in jsonb. (more on the line)agent/Core/Plan.cs:1318: The agent now rejects a whole existing schema-10 ticket if any sibling target contains linux. (more on the line)coordinator/beanstalk/planner.py:172: The prompt cannot resolve an impossible target pinned by a maintainer. (more on the line)agent/Core/Report.cs:341: The existing agent test fills the retained suffix with plain x characters, so it passes if the new post-scrub cap is removed. (more on the line)coordinator/tests/test_reports.py:171: The multibyte character is outside the retained suffix, so the test never exercises a cut inside a UTF-8 character. (more on the line)coordinator/beanstalk/regression.py:90: Hashing by commit can select the same eight on consecutive nightlies. (more on the line)docs/test-plan.md:531: The schema guide tells authors to add window but omits the new explicit rejection of linux. Document both tag rules here so an author updating a Linux plan can see why adding window alone still fails.Checks: Still running:
CI / Coordinator tests (pull_request),CI / Agent build and checks (pull_request),CI / Coordinator image (pull_request),CI / Conventional Commit title (pull_request),CI / Workflow lint (actionlint) (pull_request).More: does it help, other systems, switches, what was read
Does it help: Yes for the tested coordinator cases. The new integration test registers 10 testers and checks that a run queues with 8 targets. The author reports 614 coordinator tests passed, 1 skipped, and 2,303 agent checks passed. The reported 3 of 4 hidden-window starts on one Windows NVIDIA laptop show that the existing window path can present, but provide no head-versus-base evidence for this fix. Production recovery after the reported roughly 40-second refusal cycle remains unverified.
Other systems: Tester selection happens after the existing eligibility and privacy filters, with no GPU, driver or OS weighting. The cap can omit the only PC with a particular GPU, driver or Steam Deck configuration. Log handling is shared by Windows and Linux agents and affects report ingestion, PostgreSQL storage and the report page. Hidden-window validation affects local plans, planner output, manual runs and signed tickets. The diff does not touch game rendering, saves, audio, input, or the build and sandbox implementations.
Switches: None. The negative fixture reuses RX_VK_ACQUIRE_AHEAD values 0 and 1 from the existing positive fixture. No Longshot switch default or table changes.
Reviewed:
5d3e7b398eagainst14cc1aa3d7: Read AGENTS.md, CONTRIBUTING.md, the sole commit, all ten file diffs and the complete new fixture. Read the changed code and tests in context, including target normalization, scheduler offers and ticket reads, planner retry and fallback, report creation and database insertion, and the fixture harness. Skimmed the relevant protocol, report schema, plan, deployment and usage docs and CI workflow. Unrelated portions of the larger changed files were outside the source trace. No local review checklist, PR template, recorded run artifact, translation change or generated file change was present. The supplied comments and reviews were empty.; nothing run (a code review).Checked and fine:
Testing: Read-only review. No builds or tests were run. The five listed CI checks were pending. Existing CI runs the agent checks on Ubuntu and cross-publishes the Windows build. The supplied counts do not establish a Windows test execution on this head.
Overlaps and merge order: None identified in the checkout or supplied review context.
Automated code review by BeanBot (gpt-6.2-sol), on the pull request's opening. Nothing was run; a maintainer decides.
@ -1315,0 +1315,4 @@// (only Windows testers have the tag for now: linux+window would wait for ever, Nov 2026)foreach (var t in targets)if (t["tags"]!.AsArray().Any(x => (string?)x == "linux"))throw new PlanException($"target {(string?)t["name"]}: only Windows testers can run a hidden window for now; leave linux out (tags = [\"windows\", \"window\", ...])");L3: The agent now rejects a whole existing schema-10 ticket if any sibling target contains linux. A stored plan with windows+window and linux+window still gets offered to a Windows tester because the coordinator sends all stored targets in the ticket. The upgraded agent refuses it before checking the job's own target. Preserve reads of existing tickets for compatible job targets, or migrate queued plans and their impossible jobs before deploying the stricter reader. Cover a mixed-target ticket in the agent checks.
@ -338,1 +338,4 @@scrubbed["target"] = x.Target;// (capped again after the scrub: a short name it hides becomes a longer one (<user>), and a tail over MaxLogTail had the// farm refuse the whole report)scrubbed["log_tail"] = Tail((string?)scrubbed["log_tail"] ?? "", MaxLogTail);L6: The existing agent test fills the retained suffix with plain x characters, so it passes if the new post-scrub cap is removed. Add a Report.Build case using a synthetic short name repeatedly at word boundaries. Check that redaction expands the input past 64 KiB and that the outgoing tail is scrubbed, within the UTF-8 byte cap, and retains its end.
@ -170,3 +170,3 @@their screen), so the present path runs: the swapchain, acquiring its next image, pacing at present, and the loglines they print. Use it ONLY for a change that acts when the game presents to a window. Only testers with thewindow tag can (Windows for now): every target of a plan with a window scenario lists "window" in its tags, and awindow tag can (Windows only for now: never with the linux tag): every target of a plan with a window scenario lists "window" in its tags, and aL4: The prompt cannot resolve an impossible target pinned by a maintainer. For a manual window run with both linux+window and windows+window pinned, fixed_targets restores the Linux target even if the model omits it. After two refusals, the default headless plan can queue on Windows and produce a result without exercising presentation. Reject impossible pinned combinations at submission, or hold the run with the target error before the headless fallback. Test that the mixed request queues no fallback jobs.
@ -86,1 +87,4 @@def some_testers(targets: list[tuple[str, int]], seed: str) -> list[tuple[str, int]]:"""At most plans.MAX_TARGETS of the testers' targets, in tag order: a plan takes no more (Nov 2026: 9 testers online,and every look failed for 5 h). Which ones turns with the candidate's commit, so each nightly asks other testers"""L8 (minor): Hashing by commit can select the same eight on consecutive nightlies. With nine stable eligible accounts, the same account can miss both comparisons, despite the PR and helper promising a different group each time. Describe the selection as a deterministic sample that can repeat, and update docs/using.md and docs/deploy.md, which still promise every connected PC.
@ -154,1 +153,4 @@if not isinstance(log_tail, str):raise ReportError("report.log_tail must be a string of at most 64 KB")try:raw = log_tail.encode("utf-8")L2: UTF-8 encoding leaves NUL intact, and PostgreSQL rejects it in jsonb. An oversized log with a NUL in its retained suffix now passes validation, then fails the INSERT and rolls back the report. Normalize NUL before persistence and add a submission test that verifies the stored tail and completed job.
@ -155,0 +160,4 @@if len(raw) > MAX_LOG:# (its end is kept, not the report refused: an agent's scrub after its own cap can make it longer, a user's name# becoming <user>; nightly-217 lost a whole report so, Nov 2026)doc["log_tail"] = raw[-MAX_LOG:].decode("utf-8", "ignore")L1: The fallback caps the displayed report, but a legacy submission still stores the original base64 payload in reports.envelope at line 414. An older agent can send a multi-megabyte log under the request limit and the farm will retain the entire log in the audit column. Bound the retained log for both submission formats. If exact legacy envelopes must be preserved for audit, define and enforce a compatibility limit for oversized logs and document what is retained.
@ -167,0 +168,4 @@"""An agent's scrub after its own cap can make the tail longer (a name becoming <user>): its end is kept, not thereport refused"""doc = _valid()doc["log_tail"] = "é" + "x" * (64 * 1024) + "the end"L7 (minor): The multibyte character is outside the retained suffix, so the test never exercises a cut inside a UTF-8 character. Place a multibyte character across the cutoff and assert the exact retained suffix. The current bounds and endswith checks would also accept a tail reduced to just the final marker.