5.8 KiB
G3 Real Sample Output Contract Verification Plan
Date: 2026-04-19 Status: Draft Upstream Spec: 2026-04-19-g3-real-sample-output-contract-verification-design.md Trigger Report: 2026-04-19-g3-real-sample-runtime-contract-correction-closure-report.md
Plan Intent
This plan implements the next bounded mainline scope after G3 runtime-scope correction:
G3 real-sample output / contract verification
Its purpose is to reduce the remaining real-sample mismatch from a generic verification gap to either:
- a verified pass
- or a smaller named output/contract mismatch
Scope Guardrails
- do not reopen the completed
G3archetype-correction scope - do not reopen the completed
G3runtime-scope correction scope - do not broaden this work into
G8runtime implementation - do not reopen
G3family expansion or add unrelated fixtures - do not open
G4 / G5 - do not update validation assets until output verification produces a narrower outcome
Workstreams
WS1Real-Sample Output Contract DifferentialWS2G3 Output Contract NarrowingWS3Regression and Verification IntegrityWS4Real-Sample Verification Rerun and Closure
Phase 0: Freeze the Verification Boundary
Objective
Lock the scope to one remaining mismatch: output_contract_not_verified.
Tasks
- freeze
95598工单明细表as the only verification anchor - freeze current remaining mismatch:
output_contract_not_verified
- freeze current
G3routing and runtime-scope behavior as completed constraints that must not regress
Deliverables
- verification-boundary note
- fixed output-gap statement
Acceptance Criteria
- no additional family or runtime scope is added under this plan
- the correction target is explicitly
G3 output / contract verification
Phase 1: Build the Real-Sample Output Contract Differential
Objective
Understand exactly what part of the generated real-sample contract is still unverified.
Tasks
- compare the real generated
SceneIragainst the intendedG3business output contract - isolate which fields are structurally present but semantically too broad
- isolate whether the dominant gap is:
- main request selection
- enrichment request partitioning
- join key correctness
- merge/dedupe correctness
- export contract correctness
- write a minimum verification-gap summary before code changes begin
Deliverables
- output-contract differential note
- minimum verification-gap summary
Acceptance Criteria
- the smallest remaining output mismatch is explicit
- the next change target is narrower than the current generic verification label
Phase 2: Narrow the G3 Output Contract Gap
Objective
Reduce the real-sample mismatch from generic non-verified output to a specific verified contract state.
Tasks
- adjust the minimum
G3output-contract logic only where the real sample proves it is too coarse - keep routing and runtime-scope logic unchanged unless required by output verification
- preserve fail-closed behavior for scenes whose output contract is still unresolved
Deliverables
- bounded output-contract update
- explicit verification rule in code or tests where needed
Acceptance Criteria
- the real-sample mismatch is narrower than
output_contract_not_verified - no unrelated family is reclassified or broadened
- the corrected result stays inside
G3
Phase 3: Lock Regression and Verification Integrity
Objective
Prove the narrower contract logic does not create false positives.
Tasks
- add or update regression that names the corrected real-sample verification pattern
- retain mixed-boundary,
G8, and canonical regressions - verify unresolved
G3cases still fail closed when the output contract is genuinely incomplete
Deliverables
- regression tests for
G3output verification - updated assertions where needed
Acceptance Criteria
- no regression causes
G8to disappear as a boundary archetype - no regression causes unrelated
single_request_tableor other families to drift - test coverage explicitly names the corrected output-verification pattern
Phase 4: Rerun the Real Sample and Close the Loop
Objective
Use the actual real sample to confirm the narrowed output-verification outcome and record the next state.
Tasks
- rerun
sg_scene_generateon95598工单明细表 - record whether:
- the sample becomes
executed-pass - or the remaining mismatch is narrower than
output_contract_not_verified
- the sample becomes
- update the real-sample validation record layer
- write a formal closure report
Deliverables
- rerun output
- updated real-sample validation assets
G3output-contract-verification closure report
Acceptance Criteria
- the rerun no longer leaves the generic
output_contract_not_verifiedlabel unchanged - the validation layer records a narrower family outcome
- the next scope recommendation can move from
G3to the next mainline gap when appropriate
Completion Criteria
This plan is complete when:
- the
G3real sample no longer ends at the genericoutput_contract_not_verifiedlabel - the narrowed result is covered by automated regression
- real-sample validation assets are updated with the new outcome
G8and priorG3routing/runtime corrections remain intact
Next Step
After this plan completes:
- if
G3becomesexecuted-pass, return to the next mainline mismatch in priority order, which isG2real-sample contract correction - if
G3still has a smaller output-specific mismatch, move only to that narrowerG3verification slice