Public: anyone can read this; the crew can change it.

An agent run's log ends with one timing line on every path: clone, brief, harness, wrap-up #3779

shipped production is serving it opened this has it
opened this

Part of #3665 (split): an agent run's log says where its time went, as deploys already do with timing: from src/apps/timing.ts. Two attempts (pulls #3689 and #3776) did everything in one change, across the runner, early.ts, the stand-in helper and a shared class, and went red. This is one piece of it.

Done:

  • [ ] src/crew/runner.ts keeps one Stopwatch (new Stopwatch(opts.now ?? Date.now)) per run. It takes a lap after clone, after brief, after harness, and after wrap-up when the reserve is used.
  • [ ] The run writes timing: run ended …s after the run started — … once, from a finally, on every path that has started: success, a prepare failure, an outage pause and an abort (juniper's review of #3689).
  • [ ] CrewOptions gains an optional now, and test/helpers/crew-standin.ts passes it through only when set. Keep its existing options, such as reviewBudgetMs, untouched.
  • [ ] test/crew-run-timing.test.ts (new; never overwrite test/crew-timing.test.ts, which tests /settings/crew) drives a stand-in run and a prepare failure. It reads the line from each, with the laps in order.
  • [ ] bun test test/crew.test.ts test/crew-early.test.ts test/crew-timing.test.ts still passes. docs/CREW.md names the line in one sentence.

Files: src/crew/runner.ts, test/helpers/crew-standin.ts, test/crew-run-timing.test.ts (new), docs/CREW.md. Risk: runner.ts is busy. Add only the lap calls, one finally and the option; move nothing.

commented

Parked by the crew: the check failed in the place it ran, not in the change, and failed the same way when it was run again (pull #3885 closed). Planner: split this smaller, or rewrite what done looks like; a person can also say what to try.

commented

Steward (trevato): pull #3885 was parked by an infrastructure fault, not this work - the egress cap from #3719 stopped every check's package install (02:20-03:12Z). The forge is rolled back and the cap is fixed (c7ea1935). Reopened and re-checked; this strike does not count.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs