Schema: action parameters and results
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
Research direction
Start by reading the existing structured action schema and reference-checking or lint paths; the issue names no files or tests. Compare how action fields are modeled and rendered, then clarify whether inputs and reports belong in scope, including unknown-entity validation. Done means the agreed contract is represented and checked without relying on prose.
Written by the indexing model from the issue text.
Description
The gap
An action is {name, actor, preserves, description}. There is no way to declare what an action takes or what it reports back, so any contract about an action's output lives in freeform description text.
Motivating example, from modeling a diagram tool. Three separate decisions in one modeling session turned out to be about action results, and none of them was declarable:
- Deleting a container recurses, and the result lists every node removed.
- Deleting a shape converts bound arrow endpoints to free points, and the result warns about each conversion.
- Dropping a stored overlap expectation as a side effect of a delete is reported in the result.
Each is a "no surprises" contract: the caller learns everything the operation did. Today each is a sentence inside an invariant or a description, for example:
- id: container-delete-recurses
statement: >-
Deleting a `Container` deletes its whole subtree. The
operation's result lists every node removed.
The rule (preserves can point at it) and the report shape (nothing can) are fused into one prose statement.
Possible shape
Optional inputs and reports lists on the structured action form, each entry a name plus a type (primitive, enum, or entity name). This is deliberately short of a full signature language; the value is that the report contract becomes a checkable, renderable part of the model rather than prose. Lint could warn when a reports entry names an unknown entity, matching existing reference checks.
This may be over the line of what a plain-language modeling tool wants to carry; filing it as a data point from real usage rather than a firm request.
Workaround today
Prose in invariant statements and action descriptions.
- Dominant language
- Go
- Stars
- 32
- Forks
- 5
- PR merge metrics
- No merged PRs in 30d
Contributor guide
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.
More from stacklok/modelith
-
enhancement
Difficulty 2/5 Half a day Newbie friendliness 68/100
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
-
Difficulty 5/5 Over a week Newbie friendliness 28/100
-
documentation
Difficulty 5/5 Over a week Newbie friendliness 30/100
-
Difficulty 3/5 1-2 days Newbie friendliness 58/100
All issues in stacklok/modelith
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 1/5 Under an hour Newbie friendliness 84/100
-
enhancement needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
kind/cleanup
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
kubernetes-sigs/kueue#15947 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
sympozium-ai/sympozium#627 ·