3.7 KiB
RP17 — Accept normalized candidate defaults in validation responses
Parent E12. Priority P1 / High workflow defect. Complexity S. Dependencies A02 and R08. Owner continuation authorizes this correction.
Verified baseline: validationPhasePreview retains normalized candidate parameters in each child, while shared parseValidationDetail incorrectly compares training child parameters with the original partial input. An actual preparation/child-builder/service-read probe accepts explicit defaults but rejects omitted defaults after valid admission. Evidence: /tmp/candidate-validation-defaults-probe.test.ts and its .log (one control pass, one regression failure). This decoder serves both web and AI clients and nested walk-forward details.
Real PostgreSQL verification exposed the coupled admission defect: migration 29's validate_experiment_manifest compares expanded request parameters with raw candidate input, rejecting the same supported empty/partial inputs with SQLSTATE 23514 before admission. /tmp/stock-bot-rp17-defaults-debug.log records the exact guard failure. The read-only decoder probe established the separate response mismatch, not successful database admission.
Scope: compare each child candidate with the already validated phase parameters: normalized retained request for training, frozen winner for holdouts. Add a forward SQL migration so the admission comparison expands only defaults declared by the exact retained package, with explicit caller values taking precedence. Preserve original raw root inputs, child generation, hashes, exact retries and all other version/parameter/evidence/authorization checks. No historical-row rewrite, financial policy change or new abstraction.
Ownership: one implementation agent owns the shared validation response decoder and focused contract regressions; a separate SQL owner owns the additive migration and direct guard regressions. Root owns real authenticated PostgreSQL workflow/browser coverage, shared documentation and integration. Independent review required. No concurrent edits to the same contracts.
Acceptance/tests: omitted and partial default parameters decode actual server-generated training details; explicit parameters and built-ins remain valid. Holdouts use the selected winner. Altered child parameters, version, request or winner still fail. Nested walk-forward details accept valid defaulted candidates. A real research-agent submission can be read and retried with exactly the original body/key and no duplicate runs; full native chronological workflow with defaults can seal evidence. Preserve caller input and preview hashes throughout. Direct SQL mutations that substitute an explicit parameter or invented default remain rejected; migration reapplication is safe and existing immutable records remain unchanged.
Gates: focused response/validation/walk-forward/client tests; authored and application types, scoped lint/formatting; root repository check; real PostgreSQL AI workflow and relevant browser validation paths using disposable stores. No real development research execution or paper/live activation. Conditional performance stories remain deferred.
Accepted October 27, 2026; implementation 1502ab41. Independent review accepted the decoder and SQL32 correction. Root full check passed (1,371 integration / 150 Rust tests); authenticated AI/startup tests passed 9 / 217 assertions, direct SQL guards 2 / 25, and all 21 browser scenarios / 785 assertions. Application/authored types, lint and formatting passed. Migration 32 is included in the existing additive startup allowlist; no development database was migrated during this work. Combined evidence records the initial SQL precedence correction and worktree-only dependency limitation.