You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add compiler-backed actions that complete or explicitly synchronize a function's full contract:
effect fn load() -> Data ! ParseError ? &FileSystem
This includes the result type, failure row, requirement row, and imports needed to spell those types.
Semantic product
Introduce a declaration-independent per-function summary such as:
FunctionDemand
success/result type
propagated failures
propagated requirements
effect/laziness facts
provenance for every demanded member
availability or underdetermination reason
It must derive facts from all reachable return/failure paths and remain available when the declared contract is missing or wrong—the state in which the action is needed.
Actions
Complete contract: conservatively add an absent result, failures, requirements, and required imports without narrowing an existing valid contract.
Minimize/synchronize contract: explicit refactor that may remove unused row members/imports or narrow a result after proving the implementation contract.
Return one atomic grouped change plan for header and import edits.
Missing required contract members may support actionable diagnostics.
Unnecessary failures/requirements may be linted where policy allows.
Public declarations must not be automatically narrowed merely because the current implementation is narrower; a wider public contract may be intentional.
Contract minimization for public functions must be opt-in or otherwise explicitly configured.
Acceptance criteria
Completion derives the result from all reachable returns, not only the final terminal.
Direct fail sites and rows demanded by run contribute structured canonical failures/requirements.
Missing imports for result/error/capability types are added or merged atomically.
Existing valid aliases and contract spelling are preserved unless the selected action explicitly synchronizes them.
Ambiguous or unavailable type presentation withholds the action or explains why it cannot be completed.
Recursive/generic/open-row tests cover determined and underdetermined cases.
Public/private contract minimization policy is specified and tested.
Stale action resolution never applies an old contract plan to new source.
Summary
Add compiler-backed actions that complete or explicitly synchronize a function's full contract:
This includes the result type, failure row, requirement row, and imports needed to spell those types.
Semantic product
Introduce a declaration-independent per-function summary such as:
It must derive facts from all reachable return/failure paths and remain available when the declared contract is missing or wrong—the state in which the action is needed.
Actions
Lint behavior
Integrate with the warning framework from #181:
Acceptance criteria
failsites and rows demanded byruncontribute structured canonical failures/requirements.Dependencies