Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
240 commits
Select commit Hold shift + click to select a range
a0a642b
chore(db): scaffold src/db/postgres directory
dcoric May 11, 2026
b7ff225
feat(config): add postgres variant to sink schema
dcoric May 11, 2026
52db0b2
feat(config): env fallback for postgres connection string
dcoric May 11, 2026
ba5c752
feat(config): add disabled postgres entry to default sink list
dcoric May 11, 2026
88fb632
chore(deps): add pg and connect-pg-simple
dcoric May 11, 2026
d95a04f
feat(db/postgres): pool and schema bootstrap helper
dcoric May 11, 2026
189b20d
feat(db/postgres): pushes adapter
dcoric May 11, 2026
379dc67
feat(db/postgres): users adapter
dcoric May 11, 2026
98ae5a6
feat(db/postgres): repo adapter with jsonb permissions
dcoric May 11, 2026
cf62fea
feat(db): wire postgres adapter into sink dispatch
dcoric May 11, 2026
5971316
fix(service): fail loudly if persistent session store is missing
dcoric May 11, 2026
77ee747
test(db/postgres): unit tests for pushes adapter
dcoric May 11, 2026
f9fbb3b
test(db/postgres): unit tests for users adapter
dcoric May 11, 2026
9e49a76
test(db/postgres): unit tests for repo adapter
dcoric May 11, 2026
5013da6
test(db/postgres): unit tests for helper bootstrap and session store
dcoric May 11, 2026
a17a9d1
test(db/postgres): integration test harness
dcoric May 11, 2026
6f74b09
test(db/postgres): pushes integration suite
dcoric May 11, 2026
d8d4e31
test(db/postgres): users integration suite
dcoric May 11, 2026
efcd240
test(db/postgres): repo integration suite
dcoric May 11, 2026
b88d6e4
ci: postgres integration lane
dcoric May 11, 2026
93a3292
docs: configuring postgres sink
dcoric May 11, 2026
fcf94f1
fix(postgres): correct user updates and session startup
dcoric May 12, 2026
00ea383
fix(config): recover cached git sources on detached head
dcoric May 15, 2026
26a348e
Merge branch 'main' into feat/postgres-sink
dcoric May 20, 2026
70d6feb
Merge remote-tracking branch 'finos/main' into feat/postgres-sink
dcoric May 29, 2026
94de03e
docs: update CONTRIBUTING.md to include PostgreSQL integration tests
dcoric Jun 3, 2026
2b59a57
test(config): set git identity for detached-HEAD cache test
dcoric Jun 3, 2026
7b12a53
test(db/postgres): cover adapter read, authorise and cancel paths
dcoric Jun 3, 2026
40bf551
test(config): use bare git checkout --detach for CI git compatibility
dcoric Jun 3, 2026
806d04d
test(config): detach cached repo by commit sha to handle unborn defau…
dcoric Jun 3, 2026
c4325b8
Merge remote-tracking branch 'finos/main' into feat/postgres-sink
dcoric Jun 3, 2026
c373d5d
feat(db/postgres): add versioned schema migration runner
dcoric Jun 4, 2026
b3ea03b
test(db/postgres): integration coverage for schema migrations
dcoric Jun 4, 2026
18f9e06
docs: document postgres schema migration mechanism
dcoric Jun 4, 2026
f111c71
feat(db/postgres): add data migration orchestrator
dcoric Jun 4, 2026
9eea3cd
feat(db/postgres): add mongodb migration source
dcoric Jun 4, 2026
55d22e3
feat(db/postgres): add filesystem migration source
dcoric Jun 4, 2026
18b3caf
feat(db/postgres): add migrate-to-postgres npm command
dcoric Jun 4, 2026
fd805fb
docs: document mongo/fs to postgres data migration
dcoric Jun 4, 2026
5f1efb4
test(db/postgres): integration coverage for data migration
dcoric Jun 4, 2026
2e6335c
Merge remote-tracking branch 'finos/main' into feat/postgres-sink
dcoric Jun 8, 2026
a6e8aab
Merge remote-tracking branch 'finos/main' into feat/postgres-schema-m…
dcoric Jun 8, 2026
ea833ec
Merge remote-tracking branch 'finos/main' into feat/postgres-data-mig…
dcoric Jun 8, 2026
1ad1dd2
feat(db/postgres): support discrete connection fields and PG* env vars
dcoric Jun 8, 2026
8e4ad65
feat(db/postgres): support TLS/ssl connection options
dcoric Jun 8, 2026
19c901c
feat(db/postgres): support connection pool tuning options
dcoric Jun 8, 2026
b1fbdf8
docs: document postgres connection configuration options
dcoric Jun 8, 2026
5b14c01
test(db/postgres): stub on() in the mocked pg Pool
dcoric Jun 9, 2026
8afc62a
fix(db/postgres): attach an idle-client error listener to the pool
dcoric Jun 9, 2026
edd63c3
test(db/postgres): assert the pool registers an error listener
dcoric Jun 9, 2026
eb99ba0
test(db/postgres): verify the error handler logs and does not rethrow
dcoric Jun 9, 2026
38d9f84
Merge remote-tracking branch 'finos/main' into feat/postgres-pool-err…
dcoric Jun 9, 2026
b045346
feat(db/postgres): add repo_users table and backfill migration
dcoric Jun 10, 2026
358c590
refactor(db/postgres): read and write repo permissions via repo_users
dcoric Jun 10, 2026
3706cd4
feat(db/postgres): drop the legacy repos.users JSONB column
dcoric Jun 10, 2026
a953633
test(db/postgres): integration coverage for repo_users normalization
dcoric Jun 10, 2026
f2d868a
docs: document repo permissions normalization into repo_users
dcoric Jun 10, 2026
c50b1e6
Merge remote-tracking branch 'finos/main' into feat/postgres-sink
dcoric Jun 11, 2026
ca16248
feat(db/postgres): add public_keys column to the users schema
dcoric Jun 11, 2026
dac8035
feat(db/postgres): map and persist user public keys
dcoric Jun 11, 2026
1b3bf87
feat(db/postgres): implement ssh public key handlers
dcoric Jun 11, 2026
645c30c
test(db/postgres): unit coverage for ssh public key handlers
dcoric Jun 11, 2026
bf2bec7
test(db/postgres): integration coverage for ssh public keys
dcoric Jun 11, 2026
024f699
fix(test): let the env override the postgres integration connection
dcoric Jun 11, 2026
a6dbaf6
fix(db/postgres): reject updateUser calls with nothing to update
dcoric Jun 11, 2026
afde6fc
fix(db/postgres): tolerate users without an email address
dcoric Jun 11, 2026
f22f537
docs: justify postgres behaviors by backend parity, not the issue
dcoric Jun 11, 2026
cf4cf73
refactor(config): move the detached-head ConfigLoader fix to its own PR
dcoric Jun 11, 2026
15f8a6e
Merge branch 'feat/postgres-sink' into feat/postgres-pool-error-handler
dcoric Jun 11, 2026
9d86c75
Merge branch 'feat/postgres-sink' into feat/postgres-connection-config
dcoric Jun 11, 2026
ab90f80
Merge branch 'feat/postgres-sink' into feat/postgres-schema-migrations
dcoric Jun 11, 2026
abf0854
feat(db/postgres): add user public keys and optional email as migrati…
dcoric Jun 11, 2026
d512450
test(db/postgres): assert the v2 users shape on a fresh database
dcoric Jun 11, 2026
529c4be
Merge branch 'feat/postgres-sink' into feat/postgres-data-migration
dcoric Jun 11, 2026
f6753c1
fix(db/postgres): default missing email and gitAccount during data mi…
dcoric Jun 11, 2026
f0cfd2c
Merge branch 'feat/postgres-schema-migrations' into feat/postgres-rep…
dcoric Jun 11, 2026
0bcd00b
Merge finos/main into feat/postgres-repo-users
dcoric Jun 12, 2026
9d205ca
test(db/postgres): cover the repo_users JSONB backfill end-to-end
dcoric Jun 12, 2026
11b0e18
feat(config): add awsIamAuth option to the postgres sink
dcoric Jun 12, 2026
912e91f
feat(db/postgres): authenticate to RDS/Aurora via IAM auth tokens
dcoric Jun 12, 2026
859f6d8
test(db/postgres): cover RDS IAM auth connection options
dcoric Jun 12, 2026
34a18df
docs: document postgres RDS IAM authentication
dcoric Jun 12, 2026
90186ba
test(db/postgres): cover the missing-rds-signer and region fallbacks
dcoric Jun 12, 2026
9540568
Merge finos/main into feat/postgres-sink
dcoric Jun 13, 2026
43a2a4e
Merge finos/main into feat/postgres-schema-migrations
dcoric Jun 13, 2026
3b7741c
Merge finos/main into feat/postgres-data-migration
dcoric Jun 13, 2026
959465e
Merge finos/main into feat/postgres-pool-error-handler
dcoric Jun 13, 2026
e400563
Merge finos/main into feat/postgres-connection-config
dcoric Jun 13, 2026
21303f4
Merge finos/main into feat/postgres-rds-iam-auth
dcoric Jun 13, 2026
2ec0bff
Merge finos/main into feat/postgres-sink
dcoric Jun 24, 2026
3e65092
Merge branch 'feat/postgres-sink' into feat/postgres-schema-migrations
dcoric Jun 24, 2026
3c94911
Merge branch 'feat/postgres-schema-migrations' into feat/postgres-rep…
dcoric Jun 24, 2026
c9d39be
Merge branch 'feat/postgres-sink' into feat/postgres-data-migration
dcoric Jun 24, 2026
c15b960
Merge branch 'feat/postgres-sink' into feat/postgres-pool-error-handler
dcoric Jun 24, 2026
35ec4ef
Merge branch 'feat/postgres-sink' into feat/postgres-connection-config
dcoric Jun 24, 2026
248b00a
Merge branch 'feat/postgres-connection-config' into feat/postgres-rds…
dcoric Jun 24, 2026
62d2d31
Merge remote-tracking branch 'finos/main' into feat/postgres-sink
dcoric Jun 26, 2026
21165fe
Merge branch 'feat/postgres-sink' into feat/postgres-schema-migrations
dcoric Jun 26, 2026
afb01c5
Merge branch 'feat/postgres-schema-migrations' into feat/postgres-rep…
dcoric Jun 26, 2026
6a43f97
Merge branch 'feat/postgres-sink' into feat/postgres-data-migration
dcoric Jun 26, 2026
facf98e
Merge branch 'feat/postgres-sink' into feat/postgres-pool-error-handler
dcoric Jun 26, 2026
42ebc5c
Merge branch 'feat/postgres-sink' into feat/postgres-connection-config
dcoric Jun 26, 2026
63cb779
Merge branch 'feat/postgres-connection-config' into feat/postgres-rds…
dcoric Jun 26, 2026
d1da368
Merge remote-tracking branch 'finos/main' into feat/postgres-sink
dcoric Jun 29, 2026
67945d1
Merge branch 'feat/postgres-sink' into feat/postgres-schema-migrations
dcoric Jun 29, 2026
afb7005
Merge branch 'feat/postgres-schema-migrations' into feat/postgres-rep…
dcoric Jun 29, 2026
175867d
Merge branch 'feat/postgres-sink' into feat/postgres-data-migration
dcoric Jun 29, 2026
2eb7e5c
Merge branch 'feat/postgres-sink' into feat/postgres-pool-error-handler
dcoric Jun 29, 2026
4dfabc7
Merge branch 'feat/postgres-sink' into feat/postgres-connection-config
dcoric Jun 29, 2026
7b9d3bd
Merge branch 'feat/postgres-connection-config' into feat/postgres-rds…
dcoric Jun 29, 2026
44a264e
Merge branch 'main' into feat/postgres-sink
kriswest Jul 9, 2026
5ef0188
Merge remote-tracking branch 'finos/main' into feat/postgres-sink
dcoric Jul 13, 2026
d39ed58
Merge branch 'feat/postgres-sink' into feat/postgres-schema-migrations
dcoric Jul 13, 2026
33c1510
Merge branch 'feat/postgres-schema-migrations' into feat/postgres-rep…
dcoric Jul 13, 2026
59605ff
Merge branch 'feat/postgres-sink' into feat/postgres-data-migration
dcoric Jul 13, 2026
7e01406
Merge branch 'feat/postgres-sink' into feat/postgres-pool-error-handler
dcoric Jul 13, 2026
170c41a
Merge branch 'feat/postgres-sink' into feat/postgres-connection-config
dcoric Jul 13, 2026
cd73b7f
Merge branch 'feat/postgres-connection-config' into feat/postgres-rds…
dcoric Jul 13, 2026
8a9fee7
docs: drop stale issue reference from postgres sink architecture notes
dcoric Jul 13, 2026
22fec3b
Merge branch 'feat/postgres-sink' into feat/postgres-schema-migrations
dcoric Jul 13, 2026
d61927a
Merge branch 'feat/postgres-schema-migrations' into feat/postgres-rep…
dcoric Jul 13, 2026
e0b4a94
Merge branch 'feat/postgres-sink' into feat/postgres-data-migration
dcoric Jul 13, 2026
19c7834
Merge branch 'feat/postgres-sink' into feat/postgres-pool-error-handler
dcoric Jul 13, 2026
9bb2553
Merge branch 'feat/postgres-sink' into feat/postgres-connection-config
dcoric Jul 13, 2026
d3caadf
Merge branch 'feat/postgres-connection-config' into feat/postgres-rds…
dcoric Jul 13, 2026
35e7317
Merge remote-tracking branch 'finos/main' into feat/postgres-sink
dcoric Jul 23, 2026
e25a3e8
feat(db/postgres): add findUserByGitAccount to match the sink interface
dcoric Jul 23, 2026
74d0375
Merge branch 'feat/postgres-sink' into feat/postgres-schema-migrations
dcoric Jul 23, 2026
88f5d34
Merge branch 'feat/postgres-schema-migrations' into feat/postgres-rep…
dcoric Jul 23, 2026
238f1c2
Merge branch 'feat/postgres-sink' into feat/postgres-data-migration
dcoric Jul 23, 2026
4ccd91b
Merge branch 'feat/postgres-sink' into feat/postgres-pool-error-handler
dcoric Jul 23, 2026
1f67754
Merge branch 'feat/postgres-sink' into feat/postgres-connection-config
dcoric Jul 23, 2026
b74160e
Merge branch 'feat/postgres-connection-config' into feat/postgres-rds…
dcoric Jul 23, 2026
b39ecde
Merge remote-tracking branch 'finos/main' into feat/postgres-sink
dcoric Jul 27, 2026
f7e9458
Merge branch 'feat/postgres-sink' into feat/postgres-schema-migrations
dcoric Jul 27, 2026
1ea7ecc
Merge branch 'feat/postgres-schema-migrations' into feat/postgres-rep…
dcoric Jul 27, 2026
407e003
Merge branch 'feat/postgres-sink' into feat/postgres-data-migration
dcoric Jul 27, 2026
b1bdc98
Merge branch 'feat/postgres-sink' into feat/postgres-pool-error-handler
dcoric Jul 27, 2026
57c1595
Merge branch 'feat/postgres-sink' into feat/postgres-connection-config
dcoric Jul 27, 2026
6ae7a99
Merge branch 'feat/postgres-connection-config' into feat/postgres-rds…
dcoric Jul 27, 2026
9370ece
chore: open integration branch for the PostgreSQL sink
dcoric Aug 24, 2026
678850d
Merge finos/main into feat/postgres-sink
dcoric Aug 24, 2026
1232c46
Merge branch 'feat/postgres-sink' into feat/postgres-pool-error-handler
dcoric Aug 24, 2026
e9be314
Merge branch 'feat/postgres-sink' into feat/postgres-connection-config
dcoric Aug 24, 2026
05648f2
Merge branch 'feat/postgres-connection-config' into feat/postgres-rds…
dcoric Aug 24, 2026
cfc4c82
Merge branch 'feat/postgres-sink' into feat/postgres-data-migration
dcoric Aug 24, 2026
7c4af22
Merge branch 'feat/postgres-sink' into feat/postgres-schema-migrations
dcoric Aug 24, 2026
7658625
Merge branch 'feat/postgres-schema-migrations' into feat/postgres-rep…
dcoric Aug 24, 2026
23fe9d2
chore: regenerate package-lock with the npm version CI uses
dcoric Aug 24, 2026
c9e59cb
Merge branch 'feat/postgres-sink' into feat/postgres-schema-migrations
dcoric Aug 24, 2026
93fb423
Merge branch 'feat/postgres-sink' into feat/postgres-data-migration
dcoric Aug 24, 2026
13c230e
Merge branch 'feat/postgres-sink' into feat/postgres-pool-error-handler
dcoric Aug 24, 2026
edd907f
Merge branch 'feat/postgres-sink' into feat/postgres-connection-config
dcoric Aug 24, 2026
5656325
Merge branch 'feat/postgres-schema-migrations' into feat/postgres-rep…
dcoric Aug 24, 2026
4cff767
Merge branch 'feat/postgres-connection-config' into feat/postgres-rds…
dcoric Aug 24, 2026
04fee88
style: format pushes.ts with prettier
dcoric Aug 24, 2026
59ac8b3
Merge branch 'feat/postgres-sink' into feat/postgres-schema-migrations
dcoric Aug 24, 2026
fd760d0
Merge branch 'feat/postgres-sink' into feat/postgres-data-migration
dcoric Aug 24, 2026
93d57c2
Merge branch 'feat/postgres-sink' into feat/postgres-pool-error-handler
dcoric Aug 24, 2026
048c982
Merge branch 'feat/postgres-sink' into feat/postgres-connection-config
dcoric Aug 24, 2026
3b896cd
Merge branch 'feat/postgres-schema-migrations' into feat/postgres-rep…
dcoric Aug 24, 2026
ada3aeb
Merge branch 'feat/postgres-connection-config' into feat/postgres-rds…
dcoric Aug 24, 2026
931335b
feat(db/postgres): store repo dateCreated and lastModified
dcoric Aug 24, 2026
cc83957
Merge branch 'feat/postgres-sink' into feat/postgres-data-migration
dcoric Aug 24, 2026
43d5e5d
Merge branch 'feat/postgres-sink' into feat/postgres-pool-error-handler
dcoric Aug 24, 2026
bfbeb47
Merge branch 'feat/postgres-sink' into feat/postgres-connection-config
dcoric Aug 24, 2026
39988d9
Merge branch 'feat/postgres-sink' into feat/postgres-schema-migrations
dcoric Aug 24, 2026
1a66450
Merge branch 'feat/postgres-schema-migrations' into feat/postgres-rep…
dcoric Aug 24, 2026
793c893
Merge branch 'feat/postgres-connection-config' into feat/postgres-rds…
dcoric Aug 24, 2026
4e8cc50
feat: add sink-parity agent skill
dcoric Aug 24, 2026
a0abca0
perf(db/postgres): index the pushes hot paths and slim list projections
dcoric Aug 24, 2026
85ed238
docs: record the PostgreSQL sink design decisions in the architecture…
dcoric Aug 24, 2026
7a5b815
docs: point database changes at the sink-parity skill from AGENTS.md
dcoric Aug 24, 2026
8ed4725
Merge branch 'feat/postgres-sink' into feat/postgres-schema-migrations
dcoric Aug 24, 2026
8ab25c6
Merge branch 'feat/postgres-sink' into feat/postgres-data-migration
dcoric Aug 24, 2026
54d6ce2
Merge branch 'feat/postgres-sink' into feat/postgres-pool-error-handler
dcoric Aug 24, 2026
52bb0e2
Merge branch 'feat/postgres-sink' into feat/postgres-connection-config
dcoric Aug 24, 2026
e8b4e4d
Merge branch 'feat/postgres-schema-migrations' into feat/postgres-rep…
dcoric Aug 24, 2026
7269069
Merge branch 'feat/postgres-schema-migrations' into feat/postgres-pus…
dcoric Aug 24, 2026
7e09b68
Merge branch 'feat/postgres-connection-config' into feat/postgres-rds…
dcoric Aug 24, 2026
d7ed000
Merge pull request #1532 from dcoric/feat/postgres-sink
dcoric Aug 24, 2026
eafe14e
Merge branch 'feat/postgres' into feat/postgres-schema-migrations
jescalada Aug 24, 2026
74aedea
Merge pull request #1581 from dcoric/feat/postgres-schema-migrations
jescalada Aug 24, 2026
bb43044
Merge branch 'feat/postgres' into feat/postgres-data-migration
jescalada Aug 24, 2026
44de8a2
Merge remote-tracking branch 'finos/feat/postgres' into feat/postgres…
dcoric Aug 25, 2026
1d6a005
Merge remote-tracking branch 'finos/feat/postgres' into feat/postgres…
dcoric Aug 25, 2026
856c8ab
Merge branch 'feat/postgres-connection-config' into feat/postgres-rds…
dcoric Aug 25, 2026
d2e23ff
Merge remote-tracking branch 'finos/feat/postgres' into feat/postgres…
dcoric Aug 25, 2026
93a2163
Merge remote-tracking branch 'finos/feat/postgres' into feat/postgres…
dcoric Aug 25, 2026
be160a8
Merge remote-tracking branch 'finos/feat/postgres' into feat/sink-par…
dcoric Aug 25, 2026
188c43c
Merge pull request #1583 from dcoric/feat/postgres-pool-error-handler
jescalada Aug 26, 2026
4ca29d7
Merge branch 'main' into feat/postgres
jescalada Aug 26, 2026
bb14cee
Merge branch 'feat/postgres' into feat/postgres-connection-config
jescalada Aug 26, 2026
7cab69c
Merge branch 'feat/postgres' into feat/postgres-repo-users
jescalada Aug 26, 2026
68513f1
fix(db/postgres): widen the PG* env check and warn on ignored discret…
dcoric Aug 27, 2026
331043a
docs: make the sink-parity skill contract-first and add a testing sec…
dcoric Aug 27, 2026
46c6dec
feat(db/postgres): batch the push migration and harden the file source
dcoric Aug 27, 2026
a309bbf
Merge pull request #1584 from dcoric/feat/postgres-connection-config
dcoric Aug 27, 2026
e65e4fb
Merge remote-tracking branch 'finos/feat/postgres' into feat/postgres…
dcoric Aug 27, 2026
f64e43e
Merge remote-tracking branch 'finos/feat/postgres' into feat/postgres…
dcoric Aug 27, 2026
6f5d984
Merge remote-tracking branch 'finos/feat/postgres' into feat/postgres…
dcoric Aug 27, 2026
c97a0c8
Merge remote-tracking branch 'finos/feat/postgres' into feat/sink-par…
dcoric Aug 27, 2026
1ede899
Merge remote-tracking branch 'finos/feat/postgres' into feat/postgres…
dcoric Aug 27, 2026
a1196fe
ci: run the CI workflow for the feat/postgres integration branch
dcoric Aug 27, 2026
1b59030
fix(db/postgres): make updateRepo transactional and lowercase the bac…
dcoric Aug 27, 2026
ea3a312
Merge remote-tracking branch 'finos/feat/postgres' into feat/postgres…
dcoric Aug 27, 2026
54fe7d6
test(db/postgres): cover withTransaction, lowercased backfill and upd…
dcoric Aug 27, 2026
5592926
test(db/postgres): isolate withTransaction assertions from the pool b…
dcoric Aug 27, 2026
5b4e053
Merge remote-tracking branch 'finos/feat/postgres' into feat/postgres…
dcoric Aug 27, 2026
36055fc
test(db/postgres): expect version 6 in the schema migration assertions
dcoric Aug 27, 2026
a7c1047
Merge remote-tracking branch 'finos/feat/postgres' into feat/postgres…
dcoric Aug 27, 2026
a7839c8
Merge remote-tracking branch 'finos/feat/postgres' into feat/postgres…
dcoric Aug 27, 2026
794db19
Merge remote-tracking branch 'finos/feat/postgres' into feat/sink-par…
dcoric Aug 27, 2026
6939f9d
test(db/postgres): clear every PG* variable the connection guard reads
dcoric Aug 27, 2026
3b135f1
Merge remote-tracking branch 'finos/feat/postgres' into feat/postgres…
dcoric Aug 27, 2026
d3a7e63
Merge remote-tracking branch 'finos/feat/postgres' into feat/postgres…
dcoric Aug 27, 2026
c0c35a0
Merge remote-tracking branch 'finos/feat/postgres' into feat/postgres…
dcoric Aug 27, 2026
4c7003d
Merge remote-tracking branch 'finos/feat/postgres' into feat/postgres…
dcoric Aug 27, 2026
1c1375e
Merge remote-tracking branch 'finos/feat/postgres' into feat/sink-par…
dcoric Aug 27, 2026
94b49b9
fix(db/postgres): surface RDS IAM transport pitfalls instead of faili…
dcoric Aug 27, 2026
13caea1
test(db/postgres): serialise the integration files under vitest 4
dcoric Aug 27, 2026
9f6fb3b
Merge remote-tracking branch 'finos/feat/postgres' into feat/postgres…
dcoric Aug 27, 2026
f25a077
Merge remote-tracking branch 'finos/feat/postgres' into feat/postgres…
dcoric Aug 27, 2026
fe63eb8
Merge remote-tracking branch 'finos/feat/postgres' into feat/postgres…
dcoric Aug 27, 2026
195cf2d
Merge remote-tracking branch 'finos/feat/postgres' into feat/postgres…
dcoric Aug 27, 2026
6249a64
Merge remote-tracking branch 'finos/feat/postgres' into feat/sink-par…
dcoric Aug 27, 2026
5fe3ad9
test(db/postgres): import the DDL migration list from its post-rename…
dcoric Aug 27, 2026
b93c4ed
chore: regenerate package-lock with the npm version CI uses
dcoric Aug 27, 2026
ac8ca1f
Merge pull request #1590 from dcoric/feat/postgres-repo-users
jescalada Aug 28, 2026
864be89
Merge pull request #1689 from dcoric/feat/sink-parity-skill
jescalada Aug 28, 2026
fbb56bb
Merge remote-tracking branch 'finos/feat/postgres' into feat/postgres…
dcoric Aug 28, 2026
0ac64f0
Merge remote-tracking branch 'finos/feat/postgres' into feat/postgres…
dcoric Aug 28, 2026
4fb042f
Merge remote-tracking branch 'finos/feat/postgres' into feat/postgres…
dcoric Aug 28, 2026
83377fe
Merge pull request #1582 from dcoric/feat/postgres-data-migration
dcoric Aug 28, 2026
f04ccba
Merge pull request #1692 from dcoric/feat/postgres-pushes-perf
dcoric Aug 28, 2026
772d4ea
Merge remote-tracking branch 'finos/feat/postgres' into feat/postgres…
dcoric Aug 28, 2026
9de035e
Merge pull request #1591 from dcoric/feat/postgres-rds-iam-auth
dcoric Aug 28, 2026
f596c2b
ci: drop the temporary feat/postgres triggers
dcoric Aug 28, 2026
61cb038
fix(postgres): make push decisions, repo creation and key adds atomic
dcoric Aug 29, 2026
435c232
feat(postgres): autoMigrate escape hatch, versioned session table, po…
dcoric Aug 29, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 69 additions & 0 deletions .agents/skills/sink-parity/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
---
name: sink-parity
description: Keep the fs, mongo and postgres sink backends at feature parity when changing any of them
---

