stablyai/orca · error · Error
sync-runtime-graph.ts no longer defines the updatedAt bucket
Error message
sync-runtime-graph.ts no longer defines the updatedAt bucket; re-sync this benchmark.
What it means
Drift-detection guard. The benchmark reads src/renderer/src/runtime/sync-runtime-graph.ts as text and regex-extracts AGENT_STATUS_SYNC_UPDATED_AT_BUCKET_MS = <number>. If the constant is renamed, removed, reformatted (e.g. switched to a BigInt literal, moved to a separate file, or changed to a computed expression), the regex fails and the benchmark refuses to run rather than silently measuring against a wrong bucket size.
Source
Thrown at config/scripts/mobile-agent-status-projection-benchmark.mjs:28
//
// The fix memoizes each row's JSON by entry identity, mirroring the
// cachedTabsProjection pattern already in the same file, so a ping re-serializes
// only the agent that actually changed.
//
// The bucket width is re-read from the real module so a drifted constant fails
// loudly here instead of quietly changing what this benchmark measures.
import { readFileSync } from 'node:fs'
import { performance } from 'node:perf_hooks'
import { fileURLToPath } from 'node:url'
const GRAPH_SOURCE = readFileSync(
fileURLToPath(new URL('../../src/renderer/src/runtime/sync-runtime-graph.ts', import.meta.url)),
'utf8'
)
const bucketMatch = GRAPH_SOURCE.match(/AGENT_STATUS_SYNC_UPDATED_AT_BUCKET_MS = ([0-9_]+)/)
if (!bucketMatch) {
throw new Error(
'sync-runtime-graph.ts no longer defines the updatedAt bucket; re-sync this benchmark.'
)
}
const BUCKET_MS = Number(bucketMatch[1].replaceAll('_', ''))
const ITERATIONS = Number.parseInt(process.env.ORCA_AGENT_PROJECTION_BENCH_ITERATIONS ?? '400', 10)
const WARMUP = Number.parseInt(process.env.ORCA_AGENT_PROJECTION_BENCH_WARMUP ?? '60', 10)
for (const [name, value] of [
['ORCA_AGENT_PROJECTION_BENCH_ITERATIONS', ITERATIONS],
['ORCA_AGENT_PROJECTION_BENCH_WARMUP', WARMUP]
]) {
if (!Number.isInteger(value) || value <= 0) {
throw new Error(`${name} must be a positive integer, received ${value}`)
}
}
function toRow(paneKey, entry) {View on GitHub (pinned to 1136503c6a)
Solutions
- Open sync-runtime-graph.ts and find the new shape of the bucket constant
- Update the GRAPH_SOURCE regex in the benchmark to match the new definition location/format
- If the constant moved to another file, point new URL(...) at the new file and adjust the regex
- Re-run the benchmark to confirm BUCKET_MS is parsed correctly before trusting timings
Example fix
// before (sync-runtime-graph.ts moved the constant to a separate file)
const GRAPH_SOURCE = readFileSync(new URL('../../src/renderer/src/runtime/sync-runtime-graph.ts', import.meta.url), 'utf8')
// after
const GRAPH_SOURCE = readFileSync(new URL('../../src/renderer/src/runtime/agent-status-constants.ts', import.meta.url), 'utf8') Defensive patterns
Strategy: validation
Validate before calling
const bucketMatch = GRAPH_SOURCE.match(/AGENT_STATUS_SYNC_UPDATED_AT_BUCKET_MS\s*=\s*([0-9_]+)/)
if (!bucketMatch) {
throw new Error('sync-runtime-graph.ts drift: update the benchmark regex to match the new constant shape')
} Prevention
- When refactoring sync-runtime-graph.ts, grep this benchmark for AGENT_STATUS_SYNC_UPDATED_AT_BUCKET_MS
- Keep the constant as a plain numeric literal to preserve the regex match
- Run the benchmark once after any runtime-graph change to catch drift early
When it happens
Trigger: Someone renames AGENT_STATUS_SYNC_UPDATED_AT_BUCKET_MS, moves it to another module, changes it from a numeric literal to an expression, or deletes it entirely from sync-runtime-graph.ts.
Common situations: Refactoring the runtime graph module; consolidating constants into a shared config file; converting the constant to a function parameter. The guard is designed to fire exactly then.
Related errors
- advertised-url-watcher.ts no longer contains \`${marker}\`
- ${name} must be a positive integer, received ${value}
- ORCA_ADVERTISED_URL_BENCH_ROUNDS must be even
- agent-status-types.ts no longer defines ${name}; re-sync thi
- ${name} must be a positive integer, received ${value}
AI-assisted analysis of stablyai/orca@1136503c6a (2026-08-12).
Data as JSON: /api/errors/fbadb8df858edcf2.
Report an issue: GitHub.