Add dispatch duration report derived from dispatch timestamps #549

Open
opened 2026-09-10 14:42:06 +00:00 by jared · 0 comments
Owner

Context

The user asked for this ticket on 2026-09-10 while investigating ticket #528 (settlement timing). The #528 process-level probe in plugins/os-sdlc/lib/os_sdlc/timing.rb, enabled by OS_SDLC_TIMING=1 (commits affb434 and 37cdc2f on branch ticket-528), is a throwaway diagnostic that will be deleted. That probe measures boot, work, and SQLite time inside one runner process. It is not a pipeline metric. This ticket is the pipeline metric. It does not block #528.

Observed

The dispatches table already has created_at, updated_at, completed_at, routed_at, stalled_at (see Db.timestamp_columns and add_dispatch_outcome_columns in plugins/os-sdlc/lib/os_sdlc/runner/db.rb).

There is no gate_runs table. Gate and verdict data lives in correction_rounds, violations, step_results. Each has only created_at and updated_at.

Per-dispatch duration is completed_at - created_at. Route latency is routed_at - completed_at. Both are derivable. No new columns are needed. Architecture rule in .claude/rules/os-sdlc-architecture.md says: state is derived, record transitions as timestamps.

The runner CLI already has a violations IMPLEMENTATION_ID Thor subcommand with a --format md|json|csv option in plugins/os-sdlc/lib/os_sdlc/runner/cli.rb. A duration report can sit beside it.

Reproduce

n/a: feature/design ticket

Expected

  • A report object over one implementation's dispatches. Name it by the role test in ADR-0167 (value object via Data.define if two equal reports mean the same thing).
  • Per dispatch: dispatch id, node, agent type, created_at, completed_at, routed_at, duration_ms, route_ms.
  • Implementation totals: dispatch count, total duration, total route latency.
  • Runner Thor subcommand, for example durations IMPLEMENTATION_ID --format md|json|csv, matching violations.
  • Minitest coverage; no new columns; no ActiveModel/ActiveSupport.

Origin

  • Trigger: User request on 2026-09-10 while investigating ticket #528
  • Improvised this session: none
  • Chain: DESIGN (ADR-0167, architecture rule in .claude/rules/os-sdlc-architecture.md)
  • Root candidate: #528
  • Where: plugins/os-sdlc/lib/os_sdlc/runner/db.rb (dispatch timestamp columns), plugins/os-sdlc/lib/os_sdlc/runner/cli.rb
  • Session: 8d211345-da76-4772-b616-ed676eb86ad1
  • Transcript: /home/jared/.claude/projects/-home-jared-dev-cc-os--claude-worktrees-ticket-528/8d211345-da76-4772-b616-ed676eb86ad1.jsonl
## Context The user asked for this ticket on 2026-09-10 while investigating ticket #528 (settlement timing). The #528 process-level probe in `plugins/os-sdlc/lib/os_sdlc/timing.rb`, enabled by `OS_SDLC_TIMING=1` (commits `affb434` and `37cdc2f` on branch `ticket-528`), is a throwaway diagnostic that will be deleted. That probe measures boot, work, and SQLite time inside one runner process. It is not a pipeline metric. This ticket is the pipeline metric. It does not block #528. ## Observed The `dispatches` table already has `created_at`, `updated_at`, `completed_at`, `routed_at`, `stalled_at` (see `Db.timestamp_columns` and `add_dispatch_outcome_columns` in `plugins/os-sdlc/lib/os_sdlc/runner/db.rb`). There is no `gate_runs` table. Gate and verdict data lives in `correction_rounds`, `violations`, `step_results`. Each has only `created_at` and `updated_at`. Per-dispatch duration is `completed_at - created_at`. Route latency is `routed_at - completed_at`. Both are derivable. No new columns are needed. Architecture rule in `.claude/rules/os-sdlc-architecture.md` says: state is derived, record transitions as timestamps. The runner CLI already has a `violations IMPLEMENTATION_ID` Thor subcommand with a `--format md|json|csv` option in `plugins/os-sdlc/lib/os_sdlc/runner/cli.rb`. A duration report can sit beside it. ## Reproduce n/a: feature/design ticket ## Expected - [ ] A report object over one implementation's dispatches. Name it by the role test in ADR-0167 (value object via `Data.define` if two equal reports mean the same thing). - [ ] Per dispatch: dispatch id, node, agent type, created_at, completed_at, routed_at, duration_ms, route_ms. - [ ] Implementation totals: dispatch count, total duration, total route latency. - [ ] Runner Thor subcommand, for example `durations IMPLEMENTATION_ID --format md|json|csv`, matching `violations`. - [ ] Minitest coverage; no new columns; no ActiveModel/ActiveSupport. ## Origin - Trigger: User request on 2026-09-10 while investigating ticket #528 - Improvised this session: none - Chain: DESIGN (ADR-0167, architecture rule in `.claude/rules/os-sdlc-architecture.md`) - Root candidate: #528 - Where: `plugins/os-sdlc/lib/os_sdlc/runner/db.rb` (dispatch timestamp columns), `plugins/os-sdlc/lib/os_sdlc/runner/cli.rb` - Session: 8d211345-da76-4772-b616-ed676eb86ad1 - Transcript: /home/jared/.claude/projects/-home-jared-dev-cc-os--claude-worktrees-ticket-528/8d211345-da76-4772-b616-ed676eb86ad1.jsonl
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
jared/cc-os#549
No description provided.