Skip to content

Commit 76be711

Browse files
committed
refactor(V2): polish comments per review feedback
- Drop "Reduced from" history sentence from COMMIT_POLL_INTERVAL_MS comment; intent and trade-off are sufficient, history lives in git log - Add tradeoff comment on the merged cascade-delete it() explaining why Graph A + Graph B share one it() despite reduced failure isolation
1 parent 741dec0 commit 76be711

2 files changed

Lines changed: 8 additions & 4 deletions

File tree

tests/v2/live-api/cascade-delete.live.spec.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,11 @@ describe('Cascade Delete Live API Tests', function () {
5151
return parsed.some((p) => p?.[key] === value);
5252
});
5353

54+
// Graphs A and B are intentionally combined into one it() to share a single
55+
// on-chain commit cycle. Trade-off: a Graph A assertion failure will abort
56+
// the test before Graph B executes. Accepted because the two graphs share
57+
// the same commit, and duplicating the commit cycle for isolation would cost
58+
// ~2 min per CI run.
5459
it('should cascade delete project and sub-entity children through commit', async function () {
5560
// === Graph A: full project cascade (project + 11 children) ===
5661
const programAId = await postAndGetId('/v2/program', generateProgram(), 'cadTrustProgramId');

tests/v2/live-api/helpers/live-api-helpers.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,10 @@ import {
1010
createRecoveryStuckTracker,
1111
} from './wallet-diagnostics.js';
1212

13-
// Reduced from 10 000 ms to cut idle wait time between blockchain commits.
1413
// Each iteration calls two HTTP endpoints (org-synced + wallet-diagnostics),
15-
// so the total request rate increase across all live jobs is ~6.7× vs the old
16-
// 10 s interval. Both jobs (test-v2-live-api, test-v2-live-cascade-delete)
17-
// use this helper; the 30-minute suite timeout is not at risk.
14+
// so the per-loop request rate is ~6.7× the org-creation polling interval.
15+
// Both live jobs (test-v2-live-api, test-v2-live-cascade-delete) share this
16+
// helper; the 30-minute suite timeout is not at risk.
1817
const COMMIT_POLL_INTERVAL_MS = 3000;
1918

2019
/**

0 commit comments

Comments
 (0)