Commit Graph

917 Commits

Author SHA1 Message Date
e3be810e80 reviewer(ET): auto-commit from reviewer run_id=782
All checks were successful
CI / test (push) Successful in 1m22s
CI / test (pull_request) Successful in 1m16s
2026-06-17 13:41:16 +03:00
19c31778b2 docs(overview): sync system showcase with analyst open-questions auto-park (ORCH-120)
All checks were successful
CI / test (push) Successful in 1m15s
CI / test (pull_request) Successful in 1m14s
Address reviewer P1 (ось ORCH-011/ORCH-079, правило агентов №6): витрина
описывала паузу serial-gate как исключительно операторскую, но ORCH-120
добавил движковый авто-park/unpark на analyst Needs Input.

- tech-pipeline.md: абзац пауз теперь называет два источника (оператор +
  авто-park движком на Needs Input, флаг analyst_needs_input_autopause_enabled,
  скоуп self-hosting, симметричный unpark на resume).
- tech-observability.md: пункт пауз в GET /queue — оба источника.
- tech-agents.md: when-applicable сигнальный канал 01-questions.md у analyst
  (строка таблицы + поясняющая врезка; не machine-verdict, не deliverable).
- CHANGELOG: запись ORCH-120 дополнена строкой про обновление витрины.

tests/test_system_docs.py зелёный (29 passed). src/STAGE_TRANSITIONS/QG_CHECKS
не тронуты — docs-only.

Refs: ORCH-120
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-17 13:28:06 +03:00
452df7aedf reviewer(ET): auto-commit from reviewer run_id=780
All checks were successful
CI / test (push) Successful in 1m14s
CI / test (pull_request) Successful in 1m14s
2026-06-17 13:24:21 +03:00
d6b495f156 fix(analysis): activate analyst open-questions -> Needs Input flow (ORCH-120)
All checks were successful
CI / test (push) Successful in 1m14s
CI / test (pull_request) Successful in 1m11s
Activates and completes the previously dead "analyst asks BLOCKING questions ->
01-questions.md -> Needs Input" path. Four coordinated changes, additive, under
kill-switch, self-hosting scope, never-raise; STAGE_TRANSITIONS / QG_CHECKS /
check_* / machine-verdict keys / DB schema are byte-for-byte UNCHANGED (the flow
is a pre-gate engine branch, NOT a Quality Gate; 01-questions.md is a SIGNAL
artifact, NOT a machine-verdict).

- D1 contract + canon: analyst.md documents the 01-questions.md channel (blocking
  questions -> Needs Input, do NOT fabricate deliverables) + resume behaviour; new
  skeleton docs/_templates/01-questions.md; PIPELINE_DOCS.md manifest row + 01-
  prefix note.
- D2 freshness-supersede (DQ-2): pure offline mtime predicate questions_active in
  the new leaf src/analyst_questions.py (a full FRESH package supersedes a stale
  untouched 01-questions.md -> no Needs-Input loop, AC-6).
- D3 priority: questions take priority over "files ready" in
  _handle_analysis_approved_flow (_decide_analysis_outcome + _emit_analysis_*);
  off/out-of-scope runs the ORIGINAL byte-for-byte order (AC-9).
- D4 auto-park: set_task_paused on Needs Input via the ORCH-124 pause axis so the
  repo serial-gate FIFO is not wedged while waiting for a human (AC-4); D5 resume +
  unpark (clear_task_paused) in handle_status_start (analysis branch).

Flags (config.py, safe defaults): analyst_questions_gate_enabled /
analyst_questions_gate_repos (empty -> self-hosting only) /
analyst_needs_input_autopause_enabled.

Tests: test_orch120_analyst_needs_input.py (TC-01 regress + TC-02/03/06/09/10),
test_orch120_serial_gate_needs_input.py (TC-04), test_orch120_resume_unpark.py
(TC-05), test_orch120_questions_artifact_canon.py (TC-08), assert in
test_agent_prompts_canon.py (TC-07). Full suite green (2205 passed).

