Schema: exhaustiveness/disjointness markers for subtypeOf (sealed/abstract)
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Anfängerfreundlichkeit
- 45/100
Rechercherichtung
Beginne mit ADR-0004 und der bestehenden subtypeOf-Implementierung, um das Schema und die Konventionen für die Validierung zu verstehen. Verfolge dann den im Issue beschriebenen Abschnitt zur Markdown-Hierarchie und die zugehörigen Prüfungen. Die Aufgabe ist abgeschlossen, wenn abstrakte Eltern nicht als konkrete Instanzen verwendet werden können und versiegelte Eltern ihre Subtypen als geschlossene Aufzählung darstellen, mit Tests für beide Marker.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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.
- Vorherrschende Sprache
- Go
- Sterne
- 35
- Forks
- 5
- Ø Merge
- 5 Std. 7 Min.
- Gemergte PRs (30 T.)
- 6
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Keine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus stacklok/modelith
-
enhancement
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 88/100
-
lint accepts modelith-ref-type on a GitHub-origin provenance headerEvtl. vergeben @gosharplite hat das vor 8 Tagen übernommen. Offenbug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 86/100
-
ADR-0019 cites a nonexistent test and omits the ones that pin its decisionsEvtl. vergeben @gosharplite hat das vor 8 Tagen übernommen. Offendocumentation
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 92/100
-
enhancement
Schwierigkeit 2/5 Ein halber Tag Anfängerfreundlichkeit 68/100
-
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 20/100
Alle Issues in stacklok/modelith
Ähnliche Issues
-
enhancement
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
AOSSIE-Org/DebateAI#611 ·
Maintainer antworten meist innerhalb von 3 Tagen
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
MHSanaei/3x-ui#6737 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
terraform-provider
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 73/100
ClickHouse/terraform-provider-clickhousedbops#281 ·
Maintainer antworten meist innerhalb von 2 Tagen
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 74/100
open-telemetry/opentelemetry-go-compile-instrumentation#1450 ·
Maintainer antworten meist innerhalb von 2 Tagen