Repository navigation
[AGE-2882] Add artifact metadata tables - #1435
Open
rutvij-menavlikar wants to merge 8 commits into
Open
rutvij-menavlikar wants to merge 8 commits into
rutvij-menavlikar wants to merge 8 commits into
Conversation
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
3 of 5 tasks
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
rutvij-menavlikar
marked this pull request as ready for review
November 19, 2026 14:46
rutvij-menavlikar
requested review from
chiragjn,
debajyoti-truefoundry,
heerambavi1998 and
thesujai
as code owners
November 19, 2026 14:46
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 9e9efaa. Configure here.
Co-authored-by: Cursor <cursoragent@cursor.com>
rutvij-menavlikar
force-pushed
the
rutvij/age-2882_1
branch
from
November 19, 2026 15:56
9e9efaa to
b3e76a2
Compare
3 tasks done
Co-authored-by: Cursor <cursoragent@cursor.com>
This branch has not been deployed
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.

Summary
Adds Postgres + SQLite migrations for the artifact metadata tables from the Artifacts design. File bytes live in S3; these tables hold metadata only. Store, upload, list, and serving paths come in later PRs.
Linear: AGE-2882
Schema
Postgres types; SQLite stores
jsonbas BLOB, timestamps as ISO text,bigintas INTEGER.Changes
artifact: ULIDid,UNIQUE (tenant_id, slug),title,latest_version(0 until first commit),created_by_subject,created_by_session_id(no FK; outlives the session). Indexes(tenant_id, created_by_subject->>'subject_id', updated_at DESC, id)(SQLite:json_extract(created_by_subject, '$.subject_id')) and(tenant_id, created_by_session_id).artifact_version: PK(artifact_id, version),status(pending/committed/failed),entrypoint,created_by_turn_id. Index(artifact_id, status). Cascades fromartifact.artifact_file: PK(artifact_id, version, path),size_bytes,storage_key(object-store key),sha256,created_at. Cascades fromartifact_version.How was this tested?
jest.store.sqlite.config.cjs) and on a throwaway database on the devtest RDS, PG 17.11 (jest.store.postgres.config.cjs).tsc --noEmit, eslint, prettier on changed files.Checklist
pnpm build,pnpm test,pnpm typecheck,pnpm lint:ci, andpnpm format:checkpass locallypackages/trueforge-sdk,python/trueforge_sdk,.github/fern/openapi/openapi.json,docs/openapi.json) — fork PRs omit SDK regen; maintainers regenerate after merge.env.exampleupdated if configuration or behavior changedNote
Low Risk
Additive schema-only migrations with down migrations; no application logic or auth changes in this PR.
Overview
Introduces artifact metadata persistence via paired Postgres and SQLite Kysely migrations:
artifact(tenant-scoped slug/title, creator subject/session,latest_version),artifact_version(monotonic versions withstatus,entrypoint, turn linkage), andartifact_file(per-version paths pointing at object-store keys and checksums).Postgres uses
jsonb/timestamptz/bigint, unique(tenant_id, slug), list/session indexes including JSONsubject_id, and cascade FKs from artifact → version → file. SQLite mirrors the same shape withSTRICTtables, subject as BLOB, ISO text timestamps, andjson_extractfor the list index. A changeset records a patch bump for@truefoundry/trueforge. Store/API behavior is not in this diff.Reviewed by Cursor Bugbot for commit 1d9e88c. Bugbot is set up for automated code reviews on this repo. Configure here.