Skip to content

feat(benchsdk-runner): reliability config block + --scheduled-for - #562

Merged
dtice25 merged 3 commits into
masterfrom
devin/1793150145-reliability-runner
Oct 28, 2026
Merged

dtice25 merged 3 commits into
masterfrom
devin/1793150145-reliability-runner

Conversation

@dtice25

@dtice25 dtice25 commented Oct 28, 2026

Copy link
Copy Markdown
Collaborator

Summary

Lands rollout step 2 of the reliability benchmark design (docs/2026-09-29-benchmark-types.md in benchmarks-platform): the runner side of type: 'reliability'.

reliability config block — defineBenchmarkConfig now accepts type: 'reliability' with a strict reliability block mirroring the platform's config.reliability zod schema:

reliability: {
  interval: '1m',                       // required, /^(\d+)([smh])$/, >= 30s
  graceMs?: number,
  degradedWhen?: { data: Record<string, string | number | boolean> },
  target?: { uptime: number },          // 0 < x < 1
  layout?: 'series',
  sections?: (uptime | slot-grid | metric | breakdown | incidents)[],
  feedCard?: { strip?: '24h', stat?: 'uptime' },
}

Pairing is enforced both ways (block requires the type, type requires the block). Unlike the platform — which skips unknown section types at render time — the runner is the strict check: unknown section types, windows, stats, and outcomes throw at definition time. A metric section must name a key in display.metrics or the built-in 'latency' (RELIABILITY_LATENCY_METRIC).

Upsert — the materialize path sends config.reliability alongside index/display/scoring, so a reliability-typed bench file passes the platform's type-vs-config check on first run.

--scheduled-for <ISO-8601> — new flag stamped into config.trigger.scheduledFor on the run (read by reliability-slots.ts's assignedAt). A scheduled run that reports late fills its real slot instead of whichever slot it landed in by creation time; without the flag the platform falls back to nearest-slot. Exposed on CliArgs/ResolvedRunConfig/runConfigToJson.

Testing

27 new bench-config.test.ts cases cover the full block: type/block pairing, interval parsing + 30s minimum, target.uptime range, unknown keys, each section type's options, unknown section types, and the metric-vs-display.metrics rule including the latency exemption. runner.test.ts adds --scheduled-for parse/reject cases, trigger JSON stamping, and a config.reliability upsert assertion. 221 tests pass; root pnpm typecheck clean.

Link to Devin session: https://app.devin.ai/sessions/fdf951a9b9184f11a6d65e3c5056e907
Open in Devin Desktop: https://app.devin.ai/desktop/session/fdf951a9b9184f11a6d65e3c5056e907?variant=devin
Requested by: @dtice25

- defineBenchmarkConfig accepts type: 'reliability' with a strict
  reliability block (interval, graceMs, degradedWhen, target, layout,
  sections, feedCard). Pairing enforced both ways; unknown section
  types/options rejected at definition time; a metric section must name
  a display.metrics key or the built-in 'latency' metric. Mirrors the
  platform's config.reliability schema.
- The materialize upsert sends config.reliability alongside
  index/display/scoring so a reliability-typed bench file passes the
  platform's type-vs-config check on first run.
- New --scheduled-for <ISO-8601> flag stamps
  config.trigger.scheduledFor so a late-reporting scheduled run fills
  its real reliability slot instead of the nearest by creation time.

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@devin-ai-integration

Copy link
Copy Markdown
Contributor

I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".

  • Disable automatic comment, CI, and merge conflict monitoring

…t test

export * picks up the new runner constant exports (layouts, section
types, latency metric key, stats, windows, outcomes); they are arrays/
strings like BENCHMARK_INDEX_LAYOUTS, not functions. Also adds the
reliability types to the _PublicTypeSurface proof list.

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@dtice25
dtice25 marked this pull request as ready for review October 28, 2026 18:17
@open-cla

open-cla Bot commented Oct 28, 2026

Copy link
Copy Markdown

Contributor License Agreement

All contributors are covered by a CLA.

@devin-ai-integration devin-ai-integration Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin resolved the finding on 988b973

Fixed by Devin (1)

  • Ambiguous timestamps misassign reliability slots

View all findings in Devin Review

Devin Review

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@dtice25
dtice25 merged commit 20896fc into master Oct 28, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant