Repository navigation
feat: add created_by_subject in db in place of created_by - #568
Merged
Merged
Conversation
thesujai
requested review from
bhaveshpatel640,
chiragjn,
debajyoti-truefoundry,
heerambavi1998 and
sr07asthana
as code owners
September 3, 2026 05:51
🦋 Changeset detectedLatest commit: 2205263 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
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 |
thesujai
force-pushed
the
feat/request-context
branch
from
September 3, 2026 05:51
2d106c3 to
e6df9b3
Compare
thesujai
force-pushed
the
feat/created-by-field
branch
from
September 3, 2026 06:02
17b89b5 to
d65eb70
Compare
thesujai
force-pushed
the
feat/request-context
branch
from
September 3, 2026 09:52
c34c21d to
e593de8
Compare
…ables, replacing created_by field with JSONB structure for improved data integrity and indexing
thesujai
force-pushed
the
feat/created-by-field
branch
from
September 3, 2026 10:28
d65eb70 to
cd75e71
Compare
… and enhancing JSONB handling for created_by_subject
chiragjn
reviewed
Sep 3, 2026
…cing created_by fields with JSONB structure across agent, session, schedule, and schedule_run tables for improved data integrity and indexing
chiragjn
reviewed
Sep 3, 2026
…on logic for agent, session, schedule, and schedule_run tables
…ent, session, schedule, and schedule_run tables, ensuring consistent handling and improved transaction management
thesujai
requested review from
govindavashishtha,
kumarsks619,
qaifi-tf,
sayan-truefoundry and
vinit-truefoundry
as code owners
September 3, 2026 13:45
… session, schedule, and schedule_run tables, enhancing backfill strategy and ensuring consistent handling of JSONB data
thesujai
enabled auto-merge (squash)
September 3, 2026 16:18
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 2205263. Configure here.
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
feat: add created_by_subject in db in place of created_by
Closes AGE-2067
Changes
[-](feat: add created_by_subject in db in place of created_by)
How was this tested?
With APIs, no UI testing was performed
Checklist
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
High Risk
Breaking public API and DB schema with a data migration; creator-based authorization and list scoping must stay correct or resources become inaccessible or over-exposed.
Overview
Breaking change: API and persistence now expose a required
created_by_subjectobject (subject_id,subject_type,subject_display_name) instead of stringcreated_byon agents, sessions, and schedules, and instead oftriggered_byon schedule runs. Agents also gaincreated_by_subjecton list/create responses.Ownership, session listing, schedule scoping, and metrics filters now key off
created_by_subject.subject_id(withcreatedBySubjectFromRequestContextstamping rows at create time). OpenAPI,trueforge-coreschemas/stores, Postgres/SQLite stores, and the generated SDK are aligned; the UI schedule adapter maps the new field into the existing “triggered by” display.A Postgres migration backfills JSON from legacy columns, drops
created_by/triggered_by, and adds(tenant_id, created_by_subject->>'subject_id')indexes. Changeset marks@truefoundry/trueforge-coreand@truefoundry/trueforgeas major.Reviewed by Cursor Bugbot for commit 2205263. Bugbot is set up for automated code reviews on this repo. Configure here.