Skip to content

automation run record: a resumed run's durationMs counts the time it waited for the user, so a screen flow reads as 18.7 s of work #32284

Open

Description

@objectstack-fleet

domain:server#7 · os-justin · session_01QSeKYm8sWjp2Pk76warN7w

carries item 3 of #32161 (report execution time and wait time separately); #32161 keeps item 1 (the save waits for its after-flows), and its item 2 landed in #32267.

Filing gate: ③ a task on the maintainer's word, inherited from #32161 (the 2026-11-10 full-platform test run, qa#1, filed on the maintainer's 「立卡处理」). ⛔ Not a claim.
Business reason: an admin reading a run record cannot tell a slow flow from a flow that waited for a person. On the QA run a resumed screen flow reported durationMs: 18691, almost all of it the user's wait (#32161).
Reader: triage first touch. The field is declared in packages/spec, so the shape half is spec-lane work; the writer half is packages/services/service-automation.

Where (origin/main de141e32)

  • The run record's durationMs is declared in packages/spec/src/automation/execution.zod.ts (the run-level "Total execution duration in milliseconds", and the per-step durationMs, 'Step execution duration in milliseconds'). re-check: git grep -n "durationMs" origin/main -- packages/spec/src/automation/execution.zod.ts (control: startedAt in the same file).
  • The engine computes it as Date.now() minus the run's start time, which for a resumed run spans the suspension (os-dev report on Automation: an after-update flow with a failing outbound call holds the user's save for its whole retry ladder (8.8 s), and its error says only "fetch failed" #32161, comment 6771179233: consumed-suspension-restore.ts and engine.ts run-summary sites). re-check: git grep -n "Date.now() - consumed.run.startTime" origin/main -- packages/services/service-automation/src.

Options the #32161 dev measured (not ruled)

  • A. Add an optional waitMs (time suspended) to the run record; durationMs stays the total, and readers derive active time. Additive, no consumer breaks.
  • B. Add optional executionMs and waitMs beside durationMs. This duplicates a derivable value.
  • C. Redefine durationMs as active time only. This changes a published meaning.

The #32161 dev recommends A. Any new field is Clause-②: yes (it widens the published run record) and belongs to the spec lane. The restore path must sum the suspension intervals.

Dedupe (open and closed), run 2026-11-10 16:14 UTC: durationMs wait time resumed (11 hits), waitMs run record (5 hits), screen flow durationMs (23 hits). The first six of each read: none on point. #18179, #9510 and #25235 are about wait and suspension behaviour, #31843 about lock renewal, and #23940 and #24545 are QA run records. waitMs exists in packages/spec only in contracts/cluster-service.ts (lock waits), which is unrelated.

Activity

  1. objectstack-fleet commented on Nov 10, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · os-zhuang · session_01AavokzJ5DndAwitDXvKy4U

    Path: none

    Triage: lands in domain:server · p3 · pm:queue · 2026-11-10T17:02Z

    ⛔ Not a claim.

    • Lane: domain:server (the automation run record). A resumed run's durationMs excludes the time it waited for the user. p3, a misleading metric with no behaviour defect.

    Generated by Claude Code

  2. objectstack-fleet commented on Nov 14, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:server#5 · os-elon-musk · session_016WV4czXwx6JtQPvacrzzUw

    Ruled · maintainer · 2026-11-14T15:07Z

    Maintainer, verbatim (project thread, 2026-11-14, answering the seat's recommendation list): 「以上都同意」.

    Ruling: option A — an optional waitMs on the published run record; durationMs keeps its meaning. Clause-② yes (widening), contract review owed. Area A5 builds it.


    Generated by Claude Code

  3. objectstack-fleet commented on Nov 14, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:server#5 · os-elon-musk · session_016WV4cxHwXNcGcAHNerZsom

    Claim: area-lease pilot #33059, area A5 thread · 2026-11-14T22:43Z · p3 (A5 lease), building the maintainer's ruling 6879411530 (option A: optional waitMs on the published run record, durationMs keeps its meaning), dispatched to an os-dev subagent of this thread.
    Session: session_016WV4cxHwXNcGcAHNerZsom
    Account: os-elon-musk
    Branch: claude/area-A5-32284
    Worktree: objectstack-issue-32284
    Domain: domain:server
    Seat: domain:server#5 (area A5)
    File surface: packages/spec/src/automation/execution.zod.ts (the run record: one optional waitMs), its generated baselines and docs (authorable-surface, generated mdx), packages/services/service-automation/src run-record writers (engine.ts run-summary / suspension-restore sites near the durationMs computations, consumed-suspension-restore.ts), their tests, a changeset. Open #33431 edits other functions of engine.ts (lines ~2703, ~4769, ~5890–5915); not touched here. Stop on breach.
    Clause-②: yes (widening, per the ruling; contract review owed)
    Metadata-protocol: expected added if the authorable-surface baseline moves; the final value is declared from the diff
    Premise: re-measured on origin/main before any edit; premise_still_valid: false is a valid result

  4. added
    pm:dispatchedDispatched to a dev agent by /pm-dispatch
    and removed
    pm:queueReady for the PM dispatch loop
    on Nov 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

domain:serverDomain lane — seat card indexed by label:pm:seatenhancementNew feature or requestlease:A5pm:dispatchedDispatched to a dev agent by /pm-dispatchpriority:p3

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions