S19 (AD9 half) — data version pin: stamp authoredAgainstVersion - #14
Closed
oskarhagberg wants to merge 1 commit into
Closed
oskarhagberg wants to merge 1 commit into
oskarhagberg wants to merge 1 commit into
Conversation
…ersion Every write through putOwnDataEntry now records the artefact's payload content hash on the DataEntry, so a reader can tell whether a user's saved data predates the live HTML. One stamp covers both writers — PUT …/data/me (the served shim) and the S31 set_artefact_data connector tool — with no connector-specific path. - Domain: DataEntry.authoredAgainstVersion (string | null); upsertDataEntry requires it, so no write path can skip the stamp. Advisory only — never gates a read or write (AD3–AD5), never interprets the blob (AD8). - Persistence: migration 0008 adds the nullable authored_against_version column (no backfill; pre-pin rows read null). The Drizzle upsert's ON CONFLICT DO UPDATE SET carries the pin, so it re-stamps on update instead of freezing at the first write (Drizzle-backed test guards it). - MCP: get_artefact_data returns the entry's pin in the field S30 reserved; return shape unchanged. - Specs: AD9 marked implemented; S19 split into the done data-pin half and the still-pending AH15 retention-seam half. Refs ALI-269. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016k2yeDPhXBHfqCQJLVuUj7
Collaborator
Author
|
Closing: wrong flow. Per ee/CLAUDE.md (sync model A1) this is developed cloud-first as oskarhagberg/artefactor-cloud#1 and the core commit is synced up to OSS with ee/scripts/sync-fix-to-oss.sh after it merges. |
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.
Implements ALI-269: the data-pin half of S19. The AH15 retention seam is deliberately not included and is still pending.
What
DataEntry.authoredAgainstVersion: string | nullstores the artefact's payload content hash at the last write.upsertDataEntryrequires it, so no write path can skip the stamp. It is advisory only: it never gates a read or write (AD3–AD5), and the blob stays opaque (AD8).putOwnDataEntrystamps the payload hash of the artefact it has already resolved, soPUT …/data/meandset_artefact_data(S31) get the same pin. There is no connector-specific code.0008adds a nullableauthored_against_versioncolumn with no backfill; rows from before the pin readnull. The Drizzle upsert'sON CONFLICT DO UPDATE SETalso sets the pin, so it updates on every write. Without that it would stay at the first write's value.get_artefact_datanow returns the entry's pin in the field S30 reserved. The return shape is unchanged.artefact-data.mdmarks AD9 implemented.slice-dag.mdsplits S19 into the done data-pin half and the pending AH15 half.CLAUDE.mdstatus lines are updated. No doctrine rewrite was needed:SKILL.md/PERSISTENCE_CONTRACT_SUMMARYalready describe null, ≠ and = correctly.Not in scope
DataEntryResponseor the S12 author list (no consumer yet).PayloadRetentionPolicyseam.Tests
383/383 green;
pnpm checkclean. New tests cover:nullpin gets stamped on its next write.nulland still reads and writes normally; the pin never grants or blocks access.PATCHof the payload; a null column is served normally. I checked this test by removing the pin from the SET clause: it fails.nullwith no entry, equal tocurrentPayloadVersionafter a write, different afterupdate_artefact;set_artefact_datastamps the same pin asputOwnDataEntry.🤖 Generated with Claude Code
https://claude.ai/code/session_016k2yeDPhXBHfqCQJLVuUj7