Keep the sink backends at feature parity.

Read `AGENTS.md` first. It is the canonical project guide for this repository.

GitProxy persists its state through interchangeable sink backends: `src/db/file` (NeDB), `src/db/mongo`, and `src/db/postgres`. They all implement the `Sink` interface in `src/db/types.ts`, and deployments pick one via the `sink` config. A feature that exists in one backend but not the others is a bug waiting for whichever deployment uses the others.

Use this skill whenever a change touches any of:

- the `Sink` interface or the entity classes (`Repo`, `User`, push types) in `src/db/types.ts`
- any backend adapter under `src/db/file`, `src/db/mongo`, or `src/db/postgres`
- the migration framework (`src/db/migrations`) or the postgres schema

## The contract

- `src/db/types.ts` is the single source of truth: the `Sink` interface plus the doc comments on its members define the behaviour every backend must provide. No backend implementation, mongo included, outranks the contract. A new `Sink` member or entity field is not done until all three backends implement it in the same change; do not leave a backend behind for a follow-up.
- `npm run check-types:server` enforces the interface structurally, but it cannot see semantic drift. The rest of this checklist exists for what the compiler cannot catch.

## Adding or changing a Sink member

1. Add the member to the `Sink` interface with a doc comment stating its semantics (ordering, case sensitivity, empty-result shape).
2. Implement it in `src/db/file`, `src/db/mongo`, and `src/db/postgres`. The doc comment on the interface member is the reference for behaviour, not any one backend: whichever implementation lands first defines the semantics, so spell them out in the doc comment and make the other backends match it. Historically most members appeared in mongo first, but new functionality can just as well start in postgres; do not assume mongo is the template.
3. Export it from each backend's `index.ts` and wire the dispatcher in `src/db/index.ts`.
4. Add unit tests for every backend, not just the one you started from.

