julia-script / julia-script/silk
Add function contract completion and synchronization actions
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 48
- Forks
- 0
- Avg merge
- 4h 49m
- Merged PRs (30d)
- 213
Description
Summary
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.
- Reuse the scope-aware presentation and import planning introduced by #178.
- Resolve actions against the originating revision.
- Report recursive, generic, open-row, or otherwise underdetermined cases instead of guessing.
Lint behavior
Integrate with the warning framework from #181:
- 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
failsites and rows demanded byruncontribute 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.
Dependencies
- Source-action and import-plan foundation: #178
- Warning delivery for optional contract lints: #181
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the source-action and import-plan foundation in #178 and the warning framework in #181. Define how the FunctionDemand summary and contract actions satisfy the stated acceptance criteria, then add coverage for reachable paths, recursive/generic/open-row cases, public/private minimization, and stale action resolution.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- compilers, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100