Expand description
The serializable wire contract for the Foreman pipeline (B6 wire-freeze).
The internal gate/harness/planner types stay free to evolve; THESE versioned DTOs are the stable shape the daemon JSON-RPC and the four FFI binding surfaces expose. Conversions are one-way (internal → DTO).
Wire-freeze hygiene (from the B5 review), so this can be frozen at release:
- String discriminants on every enum (
snake_caseserde tags), never positional/integer — adding a variant can’t shift another’s meaning. - A
schema_versionon the top-level report. - Structured rejection evidence (typed containment / duplicate / build fields), not flattened prose — this is what a future post-gate replan reads.
- A forward-compatible
unknownescape variant on each externally-matched enum, so an older client doesn’t hard-fail on a newer server’s state. - The scheduler’s
ExpandedFootprintis never representable here — only the gate’s verdict and declared(file, symbol)refs — so “scheduler output never feeds acceptance” holds on the wire, not just in Rust.
Structs§
- Apply
Conflict Dto - A patch that failed to apply, attributed to its subtask + targeted files.
- Build
Test Failure Dto - The union build/test failure that rejected the merge.
candidate_subtask_idsis the whole integrated set — a build failure can’t be localized further without mapping test output back to a symbol (not done). - Duplicate
Blame Dto - A union duplicate declaration.
candidate_subtask_idsare the subtasks whose patches touched the offending file — candidates, not proven culprits (file granularity can implicate a subtask that edited the file but not the symbol). - Duplicate
Dto - A duplicate-declaration finding on the wire.
- Foreman
Report - The full report of a Foreman run.
- Gate
Evidence Dto - The gate’s evidence — structured, so a consumer (or replan) can attribute a verdict without parsing prose.
- Integration
Blame Dto - Structured attribution of why a union integration failed — the wire form of
the harness
IntegrationBlame. What a post-gate regional replan reads to retry the failing region, and what a UI reads to show “why did this run fail”. - Integration
Report Dto - The integrated-union outcome.
- Plan
Report - The decomposition plan — the SCHEDULER surface, deliberately distinct from
MergeVerdictDto(the gate surface) so a consumer can never mistake a scheduling hint (levels,prefer_single_session) for a safety verdict. - Plan
Subtask Dto - One planned subtask on the wire — carries only the DECLARED
(file, symbol)footprint, never the scheduler’s expanded blast radius. - Subtask
Report Dto - One farmed-out subtask’s outcome.
- Symbol
RefDto - A
(file, symbol)location on the wire.
Enums§
- Acceptance
Basis Dto - Why a worktree was accepted.
- Build
Test Dto - The build/test leg outcome.
- Merge
Verdict Dto - The gate’s verdict on a worktree (per-subtask or the integrated union).
Constants§
- FOREMAN_
SCHEMA_ VERSION - Bump when the serialized shape changes incompatibly.