Skip to content

refactor(spec-builder): compose backend by lifecycle owner - #14547

Merged
bolichen97 merged 2 commits into
mainfrom
refactor/i07-spec-builder-orchestration
Sep 28, 2026
Merged

bolichen97 merged 2 commits into
mainfrom
refactor/i07-spec-builder-orchestration

Conversation

@bolichen97

@bolichen97 bolichen97 commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: Spec Builder's backend keeps each lifecycle concern — request identity, turn admission, the decision outbox, autonomous execution, and create/delete/duplicate — in one cohesive owner module, with every route, payload, lock order and test seam unchanged.

handlers.py (3,366 lines) and runtime.py (2,060 lines) mixed HTTP adaptation, turn admission, the decision-outbox relay, the autonomous build loop, and the destructive delete and duplicate transactions. Changing one flow meant reading all of them, and the invariants each flow depends on (index-then-decision lock order, one-way decision answers, Stop/Delete revocation) were spread across both files.

Why it matters

Spec Builder's backend is concurrency-sensitive: agent turns that must never run twice over one spec directory, a durable answer ledger that must never reopen a settled decision, and delete/duplicate transactions that must never publish half a copy or strand an answer. When those rules live beside unrelated HTTP code, every edit risks one of them, and every reviewer or agent has to page thousands of lines to see which. The App Kit spec gains the ownership map that later App Kit work builds on.

Not a goal

  • No change to any route, payload, status code, error text, prompt, lock order, or ledger/index/state-file format.
  • No change to repository.py, parsers.py, routes.py, route registration, or the app manifest.
  • No decomposition of the long handler bodies (_handle_handoff, _handle_create, _handle_message, _handle_delete): their step order is pinned by source-guard tests, so they move intact.
  • No change to shared registries (security_posture.py, the transcript-derivation seam, baselines).
  • No frontend change.

What changed (motivation → approach → change)

Each concern has one owner under a private backend/orchestration/ package; handlers.py stays the route facade and runtime.py the worker-session binding.

Owner Owns
orchestration/request_identity.py auth, JSON body, client-rendered creation identity
orchestration/turn_guard.py per-directory turn lock, alias occupancy
orchestration/dispatch_claims.py process-owned dispatch/execution generations, Stop/Delete barrier
orchestration/execution_state.py nudge-loop state, planning -> executing claim, reconcile, halt, orphan recovery
orchestration/decision_outbox.py relaying one durable answer through a turn, crash replay
orchestration/{create,messages,execution,controls,delete}.py the mutating route families
orchestration/duplicate.py the duplicate's staged publication transaction
runtime.py slot scoping, turn relay, turn/slot stop, transcript projection
handlers.py route facade plus every redacting read projection (list, detail, settings, duplicate response)
decisions.py the protected ledger and its outbox rows

Most handler and helper bodies move byte-for-byte because source-guard tests pin their step order: 124 top-level definitions are identical to base. The other 10 carry only the changes in the next paragraph, the stale-client constant, and one reworded docstring (_pinned_entry). Imports only point down the stack (routes → handlers → owners → runtime → decisions → repository → parsers), and handlers.py re-exports each route entry point straight from its owner, so routes.py and the test facade keep one import surface. Two placements are constraints: redactor calls stay in the modules security_posture registers, and the transcript read stays in runtime.py.

Three pieces of repeated knowledge get one owner: the Stop/Delete runtime capture (which slots and loops a revocation reached) moves onto the barrier's capture object; the outbox row lookup and write-back shared by relay, restore and finalize become two helpers in decisions.py; and the duplicate's publication transaction leaves the HTTP adapter, so its two identical write-failure refusals collapse into one mapping. _handle_stop_execution and _handle_delete differ from base only by calling the capture helpers. _handle_message (4 sites) and _handle_recover_decision (1 site) use the existing _STALE_CLIENT_ERROR constant where they spelled out its text, so the wire string is unchanged. The App Kit platform spec gains §19 with the ownership map.

The first commit's message says handler bodies move byte-for-byte; this section supersedes that line, because the _STALE_CLIENT_ERROR sites and the Stop/Delete capture helpers change those bodies.

Backwards compatibility

Compatible: every route, response body, status code, error text, prompt, and ledger/index format is byte-identical; routes.py imports the same 18 handlers from handlers.py; every name the tests patch through the facade still reaches the code that reads it (the facade lists the new modules).