## Adding a field to an entity

1. Update the class in `src/db/types.ts`.
2. fs and mongo store documents whole, so writes usually pass new fields through automatically; verify reads return them.
3. postgres maps fields to columns explicitly, so every layer must be updated by hand:
- schema: add the column (see the migration rules below)
- create: insert the field, applying the same defaults as mongo (for example `dateCreated`/`lastModified` are stamped with the current ISO time on create)
- update: extend the column allowlist; a field missing from the allowlist is dropped silently, and an update reduced to zero columns throws, which has already nearly shipped a startup crash (`populateRepoDates`)
- read: add the column to every select and to the row-to-entity mapping
4. If mongo or fs bump `lastModified` (or similar) on a mutation, every backend must bump it on that mutation.

## Postgres schema changes

- Schema changes are append-only migrations; never edit or reorder an entry that has shipped.
- Cross-backend logical migrations belong in `src/db/migrations` (registered in `registry.ts`) and run through the `Sink` hooks (`getAppliedMigrations`, `recordMigration`, `unrecordMigration`), so they must work against all three backends.
- `deriveCreatedAt` is best-effort by design: mongo derives a timestamp from the ObjectId, fs and postgres return `undefined` and callers fall back. Do not assume it returns a value.

## Semantic parity rules

- Same defaults on create in every backend.
- Same case handling: usernames are lowercased on permission changes; name lookups are case-insensitive where mongo's are.
- Same projections: list endpoints must return the same field set from every backend, or UI behaviour diverges by deployment.
- Same error behaviour for invalid input (missing id, empty update).

