Problem
A state error points to the rejected call, but often leaves the developer searching for the earlier operation that established the receiver's relevant state. In E_A3_07_ScannerOutputStage, preview.setTiling(...) fails at line 59 because preview.setTilingMode(MODE_COPY_FROM_METADATA) at line 53 left its tiling state at startTiling. Intervening compression calls make that connection harder to spot.
Proposed first version
Track the source location of the call or construction that establishes a receiver's state in a particular @StateSet. Carry that origin through operations that preserve that state set. When a state error occurs, include a clickable “State established here” location only when the origin is unambiguous. Record the user-code call site after resolving the resulting state, rather than the location of the @StateRefinement declaration.
Start with straight-line code and a known resulting state. For the scanner example, the link should lead to line 53. If the origin cannot be established reliably, keep the current error without a link.
This needs verifier provenance metadata carried to the error DTO and an extension link to display it. Existing source mappings alone do not provide a reliable transition history. The feature is deterministic and does not require an LLM.
Acceptance criteria
- Calls affecting another state set do not replace the tiling origin.
- Two receivers, such as
archive and preview, retain separate origins.
- Constructor-established states can point to construction where applicable.
- Branches with different possible origins, or transitions whose resulting state cannot be resolved reliably, do not produce a misleading single link.
- Existing verification results remain unchanged.
Priority and scope
Lower priority, technically difficult enhancement. A conservative first version is preferable to guessing an origin in complex control flow.
Problem
A state error points to the rejected call, but often leaves the developer searching for the earlier operation that established the receiver's relevant state. In
E_A3_07_ScannerOutputStage,preview.setTiling(...)fails at line 59 becausepreview.setTilingMode(MODE_COPY_FROM_METADATA)at line 53 left its tiling state atstartTiling. Intervening compression calls make that connection harder to spot.Proposed first version
Track the source location of the call or construction that establishes a receiver's state in a particular
@StateSet. Carry that origin through operations that preserve that state set. When a state error occurs, include a clickable “State established here” location only when the origin is unambiguous. Record the user-code call site after resolving the resulting state, rather than the location of the@StateRefinementdeclaration.Start with straight-line code and a known resulting state. For the scanner example, the link should lead to line 53. If the origin cannot be established reliably, keep the current error without a link.
This needs verifier provenance metadata carried to the error DTO and an extension link to display it. Existing source mappings alone do not provide a reliable transition history. The feature is deterministic and does not require an LLM.
Acceptance criteria
archiveandpreview, retain separate origins.Priority and scope
Lower priority, technically difficult enhancement. A conservative first version is preferable to guessing an origin in complex control flow.