Skip to content

fix(solid): keep only the classes a draft's subject writes - #736

Merged
ixuz merged 1 commit into
mainfrom
fix/draft-foreign-classes
Nov 12, 2026
Merged

ixuz merged 1 commit into
mainfrom
fix/draft-foreign-classes

Conversation

@ixuz

@ixuz ixuz commented Nov 12, 2026

Copy link
Copy Markdown
Member

What and why

A release draft keeps another app's statements about its subjects as they are and writes them back on every edit, rdf:type statements included. The write check holds a subject to the shape of every class it has. So if a draft's deck, one of its cards, or another subject the draft reads by its shape was given a class that a shape asks something of, every later edit of that subject failed. On the deck itself, the draft could no longer be edited at all. Writing a subject outside drafts already drops such classes, but the draft added them back from its kept statements.

When it reads a draft, the Studio now keeps only the other classes of a shaped subject that a write would keep:

  • no class that a shape asks something of;
  • none past the most the check reads;
  • no type value that is not an IRI.

Writing a draft, whether it is new or changed, holds what it writes of such a subject to the same rule, whatever its kept statements carry. Publishing a draft also leaves those classes out of the release, so the release holds what the draft's check saw. The rule is the one records.ts uses to write a subject, now shared as keptClasses.

docs/data-model.md and docs/shapes.md describe it.

Refs: GHSA-8hh7-p2ww-mpjf

A release draft keeps another app's statements of its subjects as they
are and writes them back on every edit, its rdf:type ones among them.
The write check holds a subject to the shape of every class it has, so
a class that a shape asks something of, given to the draft's deck, a
card or another subject the draft reads by its shape, made every later
edit of that subject fail. On the deck, the draft could no longer be
edited at all. The writer already drops such classes from a subject it
records, but the draft added them back from its kept statements.

Reading a draft now keeps, of a shaped subject's other classes, only
those its write keeps: no class a shape asks something of, none past
the most the check reads, and no type that is no IRI. Writing a draft,
made or changed, holds what it writes of such a subject to the same
rule, whatever its statements carry. Publishing a draft leaves the
classes it does not keep out of the release too, so the release holds
what the check of the draft sees. The rule is the one records.ts writes
a subject by, now shared as keptClasses.

Refs: GHSA-8hh7-p2ww-mpjf
@ixuz ixuz added the bug Something isn't working label Nov 12, 2026
@ixuz
ixuz enabled auto-merge November 12, 2026 00:03
@ixuz
ixuz added this pull request to the merge queue Nov 12, 2026
Merged via the queue into main with commit eaf73b1 Nov 12, 2026
53 checks passed
@ixuz
ixuz deleted the fix/draft-foreign-classes branch November 12, 2026 00:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant