### lanes_active / lane_enter with lanes disabled
-- seam: LANE_ACTIVE=false LANE_PATH=[] LANE_BRANCH=[] LANE_BASE_SHA=[]
   WORK_ROOT=[<T>/ctl] STORIES_DIR=[<T>/ctl/harness/stories] LANE_WORKTREE=[<unset>]
   lanes_active: no
rc=1
-- seam: LANE_ACTIVE=false LANE_PATH=[] LANE_BRANCH=[] LANE_BASE_SHA=[]
   WORK_ROOT=[<T>/ctl] STORIES_DIR=[<T>/ctl/harness/stories] LANE_WORKTREE=[<unset>]
   lanes_active: no
### lane_enter — a cold lane (bootstrap, no env check, no build)
LOG   Lane: factory/task/T-1 @ <SHA8> → <T>/ctl/harness/state/lanes/1 (cold, 0s)
METRIC {"event":"lane_pool_acquire","task_id":"T-1","slot":1,"mode":"cold","duration_s":0,"at":"2026-10-18T00:00:00+00:00"}
LOG   Lane cold sync: echo bootstrap
LOG   + Lane dependencies synced in 0s
METRIC {"event":"lane_bootstrap","task_id":"T-1","slot":1,"mode":"cold","duration_s":0,"at":"2026-10-18T00:00:00+00:00"}
METRIC {"event":"lane_acquired","task_id":"T-1","branch":"factory/task/T-1","base_sha":"<SHA>","at":"2026-10-18T00:00:00+00:00"}
rc=0
-- seam: LANE_ACTIVE=true LANE_PATH=[<T>/ctl/harness/state/lanes/1] LANE_BRANCH=[factory/task/T-1] LANE_BASE_SHA=[set]
   WORK_ROOT=[<T>/ctl/harness/state/lanes/1] STORIES_DIR=[<T>/ctl/harness/state/lanes/1/harness/stories] LANE_WORKTREE=[<T>/ctl/harness/state/lanes/1]
   lanes_active: yes
-- worktrees:
   worktree <T>/ctl
   branch refs/heads/main
   worktree <T>/ctl/harness/state/lanes/1
   branch refs/heads/factory/task/T-1
-- branches: factory/task/T-1 main 
-- base.sha recorded: HEAD
### run_integration_for_task — the lane's commit lands (scoped tests green, control refresh)
LOG   Integrator: base moved lockfiles under the lane ((hash-gating off)) — syncing: echo refresh
LOG   + Integrator: dependency tree synced to the merged tree (0s)
METRIC {"event":"integration_sync","task_id":"T-1","slot":1,"lockfiles":"(hash-gating off)","duration_s":0,"at":"2026-10-18T00:00:00+00:00"}
CALL run_scoped_tests [start sha]
LOG   + Integrator: main fast-forwarded to <SHA8> (factory/task/T-1)
METRIC {"event":"integration_completed","task_id":"T-1","branch":"factory/task/T-1","base_sha":"<SHA>","at":"2026-10-18T00:00:00+00:00"}
CALL run_hooks [pre_commit] [start sha]
LOG   + Committed orchestrator state (T-1 integrated)
METRIC {"event":"control_refresh","task_id":"T-1","duration_s":0,"at":"2026-10-18T00:00:00+00:00"}
rc=0
-- main:
   chore(state): T-1 integrated
   T-1 work
   base
-- queue.txt:
   # queue
   # [DONE] docs/t1.md#t-1
   # [RUNNING] docs/t2.md#t-2
-- integration lock held after: no
### lane_exit auto — the integrated branch is disposable
rc=0
-- seam: LANE_ACTIVE=false LANE_PATH=[] LANE_BRANCH=[] LANE_BASE_SHA=[]
   WORK_ROOT=[<T>/ctl] STORIES_DIR=[<T>/ctl/harness/stories] LANE_WORKTREE=[<unset>]
   lanes_active: no
-- worktrees:
   worktree <T>/ctl
   branch refs/heads/main
   worktree <T>/ctl/harness/state/lanes/1
   detached
-- branches: main 
### lane_enter — the same slot again: a RESET lane, lockfiles unchanged
LOG   Lane: factory/task/T-2 @ <SHA8> → <T>/ctl/harness/state/lanes/1 (reset, 0s)
METRIC {"event":"lane_pool_acquire","task_id":"T-2","slot":1,"mode":"reset","duration_s":0,"at":"2026-10-18T00:00:00+00:00"}
LOG   Lane reset sync: echo refresh
LOG   + Lane dependencies synced in 0s
METRIC {"event":"lane_bootstrap","task_id":"T-2","slot":1,"mode":"reset","duration_s":0,"at":"2026-10-18T00:00:00+00:00"}
METRIC {"event":"lane_acquired","task_id":"T-2","branch":"factory/task/T-2","base_sha":"<SHA>","at":"2026-10-18T00:00:00+00:00"}
rc=0
-- seam: LANE_ACTIVE=true LANE_PATH=[<T>/ctl/harness/state/lanes/1] LANE_BRANCH=[factory/task/T-2] LANE_BASE_SHA=[set]
   WORK_ROOT=[<T>/ctl/harness/state/lanes/1] STORIES_DIR=[<T>/ctl/harness/state/lanes/1/harness/stories] LANE_WORKTREE=[<T>/ctl/harness/state/lanes/1]
   lanes_active: yes
### run_integration_for_task — the base moved under the lane: rebase conflict
ERR   x Integrator: factory/task/T-2 conflicts with the base — rebase aborted, branch kept
rc=1 INTEGRATOR_FAIL_REASON=[rebase-conflict]
-- main:
   concurrent main edit
   chore(state): T-1 integrated
   T-1 work
   base
-- queue.txt:
   # queue
   # [DONE] docs/t1.md#t-1
   # [RUNNING] docs/t2.md#t-2
### lane_exit keep — the conflicting branch is kept
rc=0
-- seam: LANE_ACTIVE=false LANE_PATH=[] LANE_BRANCH=[] LANE_BASE_SHA=[]
   WORK_ROOT=[<T>/ctl] STORIES_DIR=[<T>/ctl/harness/stories] LANE_WORKTREE=[<unset>]
   lanes_active: no
-- worktrees:
   worktree <T>/ctl
   branch refs/heads/main
   worktree <T>/ctl/harness/state/lanes/1
   detached
-- branches: factory/task/T-2 main 
### run_integration_for_task — green alone, RED once merged
LOG   Lane: factory/task/T-3 @ <SHA8> → <T>/ctl/harness/state/lanes/1 (reset, 0s)
METRIC {"event":"lane_pool_acquire","task_id":"T-3","slot":1,"mode":"reset","duration_s":0,"at":"2026-10-18T00:00:00+00:00"}
LOG   Lane reset sync: echo refresh
LOG   + Lane dependencies synced in 0s
METRIC {"event":"lane_bootstrap","task_id":"T-3","slot":1,"mode":"reset","duration_s":0,"at":"2026-10-18T00:00:00+00:00"}
METRIC {"event":"lane_acquired","task_id":"T-3","branch":"factory/task/T-3","base_sha":"<SHA>","at":"2026-10-18T00:00:00+00:00"}
enter rc=0
LOG   Integrator: base moved lockfiles under the lane ((hash-gating off)) — syncing: echo refresh
LOG   + Integrator: dependency tree synced to the merged tree (0s)
METRIC {"event":"integration_sync","task_id":"T-3","slot":1,"lockfiles":"(hash-gating off)","duration_s":0,"at":"2026-10-18T00:00:00+00:00"}
CALL run_scoped_tests [start sha]
ERR   x Integrator: factory/task/T-3 is green alone but RED once merged — base unmoved
rc=2 INTEGRATOR_FAIL_REASON=[merged-tree-tests-failed in: pkg-a]
-- main:
   concurrent main edit
   chore(state): T-1 integrated
   T-1 work
   base
### lane_enter — the dependency sync fails (cold slot 2): released, run in place
LOG   Lane: factory/task/T-4 @ <SHA8> → <T>/ctl/harness/state/lanes/2 (cold, 0s)
METRIC {"event":"lane_pool_acquire","task_id":"T-4","slot":2,"mode":"cold","duration_s":0,"at":"2026-10-18T00:00:00+00:00"}
LOG   Lane cold sync: echo boom; exit 4
ERR   ! Lane sync failed after 0s (<T>/ctl/harness/state/logs/lane-bootstrap-<SHA8>-000000-T-4.log) — running T-4 in place
METRIC {"event":"lane_bootstrap_failed","task_id":"T-4","slot":2,"duration_s":0,"at":"2026-10-18T00:00:00+00:00"}
rc=1
-- seam: LANE_ACTIVE=false LANE_PATH=[] LANE_BRANCH=[] LANE_BASE_SHA=[]
   WORK_ROOT=[<T>/ctl] STORIES_DIR=[<T>/ctl/harness/stories] LANE_WORKTREE=[<unset>]
   lanes_active: no
-- worktrees:
   worktree <T>/ctl
   branch refs/heads/main
   worktree <T>/ctl/harness/state/lanes/1
   detached
   worktree <T>/ctl/harness/state/lanes/2
   detached
-- branches: factory/task/T-2 factory/task/T-3 main 
### lane_enter — the environment check fails with no repair command
LOG   Lane: factory/task/T-5 @ <SHA8> → <T>/ctl/harness/state/lanes/2 (reset, 0s)
METRIC {"event":"lane_pool_acquire","task_id":"T-5","slot":2,"mode":"reset","duration_s":0,"at":"2026-10-18T00:00:00+00:00"}
LOG   Lane reset sync: echo refresh
LOG   + Lane dependencies synced in 0s
METRIC {"event":"lane_bootstrap","task_id":"T-5","slot":2,"mode":"reset","duration_s":0,"at":"2026-10-18T00:00:00+00:00"}
ERR   ! Lane 2: environment is DEGRADED (false failed) — repairing before T-5
ERR     No repair command is configured — releasing the lane. An environment failure, not a defect in T-5.
METRIC {"event":"lane_env_repair_failed","task_id":"T-5","slot":2,"reason":"no-repair-command","at":"2026-10-18T00:00:00+00:00"}
rc=1
-- seam: LANE_ACTIVE=false LANE_PATH=[] LANE_BRANCH=[] LANE_BASE_SHA=[]
   WORK_ROOT=[<T>/ctl] STORIES_DIR=[<T>/ctl/harness/stories] LANE_WORKTREE=[<unset>]
   lanes_active: no
### lane_enter — the build fails
LOG   Lane: factory/task/T-6 @ <SHA8> → <T>/ctl/harness/state/lanes/2 (reset, 0s)
METRIC {"event":"lane_pool_acquire","task_id":"T-6","slot":2,"mode":"reset","duration_s":0,"at":"2026-10-18T00:00:00+00:00"}
LOG   Lane reset sync: echo refresh
LOG   + Lane dependencies synced in 0s
METRIC {"event":"lane_bootstrap","task_id":"T-6","slot":2,"mode":"reset","duration_s":0,"at":"2026-10-18T00:00:00+00:00"}
LOG   Lane 2 build: echo no-build; exit 2
ERR   ! Lane build failed after 0s (<T>/ctl/harness/state/logs/lane-build-<SHA8>-000000-T-6.log) — releasing the lane for T-6
ERR     This is an environment failure, not a defect in T-6.
METRIC {"event":"lane_build_failed","task_id":"T-6","slot":2,"duration_s":0,"at":"2026-10-18T00:00:00+00:00"}
rc=1
-- seam: LANE_ACTIVE=false LANE_PATH=[] LANE_BRANCH=[] LANE_BASE_SHA=[]
   WORK_ROOT=[<T>/ctl] STORIES_DIR=[<T>/ctl/harness/stories] LANE_WORKTREE=[<unset>]
   lanes_active: no
