Skip to content

P6c: EvaluationOrchestrator, baseline establishment, and the first complete fixed-patch loop - #26

Merged
Ayushxsingh100 merged 9 commits into
mainfrom
feature/p6c
Oct 29, 2026
Merged

Ayushxsingh100 merged 9 commits into
mainfrom
feature/p6c

Conversation

@Ayushxsingh100

Copy link
Copy Markdown
Owner

Do not merge. Wait for the external verdict and paste it into the PR (C-28).

P6c: the EvaluationOrchestrator, baseline establishment, and the first complete fixed-patch loop

Branch feature/p6c from main at b9b270a. No gate and no milestone is claimed: the P6c mini-gate, the P6 gate (Doc 15 §13.3) and M3 (Doc 15 §23) are NOT DECIDED and wait for the external review.

What it adds

  • core/application/orchestrator.py: EvaluationOrchestrator.evaluate(request). Coordinates only (AST test pins it); stage order load, build, normalize, identity, graph, impact, scope policy, verify, decide, record, commit if PROMOTE.
  • core/application/baseline.py: establish_baseline (C-171), conservative acceptance protocol, refusals fail closed.
  • core/application/{ids,recorder,chain}.py: derived ids, idempotent stage recorder, and describe_chain(...).problems() that defines a complete chain (C-172).
  • Rows C-170 to C-176 (all Proposed); C-175 (sole callers of save_promoted and save_baseline) closes the P6b carry-forward; the P6b verdict and row 14b are recorded in PHASE_GATES.md and BUILD_SEQUENCE.md; a P6 (pending external review) stub lists the evidence map.
  • No change to any package that has passed its gate, to fixtures, or to requirements/.

Tests (final tree, Python 3.12)

4106 tests, OK (skipped=1), up from 3941. pytest exit 0; Python 3.14: OK. black, ruff and mypy clean at every commit. 38 of 38 mutants of the new code killed (scratch copies outside the repository). NOT RUN: Python 3.13 (not installed), dev.py lint (toolchain probe fails; the three tools were run directly), dev.py bootstrap, a full test run at each commit (lint only).

Points for the reviewer

  • C-173 (decided by the user): a stale candidate runs the stages against its recorded parent, then decide is given the current state. The prompt's "skip the stages" cannot be built without an invented ImpactReport.
  • C-176 (spec gap): to_evidence_submission stamps the resource-set hash, but P6 compares the state's own hash, so every carry-forward from version 0 would be refused. Baseline evidence is built in baseline.py with the state hash.
  • Defect found by the concurrency suite and fixed: when the head moved between decide and record_decision, record_decision raised StaleParentError out of evaluate (9 of 28 schedules). The orchestrator now decides again, giving the stale rejection; a deterministic regression test pins it.
  • Additions to the request: candidate_sequence (the schema is UNIQUE (lineage_id, candidate_sequence)); verification ids are positional (the engine's id source has no target).
  • Times: hashed evidence carries the candidate's creation instant so reruns with a real clock are duplicates; audit timestamps are live (C-170 (4)).
  • Open for the authors: baseline acceptance protocol (C-171; a VIOLATED invariant is accepted), construction failure stores no decision (C-170 (3)), C-169 untouched.
  • Test order disclosure: the Step 5 suites and the mutation harness were written after the code; the Step 2 to 4 tests came first and failed on import; the orchestrator coupling checker was written before its self-test (shown failing on a neutered checker).
  • The repository has 18 fixtures with a parent, not 17; all 18 agree between evaluate and the P6a pipeline.

Limits

Impact and verification reports are not persisted (P8); fixed patches only and the patch text is not applied (C-174, P7b); one SQLite file, the MVP's single promotion worker (Doc 09 §39), nothing claimed for several processes beyond the concurrency tests.

Do not merge. Wait for the external verdict and paste it into the PR (C-28).

🤖 Generated with Claude Code

Ayushxsingh100 and others added 9 commits October 29, 2026 21:26
…D_SEQUENCE)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…tory writes, the orchestrator coupling check (Doc 03 §15; Doc 09 §26; C-170, C-175)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ts checker (Doc 11 §12, §43, §44, §51.3; Doc 06 §28; C-170 (4), C-172)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…s own hash, refusals fail closed (Doc 06 §24; Doc 13 §13; Doc 11 §8, §44; C-171, C-176)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…tes a recovered stage error (Doc 03 §15; Doc 09 §26, §40; Doc 11 §43; C-170, C-172, C-173, C-174)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…idempotency and crash windows; the chain ending ignores a recorded error (Doc 12 §14; Doc 11 §51.3; C-170, C-172)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ecide and record_decision ends as a stale rejection (Doc 09 §25; Doc 06 §27; C-166, C-173)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
….3; C-170, C-172)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…and carry-forwards (Doc 15 §13.3, §23; C-170 to C-176)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@Ayushxsingh100
Ayushxsingh100 merged commit d7c0333 into main Oct 29, 2026
3 checks passed
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