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
Jul 31, 2026, 12:41:58 a.m.
UTC
Last successful cycle
Jul 31, 2026, 12:41:32 a.m.
UTC
Runtime status
completed
Next scheduled run
Not available
No next_run_at exposed
Last cycle duration
2.3s
Completed Jul 31, 2026, 12:41:32 a.m. UTC
Process started
Jul 31, 2026, 12:32:58 a.m.
UTC
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 StableBacklog Stable
Runs
20
Average duration
2.1s
P95 duration
2.9s
Max backlog
171
Failed runs
0
Finished UTC
2026-07-31, 12:41:32 a.m.
Live
Duration
2.3s
Backlog
96
Oldest due: 1m
Evaluated: 88
Persisted: 2
Errors: 0
Finished UTC
2026-07-31, 12:40:29 a.m.
Live
Duration
1.9s
Backlog
73
Oldest due: 1m
Evaluated: 66
Persisted: 0
Errors: 0
Finished UTC
2026-07-31, 12:39:27 a.m.
Live
Duration
2.1s
Backlog
90
Oldest due: 1m
Evaluated: 81
Persisted: 1
Errors: 0
Finished UTC
2026-07-31, 12:38:25 a.m.
Live
Duration
1.8s
Backlog
66
Oldest due: 1m
Evaluated: 66
Persisted: 0
Errors: 0
Finished UTC
2026-07-31, 12:37:23 a.m.
Live
Duration
1.9s
Backlog
72
Oldest due: 1m
Evaluated: 71
Persisted: 2
Errors: 0
Finished UTC
2026-07-31, 12:36:22 a.m.
Live
Duration
1.9s
Backlog
77
Oldest due: 1m
Evaluated: 69
Persisted: 1
Errors: 0
Finished UTC
2026-07-31, 12:35:20 a.m.
Live
Duration
2.2s
Backlog
92
Oldest due: 1m
Evaluated: 87
Persisted: 3
Errors: 0
Finished UTC
2026-07-31, 12:34:17 a.m.
Live
Duration
2s
Backlog
79
Oldest due: 1m
Evaluated: 73
Persisted: 3
Errors: 0
Finished UTC
2026-07-31, 12:33:15 a.m.
Live
Duration
2.3s
Backlog
106
Oldest due: 1m
Evaluated: 104
Persisted: 0
Errors: 0
Finished UTC
2026-07-31, 12:32:09 a.m.
Live
Duration
2.6s
Backlog
80
Oldest due: 1m
Evaluated: 77
Persisted: 1
Errors: 0
Finished UTC
2026-07-31, 12:31:07 a.m.
Live
Duration
1.9s
Backlog
72
Oldest due: 1m
Evaluated: 64
Persisted: 0
Errors: 0
Finished UTC
2026-07-31, 12:30:05 a.m.
Live
Duration
1.9s
Backlog
87
Oldest due: 1m
Evaluated: 81
Persisted: 0
Errors: 0
Finished UTC
2026-07-31, 12:29:03 a.m.
Live
Duration
1.9s
Backlog
86
Oldest due: 1m
Evaluated: 79
Persisted: 2
Errors: 0
Finished UTC
2026-07-31, 12:28:01 a.m.
Live
Duration
1.8s
Backlog
79
Oldest due: 1m
Evaluated: 75
Persisted: 0
Errors: 0
Finished UTC
2026-07-31, 12:26:59 a.m.
Live
Duration
2s
Backlog
94
Oldest due: 1m
Evaluated: 89
Persisted: 3
Errors: 0
Finished UTC
2026-07-31, 12:25:57 a.m.
Live
Duration
4.3s
Backlog
86
Oldest due: 1m
Evaluated: 82
Persisted: 1
Errors: 0
Finished UTC
2026-07-31, 12:24:53 a.m.
Live
Duration
2.9s
Backlog
80
Oldest due: 1m
Evaluated: 76
Persisted: 0
Errors: 0
Finished UTC
2026-07-31, 12:23:50 a.m.
Live
Duration
2.5s
Backlog
98
Oldest due: 1m
Evaluated: 93
Persisted: 0
Errors: 0
Finished UTC
2026-07-31, 12:22:47 a.m.
Live
Duration
2.9s
Backlog
171
Oldest due: 2m
Evaluated: 167
Persisted: 3
Errors: 0
Finished UTC
2026-07-31, 12:21:44 a.m.
Live
Duration
25ms
Backlog
0
Oldest due:
Evaluated: 0
Persisted: 0
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
96
Due Rows
96
Evaluated
88
Persisted
2
Finished At
2026-07-31T00:41:32.057+00:00
Oldest Due Age Seconds
62

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