Tests

  • New tests/test_orchestration_composition_contract.py (26 tests), green on the base code and on this head:
    • one object per name shared across backend modules (what makes facade patch-and-restore sound);
    • the layered, acyclic import graph and the one-hop route facade;
    • index-then-decision lock order over a full create → detail → answer → relay → finalize → delete flow, with no lock held on the event loop;
    • eight concurrent claims record exactly one answer; a claim holds the ledger lock across read and write against a concurrent finalization;
    • outbox transitions are one-way and a final answer is never demoted;
    • Stop and Delete act on every captured slot and loop exactly once, in capture order — including a slot held by an earlier claim, captured before the spec's own — and skip only the loop whose slot key and id both match the caller's;
    • every loop removal names its stop (spec_stopped, spec_deleted, spec_arm_aborted);
    • a duplicate that cannot stage reserves nothing (501 vs 400, marker cleanup);
    • a refused crash replay dispatches nothing and keeps its row pending;
    • a stale-client refusal answers with the exact existing wire text.
  • Each new behavioural test was shown to fail under a targeted mutation of the code it guards.
  • test_spec_builder_windows.py turn-key tests read the new owner turn_guard (assertions unchanged); test_routes.py imports _ClientClaim from its owner.
  • tests/routes_facade.py lists the new modules in BACKEND_MODULES.
  • Local runs on this head: the Spec Builder suites plus the read-only oracles that import or scan these modules (test_spec_builder_routes_coverage.py, the transcript-derivation seam, the lazy data-home ratchet, the security-posture redactor classification, the error-code contract) pass, 4,108 tests. local-gate.py --dry-run selects 2,412 backend and 1,284 frontend related files; the backend set ran on the pre-rebase commit with one failure, test_service.py::…system_unit_whose_file_was_deleted…, which fails the same way on the base commit. The frontend set is left to CI because the diff touches no website/**.

Manual verification

Installed mode: a built wheel contains all 12 orchestration/ files; in a fresh venv every backend module imports from site-packages and register_routes wires the same 20 routes as base. No UI change.

Related Issues

no linked issue: behavior-preserving structural refactor.

Checklist

  • At most two commits (one is the norm), with a Conventional Commits title (feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)
  • Existing tests pass and new tests added for new functionality
  • Self-review completed; code follows project style guidelines
  • Documentation updated (if applicable)
  • No secrets, credentials, or internal references in the diff

@bolichen97
bolichen97 requested a review from a team as a code owner September 27, 2026 22:52
@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Sep 27, 2026
@github-actions

github-actions Bot commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Fable 5) — ✅ PASS

Design-level review of 6f2c7446062dafbdfafdf9c8865ee097ee712e2b — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

Design-Verdict: PASS

Verify CI runs the pre-existing source-guard tests that pin handler step order against the moved bodies — everything else is contract-tested on both base and head.

[DESIGN-REVIEWED] 6f2c744

@github-actions

github-actions Bot commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Fable 5) — ✅ PASS

Premise-level review of 6f2c7446062dafbdfafdf9c8865ee097ee712e2b — why this exists and whether the shipped surface is the smallest honest version. Updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

First-Principles-Verdict: PASS

Verify the behavior-preservation evidence: run the new composition-contract tests on the base commit — the "124 definitions byte-identical" claim rests on it.

Spot-checks confirm the description: the Stop and Delete handlers differ from base only by the two capture-helper calls whose inline copies they replace (2 copies → 1); the five stale-client literals swapped for the pre-existing _STALE_CLIENT_ERROR carry identical wire text (counted 5 minus-sites, pattern spec was deleted or recreated; reload and retry); the outbox lookup/write-back helpers replace 3 copies each; _ExecutionStopCapture, _execution_stop_barrier and the duplicate transaction move intact, and the reworded _pinned_entry docstring only drops "added below"/"new" phrasing that the move made false. Updated tests repoint imports with assertions unchanged — no pin deleted. No route, default, or capability changes, so lens 9 is not triggered; the spec §19 update is the AGENTS.md same-commit obligation.

What this change ships

Inventory (9 items) — 9 justified

Intent: restructure Spec Builder's backend so each lifecycle concern lives in one owner module with zero behavior change — an ADDITION (of structure), not a fix.

  1. Backend split into 11 private orchestration/ owner modules; handlers.py becomes the route facade — justified
  2. App Kit platform spec gains §19 ownership map, same commit — justified
  3. Outbox row lookup/write-back deduplicated into two decisions.py helpers (3 copies each → 1) — justified
  4. Stop/Delete slot-and-loop capture moved onto the barrier's capture object (2 inline copies → 1) — justified
  5. Five spelled-out stale-client refusals now use the existing constant, wire text unchanged — justified
  6. Duplicate publication transaction extracted; its two identical write-failure refusals collapse into one mapping — justified
  7. New composition-contract test module (26 tests) pinning layering, lock order, one-way outbox, capture order — justified
  8. Test facade lists the new modules; two tests repoint imports, assertions unchanged — justified
  9. _pinned_entry docstring reworded for its new location — justified

[FIRST-PRINCIPLES-REVIEWED] 6f2c744

@github-actions

github-actions Bot commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

GPT 5.6 Review — ✅ no blocking findings

GPT 5.6 completed its review of 6f2c7446062dafbdfafdf9c8865ee097ee712e2b and found no blocking issues.

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] 6f2c744

False positive or not applicable? A repository writer can comment:
/ai-review override gpt 6f2c7446062dafbdfafdf9c8865ee097ee712e2b: <one-sentence reason>

@github-actions

github-actions Bot commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

Opus 5 Review — ✅ no blocking findings

Reviewed 6f2c7446062dafbdfafdf9c8865ee097ee712e2b — this comment is updated in place on each push.

Review details

No findings.

[OPUS-REVIEWED] 6f2c744

Verdict parsed from the review's SHA-scoped output markers for commit 6f2c7446062dafbdfafdf9c8865ee097ee712e2b.

False positive or not applicable? A repository writer can comment:
/ai-review override fable 6f2c7446062dafbdfafdf9c8865ee097ee712e2b: <one-sentence reason>

@github-actions github-actions Bot added readiness: passed Eligible automated validation passed for the current revision and removed readiness: checking Automated validation is still running labels Sep 27, 2026
@bolichen97

Copy link
Copy Markdown
Contributor Author

Re: Design Review PASS note — move-aware verification of the "moved byte-for-byte" claim at bf4db87cae2342e0e2b5583b9ef21c7c4bdb78cd.

Every top-level definition of the base handlers.py, runtime.py and decisions.py was located at head (in those files or orchestration/*) and its exact source segment compared with ast.get_source_segment (byte equality, docstrings and comments included):

BASE 20ed6a1dc7c6 (handlers/runtime/decisions) vs HEAD bf4db87cae23 (handlers/runtime/decisions/orchestration/*)
top-level definitions byte-identical: 124
changed (10): handlers.py:_duplicate_locked, decisions.py:_mark_decision_relayed_locked, decisions.py:_restore_decision_pending_locked, decisions.py:_finalize_decision_locked, delete.py:_handle_delete, dispatch_claims.py:_ExecutionStopCapture, execution.py:_handle_stop_execution, messages.py:_handle_recover_decision, messages.py:_handle_message, request_identity.py:_pinned_entry
added (4): decisions.py:_outbox_entry, decisions.py:_store_outbox_entry, duplicate.py:_DuplicateOutcome, duplicate.py:_publish_duplicate
base definitions not present at head: none

The 10 changed definitions are the intended ones: the Stop/Delete capture moved onto _ExecutionStopCapture (_handle_stop_execution, _handle_delete, _ExecutionStopCapture), the outbox row helpers (_mark_decision_relayed_locked, _restore_decision_pending_locked, _finalize_decision_locked), the duplicate transaction extraction (_duplicate_locked), the stale-client literal replaced by its existing constant (_handle_message, _handle_recover_decision), and one reworded docstring (_pinned_entry). git diff --color-moved=dimmed-zebra --color-moved-ws=allow-indentation-change shows the same picture. The PR body's count is corrected to 124 identical + 10 changed. Each non-identical path is pinned by a characterization test that is green on base and red under a targeted mutation (test_orchestration_composition_contract.py).

@bolichen97

Copy link
Copy Markdown
Contributor Author

Re: First Principles Review PASS note — move-aware verification of the "moved byte-for-byte" claim at bf4db87cae2342e0e2b5583b9ef21c7c4bdb78cd.

Every top-level definition of the base handlers.py, runtime.py and decisions.py was located at head (in those files or orchestration/*) and its exact source segment compared with ast.get_source_segment (byte equality, docstrings and comments included):

BASE 20ed6a1dc7c6 (handlers/runtime/decisions) vs HEAD bf4db87cae23 (handlers/runtime/decisions/orchestration/*)
top-level definitions byte-identical: 124
changed (10): handlers.py:_duplicate_locked, decisions.py:_mark_decision_relayed_locked, decisions.py:_restore_decision_pending_locked, decisions.py:_finalize_decision_locked, delete.py:_handle_delete, dispatch_claims.py:_ExecutionStopCapture, execution.py:_handle_stop_execution, messages.py:_handle_recover_decision, messages.py:_handle_message, request_identity.py:_pinned_entry
added (4): decisions.py:_outbox_entry, decisions.py:_store_outbox_entry, duplicate.py:_DuplicateOutcome, duplicate.py:_publish_duplicate
base definitions not present at head: none

The 10 changed definitions are the intended ones: the Stop/Delete capture moved onto _ExecutionStopCapture (_handle_stop_execution, _handle_delete, _ExecutionStopCapture), the outbox row helpers (_mark_decision_relayed_locked, _restore_decision_pending_locked, _finalize_decision_locked), the duplicate transaction extraction (_duplicate_locked), the stale-client literal replaced by its existing constant (_handle_message, _handle_recover_decision), and one reworded docstring (_pinned_entry). git diff --color-moved=dimmed-zebra --color-moved-ws=allow-indentation-change shows the same picture. The PR body's count is corrected to 124 identical + 10 changed. Each non-identical path is pinned by a characterization test that is green on base and red under a targeted mutation (test_orchestration_composition_contract.py).

@github-actions github-actions Bot added the merge conflict Branch has merge conflicts with its base — author must resolve before merge label Sep 28, 2026
@bolichen97
bolichen97 enabled auto-merge (squash) September 28, 2026 00:27
@bolichen97
bolichen97 force-pushed the refactor/i07-spec-builder-orchestration branch from bf4db87 to ca1c448 Compare September 28, 2026 00:40
@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention and removed readiness: passed Eligible automated validation passed for the current revision merge conflict Branch has merge conflicts with its base — author must resolve before merge readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention labels Sep 28, 2026
@bolichen97

Copy link
Copy Markdown
Contributor Author

Infrastructure reruns at 151b8b191d927e3da83ab0356ea8c2b81e01e4e4 (GitHub Actions set-up/checkout outage around 03:05–03:12Z). Each rerun below uses gh run rerun <id> --failed once, and only for jobs that never reached their own steps:

Run Job Where it stopped
Fast Gate 36372599940 108771843203 Loop-Bound Locks Gate cancelled at Set up job
macOS Tests (on demand) 36372600209 108771843487 Decide whether the macOS suite runs cancelled at Set up job
Screenshot Evidence 36372600085 108772043954 Screenshot Evidence cancelled in actions/checkout

CI 36372599928 failed only in downstream orchestration: Await Fast Gate found no Fast Gate verdict because of the cancellation above, and Coverage Gate failed on "Require upstream coverage jobs to have succeeded". The test matrix never ran. It will be rerun once, after the rerun Fast Gate is green. No job whose own steps failed has been rerun.

@bolichen97

Copy link
Copy Markdown
Contributor Author

CodeQL at 151b8b191d927e3da83ab0356ea8c2b81e01e4e4 (check-run 108772319386) reports "14 new alerts". None of them is in a file this PR changes, and each one is already open on refs/heads/main:

Annotation Open main alert
src/kiro_crew/atomic_write.py:373 (×2) #934 py/path-injection
src/kiro_crew/atomic_write.py:392 (×2) #936 py/path-injection
src/kiro_crew/history.py:1846 #938 py/path-injection
src/kiro_crew/history.py:1847 #939 py/path-injection
src/kiro_crew/history_projection.py:1484 #958 py/path-injection
src/kiro_crew/history_projection.py:1491 #931 py/path-injection
src/kiro_crew/history_projection.py:1873 #940 py/path-injection
src/kiro_crew/history_projection.py:1905 (×2) #959 py/path-injection
src/kiro_crew/history_projection.py:1947 #943 py/path-injection
src/kiro_crew/history_projection.py:1962 #944 py/path-injection
src/kiro_crew/messaging/outbound_files.py:695 #889 py/polynomial-redos

This PR changes only src/kiro_crew/apps/builtins/spec_builder/** and docs/system-specs/modules/app-kit-platform.md. The check's own summary warns: "Alerts not introduced by this pull request might have been detected because the code changes were too large." These are pre-existing main alerts attributed to a large diff. No alert has been dismissed or edited from this PR. A maintainer decides whether the CodeQL check needs a ruling.

@bolichen97

bolichen97 commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor Author
  • span=0bd03435d922 Stale host ownership can delete restored items

rebutted: this PR does not contain the cited code. src/kiro_crew/knowledge/store.py is not in this branch's diff (git diff 151b8b191~2 151b8b191 -- src/kiro_crew/knowledge/ is empty).
restored_groups appears 0 times in store.py at 151b8b1 and 3 times on main. Line 3483 exists only on main, added by 50018eb (#13448), which is not an ancestor of 151b8b1.
The run that raised this (36374785709, started by a body edit) read main's #13448 code through the merge ref. This PR changes only apps/builtins/spec_builder/** and docs/system-specs/modules/app-kit-platform.md. The adjudication note says the same.
No change here can fix or worsen it. Whether #13448's import exemption is a defect belongs on #13448's code owner, not this refactor.
Maintainer override reason: the cited store.py code is not in this PR's diff; it landed on main in #13448 after this branch's base.

Spec Builder's handlers.py (3,366 lines) and runtime.py (2,060 lines)
mixed HTTP adaptation, turn admission, the decision outbox relay, the
autonomous execution loop, and the destructive delete and duplicate
transactions. A change to any one flow meant reading all of them, and
the invariants each flow relies on were spread across both files.

Move each concern to one owner under a private backend/orchestration
package: the request prologue and creation identity, directory turn
locks and alias occupancy, process-owned dispatch generations and the
Stop/Delete barrier, execution-loop state, the decision outbox relay,
and one module per mutating route family. runtime.py keeps the worker
session binding; handlers.py keeps every redacting read projection and
re-exports each route entry point from its owner, so routes.py and the
test facade keep one import surface. Imports only point down the
stack.

Handler bodies move byte-for-byte, keeping their source-pinned ordering.
Three pieces of repeated knowledge get one owner: the Stop/Delete
runtime capture (which slots and loops a revocation reached), the
outbox row lookup and write-back shared by relay, restore and
finalize, and the duplicate's staged publication transaction, whose
two identical write-failure refusals collapse into one mapping.

No route, payload, status code, error text, prompt, lock order, ledger
or index format changes. A new composition contract test pins one
object per shared name, the layered acyclic import graph, the one-hop
route facade, the index-then-decision lock order end to end, and the
paths whose code changed shape (concurrent claims, outbox transitions,
Stop/Delete capture, duplicate stage failures, refused crash replay).
The App Kit platform spec records the ownership map.
The contract tests for Stop and Delete could not tell capture order
from own-slot-first, or the key-and-loop-id skip from either half:
their fixture captured the own slot first with the caller's loop id.
Parametrize both with an earlier execution or dispatch claim captured
before the own slot, and with a stale own-slot loop id beside the
caller's id under another slot, so each of those three wrong variants
fails. Assert the stop reason every removal names (spec_stopped,
spec_deleted, spec_arm_aborted), pin the stale-client wire text, and
say in the orchestration package docstring that tests, not production
modules, import it from outside the backend.
@bolichen97
bolichen97 force-pushed the refactor/i07-spec-builder-orchestration branch from 151b8b1 to 6f2c744 Compare September 28, 2026 04:07
@bolichen97

Copy link
Copy Markdown
Contributor Author

Rebased: main moved in 15 commits since this head went green (68c6476 -> cd783d2); CI re-running.

This rebase changes no content. Both commits are replayed unchanged: git range-diff marks both patches =, the PR's patch is byte-identical to 151b8b191's, authorship is kept, and the PR is still exactly 2 commits. It retires two stale-base misattributions on 151b8b191:

Both are now part of the base. At 6f2c7446062dafbdfafdf9c8865ee097ee712e2b the Spec Builder suites and oracles pass (4,131 passed), and black, subprocess-encoding, isort, flake8, mypy and docs-lint all exit 0.

@bolichen97

Copy link
Copy Markdown
Contributor Author

One exact-job rerun at 6f2c7446062dafbdfafdf9c8865ee097ee712e2b: Backend Tests (Windows) (7), job 108783411817 in run 36376395420. The retry, job 108789501169, succeeded.

The first attempt failed 1 of 16,318 tests:

FAILED test/test_runtime_cleanup_windows.py::test_a_child_exiting_259_reads_as_exited_and_its_drain_finishes
    assert state.terminally_scanned == {process.pid}
E   assert {4488, 6756} == {4488}

The platform_compat Windows tree drain terminally scanned a second, foreign PID (6756) beside the test's own child. That is a real-process race on a shared Windows runner, not a behavior of this PR:

@bolichen97

Copy link
Copy Markdown
Contributor Author

One rerun of Opus 5 Review (run 36376395386, --failed) at 6f2c7446062dafbdfafdf9c8865ee097ee712e2b. Discovery had completed with "No candidates" and its [OPUS-DISCOVERY] marker. Validation then failed in 0 s, inside the review action's own actor-permission check, before any model call or verdict:

GET /repos/kirodotdev/KiroCrew/collaborators/bolichen97/permission - 403
Failed to check permissions: HttpError: API rate limit exceeded for installation
request id 2BC0:2260BA:205FCF6:2690A4C:6AB9EEDB, 2026-09-28 04:36:43 UTC

This is an installation-wide GitHub API rate limit, not a review finding. The rerun started at 04:57Z, after a 20-minute wait for the limit window to reset.

@github-actions github-actions Bot added readiness: passed Eligible automated validation passed for the current revision and removed readiness: action required A blocking check or review needs attention labels Sep 28, 2026
@bolichen97

Copy link
Copy Markdown
Contributor Author

Green-age note for 6f2c7446062dafbdfafdf9c8865ee097ee712e2b: green_age.py reports base +11 commits (cd783d2 -> 8719952) with 36 same-directory or import overlaps. None of them is a file this PR changes. This head's CI merge ref was built against main at push time, and every check and lane is green on it. The branch will not be re-synced again: the one content-identical rebase (onto cd783d2, #issuecomment-5863159649) is spent, and chasing main churns CI without changing this PR's content. If main later conflicts with the Spec Builder files, GitHub's "Update with rebase" is the path.

@bolichen97

bolichen97 commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor Author
  • Verify CI runs the pre-existing source-guard tests that pin handler step order

rebutted: no change needed, verified with evidence. The inspect.getsource step-order pins live in src/kiro_crew/apps/builtins/spec_builder/tests/test_routes.py, which is in pytest's testpaths (Testpaths Coverage Gate green). CI ran them at 6f2c744: every Backend Tests shard, Linux 1-8 and Windows 1-8, is green, and the Windows (7) log names test_routes.py cases.
Locally at 6f2c744: the Spec Builder suites plus the test_spec_builder_routes_coverage.py oracle gave 4,131 passed, 0 failed. No pin was deleted or weakened. The only test_routes.py edit retargets one import to _ClientClaim's owner.

@bolichen97

bolichen97 commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor Author
  • Verify the behavior-preservation evidence: run the new composition-contract tests on the base commit

rebutted: no change needed, verified with evidence. All 26 tests in test_orchestration_composition_contract.py pass against a base copy (PYTHONPATH pointed at an untouched checkout of main 972675c, which includes #14493) and against this tree. The original 17 were also green on the frozen base 20ed6a1.
Each test can fail: mutations of the moved code turn the targeted tests red (capture dedupe, the own-loop skip, final-row demotion, the stage-failure mapping, claim without the decision lock, and five stop-reason mutations R1-R5).
The "124 byte-identical definitions" count comes from a definition-level source comparison of base against head (124 identical, 10 intentionally changed, 4 added, 0 dropped).

@bolichen97
bolichen97 merged commit 082d00f into main Sep 28, 2026
142 of 144 checks passed
@bolichen97
bolichen97 deleted the refactor/i07-spec-builder-orchestration branch September 28, 2026 05:47
@github-actions github-actions Bot removed the readiness: passed Eligible automated validation passed for the current revision label Sep 28, 2026
@rubencu rubencu mentioned this pull request Sep 28, 2026
5 tasks done
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.

2 participants