feat: jj-ryu ForgeGraph bridge (external stack sync) #46

Merged
gmackie merged 4 commits from feat/jj-ryu-bridge-rebased into main 2026-07-01 12:01:16 +00:00
Owner

Rebased from the April jj-ryu-forgegraph-bridge branch (design doc: docs/plans/2026-04-15-jj-ryu-forgegraph-bridge-design.md, status: approved). One-way jj-ryu -> ForgeGraph stack sync: create/update/close stack nodes, reparent edges, workspace-membership authorization, stale-topology guards.

Adds 5 nullable columns + 2 unique indexes to changesets (external_source, external_source_id, external_parent_source_id, external_head_ref, last_external_sync_at) via db:push (this repo applies schema via push, not versioned migrations) — already applied to the dev DB and verified additive/safe (existing rows all NULL, no duplicate-key conflicts on the new unique indexes).

Note: the route.test.ts integration suite uses a blanket TRUNCATE ... CASCADE for cleanup between tests, which fails against the shared local dev DB's restricted grants (the forgegraph role lacks TRUNCATE on some newer tables reached via cascade, e.g. gcp_app_bindings) but should work fine against CI's own dedicated test DB where the role owns everything. Flagging this since I couldn't fully verify the test suite locally — please check CI's result on this file specifically.

Rebased from the April jj-ryu-forgegraph-bridge branch (design doc: docs/plans/2026-04-15-jj-ryu-forgegraph-bridge-design.md, status: approved). One-way jj-ryu -> ForgeGraph stack sync: create/update/close stack nodes, reparent edges, workspace-membership authorization, stale-topology guards. Adds 5 nullable columns + 2 unique indexes to changesets (external_source, external_source_id, external_parent_source_id, external_head_ref, last_external_sync_at) via db:push (this repo applies schema via push, not versioned migrations) — already applied to the dev DB and verified additive/safe (existing rows all NULL, no duplicate-key conflicts on the new unique indexes). Note: the route.test.ts integration suite uses a blanket TRUNCATE ... CASCADE for cleanup between tests, which fails against the shared local dev DB's restricted grants (the forgegraph role lacks TRUNCATE on some newer tables reached via cascade, e.g. gcp_app_bindings) but should work fine against CI's own dedicated test DB where the role owns everything. Flagging this since I couldn't fully verify the test suite locally — please check CI's result on this file specifically.
Adds nullable external_source/external_source_id/external_parent_source_id/
external_head_ref/last_external_sync_at columns plus unique indexes on
(repositoryId, jjChangeId) and (repositoryId, externalSourceId), for
jj-ryu -> ForgeGraph one-way stack sync (see
docs/plans/2026-04-15-jj-ryu-forgegraph-bridge-design.md).

Schema-only: this repo applies schema changes via `db:push`
(introspection), not versioned drizzle-kit generate migrations.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
fix(api): authorize stack sync by workspace membership
All checks were successful
CI / ci (pull_request) Successful in 15m46s
444adc3578
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
gmackie/ForgeGraph!46
No description provided.