Skip to content

[v0.8 replacement 5/5] lock terminal correlation contract - #2328

Open
sethkarten wants to merge 3 commits into
v080/main-replacement-canonical-transcriptsfrom
v080/main-replacement-correlation-contract
Open

[v0.8 replacement 5/5] lock terminal correlation contract#2328
sethkarten wants to merge 3 commits into
v080/main-replacement-canonical-transcriptsfrom
v080/main-replacement-correlation-contract

Conversation

@sethkarten

@sethkarten sethkarten commented Aug 11, 2026

Copy link
Copy Markdown

Replacement stack

Node 5/5 in a fresh append-only v0.8 replacement chain rooted at authoritative main commit c2820d3679e6318f9c3d0155c823d6908b4e1faa.

  • Base branch: v080/main-replacement-canonical-transcripts
  • Head branch: v080/main-replacement-correlation-contract
  • Exact head: 10608006dd5f996c884249ee4fe5f4399401c8b9

Scope

Exact coherent #2322 terminal-correlation conformance delta: one test path.

The old contributor PR branches remain untouched. This branch was published non-force from a fresh owned repository. Independent Luna semantic review APPROVED the full N1→N5 chain and found no structural scope leakage; authoritative-main renderer provenance is retained and pyproject.toml / uv.lock are unchanged across replacement nodes.

Warning

TEST BLOCKED — do not merge or mark ready. Authoritative c2820d has a stale uv.lock relative to pyproject.toml. A disposable uv sync --locked correctly refused before tests, without changing repository files. The only previously approved interpreter also cannot import current main because pydantic_config is absent. Testing/remediation continues on GitHub; this draft does not claim green.

No live, hosted, Docker, sandbox, model, or paid evaluation was run.

Note

Add ACP 0.11 correlation conformance contract tests for the v1 runner

Introduces test_acp_correlation_contract.py, a new pytest suite that codifies the observable-vs-trusted correlation semantics for the ACP 0.11 runner.

  • Uses monkeypatched test doubles to load the runner without a real acp dependency, keeping tests self-contained.
  • Defines has_verified_producer_correlation and scoreable_terminal as pure validation helpers encoding the producer evidence and scoreability rules (required fields, allowed phase/outcome pairs, strict ID/sequence constraints, cancellation cut semantics).
  • Covers end-turn tool-only turns, opaque metadata observability, arrival-order non-trust, provider error authority, and cancellation durability before and after the irrevocable completion cut.

Macroscope summarized 990b823.


Note

Low Risk
Test-only addition with no production code changes; it documents and guards correlation semantics for reviewers and future refactors.

Overview
Adds tests/v1/test_acp_correlation_contract.py, a conformance suite for ACP 0.11 terminal correlation: what the v1 runner records in acp_meta / turn_acp_meta is observable evidence, not trusted verification.

The file loads verifiers/v1/acp/runner.py via monkeypatched acp doubles and exercises adapter behavior: tool-only end_turn leaves metadata empty; opaque or string turn IDs are stored but fail has_verified_producer_correlation; arrival order and late updates are history only; provider RequestError still wins over stored error-shaped metadata.

Pure helpers has_verified_producer_correlation and scoreable_terminal encode the scoped producer ABI (integer promptTurnId / eventSequence, allowed phase/outcome pairs, matching response + zero-quiescence terminal pair) and P2-style completion-cut rules—pre-cut cancel is unscoreable; post-seal cancel stays durable—without treating end_turn as proof.

Reviewed by Cursor Bugbot for commit 990b823. Bugbot is set up for automated code reviews on this repo. Configure here.

@sethkarten
sethkarten marked this pull request as ready for review August 12, 2026 06:18
@macroscopeapp

macroscopeapp Bot commented Aug 12, 2026

Copy link
Copy Markdown

Approvability

Verdict: Approved 1060800

This PR adds a new test file for ACP correlation contract conformance testing. No production code is modified - only tests are added. Test-only changes don't impact runtime behavior.

No code changes detected at 990b823. Prior analysis still applies.

You can customize Macroscope's approvability policy. Learn more.

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