### lane_enter — the slot cannot be created at all (lanes dir unwritable): pool slot disabled
mkdir: cannot create directory '<T>/not-a-dir': Not a directory
ERR   ! Could not ready a worktree lane for T-7 (worktree creation failed) — running in place
METRIC {"event":"lane_unavailable","task_id":"T-7","reason":"worktree creation failed","at":"2026-10-18T00:00:00+00:00"}
METRIC {"event":"lane_pool_disabled","slot":3,"reason":"worktree creation failed","at":"2026-10-18T00:00:00+00:00"}
rc=1
-- seam: LANE_ACTIVE=false LANE_PATH=[] LANE_BRANCH=[] LANE_BASE_SHA=[]
   WORK_ROOT=[<T>/ctl] STORIES_DIR=[<T>/ctl/harness/stories] LANE_WORKTREE=[<unset>]
   lanes_active: no
### lane_exit with no lane — a caller's preset LANE_WORKTREE survives (D-8)
rc=0
-- seam: LANE_ACTIVE=false LANE_PATH=[] LANE_BRANCH=[] LANE_BASE_SHA=[]
   WORK_ROOT=[<T>/preset] STORIES_DIR=[<T>/ctl/harness/stories] LANE_WORKTREE=[<T>/preset]
   lanes_active: no
### orchestrator_exit_cleanup — from a subshell that is not the scheduler: nothing
rc=0
### orchestrator_exit_cleanup — the scheduler, holding two lane leases, a sequential lease and a lane
CALL sweep_leases [park]
CALL sweep_leases [park]
CALL reap_orphans_under [<T>/ctl/harness/state/lanes] [the run]
CALL reap_orphans_under [<T>/ctl] [the run]
CALL _harness_run_copy_cleanup
rc=0
-- seam: LANE_ACTIVE=false LANE_PATH=[] LANE_BRANCH=[] LANE_BASE_SHA=[]
   WORK_ROOT=[<T>/ctl] STORIES_DIR=[<T>/ctl/harness/stories] LANE_WORKTREE=[<unset>]
   lanes_active: no
-- worktrees:
   worktree <T>/ctl
   branch refs/heads/main
   worktree <T>/ctl/harness/state/lanes/1
   detached
   worktree <T>/ctl/harness/state/lanes/2
   detached
-- branches: factory/task/T-10 factory/task/T-2 factory/task/T-3 main 
-- leases left: 
-- integration lock held after: no
-- CURRENT_LEASE_TASK_ID=[] LANE_HEARTBEAT_PIDS: 0
### orchestrator_exit_cleanup — the sweep RETAINED a dirty lane: its worktree is kept
ERR   ! Lane worktree kept (uncommitted work) — see the blocker row for its path.
CALL reap_orphans_under [<T>/ctl/harness/state/lanes] [the run]
CALL reap_orphans_under [<T>/ctl] [the run]
CALL _harness_run_copy_cleanup
rc=0
-- seam: LANE_ACTIVE=false LANE_PATH=[<T>/ctl/harness/state/lanes/1] LANE_BRANCH=[factory/task/T-11] LANE_BASE_SHA=[set]
   WORK_ROOT=[<T>/ctl/harness/state/lanes/1] STORIES_DIR=[<T>/ctl/harness/state/lanes/1/harness/stories] LANE_WORKTREE=[<T>/ctl/harness/state/lanes/1]
   lanes_active: no
-- worktrees:
   worktree <T>/ctl
   branch refs/heads/main
   worktree <T>/ctl/harness/state/lanes/1
   branch refs/heads/factory/task/T-11
   worktree <T>/ctl/harness/state/lanes/2
   detached
-- branches: factory/task/T-10 factory/task/T-11 factory/task/T-2 factory/task/T-3 main 
