Drop agent.metadata column - #561
Merged
Merged
Conversation
bhaveshpatel640
requested review from
chiragjn,
debajyoti-truefoundry,
heerambavi1998,
sr07asthana and
thesujai
as code owners
September 2, 2026 19:37
🦋 Changeset detectedLatest commit: be8895b The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
bhaveshpatel640
marked this pull request as draft
September 2, 2026 19:37
bhaveshpatel640
force-pushed
the
AGE-2084
branch
from
September 2, 2026 19:39
7980737 to
f0f5a5b
Compare
bhaveshpatel640
marked this pull request as ready for review
September 2, 2026 19:39
bhaveshpatel640
marked this pull request as draft
September 2, 2026 19:39
bhaveshpatel640
force-pushed
the
AGE-2064
branch
2 times, most recently
from
September 3, 2026 06:05
45b8a9e to
72c6a3f
Compare
bhaveshpatel640
force-pushed
the
AGE-2084
branch
from
September 3, 2026 06:43
ab2312e to
d81e604
Compare
bhaveshpatel640
marked this pull request as ready for review
September 3, 2026 06:45
bhaveshpatel640
force-pushed
the
AGE-2084
branch
from
September 3, 2026 06:46
d81e604 to
be8895b
Compare
debajyoti-truefoundry
approved these changes
Sep 3, 2026
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
Drop unused
agent.metadata- remote identity lives inexternal_id.Linear: AGE-2084
Changes
agent.metadataHow was this tested?
pnpm --filter @truefoundry/trueforge exec jest --config jest.unit.config.cjs tests/unit/truefoundry/TrueFoundryAgentStore.test.ts tests/unit/apis/agents.test.ts --no-coveragepnpm test:store:local -- tests/db/sqlite/agent-store/contract.test.ts tests/db/postgres/agent-store/contract.test.tsChecklist
pnpm build,pnpm test,pnpm typecheck,pnpm lint:ci, andpnpm format:checkpass locallypackages/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
Medium Risk
Schema migrations alter the
agenttable on Postgres and SQLite (SQLite table rebuild with FK handling); behavior change is limited because metadata was unused and not on the public API, but deploy order must run migrations before upgraded code.Overview
Removes the internal
agent.metadatajsonb column and all store/API plumbing around it. Remote identity stays onexternal_id; the public Agent API never exposed metadata.Postgres adds a migration that drops the column with a short lock timeout. SQLite rebuilds the
agenttable (STRICT/jsonb constraints) while preserving(tenant_id, name)uniqueness and the partial unique index on(tenant_id, external_id).AgentRecord/UpdateAgentInputand both agent stores no longer read or write metadata; the emptyagentMetadataschema module is deleted. Contract and agents API tests drop metadata patch expectations but still assert PUT rejectsmetadatain the request body.Reviewed by Cursor Bugbot for commit be8895b. Bugbot is set up for automated code reviews on this repo. Configure here.