## Tests

- Each backend has unit tests under `test/db/<backend>` that mock the driver (`pg` is mocked for postgres, NeDB runs in-memory for fs). Integration tests (`test/db/postgres/*.integration.test.ts`, `test/db/mongo/*.integration.test.ts`) run against a real service and are skipped when none is reachable; CI runs them in dedicated lanes.
- When you touch a backend, add or extend BOTH kinds for it: unit coverage for the logic, integration coverage for the real query shapes. The fs backend has no external service, so unit coverage is enough there.
- Keep the test scenarios aligned across backends: perform the same operations with the same inputs, and assert the same outputs, so parity is something the suite proves rather than something reviewers eyeball. If a scenario genuinely does not apply to a backend, say so in a comment instead of silently skipping it.

## Verify before pushing

```
npm run check-types:server
cross-env NODE_ENV=test npx vitest --run test/db
npm run lint
npm run format:check
```

Postgres integration tests (`npm run test:integration:postgres`) need a reachable PostgreSQL database; CI runs them in the dedicated lane.
24 changes: 24 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,24 @@ jobs:
node-version: [22.x, 24.x]
mongodb-version: ['6.0', '7.0', '8.0']

# PostgreSQL service container for the postgres integration tests. A
# single version (postgres:16) keeps the lane fast; a broader version
# matrix can follow later if needed.
services:
postgres:
image: postgres:16
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: git_proxy_test
ports:
- 5432:5432
options: >-
--health-cmd "pg_isready -U postgres"
--health-interval 10s
--health-timeout 5s
--health-retries 5