Refs: ORCH-120

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-17 13:15:27 +03:00
1fcbe06df5 architect(ET): auto-commit from architect run_id=778
All checks were successful
CI / test (push) Successful in 1m13s
2026-06-17 12:55:28 +03:00
432da2c4ed analyst(ET): auto-commit from analyst run_id=777
All checks were successful
CI / test (push) Successful in 1m13s
2026-06-17 12:45:52 +03:00
a4625df97c docs: init ORCH-120 business request
All checks were successful
CI / test (push) Successful in 1m12s
2026-06-17 12:37:50 +03:00
8c74430b13 Merge pull request 'fix(queue): enforce queued ⇒ no run-ownership invariant (ORCH-126)' (#145) from feature/ORCH-126-bug-queued-job-can-keep-stale- into main
Some checks failed
CI / test (push) Has been cancelled
2026-06-17 11:56:28 +03:00
deploy-finalizer
ab157324a7 deploy(ORCH-036): finalize SUCCESS for ORCH-126
All checks were successful
CI / test (push) Successful in 1m14s
CI / test (pull_request) Successful in 1m13s
2026-06-17 11:56:26 +03:00
staging-runner
aca0466162 staging(ORCH-115): staging gate SUCCESS for ORCH-126
All checks were successful
CI / test (push) Successful in 1m20s
CI / test (pull_request) Successful in 1m12s
2026-06-17 11:50:19 +03:00
test-runner
3b8aca03ee test(ORCH-116): test gate PASS for ORCH-126
Some checks failed
CI / test (push) Has been cancelled
CI / test (pull_request) Successful in 1m18s
2026-06-17 11:48:44 +03:00
c8632f4b48 reviewer(ET): auto-commit from reviewer run_id=776
All checks were successful
CI / test (push) Successful in 1m18s
CI / test (pull_request) Successful in 1m14s
2026-06-17 11:47:05 +03:00
d7e7a4d817 fix(queue): enforce queued ⇒ no run-ownership invariant (ORCH-126)
All checks were successful
CI / test (push) Successful in 1m14s
CI / test (pull_request) Successful in 1m15s
Queued analyst-jobs hung forever even with ORCH_SERIAL_GATE_ENABLED=false
(incident ORCH-124/125, job 2286: queued + run_id=759/760 + pid=35/42 +
started_at=NULL — physically impossible). No path returning a job to
'queued' reset its run-ownership (run_id/pid); after a container restart a
reused pid made pid_alive(stale)=True, so the job-reaper Tier-1 saw a phantom
'running' and at max_concurrency=1 wedged the claim of the whole shared queue.

Enforce the invariant `status='queued' ⇒ run_id IS NULL AND pid IS NULL AND
started_at IS NULL` on existing columns (no schema change):

- D1 forward-cleanup: requeue_running_jobs / mark_job('queued') /
  mark_job_transient / reap_running_job('queued') reset run_id=NULL, pid=NULL
  in the same UPDATE that clears started_at; atomic status-guards preserved.
- D2 clean claim: claim_next_job resets pid/run_id on the queued->running flip
  (defense-in-depth) so the row carries pid IS NULL until _spawn stamps it.
- D4 self-heal + observability: db.find_impossible_queued_jobs /
  sanitize_impossible_queued run at startup (main.lifespan) and on each reaper
  tick (JobReaper.sanitize_impossible_queued_once, never-raise); counter
  impossible_queued_total in the GET /queue reaper block. Kill-switch
  ORCH_IMPOSSIBLE_QUEUED_SANITIZE_ENABLED (default on; gates only the D4 sweep).
- D5: reaper Tier-1 unchanged — the fix restores its precondition (pid reflects
  THIS run). Marked invariants ORCH-065/113/114/099 preserved.

Tests: tests/test_orch126_queued_stale_run.py (TC-01 mandatory regression
red->green; TC-02..TC-10). Full pytest tests/ -q green (2189 passed).
Docs: internals.md (run-ownership invariant section), .env.example, CHANGELOG;
cross-cutting adr-0052.

Refs: ORCH-126
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-17 11:39:26 +03:00
3fb7bd6e4c architect(ET): auto-commit from architect run_id=774
All checks were successful
CI / test (push) Successful in 1m12s
2026-06-17 11:22:30 +03:00
453c5b7d04 analyst(ET): auto-commit from analyst run_id=773
All checks were successful
CI / test (push) Successful in 1m12s
2026-06-17 11:07:33 +03:00
a5f691fc96 docs: init ORCH-126 business request
All checks were successful
CI / test (push) Successful in 1m17s
2026-06-17 11:00:16 +03:00
8e2281aab4 Merge pull request 'fix(serial-gate): pause-without-blocking via per-task park signal (ORCH-124)' (#144) from feature/ORCH-124-bug-serial-gate-treats-backlog into main
Some checks failed
CI / test (push) Has been cancelled
2026-06-16 22:46:02 +03:00
deploy-finalizer
895fb3ab44 deploy(ORCH-036): finalize SUCCESS for ORCH-124
All checks were successful
CI / test (push) Successful in 1m13s
2026-06-16 22:46:01 +03:00
staging-runner
9709aa2267 staging(ORCH-115): staging gate SUCCESS for ORCH-124
All checks were successful
CI / test (push) Successful in 1m19s
CI / test (pull_request) Successful in 1m12s
2026-06-16 22:35:07 +03:00
test-runner
b61a4eb092 test(ORCH-116): test gate PASS for ORCH-124
Some checks failed
CI / test (push) Has been cancelled
CI / test (pull_request) Successful in 1m16s
2026-06-16 22:33:32 +03:00
be8ddfcd57 reviewer(ET): auto-commit from reviewer run_id=772
All checks were successful
CI / test (push) Successful in 1m18s
CI / test (pull_request) Successful in 1m13s
2026-06-16 22:31:49 +03:00
58e5dfe55d docs(serial-gate): sync system showcase + clean stray tags (ORCH-124)
All checks were successful
CI / test (push) Successful in 1m15s
CI / test (pull_request) Successful in 1m12s
Addresses reviewer REQUEST_CHANGES (run 768) on ORCH-124 — docs-only,
no src/tests touched, fix scope unchanged.

P1: update docs/overview/ showcase for the new serial-gate "pause without
blocking" axis (changed task-routing functionality, ORCH-011/ORCH-079):
- tech-pipeline.md: FIFO exception "pause without blocking" next to freeze
- tech-data-model.md: durable signal tasks.paused_at on the Task row
- tech-observability.md: paused/reason in serial_gate GET /queue block +
  operator endpoints POST /serial-gate/pause|resume

P2: strip leaked tool-call trailing tags (</content>/</invoke>) from 4
golden-source docs of this PR (06-adr/ADR-001, adr-0051,
08-data-requirements.md, 10-tech-risks.md).

CHANGELOG "Доки" bullet extended accordingly. Full suite green (2178 passed);
test_system_docs.py green (machine-checked showcase facts intact).

Refs: ORCH-124
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-16 21:50:45 +03:00
ec932264db reviewer(ET): auto-commit from reviewer run_id=768
All checks were successful
CI / test (push) Successful in 1m16s
CI / test (pull_request) Successful in 1m12s
2026-06-16 20:24:55 +03:00
3a1972875f fix(tests): isolate repos_dir in ORCH-123 staging-runner test fixture
All checks were successful
CI / test (push) Successful in 1m13s
CI / test (pull_request) Successful in 1m12s
The deterministic test-runner gate (full `pytest tests/`) failed on
test_orch123_staging_runner_exec.py::test_r2_held_deploy_staging_not_rolled_back
once ORCH-124 reached the testing stage.

Root cause (pre-existing latent regress, surfaced — not introduced — by
ORCH-124): the fixture isolated `worktrees_dir` but not `repos_dir`.
`check_staging_status` falls back to `<repos_dir>/<repo>` (and its
origin/main) when the feature worktree is absent. After ORCH-123 merged,
the real `/repos/orchestrator/docs/work-items/ORCH-123/15-staging-log.md`
(verdict SUCCESS) exists on disk, so the intended-RED staging gate read it
and went green -> advance_stage was called -> the R-2 assertion failed.
Order-dependent: the test passed alone, failed in the full suite.

Fix: isolate `settings.repos_dir` to an empty tmp subdir in the fixture
(mirroring the existing worktrees_dir isolation) so the staging gate is
deterministically "not found" -> red, regardless of suite ordering. The
ORCH-123 R-2 invariant (a held deploy-staging task is never rolled back to
development, adr-0049/ADR-001 D4) is preserved and strengthened — the fix
only restores the test's stated premise. src/** / STAGE_TRANSITIONS /
QG_CHECKS / check_* untouched (test-only change).

Refs: ORCH-124
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-16 20:12:28 +03:00
test-runner
c7336dd9ea test(ORCH-116): test gate FAIL for ORCH-124
All checks were successful
CI / test (push) Successful in 1m23s
CI / test (pull_request) Successful in 1m15s
2026-06-16 19:51:06 +03:00
7ac83a9731 reviewer(ET): auto-commit from reviewer run_id=766
All checks were successful
CI / test (push) Successful in 1m23s
CI / test (pull_request) Successful in 1m15s
2026-06-16 19:49:23 +03:00
87af857082 fix(serial-gate): pause-without-blocking via per-task park signal (ORCH-124)
All checks were successful
CI / test (push) Successful in 1m12s
CI / test (pull_request) Successful in 1m17s
Fixes incident ORCH-116/ORCH-123: serial_gate defined a repo's "active task"
purely by machine stage (tasks.stage NOT IN ('done','cancelled')). Plane statuses
Backlog/Blocked/Needs-Input (layer-B indication, ORCH-066) do NOT change
tasks.stage (layer A), so a paused predecessor was indistinguishable from an active
one and held the FIFO gate closed against an urgent successor — the urgent fix
could not start until the paused task was formally done.

Introduces an explicit, durable, DB-resolvable per-task "park" signal — additive
nullable column tasks.paused_at (pattern of cancelled_at/track) — and a new
ORTHOGONAL scheduler "pause" axis. The serial-gate "active task" predicate becomes
`stage NOT IN ('done','cancelled') AND paused_at IS NULL` across all three points
(build_claim_clause / repo_has_active_task / _per_repo_snapshot). The terminal set
{done,cancelled} in serial_gate/task_deps/stages.py is byte-for-byte unchanged
(adr-0026 not regressed): task_deps/stages.py do NOT read paused_at, so a paused
declared dependency and an active repo_freeze STILL block (pause never bypasses
them — different axes). Anti-stale-base on resume relies on the existing deferred
branch cut (ORCH-088) + pre-merge auto_rebase_onto_main + merge-gate re-test
(ORCH-026/093/110) — no new rebase machinery.

Additive, under an independent sub-flag, never-raise, restart-safe; hot-claim
fail-OPEN and freeze fail-CLOSED preserved. STAGE_TRANSITIONS / QG_CHECKS / check_*
/ machine-verdict keys / existing table schemas are byte-for-byte untouched (this is
a queue-scheduler + observability change, not a Quality Gate).

- src/db.py: additive tasks.paused_at column (_ensure_column) + set/clear/is helpers
- src/serial_gate.py: _pause_layer_enabled() + pause-term in the 3 points; `paused`
  list + per-job `reason` (freeze>dependency>active-task>null) in the /queue snapshot
- src/config.py + .env.example: serial_gate_pause_enabled (default True = true no-op)
- src/main.py: POST /serial-gate/pause|resume?work_item=<id> (by образцу unfreeze)
- tests/test_orch124_serial_gate_pause.py: TC-01 mandatory incident regress + TC-02..15
- CHANGELOG.md: [Unreleased] entry

ADR: docs/work-items/ORCH-124/06-adr/ADR-001-serial-gate-pause-without-blocking.md
Cross-cutting: docs/architecture/adr/adr-0051-serial-gate-pause-without-blocking.md

Refs: ORCH-124

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-16 19:35:55 +03:00
de4f067655 architect(ET): auto-commit from architect run_id=764
All checks were successful
CI / test (push) Successful in 1m12s
2026-06-16 19:17:43 +03:00
fef5ba15d5 analyst(ET): auto-commit from analyst run_id=763
All checks were successful
CI / test (push) Successful in 1m9s
2026-06-16 17:56:23 +03:00
569abee5f2 docs: init ORCH-124 business request
All checks were successful
CI / test (push) Successful in 1m14s
2026-06-16 17:24:43 +03:00
39fe1a5081 Merge pull request 'feat(testing): deterministic test-runner replacing LLM tester on the testing stage (ORCH-116)' (#142) from feature/ORCH-116-orch-replace-llm-tester-with-d into main
Some checks failed
CI / test (push) Has been cancelled
2026-06-16 10:27:24 +03:00
deploy-finalizer
274fbd77fc deploy(ORCH-036): finalize SUCCESS for ORCH-116
All checks were successful
CI / test (push) Successful in 1m15s
CI / test (pull_request) Successful in 1m13s
2026-06-16 10:27:22 +03:00
staging-runner
b212afbbd0 staging(ORCH-115): staging gate SUCCESS for ORCH-116
All checks were successful
CI / test (push) Successful in 1m20s
CI / test (pull_request) Successful in 1m16s
2026-06-16 10:21:36 +03:00
3270647d86 tester(ET): auto-commit from tester run_id=758
All checks were successful
CI / test (push) Successful in 1m16s
CI / test (pull_request) Successful in 1m16s
2026-06-16 10:19:58 +03:00
e12b03b235 reviewer(ET): auto-commit from reviewer run_id=757
All checks were successful
CI / test (push) Successful in 1m16s
CI / test (pull_request) Successful in 1m23s
2026-06-16 10:11:33 +03:00
c470576202 developer(ET): auto-commit from developer run_id=756
All checks were successful
CI / test (push) Successful in 1m14s
CI / test (pull_request) Successful in 1m11s
2026-06-16 09:59:29 +03:00
74fccf3a09 fix(testing): reconcile ORCH-116 with merged ORCH-123 (ADR renumber, CHANGELOG, env parity)
All checks were successful
CI / test (push) Successful in 1m12s
CI / test (pull_request) Successful in 1m12s
Recovery from the merge-gate rebase-conflict bounce. The feature branch was
rebased onto origin/main (which had merged ORCH-123). The single conflicting
hunk — docs/architecture/README.md — was resolved during the rebase: kept
ORCH-123's host-side staging-runner line AND the ORCH-116 test-runner bullet.

This follow-up commit reconciles the remainder:

- Renumber the global sweeping ADR adr-0049 -> adr-0050. ORCH-123 took adr-0049
  (adr-0049-host-side-docker-execution-boundary.md) on main while ORCH-116 was
  in flight, so ORCH-116 yields to the merged task and moves to the next free
  number. Mechanical cross-reference reconciliation only (git mv + title + every
  test-runner reference across README/internals/CLAUDE/CHANGELOG/config.py +
  06-adr/ADR-001 + 12-review). Main's adr-0049 host-side references are left
  byte-for-byte untouched. No design/verdict content was altered.
- Restore the ORCH-116 CHANGELOG entry that the CHANGELOG auto-merge silently
  dropped (both ORCH-123 and ORCH-116 inserted at the same [Unreleased] anchor;
  git kept only ORCH-123).
- Add the missing ORCH_TEST_RUNNER_* keys to .env.example (parity with the
  ORCH_STAGING_RUNNER_* block; ORCH-101 canon of start keys).

Refs: ORCH-116

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-16 09:56:47 +03:00
staging-runner
4b14b010de staging(ORCH-115): staging gate SUCCESS for ORCH-116 2026-06-16 09:37:40 +03:00
4c7b2345b7 reviewer(ET): auto-commit from reviewer run_id=754 2026-06-16 09:37:40 +03:00
a3ea56c751 reviewer(ET): auto-commit from reviewer run_id=743 2026-06-16 09:37:40 +03:00
staging-runner
024e1bfceb staging(ORCH-115): staging gate FAILED for ORCH-116 2026-06-16 09:37:40 +03:00
b1e00c0a7d tester(ET): auto-commit from tester run_id=742 2026-06-16 09:37:40 +03:00
e386130fd1 reviewer(ET): auto-commit from reviewer run_id=741 2026-06-16 09:37:40 +03:00
9d16ee473a feat(testing): deterministic test-runner replacing LLM tester on the testing stage (ORCH-116)
Second realised slice of the determinization-roadmap (ORCH-118 A5,
needs-hybrid-fallback): on the `testing` stage for the self-hosting
`orchestrator` repo the LLM `tester` agent is replaced by a deterministic
test-runner (src/test_runner.py), intercepted in launch_job BEFORE _spawn
(deploy-finalizer / post-deploy-monitor / staging-runner precedent).

It runs the regression `python -m pytest <target>` in the task worktree via
proc_group (tree-kill) + an optional read-only smoke (/health, /status, /queue
+ serial_gate), maps the exit-code -> result: PASS|FAIL via the existing
self_deploy.map_exit_code_to_status contract, writes 13-test-report.md and
initiates the EXISTING check_tests_passed gate exactly as a finished LLM-tester.

Invariant (NFR-1): only the *producer* changes — the artifact contract
(13-test-report.md / result:), the gate check_tests_passed / _parse_tests_verdict,
STAGE_TRANSITIONS and the DB schema are byte-for-byte UNCHANGED. Additive, under
a kill-switch (test_runner_enabled), never-raise, fail-closed, self-hosting scope,
two-level outcome (tool-error DEFER, anti ORCH-110), hybrid (LLM strictly
off-control-path). 52c-`status:` is aligned with the verdict (D6.1) so the
three-field _parse_tests_verdict never false-negatives a PASS.

Docs (ORCH-118 NFR-6, atomic with code): llm-call-sites.md (A5 implemented),
llm-determinization-roadmap.md (rank 2 implemented), llm-usage-policy.md,
README/internals/overview, tester.md, CLAUDE.md, CHANGELOG.md. Coverage:
tests/test_orch116_test_runner.py (TC-01..TC-14); LLM anti-drift tests green.
Full suite: 2137 passed.

Refs: ORCH-116
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-16 09:37:40 +03:00
74f53b522a architect(ET): auto-commit from architect run_id=739 2026-06-16 09:36:50 +03:00
9e543551aa analyst(ET): auto-commit from analyst run_id=738 2026-06-16 09:36:50 +03:00
c081a5b6ff docs: init ORCH-116 business request 2026-06-16 09:36:50 +03:00
9c88fdd85e Merge pull request 'feat: ORCH-123-bug-staging-runner-assumes-doc' (#143) from feature/ORCH-123-bug-staging-runner-assumes-doc into main 2026-06-16 09:03:30 +03:00
deploy-finalizer
031130c7f0 deploy(ORCH-036): finalize SUCCESS for ORCH-123
All checks were successful
CI / test (push) Successful in 1m8s
2026-06-16 09:03:29 +03:00
12e3a9e4f3 docs(ORCH-123): staging gate log — staging_status SUCCESS (8/10, C9a/C9b infra-waived)
All checks were successful
CI / test (push) Successful in 1m15s
CI / test (pull_request) Successful in 1m14s
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-16 08:57:48 +03:00