### run_concurrent_scheduler — two lanes, four tasks, max-tasks 3
SECTION Concurrent scheduler: up to 2 lanes
LOG   max_lanes_per_story: 2   tick: 1s
LOG   live-qa semaphore: 1   heavy-test semaphore: 1
-- tick 1
CALL check_escalations
CALL check_escalations
METRIC {"event":"lease_acquired","task_id":"T-A","pid":<PID>,"ttl_s":900,"at":"2026-10-18T00:00:00+00:00"}
METRIC {"event":"lease_acquired","task_id":"T-B","pid":<PID>,"ttl_s":900,"at":"2026-10-18T00:00:00+00:00"}
METRIC {"event":"scheduler_scan","duration_s":0,"candidates":2,"pending":4,"admitted":2,"deferred":0,"at":"2026-10-18T00:00:00+00:00"}
LOG   Lane 1 acquired in 0s (cold)
METRIC {"event":"lane_pool_acquire","task_id":"T-A","slot":1,"mode":"cold","duration_s":0,"at":"2026-10-18T00:00:00+00:00"}
LOG   → Lane 1: T-A on factory/task/T-A @ <SHA8>
METRIC {"event":"lane_acquired","task_id":"T-A","slot":1,"branch":"factory/task/T-A","base_sha":"<SHA>","at":"2026-10-18T00:00:00+00:00"}
METRIC {"event":"lane_wait_seconds","task_id":"T-A","slot":1,"wait_s":0,"at":"2026-10-18T00:00:00+00:00"}
METRIC {"event":"lane_started","task_id":"T-A","slot":1,"start_epoch":1792281600,"at":"2026-10-18T00:00:00+00:00"}
LOG   Lane 2 acquired in 0s (cold)
METRIC {"event":"lane_pool_acquire","task_id":"T-B","slot":2,"mode":"cold","duration_s":0,"at":"2026-10-18T00:00:00+00:00"}
LOG   → Lane 2: T-B on factory/task/T-B @ <SHA8>
METRIC {"event":"lane_acquired","task_id":"T-B","slot":2,"branch":"factory/task/T-B","base_sha":"<SHA>","at":"2026-10-18T00:00:00+00:00"}
METRIC {"event":"lane_wait_seconds","task_id":"T-B","slot":2,"wait_s":0,"at":"2026-10-18T00:00:00+00:00"}
METRIC {"event":"lane_started","task_id":"T-B","slot":2,"start_epoch":1792281600,"at":"2026-10-18T00:00:00+00:00"}
-- tick 2
[2026-10-18 00:00:00] [lane 1] pipeline T-A: success
[2026-10-18 00:00:00] [lane 2] pipeline T-B: failed
CALL check_escalations
METRIC {"event":"lane_log","task_id":"T-A","slot":1,"log":"<T>/ctl/harness/state/logs/lane-1-T-A-<SHA8>-000000.log","at":"2026-10-18T00:00:00+00:00"}
METRIC {"event":"task_completed","task_id":"T-A","at":"x"}
CALL qa_findings_sweep_lane [1] [T-A]
CALL run_scoped_tests
LOG   + Integrator: main fast-forwarded to <SHA8> (factory/task/T-A)
METRIC {"event":"integration_completed","task_id":"T-A","branch":"factory/task/T-A","base_sha":"<SHA>","at":"2026-10-18T00:00:00+00:00"}
CALL run_hooks [pre_commit]
LOG   + Committed orchestrator state (T-A integrated)
LOG   + Lane 1: T-A complete (1 so far, took 0s)
METRIC {"event":"lane_finished","task_id":"T-A","slot":1,"outcome":"done","start_epoch":1792281600,"end_epoch":1792281600,"duration_s":0,"at":"2026-10-18T00:00:00+00:00"}
CALL qa_findings_publish [T-A] [events]
METRIC {"event":"lane_log","task_id":"T-B","slot":2,"log":"<T>/ctl/harness/state/logs/lane-2-T-B-<SHA8>-000000.log","at":"2026-10-18T00:00:00+00:00"}
CALL write_blocker [T-B] [docs/tasks/t-b.md#t-b] [test-fail] [lane-2-T-B-<SHA8>-000000.log]
METRIC {"event":"task_failed","task_id":"T-B","at":"x"}
CALL qa_findings_sweep_lane [2] [T-B]
LOG   x Lane 2: T-B → failed (test-fail), 0s
METRIC {"event":"lane_finished","task_id":"T-B","slot":2,"outcome":"failed","start_epoch":1792281600,"end_epoch":1792281600,"duration_s":0,"at":"2026-10-18T00:00:00+00:00"}
CALL qa_findings_publish [T-B]
CALL check_escalations
METRIC {"event":"lease_acquired","task_id":"T-C","pid":<PID>,"ttl_s":900,"at":"2026-10-18T00:00:00+00:00"}
METRIC {"event":"lease_acquired","task_id":"T-D","pid":<PID>,"ttl_s":900,"at":"2026-10-18T00:00:00+00:00"}
METRIC {"event":"scheduler_scan","duration_s":0,"candidates":2,"pending":2,"admitted":2,"deferred":0,"at":"2026-10-18T00:00:00+00:00"}
LOG   Lane 1 acquired in 0s (reset)
METRIC {"event":"lane_pool_acquire","task_id":"T-C","slot":1,"mode":"reset","duration_s":0,"at":"2026-10-18T00:00:00+00:00"}
LOG   → Lane 1: T-C on factory/task/T-C @ <SHA8>
METRIC {"event":"lane_acquired","task_id":"T-C","slot":1,"branch":"factory/task/T-C","base_sha":"<SHA>","at":"2026-10-18T00:00:00+00:00"}
METRIC {"event":"lane_wait_seconds","task_id":"T-C","slot":1,"wait_s":0,"at":"2026-10-18T00:00:00+00:00"}
METRIC {"event":"lane_started","task_id":"T-C","slot":1,"start_epoch":1792281600,"at":"2026-10-18T00:00:00+00:00"}
LOG   Lane 2 acquired in 0s (reset)
METRIC {"event":"lane_pool_acquire","task_id":"T-D","slot":2,"mode":"reset","duration_s":0,"at":"2026-10-18T00:00:00+00:00"}
LOG   → Lane 2: T-D on factory/task/T-D @ <SHA8>
METRIC {"event":"lane_acquired","task_id":"T-D","slot":2,"branch":"factory/task/T-D","base_sha":"<SHA>","at":"2026-10-18T00:00:00+00:00"}
METRIC {"event":"lane_wait_seconds","task_id":"T-D","slot":2,"wait_s":0,"at":"2026-10-18T00:00:00+00:00"}
METRIC {"event":"lane_started","task_id":"T-D","slot":2,"start_epoch":1792281600,"at":"2026-10-18T00:00:00+00:00"}
-- tick 3
[2026-10-18 00:00:00] [lane 1] pipeline T-C: unexplained
[2026-10-18 00:00:00] [lane 2] pipeline T-D: success
CALL check_escalations
METRIC {"event":"lane_log","task_id":"T-C","slot":1,"log":"<T>/ctl/harness/state/logs/lane-1-T-C-<SHA8>-000000.log","at":"2026-10-18T00:00:00+00:00"}
CALL qa_findings_sweep_lane [1] [T-C]
ERR   ! Lane 1 (T-C) exited 3 with no result — returning the task to pending
LOG   o Lane 1: T-C returned to pending (unexplained) after 0s
METRIC {"event":"lane_finished","task_id":"T-C","slot":1,"outcome":"unexplained","reason":"","start_epoch":1792281600,"end_epoch":1792281600,"duration_s":0,"at":"2026-10-18T00:00:00+00:00"}
CALL qa_findings_publish [T-C] [events]
METRIC {"event":"lane_log","task_id":"T-D","slot":2,"log":"<T>/ctl/harness/state/logs/lane-2-T-D-<SHA8>-000000.log","at":"2026-10-18T00:00:00+00:00"}
METRIC {"event":"task_completed","task_id":"T-D","at":"x"}
CALL qa_findings_sweep_lane [2] [T-D]
CALL run_scoped_tests
LOG   + Integrator: main fast-forwarded to <SHA8> (factory/task/T-D)
METRIC {"event":"integration_completed","task_id":"T-D","branch":"factory/task/T-D","base_sha":"<SHA>","at":"2026-10-18T00:00:00+00:00"}
CALL run_hooks [pre_commit]
LOG   + Committed orchestrator state (T-D integrated)
LOG   + Lane 2: T-D complete (2 so far, took 0s)
METRIC {"event":"lane_finished","task_id":"T-D","slot":2,"outcome":"done","start_epoch":1792281600,"end_epoch":1792281600,"duration_s":0,"at":"2026-10-18T00:00:00+00:00"}
CALL qa_findings_publish [T-D] [events]
CALL check_escalations
METRIC {"event":"lease_acquired","task_id":"T-C","pid":<PID>,"ttl_s":900,"at":"2026-10-18T00:00:00+00:00"}
METRIC {"event":"scheduler_scan","duration_s":0,"candidates":1,"pending":1,"admitted":1,"deferred":0,"at":"2026-10-18T00:00:00+00:00"}
LOG   Lane 1 acquired in 0s (reset)
METRIC {"event":"lane_pool_acquire","task_id":"T-C","slot":1,"mode":"reset","duration_s":0,"at":"2026-10-18T00:00:00+00:00"}
LOG   → Lane 1: T-C on factory/task/T-C @ <SHA8>
METRIC {"event":"lane_acquired","task_id":"T-C","slot":1,"branch":"factory/task/T-C","base_sha":"<SHA>","at":"2026-10-18T00:00:00+00:00"}
METRIC {"event":"lane_wait_seconds","task_id":"T-C","slot":1,"wait_s":0,"at":"2026-10-18T00:00:00+00:00"}
METRIC {"event":"lane_started","task_id":"T-C","slot":1,"start_epoch":1792281600,"at":"2026-10-18T00:00:00+00:00"}
-- tick 4
[2026-10-18 00:00:00] [lane 1] pipeline T-C: success
CALL check_escalations
METRIC {"event":"lane_log","task_id":"T-C","slot":1,"log":"<T>/ctl/harness/state/logs/lane-1-T-C-<SHA8>-000000.log","at":"2026-10-18T00:00:00+00:00"}
METRIC {"event":"task_completed","task_id":"T-C","at":"x"}
CALL qa_findings_sweep_lane [1] [T-C]
CALL run_scoped_tests
LOG   + Integrator: main fast-forwarded to <SHA8> (factory/task/T-C)
METRIC {"event":"integration_completed","task_id":"T-C","branch":"factory/task/T-C","base_sha":"<SHA>","at":"2026-10-18T00:00:00+00:00"}
CALL run_hooks [pre_commit]
LOG   + Committed orchestrator state (T-C integrated)
LOG   + Lane 1: T-C complete (3 so far, took 0s)
METRIC {"event":"lane_finished","task_id":"T-C","slot":1,"outcome":"done","start_epoch":1792281600,"end_epoch":1792281600,"duration_s":0,"at":"2026-10-18T00:00:00+00:00"}
CALL qa_findings_publish [T-C] [events]
SECTION Max tasks (3) reached
rc=0
-- slots (in flight: 0, free: [1], pool: 2):
   1: pid=- task=[] story=[] outputs=[] branch=[]
   2: pid=- task=[] story=[] outputs=[] branch=[]
-- counters: completed=3 failed=1 consecutive=0 draining=false
-- leases: 
-- queue.txt:
   # [DONE] docs/tasks/t-a.md#t-a
   # [FAILED] docs/tasks/t-b.md#t-b
   # [DONE] docs/tasks/t-c.md#t-c
   # [DONE] docs/tasks/t-d.md#t-d
-- main:
   chore(state): T-C integrated
   T-C work
   chore(state): T-D integrated
   T-D work
   chore(state): T-A integrated
   T-A work
   base
-- lane logs: lane-1-T-A-<SHA8>-000000.log lane-1-T-C-<SHA8>-000000.log lane-2-T-B-<SHA8>-000000.log lane-2-T-D-<SHA8>-000000.log 
### --stop-on-failure drains, then halts
SECTION Concurrent scheduler: up to 2 lanes
LOG   max_lanes_per_story: 2   tick: 1s
LOG   live-qa semaphore: 1   heavy-test semaphore: 1
-- tick 1
CALL check_escalations
CALL check_escalations
METRIC {"event":"lease_acquired","task_id":"T-E","pid":<PID>,"ttl_s":900,"at":"2026-10-18T00:00:00+00:00"}
METRIC {"event":"lease_acquired","task_id":"T-F","pid":<PID>,"ttl_s":900,"at":"2026-10-18T00:00:00+00:00"}
METRIC {"event":"scheduler_scan","duration_s":0,"candidates":2,"pending":2,"admitted":2,"deferred":0,"at":"2026-10-18T00:00:00+00:00"}
LOG   Lane 1 acquired in 0s (cold)
METRIC {"event":"lane_pool_acquire","task_id":"T-E","slot":1,"mode":"cold","duration_s":0,"at":"2026-10-18T00:00:00+00:00"}
LOG   → Lane 1: T-E on factory/task/T-E @ <SHA8>
METRIC {"event":"lane_acquired","task_id":"T-E","slot":1,"branch":"factory/task/T-E","base_sha":"<SHA>","at":"2026-10-18T00:00:00+00:00"}
METRIC {"event":"lane_wait_seconds","task_id":"T-E","slot":1,"wait_s":0,"at":"2026-10-18T00:00:00+00:00"}
METRIC {"event":"lane_started","task_id":"T-E","slot":1,"start_epoch":1792281600,"at":"2026-10-18T00:00:00+00:00"}
LOG   Lane 2 acquired in 0s (cold)
METRIC {"event":"lane_pool_acquire","task_id":"T-F","slot":2,"mode":"cold","duration_s":0,"at":"2026-10-18T00:00:00+00:00"}
LOG   → Lane 2: T-F on factory/task/T-F @ <SHA8>
METRIC {"event":"lane_acquired","task_id":"T-F","slot":2,"branch":"factory/task/T-F","base_sha":"<SHA>","at":"2026-10-18T00:00:00+00:00"}
METRIC {"event":"lane_wait_seconds","task_id":"T-F","slot":2,"wait_s":0,"at":"2026-10-18T00:00:00+00:00"}
METRIC {"event":"lane_started","task_id":"T-F","slot":2,"start_epoch":1792281600,"at":"2026-10-18T00:00:00+00:00"}
-- tick 2
[2026-10-18 00:00:00] [lane 1] pipeline T-E: failed
CALL check_escalations
METRIC {"event":"lane_log","task_id":"T-E","slot":1,"log":"<T>/ctl/harness/state/logs/lane-1-T-E-<SHA8>-000000.log","at":"2026-10-18T00:00:00+00:00"}
CALL write_blocker [T-E] [docs/tasks/t-e.md#t-e] [test-fail] [lane-1-T-E-<SHA8>-000000.log]
METRIC {"event":"task_failed","task_id":"T-E","at":"x"}
CALL qa_findings_sweep_lane [1] [T-E]
LOG   x Lane 1: T-E → failed (test-fail), 0s
METRIC {"event":"lane_finished","task_id":"T-E","slot":1,"outcome":"failed","start_epoch":1792281600,"end_epoch":1792281600,"duration_s":0,"at":"2026-10-18T00:00:00+00:00"}
CALL qa_findings_publish [T-E]
ERR Stopping due to --stop-on-failure — draining 1 lane(s), admitting nothing further.
-- tick 3
[2026-10-18 00:00:00] [lane 2] pipeline T-F: success
CALL check_escalations
METRIC {"event":"lane_log","task_id":"T-F","slot":2,"log":"<T>/ctl/harness/state/logs/lane-2-T-F-<SHA8>-000000.log","at":"2026-10-18T00:00:00+00:00"}
METRIC {"event":"task_completed","task_id":"T-F","at":"x"}
CALL qa_findings_sweep_lane [2] [T-F]
CALL run_scoped_tests
LOG   + Integrator: main fast-forwarded to <SHA8> (factory/task/T-F)
METRIC {"event":"integration_completed","task_id":"T-F","branch":"factory/task/T-F","base_sha":"<SHA>","at":"2026-10-18T00:00:00+00:00"}
CALL run_hooks [pre_commit]
LOG   + Committed orchestrator state (T-F integrated)
LOG   + Lane 2: T-F complete (1 so far, took 0s)
METRIC {"event":"lane_finished","task_id":"T-F","slot":2,"outcome":"done","start_epoch":1792281600,"end_epoch":1792281600,"duration_s":0,"at":"2026-10-18T00:00:00+00:00"}
CALL qa_findings_publish [T-F] [events]
SECTION Halted (--stop-on-failure) — no lanes in flight
rc=0
-- slots (in flight: 0, free: [1], pool: 2):
   1: pid=- task=[] story=[] outputs=[] branch=[]
   2: pid=- task=[] story=[] outputs=[] branch=[]
-- counters: completed=1 failed=1 consecutive=0 draining=true
-- leases: 
-- queue.txt:
   # [FAILED] docs/tasks/t-e.md#t-e
   # [DONE] docs/tasks/t-f.md#t-f
### a semaphore expiry defers; a pause sentinel drains and halts
SECTION Concurrent scheduler: up to 2 lanes
LOG   max_lanes_per_story: 2   tick: 1s
LOG   live-qa semaphore: 1   heavy-test semaphore: 1
-- tick 1
CALL check_escalations
CALL check_escalations
METRIC {"event":"lease_acquired","task_id":"T-G","pid":<PID>,"ttl_s":900,"at":"2026-10-18T00:00:00+00:00"}
METRIC {"event":"lease_acquired","task_id":"T-H","pid":<PID>,"ttl_s":900,"at":"2026-10-18T00:00:00+00:00"}
METRIC {"event":"scheduler_scan","duration_s":0,"candidates":2,"pending":2,"admitted":2,"deferred":0,"at":"2026-10-18T00:00:00+00:00"}
LOG   Lane 1 acquired in 0s (cold)
METRIC {"event":"lane_pool_acquire","task_id":"T-G","slot":1,"mode":"cold","duration_s":0,"at":"2026-10-18T00:00:00+00:00"}
LOG   → Lane 1: T-G on factory/task/T-G @ <SHA8>
METRIC {"event":"lane_acquired","task_id":"T-G","slot":1,"branch":"factory/task/T-G","base_sha":"<SHA>","at":"2026-10-18T00:00:00+00:00"}
METRIC {"event":"lane_wait_seconds","task_id":"T-G","slot":1,"wait_s":0,"at":"2026-10-18T00:00:00+00:00"}
METRIC {"event":"lane_started","task_id":"T-G","slot":1,"start_epoch":1792281600,"at":"2026-10-18T00:00:00+00:00"}
LOG   Lane 2 acquired in 0s (cold)
METRIC {"event":"lane_pool_acquire","task_id":"T-H","slot":2,"mode":"cold","duration_s":0,"at":"2026-10-18T00:00:00+00:00"}
LOG   → Lane 2: T-H on factory/task/T-H @ <SHA8>
METRIC {"event":"lane_acquired","task_id":"T-H","slot":2,"branch":"factory/task/T-H","base_sha":"<SHA>","at":"2026-10-18T00:00:00+00:00"}
METRIC {"event":"lane_wait_seconds","task_id":"T-H","slot":2,"wait_s":0,"at":"2026-10-18T00:00:00+00:00"}
METRIC {"event":"lane_started","task_id":"T-H","slot":2,"start_epoch":1792281600,"at":"2026-10-18T00:00:00+00:00"}
-- tick 2
[2026-10-18 00:00:00] [lane 1] pipeline T-G: deferred
[2026-10-18 00:00:00] [lane 2] pipeline T-H: success
CALL check_escalations
METRIC {"event":"lane_log","task_id":"T-G","slot":1,"log":"<T>/ctl/harness/state/logs/lane-1-T-G-<SHA8>-000000.log","at":"2026-10-18T00:00:00+00:00"}
CALL qa_findings_sweep_lane [1] [T-G]
LOG   o Lane 1: T-G returned to pending (deferred: semaphore-timeout:live-qa) after 0s
METRIC {"event":"lane_finished","task_id":"T-G","slot":1,"outcome":"deferred","reason":"semaphore-timeout:live-qa","start_epoch":1792281600,"end_epoch":1792281600,"duration_s":0,"at":"2026-10-18T00:00:00+00:00"}
CALL qa_findings_publish [T-G] [events]
METRIC {"event":"lane_log","task_id":"T-H","slot":2,"log":"<T>/ctl/harness/state/logs/lane-2-T-H-<SHA8>-000000.log","at":"2026-10-18T00:00:00+00:00"}
METRIC {"event":"task_completed","task_id":"T-H","at":"x"}
CALL qa_findings_sweep_lane [2] [T-H]
CALL run_scoped_tests
LOG   + Integrator: main fast-forwarded to <SHA8> (factory/task/T-H)
METRIC {"event":"integration_completed","task_id":"T-H","branch":"factory/task/T-H","base_sha":"<SHA>","at":"2026-10-18T00:00:00+00:00"}
CALL run_hooks [pre_commit]
LOG   + Committed orchestrator state (T-H integrated)
LOG   + Lane 2: T-H complete (1 so far, took 0s)
METRIC {"event":"lane_finished","task_id":"T-H","slot":2,"outcome":"done","start_epoch":1792281600,"end_epoch":1792281600,"duration_s":0,"at":"2026-10-18T00:00:00+00:00"}
CALL qa_findings_publish [T-H] [events]
LOG Pause sentinel found before admission. Draining 0 lane(s), then halting.
SECTION Halted (pause sentinel) — no lanes in flight
rc=0
-- slots (in flight: 0, free: [1], pool: 2):
   1: pid=- task=[] story=[] outputs=[] branch=[]
   2: pid=- task=[] story=[] outputs=[] branch=[]
-- counters: completed=1 failed=0 consecutive=0 draining=true
-- leases: 
-- queue.txt:
   docs/tasks/t-g.md#t-g
   # [DONE] docs/tasks/t-h.md#t-h
### the quota park: one lane exhausts, the other is still running
SECTION Concurrent scheduler: up to 2 lanes
LOG   max_lanes_per_story: 2   tick: 1s
LOG   live-qa semaphore: 1   heavy-test semaphore: 1
-- tick 1
CALL check_escalations
CALL check_escalations
METRIC {"event":"lease_acquired","task_id":"T-P","pid":<PID>,"ttl_s":900,"at":"2026-10-18T00:00:00+00:00"}
METRIC {"event":"lease_acquired","task_id":"T-Q","pid":<PID>,"ttl_s":900,"at":"2026-10-18T00:00:00+00:00"}
METRIC {"event":"scheduler_scan","duration_s":0,"candidates":2,"pending":2,"admitted":2,"deferred":0,"at":"2026-10-18T00:00:00+00:00"}
LOG   Lane 1 acquired in 0s (cold)
METRIC {"event":"lane_pool_acquire","task_id":"T-P","slot":1,"mode":"cold","duration_s":0,"at":"2026-10-18T00:00:00+00:00"}
LOG   → Lane 1: T-P on factory/task/T-P @ <SHA8>
METRIC {"event":"lane_acquired","task_id":"T-P","slot":1,"branch":"factory/task/T-P","base_sha":"<SHA>","at":"2026-10-18T00:00:00+00:00"}
METRIC {"event":"lane_wait_seconds","task_id":"T-P","slot":1,"wait_s":0,"at":"2026-10-18T00:00:00+00:00"}
METRIC {"event":"lane_started","task_id":"T-P","slot":1,"start_epoch":1792281600,"at":"2026-10-18T00:00:00+00:00"}
LOG   Lane 2 acquired in 0s (cold)
METRIC {"event":"lane_pool_acquire","task_id":"T-Q","slot":2,"mode":"cold","duration_s":0,"at":"2026-10-18T00:00:00+00:00"}
LOG   → Lane 2: T-Q on factory/task/T-Q @ <SHA8>
METRIC {"event":"lane_acquired","task_id":"T-Q","slot":2,"branch":"factory/task/T-Q","base_sha":"<SHA>","at":"2026-10-18T00:00:00+00:00"}
METRIC {"event":"lane_wait_seconds","task_id":"T-Q","slot":2,"wait_s":0,"at":"2026-10-18T00:00:00+00:00"}
METRIC {"event":"lane_started","task_id":"T-Q","slot":2,"start_epoch":1792281600,"at":"2026-10-18T00:00:00+00:00"}
-- tick 2
[2026-10-18 00:00:00] [lane 1] pipeline T-P: exhausted
[ERROR 2026-10-18 00:00:00] [lane 1] Runner exhaustion detected — raising the global sentinel; the scheduler will park every lane.
CALL check_escalations
METRIC {"event":"lane_log","task_id":"T-P","slot":1,"log":"<T>/ctl/harness/state/logs/lane-1-T-P-<SHA8>-000000.log","at":"2026-10-18T00:00:00+00:00"}
METRIC {"event":"lane_exhausted","lane":"1","at":"2026-10-18T00:00:00+00:00"}
CALL qa_findings_sweep_lane [1] [T-P]
LOG   o Lane 1: T-P parked (runner-exhausted) after 0s — the sweep will return it to pending
METRIC {"event":"lane_finished","task_id":"T-P","slot":1,"outcome":"parked","reason":"","start_epoch":1792281600,"end_epoch":1792281600,"duration_s":0,"at":"2026-10-18T00:00:00+00:00"}
CALL qa_findings_publish [T-P] [events]
SECTION Runner exhaustion — parking every lane
LOG The provider quota is account-wide, so this is not one lane's problem.
LOG Nothing will be marked [FAILED]; every in-flight task returns to pending.
METRIC {"event":"lanes_parked","in_flight":1,"at":"2026-10-18T00:00:00+00:00"}
[2026-10-18 00:00:00] [lane 2] pipeline T-Q: failed
METRIC {"event":"lane_log","task_id":"T-Q","slot":2,"log":"<T>/ctl/harness/state/logs/lane-2-T-Q-<SHA8>-000000.log","at":"2026-10-18T00:00:00+00:00"}
CALL write_blocker [T-Q] [docs/tasks/t-q.md#t-q] [test-fail] [lane-2-T-Q-<SHA8>-000000.log]
METRIC {"event":"task_failed","task_id":"T-Q","at":"x"}
CALL qa_findings_sweep_lane [2] [T-Q]
LOG   o Lane 2: T-Q parked (runner-exhausted) after 0s — the sweep will return it to pending
METRIC {"event":"lane_finished","task_id":"T-Q","slot":2,"outcome":"parked","reason":"runner-exhausted","start_epoch":1792281600,"end_epoch":1792281600,"duration_s":0,"at":"2026-10-18T00:00:00+00:00"}
CALL qa_findings_publish [T-Q] [events]
METRIC {"event":"lease_expired","task_id":"T-P","reason":"orphaned-running-line","trigger":"park","branch":"factory/task/T-P","tag":"factory/abandoned/T-P-<SHA8>-000000","pid":"","heartbeat_age_s":"","at":"2026-10-18T00:00:00+00:00"}
LOG   Lease reconciled: T-P (orphaned-running-line) -> pending; branch factory/task/T-P tagged factory/abandoned/T-P-<SHA8>-000000; lane none recorded
METRIC {"event":"lease_expired","task_id":"T-Q","reason":"orphaned-running-line","trigger":"park","branch":"factory/task/T-Q","tag":"factory/abandoned/T-Q-<SHA8>-000000","pid":"","heartbeat_age_s":"","at":"2026-10-18T00:00:00+00:00"}
LOG   Lease reconciled: T-Q (orphaned-running-line) -> pending; branch factory/task/T-Q tagged factory/abandoned/T-Q-<SHA8>-000000; lane none recorded
LOG Lease sweep (park): reconciled 2 abandoned task(s) back to pending.
METRIC {"event":"lease_sweep","trigger":"park","reconciled":2,"at":"2026-10-18T00:00:00+00:00"}
CALL handle_runner_exhaustion [task-T-P.log]
ERR Session limit reached. Exiting; every task stays queued for the scheduled restart.
rc=75
-- sentinel raised after: no
-- queue.txt:
   docs/tasks/t-p.md#t-p
   docs/tasks/t-q.md#t-q
-- leases: 
### a lane that will not open, with nothing else in flight
SECTION Concurrent scheduler: up to 2 lanes
LOG   max_lanes_per_story: 2   tick: 1s
LOG   live-qa semaphore: 1   heavy-test semaphore: 1
-- tick 1
CALL check_escalations
CALL check_escalations
METRIC {"event":"lease_acquired","task_id":"T-I","pid":<PID>,"ttl_s":900,"at":"2026-10-18T00:00:00+00:00"}
METRIC {"event":"lease_acquired","task_id":"T-J","pid":<PID>,"ttl_s":900,"at":"2026-10-18T00:00:00+00:00"}
METRIC {"event":"scheduler_scan","duration_s":0,"candidates":2,"pending":2,"admitted":2,"deferred":0,"at":"2026-10-18T00:00:00+00:00"}
mkdir: cannot create directory '<T>/nope': Not a directory
ERR   ! Lane 1 removed from the pool for T-I: worktree creation failed
ERR     The run continues with a smaller pool. Re-enable by removing <T>/nope/lanes/meta/1/disabled.
METRIC {"event":"lane_unavailable","task_id":"T-I","slot":1,"reason":"worktree creation failed","at":"2026-10-18T00:00:00+00:00"}
METRIC {"event":"lane_pool_disabled","slot":1,"reason":"worktree creation failed","at":"2026-10-18T00:00:00+00:00"}
mkdir: cannot create directory '<T>/nope': Not a directory
ERR   ! Lane 1 removed from the pool for T-J: worktree creation failed
ERR     The run continues with a smaller pool. Re-enable by removing <T>/nope/lanes/meta/1/disabled.
METRIC {"event":"lane_unavailable","task_id":"T-J","slot":1,"reason":"worktree creation failed","at":"2026-10-18T00:00:00+00:00"}
METRIC {"event":"lane_pool_disabled","slot":1,"reason":"worktree creation failed","at":"2026-10-18T00:00:00+00:00"}
-- tick 2
CALL check_escalations
CALL check_escalations
METRIC {"event":"lease_acquired","task_id":"T-I","pid":<PID>,"ttl_s":900,"at":"2026-10-18T00:00:00+00:00"}
METRIC {"event":"lease_acquired","task_id":"T-J","pid":<PID>,"ttl_s":900,"at":"2026-10-18T00:00:00+00:00"}
METRIC {"event":"scheduler_scan","duration_s":0,"candidates":2,"pending":2,"admitted":2,"deferred":0,"at":"2026-10-18T00:00:00+00:00"}
mkdir: cannot create directory '<T>/nope': Not a directory
ERR   ! Lane 1 removed from the pool for T-I: worktree creation failed
ERR     The run continues with a smaller pool. Re-enable by removing <T>/nope/lanes/meta/1/disabled.
METRIC {"event":"lane_unavailable","task_id":"T-I","slot":1,"reason":"worktree creation failed","at":"2026-10-18T00:00:00+00:00"}
METRIC {"event":"lane_pool_disabled","slot":1,"reason":"worktree creation failed","at":"2026-10-18T00:00:00+00:00"}
mkdir: cannot create directory '<T>/nope': Not a directory
ERR   ! Lane 1 removed from the pool for T-J: worktree creation failed
ERR     The run continues with a smaller pool. Re-enable by removing <T>/nope/lanes/meta/1/disabled.
METRIC {"event":"lane_unavailable","task_id":"T-J","slot":1,"reason":"worktree creation failed","at":"2026-10-18T00:00:00+00:00"}
METRIC {"event":"lane_pool_disabled","slot":1,"reason":"worktree creation failed","at":"2026-10-18T00:00:00+00:00"}
ERR Could not open a lane 4 times in a row — stopping.
ERR Every affected task is still PENDING; nothing was marked [FAILED].
ERR Check the worktree state (git worktree list) and the lane bootstrap command.
METRIC {"event":"lane_open_giving_up","failures":4,"at":"2026-10-18T00:00:00+00:00"}
rc=0
-- slots (in flight: 0, free: [1], pool: 2):
   1: pid=- task=[] story=[] outputs=[] branch=[]
   2: pid=- task=[] story=[] outputs=[] branch=[]
-- counters: completed=0 failed=0 consecutive=0 draining=false
-- leases: 
-- queue.txt:
   docs/tasks/t-i.md#t-i
   docs/tasks/t-j.md#t-j
### a lane that will not open while another runs: the streak limit
SECTION Concurrent scheduler: up to 2 lanes
LOG   max_lanes_per_story: 2   tick: 1s
LOG   live-qa semaphore: 1   heavy-test semaphore: 1
-- tick 1
CALL check_escalations
CALL check_escalations
METRIC {"event":"lease_acquired","task_id":"T-M","pid":<PID>,"ttl_s":900,"at":"2026-10-18T00:00:00+00:00"}
METRIC {"event":"lease_acquired","task_id":"T-N","pid":<PID>,"ttl_s":900,"at":"2026-10-18T00:00:00+00:00"}
METRIC {"event":"scheduler_scan","duration_s":0,"candidates":2,"pending":2,"admitted":2,"deferred":0,"at":"2026-10-18T00:00:00+00:00"}
LOG   Lane 1 acquired in 0s (cold)
METRIC {"event":"lane_pool_acquire","task_id":"T-M","slot":1,"mode":"cold","duration_s":0,"at":"2026-10-18T00:00:00+00:00"}
METRIC {"event":"lane_env_verified","task_id":"T-M","slot":1,"at":"2026-10-18T00:00:00+00:00"}
LOG   → Lane 1: T-M on factory/task/T-M @ <SHA8>
METRIC {"event":"lane_acquired","task_id":"T-M","slot":1,"branch":"factory/task/T-M","base_sha":"<SHA>","at":"2026-10-18T00:00:00+00:00"}
METRIC {"event":"lane_wait_seconds","task_id":"T-M","slot":1,"wait_s":0,"at":"2026-10-18T00:00:00+00:00"}
METRIC {"event":"lane_started","task_id":"T-M","slot":1,"start_epoch":1792281600,"at":"2026-10-18T00:00:00+00:00"}
LOG   Lane 2 acquired in 0s (cold)
METRIC {"event":"lane_pool_acquire","task_id":"T-N","slot":2,"mode":"cold","duration_s":0,"at":"2026-10-18T00:00:00+00:00"}
ERR   ! Lane 2: environment is DEGRADED ([ "$(git rev-parse --abbrev-ref HEAD)" != factory/task/T-N ] failed) — repairing before T-N
ERR     No repair command is configured — releasing the lane. An environment failure, not a defect in T-N.
METRIC {"event":"lane_env_repair_failed","task_id":"T-N","slot":2,"reason":"no-repair-command","at":"2026-10-18T00:00:00+00:00"}
-- tick 2
CALL check_escalations
CALL check_escalations
METRIC {"event":"lease_acquired","task_id":"T-N","pid":<PID>,"ttl_s":900,"at":"2026-10-18T00:00:00+00:00"}
METRIC {"event":"scheduler_scan","duration_s":0,"candidates":1,"pending":1,"admitted":1,"deferred":0,"at":"2026-10-18T00:00:00+00:00"}
LOG   Lane 2 acquired in 0s (reset)
METRIC {"event":"lane_pool_acquire","task_id":"T-N","slot":2,"mode":"reset","duration_s":0,"at":"2026-10-18T00:00:00+00:00"}
ERR   ! Lane 2: environment is DEGRADED ([ "$(git rev-parse --abbrev-ref HEAD)" != factory/task/T-N ] failed) — repairing before T-N
ERR     No repair command is configured — releasing the lane. An environment failure, not a defect in T-N.
METRIC {"event":"lane_env_repair_failed","task_id":"T-N","slot":2,"reason":"no-repair-command","at":"2026-10-18T00:00:00+00:00"}
-- tick 3
CALL check_escalations
CALL check_escalations
METRIC {"event":"lease_acquired","task_id":"T-N","pid":<PID>,"ttl_s":900,"at":"2026-10-18T00:00:00+00:00"}
METRIC {"event":"scheduler_scan","duration_s":0,"candidates":1,"pending":1,"admitted":1,"deferred":0,"at":"2026-10-18T00:00:00+00:00"}
LOG   Lane 2 acquired in 0s (reset)
METRIC {"event":"lane_pool_acquire","task_id":"T-N","slot":2,"mode":"reset","duration_s":0,"at":"2026-10-18T00:00:00+00:00"}
ERR   ! Lane 2: environment is DEGRADED ([ "$(git rev-parse --abbrev-ref HEAD)" != factory/task/T-N ] failed) — repairing before T-N
ERR     No repair command is configured — releasing the lane. An environment failure, not a defect in T-N.
METRIC {"event":"lane_env_repair_failed","task_id":"T-N","slot":2,"reason":"no-repair-command","at":"2026-10-18T00:00:00+00:00"}
-- tick 4
[2026-10-18 00:00:00] [lane 1] pipeline T-M: success
CALL check_escalations
METRIC {"event":"lane_log","task_id":"T-M","slot":1,"log":"<T>/ctl/harness/state/logs/lane-1-T-M-<SHA8>-000000.log","at":"2026-10-18T00:00:00+00:00"}
METRIC {"event":"task_completed","task_id":"T-M","at":"x"}
CALL qa_findings_sweep_lane [1] [T-M]
CALL run_scoped_tests
LOG   + Integrator: main fast-forwarded to <SHA8> (factory/task/T-M)
METRIC {"event":"integration_completed","task_id":"T-M","branch":"factory/task/T-M","base_sha":"<SHA>","at":"2026-10-18T00:00:00+00:00"}
CALL run_hooks [pre_commit]
LOG   + Committed orchestrator state (T-M integrated)
LOG   + Lane 1: T-M complete (1 so far, took 0s)
METRIC {"event":"lane_finished","task_id":"T-M","slot":1,"outcome":"done","start_epoch":1792281600,"end_epoch":1792281600,"duration_s":0,"at":"2026-10-18T00:00:00+00:00"}
CALL qa_findings_publish [T-M] [events]
CALL check_escalations
METRIC {"event":"lease_acquired","task_id":"T-N","pid":<PID>,"ttl_s":900,"at":"2026-10-18T00:00:00+00:00"}
METRIC {"event":"scheduler_scan","duration_s":0,"candidates":1,"pending":1,"admitted":1,"deferred":0,"at":"2026-10-18T00:00:00+00:00"}
LOG   Lane 1 acquired in 0s (reset)
METRIC {"event":"lane_pool_acquire","task_id":"T-N","slot":1,"mode":"reset","duration_s":0,"at":"2026-10-18T00:00:00+00:00"}
ERR   ! Lane 1: environment is DEGRADED ([ "$(git rev-parse --abbrev-ref HEAD)" != factory/task/T-N ] failed) — repairing before T-N
ERR     No repair command is configured — releasing the lane. An environment failure, not a defect in T-N.
METRIC {"event":"lane_env_repair_failed","task_id":"T-N","slot":1,"reason":"no-repair-command","at":"2026-10-18T00:00:00+00:00"}
ERR Could not open a lane 4 times in a row — stopping.
ERR Every affected task is still PENDING; nothing was marked [FAILED].
ERR Check the worktree state (git worktree list) and the lane bootstrap command.
METRIC {"event":"lane_open_giving_up","failures":4,"at":"2026-10-18T00:00:00+00:00"}
rc=0
-- slots (in flight: 0, free: [1], pool: 2):
   1: pid=- task=[] story=[] outputs=[] branch=[]
   2: pid=- task=[] story=[] outputs=[] branch=[]
-- counters: completed=1 failed=0 consecutive=0 draining=false
-- leases: 
-- queue.txt:
   # [DONE] docs/tasks/t-m.md#t-m
   docs/tasks/t-n.md#t-n
### nothing eligible: a pending dependency
SECTION Concurrent scheduler: up to 2 lanes
LOG   max_lanes_per_story: 2   tick: 1s
LOG   live-qa semaphore: 1   heavy-test semaphore: 1
-- tick 1
CALL check_escalations
CALL check_escalations
LOG   check_deps: T-KA-001 waiting on pending deps: T-KB-001
LOG   check_deps: T-KB-001 waiting on pending deps: T-KA-001
METRIC {"event":"scheduler_scan","duration_s":0,"candidates":2,"pending":2,"admitted":0,"deferred":2,"at":"2026-10-18T00:00:00+00:00"}
SECTION No eligible tasks — remaining tasks wait on pending deps
LOG Queue ordering deadlock or upstream failure. Inspect with --dry-run;
LOG re-queue failed deps with --retry-failed.
rc=0
### an empty queue
SECTION Concurrent scheduler: up to 2 lanes
LOG   max_lanes_per_story: 2   tick: 1s
LOG   live-qa semaphore: 1   heavy-test semaphore: 1
-- tick 1
CALL check_escalations
CALL check_escalations
METRIC {"event":"scheduler_scan","duration_s":0,"candidates":0,"pending":0,"admitted":0,"deferred":0,"at":"2026-10-18T00:00:00+00:00"}
SECTION Queue empty — all tasks complete
rc=0