steps:
- name: Harden Runner
uses: step-security/harden-runner@05e31511f85b41b11d1cf0ef85d0992719546e2c # v2.21.0
Expand Down Expand Up @@ -71,6 +89,12 @@ jobs:
GIT_PROXY_MONGO_CONNECTION_STRING: mongodb://localhost:27017/git-proxy-test
run: npm run test:integration

- name: PostgreSQL Integration Tests
env:
RUN_POSTGRES_TESTS: 'true'
GIT_PROXY_POSTGRES_CONNECTION_STRING: postgresql://postgres:postgres@localhost:5432/git_proxy_test
run: npm run test:integration:postgres

- name: Upload test coverage report
uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0
with:
Expand Down
5 changes: 5 additions & 0 deletions .opencode/commands/sink-parity.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
description: Keep the fs, mongo and postgres sink backends at feature parity
---

Follow @.agents/skills/sink-parity/SKILL.md.
4 changes: 4 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,10 @@ This file is the canonical project guide. Tool-specific entry points:
- OpenCode: `.opencode/commands/`
- Codex: `AGENTS.md`

### Database changes

The fs, mongo and postgres sink backends must stay at feature parity. Before changing anything under `src/db`, read `.agents/skills/sink-parity/SKILL.md`: apparently simple adaptor changes usually cost more on the postgres side (explicit columns, update allowlists, append-only schema migrations) than on the document stores, and the skill carries the checklist that keeps the backends aligned.

---

## Agent Workflow
Expand Down
31 changes: 29 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ For project governance, roles, and voting procedures, see the [Governance sectio
- [Development Workflow](#development-workflow)
- [Testing](#testing)
- [Unit Tests](#unit-tests)
- [MongoDB Integration Tests](#mongodb-integration-tests)
- [PostgreSQL Integration Tests](#postgresql-integration-tests)
- [End-to-End Tests](#end-to-end-tests)
- [UI Tests (Cypress)](#ui-tests-cypress)
- [Fuzz Tests](#fuzz-tests)
Expand Down Expand Up @@ -87,7 +89,7 @@ git-proxy/
├── src/
│ ├── proxy/ # Core proxy logic (action chain, processors)
│ ├── service/ # Express app, API routes, authentication (Passport.js)
│ ├── db/ # Database abstraction (MongoDB + NeDB)
│ ├── db/ # Database abstraction (MongoDB, PostgreSQL, NeDB)
│ ├── config/ # Configuration loading and generated types
│ ├── ui/ # React dashboard (Material-UI)
│ ├── plugin.ts # Plugin base classes (PushActionPlugin, PullActionPlugin)
Expand All @@ -113,7 +115,7 @@ git-proxy/

- **Action chain**: Git push/fetch requests flow through a chain of processors in `src/proxy/chain.ts`
- **Plugin system**: Extends the action chain with custom logic (see `src/plugin.ts`)
- **Dual database**: MongoDB for production state; [NeDB](https://github.com/seald/nedb) for local file-based development (`.data/` directory)
- **Pluggable database**: MongoDB or PostgreSQL for production state; [NeDB](https://github.com/seald/nedb) for local file-based development (`.data/` directory)
- **Authentication**: Passport.js strategies (local, Active Directory, OpenID Connect)

## Development Workflow
Expand Down Expand Up @@ -202,6 +204,31 @@ Configuration: [vitest.config.integration.ts](vitest.config.integration.ts)

In CI, `RUN_MONGO_TESTS` is set automatically in the workflow that runs integration tests.

### PostgreSQL Integration Tests

Some tests require a real PostgreSQL instance. These are guarded by the `RUN_POSTGRES_TESTS` environment variable and run separately from unit tests.

```bash
# Start PostgreSQL with Docker
docker run -d --name postgres-test -p 5432:5432 \
-e POSTGRES_USER=postgres \
-e POSTGRES_PASSWORD=postgres \
-e POSTGRES_DB=git_proxy_test \
postgres:16

# Run PostgreSQL integration tests
npm run test:integration:postgres

# Cleanup
docker stop postgres-test && docker rm postgres-test
```

Configuration: [vitest.config.integration.postgres.ts](vitest.config.integration.postgres.ts)

Unlike the MongoDB lane, `RUN_POSTGRES_TESTS` and the connection string are set by the Vitest config itself, so no extra environment variables are required on the command line — you only need a PostgreSQL instance reachable at `postgresql://postgres:postgres@localhost:5432/git_proxy_test`.

In CI, the PostgreSQL integration tests run against a `postgres:16` service container in the same workflow as the MongoDB integration tests.

### End-to-End Tests

E2E tests perform real git operations against a Dockerized environment. They use Vitest with a separate config.
Expand Down
75 changes: 75 additions & 0 deletions config.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -568,6 +568,81 @@
"enabled": { "type": "boolean" }
},
"required": ["type", "enabled"]
},
{
"type": "object",
"name": "PostgreSQL Config",
"description": "Connection properties for PostgreSQL. The `connectionString` may also be supplied via the `GIT_PROXY_POSTGRES_CONNECTION_STRING` environment variable. If neither a `connectionString` nor the discrete `host`/`port`/`user`/`password`/`database` fields are set, the standard `PGHOST`/`PGPORT`/`PGUSER`/`PGPASSWORD`/`PGDATABASE` environment variables are used.",
"properties": {
"type": { "type": "string", "const": "postgres" },
"enabled": { "type": "boolean" },
"connectionString": {
"type": "string",
"description": "PostgreSQL client connection string, see [https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-CONNSTRING](https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-CONNSTRING). If omitted, `GIT_PROXY_POSTGRES_CONNECTION_STRING` is used as a fallback, then the discrete fields below, then the `PG*` environment variables. Takes precedence over the discrete fields when set."
},
"host": {
"type": "string",
"description": "Database server host. Used when `connectionString` is not set. Falls back to the `PGHOST` environment variable."
},
"port": {
"type": "number",
"description": "Database server port. Used when `connectionString` is not set. Falls back to the `PGPORT` environment variable."
},
"user": {
"type": "string",
"description": "Database user. Used when `connectionString` is not set. Falls back to the `PGUSER` environment variable."
},
"password": {
"type": "string",
"description": "Database password. Used when `connectionString` is not set. Falls back to the `PGPASSWORD` environment variable."
},
"database": {
"type": "string",
"description": "Database name. Used when `connectionString` is not set. Falls back to the `PGDATABASE` environment variable."
},
"autoMigrate": {
"type": "boolean",
"description": "Run pending schema migrations automatically at startup (default `true`). Set to `false` when the runtime database role must not hold DDL rights: apply migrations out-of-band with DDL-capable credentials (`npm run migrate:postgres:schema`), and startup will only verify the schema is current, refusing to start while any migration is pending."
},
"ssl": {
"description": "TLS configuration for the connection. `true` enables TLS with default certificate verification; an object is passed to the PostgreSQL client as TLS options (for example `rejectUnauthorized`, `ca`, `cert`, `key`).",
"oneOf": [{ "type": "boolean" }, { "type": "object", "additionalProperties": true }]
},
"pool": {
"type": "object",
"description": "Connection pool tuning passed to the PostgreSQL client.",
"properties": {
"max": {
"type": "number",
"description": "Maximum number of clients the pool may hold."
},
"idleTimeoutMillis": {
"type": "number",
"description": "Milliseconds a client may sit idle in the pool before being closed."
},
"connectionTimeoutMillis": {
"type": "number",
"description": "Milliseconds to wait for a connection before timing out."
}
}
},
"awsIamAuth": {
"type": "object",
"description": "Authenticate to Amazon RDS/Aurora with an IAM auth token instead of a static password. When enabled, a short-lived token is generated for each new connection from the AWS SDK default credential chain, so no password is stored. Requires the discrete `host`/`port`/`user` fields (or the `PGHOST`/`PGPORT`/`PGUSER` environment variables) rather than a `connectionString`, requires TLS (`ssl` defaults to `true` when omitted), and needs the optional `@aws-sdk/rds-signer` dependency to be installed.",
"properties": {
"enabled": {
"type": "boolean",
"description": "Enable IAM token authentication for the PostgreSQL connection."
},
"region": {
"type": "string",
"description": "AWS region of the RDS/Aurora instance. Falls back to the `AWS_REGION` / `AWS_DEFAULT_REGION` environment variables, then the AWS SDK's default region resolution."
}
},
"required": ["enabled"]
}
},
"required": ["type", "enabled"]
}
]
},
Expand Down
2 changes: 2 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ export default defineConfig(
// vendored code we're not changing
'src/ui/assets/js/**',
'src/ui/assets/css/**',
// local claude worktrees / scratch
'.claude/**',
],
},

Expand Down
Loading
Loading