Skip to content

feat: an asset link can be declared acyclic and the server refuses a loop - #93

Merged
mjanez merged 2 commits into
dgufrom
feature/acyclic-links
Oct 15, 2026
Merged

mjanez merged 2 commits into
dgufrom
feature/acyclic-links

Conversation

@mjanez

@mjanez mjanez commented Oct 9, 2026

Copy link
Copy Markdown
Member

Stacked on the ingestion PR (feature/ingest-link-mrns): merge that one first; this one then shows only its own commit.

A hierarchy built with an asset link (a line of business and its parent area) could be closed into a loop: A under B and B under A. Only the interface prevented it.

  • New validation key acyclic: true, accepted on fields with control: asset only.
  • On write, the server follows the field from each newly linked asset; if it reaches the asset being written, the write fails with the violation code cycle. The walk is bounded (256 assets).
  • The sheet shows the message for the new code; the key is documented in asset-metadata.md.

Tests: TestAnAcyclicLinkCannotLeadBackToTheAsset, TestAcyclicNeedsTheAssetControl.

mjanez added 2 commits October 9, 2026 13:38
…ir IDs

A link field written with MRNs is resolved on write; a run fills, on a second pass, the fields that named assets created later in the same batch.
@mjanez
mjanez merged commit abfc887 into dgu Oct 15, 2026
5 checks passed
@mjanez
mjanez deleted the feature/acyclic-links branch October 15, 2026 08:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant