5.4 KiB
G2 Real Sample Contract Correction Plan
Date: 2026-04-19 Status: Draft Upstream Spec: 2026-04-19-g2-real-sample-contract-correction-design.md Trigger Record:
rsv-g2-001
Plan Intent
This plan implements one bounded mainline correction slice:
G2 real-sample contract correction
Its purpose is to reduce the current real-sample G2 mismatch from the broad bundle:
bootstrap_mismatchrequest_contract_missingcolumn_defs_missingoutput correctness not closed
into either:
- a verified pass
- or a smaller named contract mismatch
Scope Guardrails
- do not reopen completed
G2family expansion work - do not add new
G2fixtures or promote newG2candidates - do not reopen
G3,G1-E, or boundary families - do not turn this work into login recovery or broader runtime-platform implementation
- do not update validation assets until the real-sample outcome becomes narrower than the current broad mismatch bundle
Fixed Verification Anchor
The only anchor under this plan is:
台区线损大数据-月_周累计线损率统计分析
Mapped real-sample record:
rsv-g2-001
Workstreams
WS1Real-Sample Contract DifferentialWS2Bootstrap and Request Contract NarrowingWS3Column and Output Contract NarrowingWS4Regression, Rerun, and Validation Closure
Phase 0: Freeze the Correction Boundary
Objective
Lock the scope to the fixed G2 real sample and its remaining contract gaps.
Tasks
- freeze
rsv-g2-001as the only real-sample correction target - freeze the current mismatch bundle from the validation layer
- freeze
G2family-expansion outputs as completed and out of scope
Deliverables
- correction-boundary note
- fixed mismatch statement
Acceptance Criteria
- no new
G2family-expansion task is opened - the correction target is explicitly limited to real-sample contract closure
Phase 1: Build the Real-Sample Contract Differential
Objective
Make the smallest remaining real-sample contract mismatch explicit before code changes.
Tasks
- compare the current real generated
SceneIragainst the intendedtq-lineloss-reportcontract - isolate whether the dominant remaining gap is:
- bootstrap target selection
- per-mode request template completeness
- output column semantics
- output artifact correctness
- write a minimum contract-gap summary
Deliverables
- contract differential note
- minimum gap summary
Acceptance Criteria
- the smallest remaining
G2mismatch is explicit - the next implementation target is narrower than the current broad mismatch bundle
Phase 2: Narrow Bootstrap and Request Contract Gaps
Objective
Correct only the bootstrap and request-side contract pieces that the real sample proves are still too coarse.
Tasks
- adjust
G2bootstrap resolution only where the real sample proves it is still misaligned - adjust mode-specific request contract recovery only where the real sample proves it is still incomplete
- preserve fail-closed behavior for unresolved
G2variants
Deliverables
- bounded bootstrap correction
- bounded request-contract correction
Acceptance Criteria
- the real sample no longer keeps the same broad bootstrap/request mismatch shape
- unrelated
G2family fixtures are not broadened or reclassified
Phase 3: Narrow Column and Output Contract Gaps
Objective
Reduce the remaining output-side mismatch to a verified or smaller state.
Tasks
- adjust
G2column-definition recovery only where the real sample proves it is still incomplete - adjust output-contract verification only where the real sample proves the generated artifact is too coarse
- keep readiness and fail-closed behavior intact for still-unresolved samples
Deliverables
- bounded column-contract correction
- bounded output-contract correction
Acceptance Criteria
- the real-sample mismatch becomes narrower than the current broad bundle
G2does not regress into false positives for unresolved variants
Phase 4: Regression, Rerun, and Validation Closure
Objective
Use rerun and validation-layer updates to close the bounded G2 correction loop.
Tasks
- add or update regression that names the corrected
G2real-sample pattern - rerun the fixed real sample
- record whether:
- the sample becomes
executed-pass - or the remaining mismatch is now smaller and named
- the sample becomes
- update the validation-layer assets
- write a formal closure report
Deliverables
- rerun output
- updated validation assets
G2real-sample contract-correction closure report
Acceptance Criteria
rsv-g2-001no longer remains unchanged as the same broad mismatch bundle- the narrowed outcome is covered by automated regression
- validation assets record the narrower
G2state
Completion Criteria
This plan is complete when:
- the fixed
G2real sample no longer remains at the same broad mismatch bundle - the narrower result is covered by automated regression
- validation assets are updated with the narrowed outcome
- completed
G2family-expansion work remains untouched
Next Step
After this plan completes:
- if
G2becomesexecuted-pass, mainline real-sample pressure leaves bothG2andG3 - if
G2still has a smaller named mismatch, move only to that narrowerG2correction slice