feat(data): batch 1: request models inherit their TaskData schema (51 servers) - #2832
feat(data): batch 1: request models inherit their TaskData schema (51 servers)#2832adil-a wants to merge 4 commits into
Conversation
|
/ok to test 447ccba |
|
/claude review |
|
SHIP — LGTM, no reliability concerns. Verified this as a contract-preserving refactor: each server's per-task request fields move from an inline model into a The two genuine logic changes both check out:
The deliberate redeclare-in-subclass cases ( No async, dependency, or public-API concerns; |
|
/ok to test 91974de |
|
/ok to test 4658119 |
4658119 to
744e36e
Compare
|
/ok to test 744e36e |
8e92d77 to
f904602
Compare
744e36e to
c01c354
Compare
|
/ok to test c01c354 |
|
/ok to test abd8cda |
15ccaed to
3a4b217
Compare
abd8cda to
f183a5b
Compare
|
/ok to test f183a5b |
9176cc6 to
4df2449
Compare
f183a5b to
e8c4f86
Compare
|
/ok to test e8c4f86 |
… servers) Each server's run/verify request model now inherits its task_data.py TaskData, so task fields are declared once and the wire cannot drift from the schema. This batch covers the 51 flat-row servers whose models import in the core venv. Fields the schema declares beyond the old wire become typed instead of riding as untyped extras, and previously silently-dropped row keys are now kept. Servers that nest fields in verifier_metadata, the explicit extra-ignore keepers, and heavy-dependency servers come in later batches. Verified against the parent branch: model contracts identical apart from 32 intentional ignore-to-allow flips, 69 newly typed fields, and 14 documented deltas; all 910 committed-row validations agree on accept/reject with byte-equal overlapping dump values; per-server test suites pass (three servers fail identically on the parent branch from missing core-venv dependencies). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Signed-off-by: Adil Asif <adasif@nvidia.com>
…re models Inheriting TaskData flipped 32 request models from pydantic's default extra=ignore to the schema's extra=allow. That widening changes how undeclared fields behave at runtime and can break servers that build responses with VerifyResponse(**body.model_dump(), reward=...): a user dataset with a column named reward would raise a duplicate keyword error on every row. Each affected model now sets extra=ignore explicitly with a comment, so undeclared fields are dropped exactly as before this refactor. Fields the schema declares are still typed and kept. Widening a server to allow is a separate, per-server decision. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Signed-off-by: Adil Asif <adasif@nvidia.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Signed-off-by: Adil Asif <adasif@nvidia.com>
…skData This stateful server consumes task fields at seed_session, and verify() reads none of them. Inheriting the schema made the verify wire require row fields, which broke synthetic verify payloads in the server's own tests. The schema still validates dataset rows at collate time. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Signed-off-by: Adil Asif <adasif@nvidia.com>
e8c4f86 to
76b0b9b
Compare
|
/ok to test 76b0b9b |
What this does
Each server's run/verify request model now inherits its
task_data.pyschema. Task fields are declared once, in the schema. The wire model and the schema can no longer drift apart, because they are the same class.Before:
After:
This is batch 1 of the inherit refactor: the 51 flat-row servers whose models import in the core venv. Later batches cover the servers that nest fields in
verifier_metadata(xstest, longmemeval, deepswe, and the vm family), the 13 servers that keep an explicitextra="ignore", the heavy-dependency servers that need their own venvs, and the base-model servers whose verify ignores task fields.Behavior changes, all intentional
extra="ignore"with a comment, so a stray column in user data behaves exactly as it does today. Only fields the schema declares are kept and typed. Widening any server toextra="allow"is a separate, per-server decision for a later PR.bird_sql.sql_context,litmus_agent.smiles) used to ride as untyped extras. They are now declared fields with types.arc_agi.trainloses its[]wire default (the default masked missing data and produced a degenerate comparison), andmath_advanced_calculations.ground_truthdrops thelist[float]branch (that branch crashed verify() withjson.loadson a list). The full list with justifications is in the verification report comment on this PR.Two servers needed a code fix, not just the model swap.
litmus_agent.verify()read legacyproperty_typeout ofmodel_extra; the typed field no longer lands there, so the resolver now receives it explicitly.indirect_prompt_injection's tests construct verify requests by hand and now supply the wire-requiredenvironmentrow field. Three servers keep duplicated field classes out of the schema on purpose:single_step_tool_use_with_argument_comparisonandformat_verificationredeclare one field each because their verify logic isinstance-checks or dict-reads those exact types, andverifif/indirect_prompt_injectionre-point their item classes to the schema module so there is a single definition.How this was verified
*RunRequest/*VerifyRequestmodel on this branch was dumped (fields, types, required-ness, defaults, extra config) and diffed against the same dump from the parent branch. Result: 0 unexplained differences and 0 extra-config changes. The only changes are the typed field additions and the 14 documented deltas.gym env testcovers those with per-server venvs.tests/unit_tests/suite passes, including the repo-wide row-vs-schema drift test from the parent PR.