Skip to content

mif-project.js inverts x-superseded-by relationship direction (supersedes vs superseded-by) #123

Description

@zircote

In .github/bin/mif-project.js (around line 96), when a document's frontmatter carries x-superseded-by: <target>, the script projects this as { type: "supersedes", target: <target> }. This is inverted: x-superseded-by on document A naming document B means B supersedes A (A is the one being superseded), so the correct relationship type is superseded-by, not supersedes. As currently implemented, A's own MIF projection asserts that A supersedes B — the opposite of what the frontmatter field means.

The schema description at schemas/structured-madr.schema.json line 118 has the same inverted assumption baked into its docstring ("Projected to a MIF 'supersedes' relationship"), so the code and the schema documentation agree with each other and are both wrong — this isn't just a code slip, the intended behavior itself needs correcting.

Concrete real-world instance found while auditing docs: in modeled-information-format/gdlc's docs/decisions/adr-0004-project-config-surface.md, frontmatter carries x-superseded-by: adr-0006-eliminate-markdown-config-carriers.md (ADR-0004 was superseded by ADR-0006). Running mif-project.js against this file currently produces a relationship asserting ADR-0004 supersedes ADR-0006 — backwards from reality.

Suggested fix: change the relationship type pushed for x-superseded-by from "supersedes" to "superseded-by", and correct the schema field description to match.

Severity rationale: the incorrect direction is silent (no validation failure) and corrupts the machine-readable relationship graph for every ADR using x-superseded-by across every repo using this Action — the exact reason this Action's MIF projection exists per its own docs (the ADR genre skill markets relationships[] as how an agent answers "what replaces or realizes it?"). No crash, no data loss, and an author-supplied relationships[] override is an available workaround, so medium rather than high/critical priority.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority: mediumImportant but can be scheduled for upcoming worktype: bugSomething is not working as expected

    Type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions