Skip to content

feat(orchestrator): add holistic integration ownership pass - #3135

Draft
lee3Q wants to merge 3 commits into
mainfrom
feat/issue-3062-holistic-integration-ownership-20261130
Draft

lee3Q wants to merge 3 commits into
mainfrom
feat/issue-3062-holistic-integration-ownership-20261130

Conversation

@lee3Q

@lee3Q lee3Q commented Nov 30, 2026

Copy link
Copy Markdown
Collaborator

Problem

Per-acceptance-criterion workers can complete their slices without one owner reviewing the assembled product. This is visible in small greenfield applications where entrypoints, shared contracts, cross-slice wiring, and the end-to-end experience need one final owner.

Change

  • Add an execution-owned holistic integration pass for runs with multiple successful slices.
  • Build the integration contract from the Seed goal, constraints, acceptance criteria, assumptions, requester answers, and expected experience.
  • Reuse the coordinator review boundary to inspect the assembled product, repair seam mismatches, and record cohesive or repaired outcomes.
  • Preserve a single-slice fast path and propagate integration failure into the execution result.
  • Keep authority checks, adaptive concurrency accounting, provider effect scope, and bounded prompt content on the integration path.

Verification

  • uv run ruff format --check src/ tests/unit/orchestrator
  • uv run ruff check src/ tests/unit/orchestrator
  • uv run python scripts/check-module-size.py
  • uv run pytest -q tests/unit/security/test_trust_boundary_invariants.py tests/unit/orchestrator

Refs #3062

@ouroboros-agent ouroboros-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review — ouroboros-agent[bot]

Verdict: REQUEST_CHANGES

Metadata

Field Value
PR #3135
HEAD checked e4621f37ac4a626003d27d84510dcb8cb57209d0
Request ID req_1796041310_73
Review record eebdcaed-9c7c-48db-b0f6-4ea74493ff7d

What Improved

  • Adds a whole-product review after successful multi-slice execution, passes the Seed contract to the coordinator, preserves the single-slice fast path, and makes integration failure affect all_succeeded.

Issue Requirements

Requirement Status
Refs #3062: address the lack of one owner for an assembled multi-slice product, as described in the PR body Partially satisfied; issue text was not supplied
Build review context from the Seed goal, constraints, acceptance criteria, assumptions, requester answers, and expected experience Implemented
Inspect and repair cross-slice seams, then record cohesive or repaired outcomes Partially satisfied; unusable review output can be recorded as cohesive
Preserve single-slice bypass and propagate integration failure Implemented in the result model
Preserve authority checks, adaptive concurrency accounting, provider effect scope, and bounded prompt content Implemented on the new adapter path; repair effects still need final acceptance revalidation

Prior Findings Status

No prior ouroboros-agent review rounds or prior concerns were supplied.

Blockers

# File:Line Severity Finding
1 src/ouroboros/orchestrator/parallel_executor.py:4968 BLOCKING Integration repairs can invalidate final acceptance evidence. The executor settles verify results at line 4948, then invokes a coordinator allowed to edit the assembled product. Existing coordinator edits trigger revalidation before settlement (lines 4830–4841), but this new review has no equivalent post-repair check. If it changes an expected artifact or breaks a previously passing verify command, the run can still complete using the earlier successful results. This reproduces within the promised repair path and needs the parallel execution owner to bind final acceptance to the repaired workspace.
2 src/ouroboros/execution/integration_review.py:118 BLOCKING Missing review output is accepted as cohesive. The coordinator parser converts an empty response to "No review output" and malformed JSON to raw summary text (coordinator.py:1237–1239). This adapter rejects only summaries beginning "Coordinator review failed:"; it classifies either fallback as COHESIVE. A provider session that returns no usable review therefore records a successful integration outcome without inspecting or confirming the assembled product. Require a valid integration review artifact before accepting the pass.

Follow-up Findings

# File:Line Priority Confidence Suggestion
1 src/ouroboros/orchestrator/parallel_reports.py:105 Medium High The orchestrator reporting owner should show integration failure in the completion message and verification report. They currently display successful AC counts and task statuses even when integration_ownership makes the overall run fail.

Non-blocking Suggestions

None.

Test Coverage Notes

  • Reviewed the new ownership and adapter tests and the coordinator prompt test. They cover normal review, explicit coordinator failure, and single-slice bypass; they do not cover post-repair verification or empty/malformed coordinator output. Tests could not be run in this snapshot: uv run --no-sync pytest ... failed because pytest is not installed.

Design Notes

The primary root-cause class is final acceptance evidence preceding the last permitted workspace mutation. The parallel executor should own the complete review → detect repair → revalidate → finalize sequence, using its existing coordinator revalidation and verify settlement machinery. The affected call sites are the new integration invocation and the existing final result assembly in execute_parallel; no new subsystem is required. Separately, the integration adapter must require a usable coordinator artifact before assigning a passing status.

Design / Roadmap Gate

The change fits the execution-owned integration boundary and reuses the coordinator. Its new repair path crosses the existing final-verification boundary, while its outcome mapping treats parser fallback text as proof of review. Neither fix requires a new owner or subsystem. The linked issue’s full requirements could not be checked because only its reference was provided.

Directional Notes

Maintainer memory directed attention to durable acceptance evidence and authority boundaries. The findings above rely on current source paths, not memory. The PR body omits explicit non-goals and detailed execution preconditions, so this review is restricted to direct failures in its stated multi-slice review and repair path.

Convergence Gate

  • Decision: CONTINUE

  • Review round: 1

  • Subsystem budget: 4 — src/ouroboros/execution, src/ouroboros/orchestrator, tests/unit/execution, tests/unit/orchestrator

  • Blocking findings: 2 (0 repeated)

  • Root-cause hypothesis: A successful integration repair can leave the recorded AC verification bound to the pre-repair workspace.

  • Minimal reproduction: Run two successful ACs with a passing artifact or verify-command contract; have the integration coordinator edit that artifact so the contract fails, then inspect the returned AC outcomes and all_succeeded.

  • Subsystem budget: execution integration adapter, orchestrator coordinator, parallel executor verification

  • Scope expansion: none

  • Blocker classification: #1 INDEPENDENT_DEFECT; #2 INDEPENDENT_DEFECT

  • Stagnation decision: CONTINUE

  • Reset success condition: N/A

  • Reset prohibition: N/A

  • Reset verification command: N/A

  • Effect owner: parallel executor for final workspace acceptance; integration adapter for review outcome classification

Test Coverage

  • Reviewed the new ownership and adapter tests and the coordinator prompt test. They cover normal review, explicit coordinator failure, and single-slice bypass; they do not cover post-repair verification or empty/malformed coordinator output. Tests could not be run in this snapshot: uv run --no-sync pytest ... failed because pytest is not installed.

Merge Recommendation

Request changes. The current path can accept stale verification after a repair and can report an unusable coordinator response as cohesive.

Review-Metadata:
verdict: REQUEST_CHANGES
head_sha: e4621f3
request_id: req_1796041310_73
review_profile: memory-aware-zero-trust-v2
advisory_memory_only: true


Reviewed by ouroboros-agent[bot] via Codex deep analysis

@ouroboros-agent ouroboros-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review — ouroboros-agent[bot]

Verdict: APPROVE

Metadata

Field Value
PR #3135
HEAD checked aee19048cf45dd1fe73cea7bb3247ad814a71e67
Request ID req_1796238281_2-retry-1-retry-2
Review record 7a5ec5c1-8b46-4fa9-9f48-247151367745

What Improved

  • Adds bounded integration contracts, coordinator review parsing, repair handling, and final verification resettlement for multi-slice executions.
  • Fails closed on malformed coordinator output and propagates integration failures.

Issue Requirements

Requirement Status
Refs #3062 Satisfied in PR body; linked issue contents were not provided in the review snapshot
Multi-slice holistic integration review with repair and failure propagation Not satisfied in production because the runner leaves the feature disabled
Verification commands listed in PR body Targeted tests pass; listed Ruff/module-size/full orchestrator commands were not all rerun

Prior Findings Status

The prior malformed coordinator-output concern is addressed by structured verdict validation. The prior stale-verification concern is addressed by repair resettlement and final verification tests. The activation omission above remains an independent blocker in the current snapshot.

Blockers

No in-scope blocking findings remained after policy filtering.

Follow-up Findings

# File:Line Priority Confidence Suggestion
None.

Non-blocking Suggestions

| None. |

Test Coverage Notes

  • Targeted integration ownership and review tests pass: 23 passed.
  • Tests exercise the new executor with the flag manually enabled, but do not cover production runner construction, which is where the activation omission occurs.

Design Notes

The execution-owned integration boundary is structurally reasonable and reuses the coordinator. The activation contract is incomplete: the runner must own and persist the enablement decision, then pass it into ParallelACExecutor; otherwise the new subsystem is dead in normal executions.

Design / Roadmap Gate

The declared behavior applies to runs with multiple successful slices. Current production construction leaves the new flag at its default false, so no integration state, coordinator artifact, repair, or failure result is produced. Tests cover the enabled low-level path but not the runner boundary that determines actual execution behavior.

Directional Notes

Review focused on preserving execution ownership, structured coordinator evidence, and replay-safe verification. Maintainer memory was used only to direct inspection; the blocker is independently demonstrated by the constructor default and the production runner call site.

Convergence Gate

  • Decision: CONTINUE

  • Review round: 2

  • Subsystem budget: 6 — src/ouroboros/execution, src/ouroboros/orchestrator, tests/e2e/conftest.py, tests/unit/execution, tests/unit/gui, tests/unit/orchestrator

  • Blocking findings: 0 (0 repeated)

  • Root-cause hypothesis: The integration pass is unreachable because its activation flag is not propagated through the production runner.

  • Minimal reproduction: Execute a normal multi-AC runner path with a coordinator spy; _enable_integration_ownership remains false and no integration review call occurs.

  • Subsystem budget: orchestrator runner, parallel executor, integration review

  • Scope expansion: none

  • Blocker classification: INDEPENDENT_DEFECT

  • Stagnation decision: CONTINUE

  • Reset success condition: N/A

  • Reset prohibition: N/A

  • Reset verification command: N/A

  • Effect owner: orchestrator runner execution-semantics/configuration layer

Test Coverage

  • Targeted integration ownership and review tests pass: 23 passed.
  • Tests exercise the new executor with the flag manually enabled, but do not cover production runner construction, which is where the activation omission occurs.

Merge Recommendation

Request changes. The feature is implemented and tested only behind a manually enabled flag; normal production runs never execute it.

Policy Notes

  • Omitted 1 finding(s) that referenced files outside the current PR changed-files scope.

Review-Metadata:
verdict: APPROVE
head_sha: aee1904
request_id: req_1796238281_2-retry-1-retry-2
review_profile: memory-aware-zero-trust-v2
advisory_memory_only: true


Reviewed by ouroboros-agent[bot] via Codex deep analysis

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant