fix(backend): use BigInt for on-chain streamId (u64-safe) #825
pr-test-gate.yml
on: pull_request
Contracts cargo test
55s
Backend npm test
1m 19s
Annotations
10 errors and 2 warnings
|
tests/integration/stream-lifecycle.test.ts > Stream Lifecycle Integration Tests > Indexer → stream_resumed: isPaused = false, accrual resumes > sets isPaused=false and accrual resumes correctly:
backend/src/workers/soroban-event-worker.ts#L1022
TypeError: Cannot mix BigInt and other types, use explicit conversions
❯ src/workers/soroban-event-worker.ts:1022:36
❯ Proxy._transactionWithCallback src/generated/prisma/runtime/client.js:103:4800
❯ SorobanEventWorker.handleStreamResumed src/workers/soroban-event-worker.ts:1012:5
❯ SorobanEventWorker.processEvent src/workers/soroban-event-worker.ts:310:9
❯ tests/integration/stream-lifecycle.test.ts:404:7
|
|
tests/integration/stream-lifecycle.test.ts > Stream Lifecycle Integration Tests > Indexer → stream_created: stream appears in GET /v1/streams/:id > processes stream_created event and makes stream available via API:
backend/tests/integration/stream-lifecycle.test.ts#L249
AssertionError: expected 1n to be 1 // Object.is equality
- Expected:
1
+ Received:
1n
❯ tests/integration/stream-lifecycle.test.ts:249:34
|
|
tests/integration/stream-actions.test.ts > stream action routes > POST /v1/streams/:streamId/withdraw withdraws the claimable amount for the recipient:
backend/tests/integration/stream-actions.test.ts#L209
AssertionError: expected 400 to be 200 // Object.is equality
- Expected
+ Received
- 200
+ 400
❯ tests/integration/stream-actions.test.ts:209:29
|
|
tests/integration/pause-resume.regression.test.ts > Regression #804: Pause/resume controller duplicate StreamEvent > pauses a stream and only writes one PAUSED event via indexer:
backend/tests/integration/pause-resume.regression.test.ts#L145
AssertionError: expected "spy" to be called with arguments: [ ObjectContaining{…} ]
Received:
1st spy call:
[
- ObjectContaining {
- "data": ObjectContaining {
+ {
+ "data": {
"isPaused": true,
+ "lastUpdateTime": 1785406359,
+ "pausedAt": 1785406359,
},
"where": {
- "streamId": 77,
+ "streamId": 77n,
},
},
]
Number of calls: 1
❯ tests/integration/pause-resume.regression.test.ts:145:38
|
|
tests/integration/admin-metrics.test.ts > GET /v1/admin/metrics > caches the response for 60 seconds:
backend/tests/integration/admin-metrics.test.ts#L167
AssertionError: expected 500 to be 200 // Object.is equality
- Expected
+ Received
- 200
+ 500
❯ tests/integration/admin-metrics.test.ts:167:26
|
|
tests/integration/admin-metrics.test.ts > GET /v1/admin/metrics > preserves precision for very large i128 withdrawn sums:
backend/tests/integration/admin-metrics.test.ts#L159
AssertionError: expected 500 to be 200 // Object.is equality
- Expected
+ Received
- 200
+ 500
❯ tests/integration/admin-metrics.test.ts:159:24
|
|
tests/integration/admin-metrics.test.ts > GET /v1/admin/metrics > returns the snake_case summary required by the public contract:
backend/tests/integration/admin-metrics.test.ts#L137
AssertionError: expected 500 to be 200 // Object.is equality
- Expected
+ Received
- 200
+ 500
❯ tests/integration/admin-metrics.test.ts:137:24
|
|
tests/soroban-event-worker.test.ts > SorobanEventWorker > Event processing idempotency > should not double-apply depositedAmount/endTime when a stream_topped_up event is re-processed:
backend/tests/soroban-event-worker.test.ts#L578
AssertionError: expected 1700000120n to be 1700000120 // Object.is equality
- Expected:
1700000120
+ Received:
1700000120n
❯ tests/soroban-event-worker.test.ts:578:31
|
|
tests/indexer-state.test.ts:
backend/src/lib/indexer-state.ts#L1
Error: [vitest] There was an error when mocking a module. If you are using "vi.mock" factory, make sure there are no top level variables inside, since this call is hoisted to top of the file. Read more: https://vitest.dev/api/vi.html#vi-mock
❯ src/lib/indexer-state.ts:1:1
Caused by: Caused by: ReferenceError: Cannot access 'mockFindUnique' before initialization
❯ tests/indexer-state.test.ts:9:19
❯ src/lib/indexer-state.ts:1:1
|
|
tests/eventRace.test.ts > Action Controller vs Worker Event Write Race Guard (Issue #831) > withdrawHandler uses upsert on transactionHash_eventType preventing P2002 duplicate crashes when worker processes event first:
backend/tests/eventRace.test.ts#L72
AssertionError: expected "spy" to be called with arguments: [ { where: { …(1) }, …(2) } ]
Received:
1st spy call:
@@ -1,10 +1,14 @@
[
{
- "create": ObjectContaining {
+ "create": {
+ "amount": "500",
"eventType": "WITHDRAWN",
- "streamId": 100,
+ "ledgerSequence": 0,
+ "metadata": "{\"withdrawnBy\":\"GRECIPIENT\"}",
+ "streamId": 100n,
+ "timestamp": 1785406361n,
"transactionHash": "tx_race_123",
},
"update": {},
"where": {
"transactionHash_eventType": {
Number of calls: 1
❯ tests/eventRace.test.ts:72:39
|
|
Contracts cargo test
Node.js 20 is deprecated. The following actions target Node.js 20 but are being forced to run on Node.js 24: actions/checkout@v4. For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/
|
|
Backend npm test
Node.js 20 is deprecated. The following actions target Node.js 20 but are being forced to run on Node.js 24: actions/checkout@v4, actions/setup-node@v4. For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/
|