QuaiWhale logo
QuaiWhale
Intelligence

Investigation Engine

Claims due canonical investigations, refreshes decisions, and records material status events.

Live
Runtime key
canonical_refresh
Railway process
worker
Required production process
Last heartbeat
Nov 1, 2026, 12:40:10 p.m.
UTC
Last successful cycle
Nov 1, 2026, 12:40:08 p.m.
UTC
Runtime status
completed
Next scheduled run
Not available
No next_run_at exposed
Last cycle duration
62ms
Completed Nov 1, 2026, 12:40:08 p.m. UTC
Process started
Oct 29, 2026, 1:01:10 a.m.
UTC
Last runtime errorOct 20, 2026, 10:29:30 p.m. UTC
canceling statement due to statement timeout
Canonical operations

Refresh duration and backlog trends

The latest twenty persisted refresh runs, ordered newest first. Duration and backlog trends compare the latest five runs with the previous five.

Duration ImprovingBacklog Improving
Runs
20
Average duration
1.8s
P95 duration
2.9s
Max backlog
276
Failed runs
0
Finished UTC
2026-11-01, 12:40:08 p.m.
Live
Duration
62ms
Backlog
0
Oldest due: —
Evaluated: 0
Persisted: 0
Errors: 0
Finished UTC
2026-11-01, 12:39:23 p.m.
Live
Duration
1.7s
Backlog
33
Oldest due: 21s
Evaluated: 33
Persisted: 0
Errors: 0
Finished UTC
2026-11-01, 12:38:36 p.m.
Live
Duration
2.4s
Backlog
184
Oldest due: 20s
Evaluated: 184
Persisted: 0
Errors: 0
Finished UTC
2026-11-01, 12:37:48 p.m.
Live
Duration
831ms
Backlog
25
Oldest due: 21s
Evaluated: 25
Persisted: 0
Errors: 0
Finished UTC
2026-11-01, 12:37:03 p.m.
Live
Duration
445ms
Backlog
3
Oldest due: 21s
Evaluated: 3
Persisted: 0
Errors: 0
Finished UTC
2026-11-01, 12:36:17 p.m.
Live
Duration
1.5s
Backlog
24
Oldest due: 20s
Evaluated: 24
Persisted: 0
Errors: 0
Finished UTC
2026-11-01, 12:35:31 p.m.
Live
Duration
536ms
Backlog
5
Oldest due: 22s
Evaluated: 5
Persisted: 0
Errors: 0
Finished UTC
2026-11-01, 12:34:45 p.m.
Live
Duration
1.2s
Backlog
73
Oldest due: 1m
Evaluated: 73
Persisted: 0
Errors: 0
Finished UTC
2026-11-01, 12:33:59 p.m.
Live
Duration
2.8s
Backlog
214
Oldest due: 57s
Evaluated: 200
Persisted: 6
Errors: 0
Finished UTC
2026-11-01, 12:33:11 p.m.
Live
Duration
3.1s
Backlog
218
Oldest due: 1m
Evaluated: 200
Persisted: 2
Errors: 0
Finished UTC
2026-11-01, 12:32:23 p.m.
Live
Duration
93ms
Backlog
200
Oldest due: 23s
Evaluated: 0
Persisted: 0
Errors: 0
Finished UTC
2026-11-01, 12:31:38 p.m.
Live
Duration
2.8s
Backlog
188
Oldest due: 1m
Evaluated: 188
Persisted: 0
Errors: 0
Finished UTC
2026-11-01, 12:30:50 p.m.
Live
Duration
2.9s
Backlog
205
Oldest due: 1m
Evaluated: 200
Persisted: 1
Errors: 0
Finished UTC
2026-11-01, 12:30:02 p.m.
Live
Duration
2.4s
Backlog
210
Oldest due: 53s
Evaluated: 200
Persisted: 4
Errors: 0
Finished UTC
2026-11-01, 12:29:15 p.m.
Live
Duration
2.6s
Backlog
224
Oldest due: 23s
Evaluated: 200
Persisted: 3
Errors: 0
Finished UTC
2026-11-01, 12:28:27 p.m.
Live
Duration
2.4s
Backlog
195
Oldest due: 23s
Evaluated: 195
Persisted: 3
Errors: 0
Finished UTC
2026-11-01, 12:27:40 p.m.
Live
Duration
678ms
Backlog
3
Oldest due: 24s
Evaluated: 3
Persisted: 0
Errors: 0
Finished UTC
2026-11-01, 12:26:54 p.m.
Live
Duration
1.7s
Backlog
104
Oldest due: 1m
Evaluated: 104
Persisted: 0
Errors: 0
Finished UTC
2026-11-01, 12:26:07 p.m.
Live
Duration
2.7s
Backlog
276
Oldest due: 1m
Evaluated: 200
Persisted: 0
Errors: 0
Finished UTC
2026-11-01, 12:25:19 p.m.
Live
Duration
2.8s
Backlog
270
Oldest due: 1m
Evaluated: 200
Persisted: 1
Errors: 0
Exact data chain

Input to product surface

required process
Step 1Input
Due investigation queue

Claims bounded due investigations with leases through the transactional canonical queue path.

Step 2Coordination
Identity-loop gate

Defers the refresh cycle while a recent canonical identity cycle is actively running.

Step 3Evaluation
Refresh canonical decisions

Re-evaluates claimed rows, separates material decision changes from technical-only updates, and builds audit events.

Step 4Persistence
Persist decisions and job audit

Updates canonical investigations, inserts status events, releases leases, and records the job-run summary.

Step 5Product
Serve investigation workspaces

Keeps Investigations, My Queue, health diagnostics, and identity workflows current.

Required dependencies

The chain cannot produce its canonical output without these dependencies.

Supabase service role

Required for queue claims, leases, canonical rows, events, and job audits.

Transactional queue RPCs

Atomic claim, persistence, and release operations for bounded refresh batches.

Secondary and fallback paths

Recovery, enrichment, transport, or coordination paths that do not replace the canonical source of truth.

canonical_identity loop state

Coordinates writes by deferring refresh while identity evaluation is running.

Material-change event writer

Adds audit events only when user-relevant canonical fields change.

Storage contract

Tables read or written by this worker chain.

Swipe horizontally to inspect all columns

TablePurpose
investigationsCanonical decision, status, priority, outcome, evidence, and scheduling state.
investigation_status_eventsMaterial status and decision audit trail.
investigation_job_runsPer-cycle health, duration, backlog, and error summary.

Product outputs

User-facing workspaces directly powered by this chain.

Runtime checkpoint

Transactional queue claim and release summary

Claimed
0
Due Rows
0
Evaluated
0
Persisted
0
Finished At
2026-11-01T12:40:08.156+00:00
Oldest Due Age Seconds
0

Cycle metadata

Job Name
refresh-canonical-investigations
Monitor Source
investigation_job_runs

Implementation map

Primary repository files implementing this worker chain and its product read path.

worker/canonical-refresh-loop.js
scripts/refresh-canonical-investigations-queue-transactional.mjs
worker/canonical-claim-client.mjs
worker/canonical-release-batch-client.mjs