Skip to content

fix(describe): order the data model the same on every store - #58

Merged
MathiasVDA merged 1 commit into
mainfrom
claude/project-thread-azm01g
Nov 19, 2026
Merged

MathiasVDA merged 1 commit into
mainfrom
claude/project-thread-azm01g

Conversation

@MathiasVDA

@MathiasVDA MathiasVDA commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

What and why

Follow-up to #32. The data model tab listed a class's attributes and incoming associations in the order the shapes graph returned them, and that order differs between stores. The enterprise test describe_pages_and_explain_keep_to_row_rules compares the describe page of a store that has row rules with the page of a store that holds only the visible rows. It failed (auth.rs:1893) because the attribute order differed (lead, area, label against lead, label, area).

Attributes now follow sh:order, then path IRI. Associations are sorted by class and property. They are read up to 1,000 and cut to the 24 shown only after sorting, so the cut is stable too.

How it was tested

  • In an enterprise build (core main + this change), cargo test -p tripletrail-server --features enterprise --test auth describe_pages_and_explain_keep_to_row_rules failed before the change. After it, the test passes on 3 runs.
  • cargo test -p tripletrail-server --test describe_pages --test linked_data passes, and clippy with -D warnings is clean.

Documentation

  • No user-facing change. The order now stays the same from one store to the next.

The data model tab listed a class's attributes and its incoming
associations in the order the shapes graph returned them, which differs
between stores. The enterprise row-rules test compares the page of a
store with row rules to one holding only the visible rows, and failed.
Attributes now follow sh:order, then path; associations sort by class
and property.

Copy link
Copy Markdown
Contributor Author

Reviewing.


Generated by Claude Code

@MathiasVDA
MathiasVDA merged commit 6a2fb7f into main Nov 19, 2026
3 checks passed

Copy link
Copy Markdown
Contributor Author

Merged as 6a2fb7f. Thank you for running the enterprise test and fixing forward.

What the sort still leaves to the store's order, for a follow-up if it bites:

  • Properties whose sh:path is a path expression (not an IRI) and that have no sh:order all get the same key, so they keep the order the graph gave them.
  • The order of the node shapes of a class (node_shapes()), and which associations fall inside the 1,000 read before sorting.

Generated by Claude Code

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant