fix(gatorwalk-factory): a manual exit waits on a person only once the agent has no way out (swamp-club #2874) #416
Loading…
Reference in a new issue
No description provided.
Delete branch "cue/2874-gatorwalk-factory-metrics"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fixes swamp-club #2874.
Problem
The metrics counted a manual exit as a wait on a person as soon as its gates passed, even while the agent was still working. In the dogfood run on #2711,
attest.completeandmerge.completecounted as waits while the agent built the attestation and waited for CI. A gatedrevisethat overlapped the plan-approval wait was summed on top of it. The summary reported 18m 57s of waits; the real time spent waiting on the person was 16m 09s.Change
awaiting.ts: a manual exit with gates, all passing, waits on a person only once the agent has no way out of its own. The agent has one while some non-manual exit is:artifact-exists,artifact-fresh,evidence-recorded, or a cooldown counting from one); orA gate that fails on a product already recorded leaves a decision, not agent work: a failed merge, findings,
cel.metrics.ts:summary.waits.timeMsis the time covered by finished waits, so exits waiting at once count once.count,openand the per-exit rows are unchanged.summary.ts: the waits line now says "(overlaps counted once)".DESIGN.md: the rule, the Waits metric, and a decision-log entry.
driving.md: the matching driver rule.The studio bundle is rebuilt.
Tests
awaiting_test, on a newhandoffDefinitionfixture shaped like attest/merge, pins these cases:completewaits beside a pendingopen-prapproval and after a decline;mergedwaits only on its cooldown;completeandnew-prwait after a failed merge;metrics_testandsummary_testpin that overlapping waits count once, that an open wait stays out of the total, and that nocompletewait appears in merge.Verified by verify-build and verify-reviews on
73cc962(attestation cfc3754f-4325-4b6f-b5c9-07809cdc9512).🤖 Generated with Claude Code