fix: budget subjektiv batches for compact verified Job results (T-704)

This commit is contained in:
2026-10-06 19:58:11 +09:00
parent d12cdc9106
commit 3c424fd17d
4 changed files with 233 additions and 10 deletions
+36
View File
@@ -88,3 +88,39 @@ including `server-full-initial-migration-fixtures.log`, `server-full-final.log`,
`server-subjektiv-final.log`, `server-api-typescript.log`, `runtime-no-default.log`
and `runtime-fs-only.log`. The durable report records their concrete results;
local log paths are not a substitute for the published immutable MR source.
## Bounded-result follow-up after interrupted review
The first implementation was published as `d12cdc91`. Human interruption ended
its first pending Reviewer before a verdict. On retry, the parent reread Ticket,
MR, clean Workdir and provider source. Before the replacement Reviewer verdict,
parent inspection identified a concrete result-budget defect: copying full
resolution records for a 100-ID batch could exceed the common 16 KiB result bound,
even when candidate decisions and surface generation had actually completed.
That pending old-source review was stopped rather than treated as approval.
The follow-up keeps full immutable receipts/reasons/revision/source edges in their
existing store and persists only verified `{candidate_id, action}` summaries in
the Job result. Batch selection conservatively budgets the complete result,
including JSON-escaped IDs in both claim and outcome, plus a reserved bounded
Subject/surface envelope. Candidates beyond that byte-bound stay staged. The
common result bound is not enlarged or bypassed.
A new narrow fixture closes a batch of long/escaped IDs with individual receipt
reasons larger than 16 KiB, successfully accepts a result within the default
bound, verifies exact replay and remaining candidates, and starts a disjoint
followup only after cleanup. A maximum escaped-ID budget unit test proves the
complete projected result fits, not merely its raw input IDs.
Follow-up evidence (same bounded jobs setting):
- `cargo test -p yoi-workspace-server --lib result_budget`: **2 passed**.
- Root `cargo check`: **passed** (`fix-root-check.log`).
- Full `cargo test -p yoi-workspace-server -- --test-threads=4`:
**639 library + 11 binary passed**, no skips (`fix-server-full.log`).
- Format and `git diff --check HEAD`: **passed**.
Only Server logic, Server fixtures and documentation changed in this follow-up;
all other changed-crate/generated/Worker/Runtime results above remain applicable.
The new commit is published on the same source selector of the existing MR and
requires a fresh exact-source review. No target ref, tags or unrelated refs are
pushed, and no merge/integration is performed by the Coder.