ORCH-026: task dependencies (B waits for A) + single-repo merge serialization #78
Reference in New Issue
Block a user
Delete Branch "feature/ORCH-026-b-a"
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?
Summary
Implements ORCH-026 (ADR-001), two conditional levels — both kill-switched, never-raise, no new stage and no change to
STAGE_TRANSITIONS/ theQG_CHECKSregistry.check_branch_mergeable, under the held lease,auto_rebase_onto_mainis called always whenpremerge_rebase_always(defaultTrue), not only when the branch is behind — a deterministic structural anti-phantom complementing ORCH-073. No-op on an up-to-date branch (rebase keeps HEAD,push --force-with-lease-> "Everything up-to-date", CI not triggered). Kill-switch off -> ORCH-043 behaviour 1:1. Serialization window "merge -> main-updated" stays per-repo (cross-repo parallelism preserved).job_deps(task_id, depends_on_task_id)table (CREATE ... IF NOT EXISTS, safe on the live DB);claim_next_jobNOT EXISTSgate defers a job whose depends-on tasks aren't yetdonewithout occupying amax_concurrencyslot; inert on emptyjob_deps-> zero regression. New leafsrc/task_deps.py(never-raise):is_task_ready(fail-open), DFS cycle detection +Blocked/alert,declare_dependency,ingest_plane_relations(thedbsource never hits the network on the hot path),snapshot. Telegram waiting-line,/queuetask_depsblock, reconciler skip + cycle backstop; reaper untouched. Intra-repo only (v1).Flags:
ORCH_PREMERGE_REBASE_ALWAYS(true),ORCH_TASK_DEPS_ENABLED(true),ORCH_TASK_DEPS_SOURCE(db).Self-hosting safety
Never pushes to
main; the only force op stays--force-with-leaseon the task branch. Prod container not restarted. Non-self repos remain a no-op on empty deps/scope.Docs (golden source, same PR)
docs/architecture/README.md,CLAUDE.md,.env.example,CHANGELOG.md, ADRadr-0015+ work-itemADR-001.Test plan
tests/test_orch026_*.py— 64 tests (TC-A01..A08, TC-B01..B08, TC-G01/G02) greenpremerge_rebase_always=Falsein the ORCH-043 short-circuit testspytest tests/ -q-> 991 passedruff checkclean on all changed/new source + tests (remaining 10 findings pre-exist onmain)🤖 Generated with Claude Code
30d9f8e5abto9800dc89e3