Artifact links on stories and experiences (vault contract revision 1.6, additive)#96
Merged
Merged
Conversation
…6, additive)
Provenance ladder rung 1 ("artifact-supported", P1a): StorySchema and
ExperienceSchema gain optional top-level artifact_links — a list of
ArtifactLink {url, label?} evidence pointers (repo, PR, talk, press,
published artifact). URLs are https-only (http and every other scheme
rejected) and capped at 500 chars, labels at 120, at most 8 links per
entity. Only set fields serialize (an unset label is never label: null)
and an empty list never reaches frontmatter (_OMIT_WHEN_EMPTY), so
pre-1.6 vaults round-trip byte-identically — proven by new round-trip
tests on both entity types.
Proposals: artifact_links joins BOTH _EXPERIENCE_KEYS and _STORY_KEYS
(lock-step with cloud vault_propose from day one); apply-time validation
rides the entity models. MCP: get_profile_summary(depth="detailed") and
find_story include an entity's artifact_links when present, same
key-absent-when-empty discipline as the revision-1.5 scope block.
Contract docs (vault-v1 README rule 10 + revision history, JSON schema
$defs/artifactLink + frontmatter properties + $comment), AGENTS.md
revision claim/key lists, and CHANGELOG updated. Cloud mirrors the field
1:1 per the provenance-ladder coordination spec (P1b sibling PR).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
claude-dataviking
requested review from
openclaw-dv and
the-data-viking
as code owners
July 17, 2026 04:24
…SON schema Adversarial review findings on #96: (1) a typo'd key inside a link entry (e.g. 'lable') was silently swallowed, losing the label — extra keys now hard-reject, matching the schema's additionalProperties: false; (2) the JSON schema accepted a bare 'https://' url that the reader rejects — minLength: 9 closes the contract drift. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Provenance ladder P1a (coordination spec: traitprint-cloud
docs/specs/provenance-ladder.md, §Rung 1 shape). Follows the revision-1.5 scope-block pattern (#90) exactly.What
stories[]andexperiences[]each gain an optional top-levelartifact_links: a list of{url, label?}evidence pointers (repo, PR, talk, press, published artifact) — rung 1, "artifact-supported".urlhttps-only (http/ftp/js/etc. rejected), ≤ 500 chars;labeloptional, ≤ 120; max 8 links per entity. Enforced inArtifactLink/ the entity models, so proposal apply-time validation rides them for free._OMIT_WHEN_EMPTY); an unsetlabelnever serializes aslabel: null. Pre-1.6 vaults rewrite with exact bytes — proven by new round-trip tests on both entity types.artifact_linksadded to BOTH_EXPERIENCE_KEYSand_STORY_KEYSin the same PR — lock-step with cloudvault_proposefrom day one (the scope PR's lesson, learned).get_profile_summary(depth="detailed")signature experiences andfind_storystories includeartifact_linkswhen present, key-absent-when-empty likescope.$defs/artifactLink+experienceFrontmatter/storyFrontmatterproperties +$comment; AGENTS.md revision claim (test_doc_truth pin) and frontmatter key lists; CHANGELOG[Unreleased].Experience links are deliberately top-level (role-level evidence), NOT inside
scope, per the spec.Coordination
Cloud sibling PR (P1b) lands the 1:1 mirror: storage columns + vault-commit projection + edit-UI link fields + provenance chips + publish embed.
Gates
pytest -q: 1054 passed, 3 skippedruff check src/ tests/: cleanmypy src/: clean🤖 Generated with Claude Code