Schema: exhaustiveness/disjointness markers for subtypeOf (sealed/abstract)
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 45/100
Direzione di ricerca
Inizia da ADR-0004 e dall’implementazione esistente di subtypeOf per comprendere lo schema e le convenzioni di validazione. Poi segui la sezione sulla gerarchia Markdown e i controlli correlati descritti nell’issue. Il lavoro è completato quando i genitori astratti non possono essere usati come istanze concrete e i genitori sealed presentano i propri sottotipi come un’enumerazione chiusa, con test che coprono entrambi i marker.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
ADR-0004 deferred exhaustiveness and disjointness markers (sealed, abstract) "until a second model needs them". This is a report that a second model needs them.
The use case
A model of a software-development methodology: the artifacts a team's process produces, and how they relate. One entity is a Commitment — a decision an agent must not re-make — which is exactly one of two kinds:
- Invariant — a property of the artifact, mechanically checkable. For example "dependencies point inward only", enforced by an import-graph test plus a linter allowlist.
- Practice — a behavioural or process rule that no test can check. For example "never edit a test to make it pass", or "rebase, never merge". Enforceable by a hook or a review step, or not at all.
subtypeOf (thank you, #8/#21) expresses the hierarchy, and having the parent's invariants cover both children is exactly right. Two things it cannot say:
- Exhaustive. Invariant and Practice are the complete enumeration. Nothing stops a bare
Commitmentthat is neither. - Abstract. A
Commitmentshould never be instantiated directly; every one is an Invariant or a Practice.
Why it bites this model specifically
The whole point of the split is that each kind gets a different enforcement path: an Invariant must have a mechanical enforcement, a Practice may not be able to have one. An unclassified Commitment is precisely the thing that escapes both rules, so the classification being provably complete is load-bearing rather than decorative.
Without a marker, the model's own prose has to carry the claim, which is the situation ADR-0004 describes for the is-a link before subtypeOf existed: "the is-a claim lived only in definition prose, so the hierarchy was invisible to the renderer... and the linter could not check the enumeration."
What would help
Whatever shape you prefer, the checks we would want are:
- an
abstract: trueparent errors (or warns) if anything references it as a concrete instance; - a
sealed: trueparent renders its children as a closed enumeration, so a reader and an agent both know the list is complete.
Rendering suggestion: the Markdown hierarchy section already lists a parent's subtypes; a closed list could simply say so.
Related: #6 (flag invariants not covered by a test) is the same shape of check one level down, and the two compose well for this model.
🤖 Filed by Claude Code on behalf of a modelith user, from a real modelling session that hit this gap.
- Lingua principale
- Go
- Stelle
- 35
- Fork
- 5
- Merge medio
- 5h 7m
- PR unite (30g)
- 6
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di stacklok/modelith
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
-
lint accepts modelith-ref-type on a GitHub-origin provenance headerForse già presa @gosharplite l’ha presa 7 giorni fa. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
-
ADR-0019 cites a nonexistent test and omits the ones that pin its decisionsForse già presa @gosharplite l’ha presa 7 giorni fa. Apertadocumentation
Difficoltà 2/5 1-3 ore Idoneità per principianti 92/100
-
enhancement
Difficoltà 2/5 Mezza giornata Idoneità per principianti 68/100
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 20/100
Tutte le issue di stacklok/modelith
Issue simili
-
bug(hub,chat): Wave-2 web chat sendAgentRouted does not update RecordChannel reply affinity to 'web'Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
GoogleCloudPlatform/scion#2448 ·
I maintainer di solito rispondono entro 1 giorno
-
customer issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
dolthub/go-mysql-server#3988 ·
I maintainer di solito rispondono entro 1 giorno
-
bug keploy
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 85/100
grpc/grpc-go#9481 · 1 commento ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
SocialGouv/iterion#2195 ·
I maintainer di solito rispondono entro 1 giorno