diff --git a/.github/workflows/openrouter-code-review.yml b/.github/workflows/openrouter-code-review.yml index 93bf07d..5e0b2cb 100644 --- a/.github/workflows/openrouter-code-review.yml +++ b/.github/workflows/openrouter-code-review.yml @@ -382,7 +382,7 @@ jobs: uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: repository: FlyOverCoderKY/openrouter-pr-review-action - ref: 188cd5557765c858a37c1da78960cd353bcbcd60 + ref: 5bb16c7a5ba87a802d7884ccbfa5e99d10978a49 path: .trusted-review-action persist-credentials: false - name: Resolve pending review request @@ -401,7 +401,7 @@ jobs: - name: Prepare shared review snapshot id: profile_setup if: inputs.review_profiles_enabled - uses: FlyOverCoderKY/openrouter-pr-review-action@188cd5557765c858a37c1da78960cd353bcbcd60 # action#39 active-response completion + uses: FlyOverCoderKY/openrouter-pr-review-action@5bb16c7a5ba87a802d7884ccbfa5e99d10978a49 # action#40 settled-dispute receipt validation with: role: setup github_token: ${{ github.token }} @@ -449,7 +449,7 @@ jobs: id: openrouter_first if: steps.profile_request.outputs.skip_review != 'true' timeout-minutes: 25 - uses: FlyOverCoderKY/openrouter-pr-review-action@188cd5557765c858a37c1da78960cd353bcbcd60 # action#39 active-response completion + uses: FlyOverCoderKY/openrouter-pr-review-action@5bb16c7a5ba87a802d7884ccbfa5e99d10978a49 # action#40 settled-dispute receipt validation env: OPENROUTER_API_KEY: ${{ secrets.OPENROUTER_API_KEY }} with: @@ -826,7 +826,7 @@ jobs: uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: repository: FlyOverCoderKY/openrouter-pr-review-action - ref: 188cd5557765c858a37c1da78960cd353bcbcd60 + ref: 5bb16c7a5ba87a802d7884ccbfa5e99d10978a49 path: .trusted-review-action persist-credentials: false - name: Resolve pending review request @@ -845,7 +845,7 @@ jobs: - name: Prepare shared review snapshot id: profile_setup if: inputs.review_profiles_enabled && steps.seeded.outputs.ready == 'true' - uses: FlyOverCoderKY/openrouter-pr-review-action@188cd5557765c858a37c1da78960cd353bcbcd60 # action#39 active-response completion + uses: FlyOverCoderKY/openrouter-pr-review-action@5bb16c7a5ba87a802d7884ccbfa5e99d10978a49 # action#40 settled-dispute receipt validation with: role: setup github_token: ${{ github.token }} @@ -893,7 +893,7 @@ jobs: id: openrouter_followup if: steps.seeded.outputs.ready == 'true' && steps.profile_request.outputs.skip_review != 'true' timeout-minutes: 25 - uses: FlyOverCoderKY/openrouter-pr-review-action@188cd5557765c858a37c1da78960cd353bcbcd60 # action#39 active-response completion + uses: FlyOverCoderKY/openrouter-pr-review-action@5bb16c7a5ba87a802d7884ccbfa5e99d10978a49 # action#40 settled-dispute receipt validation env: OPENROUTER_API_KEY: ${{ secrets.OPENROUTER_API_KEY }} with: diff --git a/.github/workflows/openrouter-profile-completion.yml b/.github/workflows/openrouter-profile-completion.yml index cb278a9..5a0e7d5 100644 --- a/.github/workflows/openrouter-profile-completion.yml +++ b/.github/workflows/openrouter-profile-completion.yml @@ -58,7 +58,7 @@ jobs: uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: repository: FlyOverCoderKY/openrouter-pr-review-action - ref: 188cd5557765c858a37c1da78960cd353bcbcd60 + ref: 5bb16c7a5ba87a802d7884ccbfa5e99d10978a49 path: .trusted-review-action persist-credentials: false - name: Resolve current profile evidence @@ -106,7 +106,7 @@ jobs: uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: repository: FlyOverCoderKY/openrouter-pr-review-action - ref: 188cd5557765c858a37c1da78960cd353bcbcd60 + ref: 5bb16c7a5ba87a802d7884ccbfa5e99d10978a49 path: .trusted-review-action persist-credentials: false - name: Confirm current profile evidence @@ -148,7 +148,7 @@ jobs: uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: repository: FlyOverCoderKY/openrouter-pr-review-action - ref: 188cd5557765c858a37c1da78960cd353bcbcd60 + ref: 5bb16c7a5ba87a802d7884ccbfa5e99d10978a49 path: .trusted-review-action persist-credentials: false - name: Publish only completed current proofs diff --git a/README.md b/README.md index 650ee29..86cc1b2 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ added in a PR becomes authoritative only after it merges. Use concise prose to describe repository contracts, with nested files for component-specific invariants. See the action's -[file format, offline lint/explain commands, and trust rules](https://github.com/FlyOverCoderKY/openrouter-pr-review-action/blob/188cd5557765c858a37c1da78960cd353bcbcd60/docs/review-policy.md). +[file format, offline lint/explain commands, and trust rules](https://github.com/FlyOverCoderKY/openrouter-pr-review-action/blob/5bb16c7a5ba87a802d7884ccbfa5e99d10978a49/docs/review-policy.md). In this guidance rollout, `profile: code` and `profile: docs` are descriptive; they do not select models by themselves. @@ -45,6 +45,10 @@ The trusted registry in `review-profiles.json` is workflow configuration, not repository policy and not merge authority. It does not grant CI or bypass branch protection. +A clean review can retain settled `disputed` findings in its ledger so later +rounds remember the rebuttals. Profile receipt validation rejects open findings; +retained settled findings do not block proof or authorize unresolved GitHub threads. + ### Baseline panels | Profile | Standard (auto) | Deep (maintainer dispatch) | @@ -225,7 +229,7 @@ Local workflow contract checks: ```sh # Obtain the pinned public action contracts outside product source. git clone --no-checkout https://github.com/FlyOverCoderKY/openrouter-pr-review-action .trusted-review-action -git -C .trusted-review-action checkout 188cd5557765c858a37c1da78960cd353bcbcd60 +git -C .trusted-review-action checkout 5bb16c7a5ba87a802d7884ccbfa5e99d10978a49 export PYTHONPATH="$PWD/.trusted-review-action/src" uv run --with jq --with pyyaml python -m unittest discover -s tests node --test tests/profile-consumer.test.mjs tests/workflow-wakeup.test.mjs diff --git a/tests/test_profile_completion.py b/tests/test_profile_completion.py index f9ea623..f37fa1c 100644 --- a/tests/test_profile_completion.py +++ b/tests/test_profile_completion.py @@ -11,7 +11,7 @@ from or_pr_review.collect import CollectedReview, DiffPlan, Truncation from or_pr_review.models import parse_model_routes -from or_pr_review.loop import Ledger, LoopState, encode_ledger +from or_pr_review.loop import Ledger, LedgerFinding, LoopState, encode_ledger from or_pr_review.profile_evidence import canonical_receipt, parse_receipt from or_pr_review.publish import render_review_parts from or_pr_review.review_context import ( @@ -502,6 +502,27 @@ def test_collect_dispatch_accepts_default_branch_source_head(self): self.assertEqual(items[0].source.head_sha, MAIN_SHA) self.assertEqual(items[0].receipt.head_sha, SHA) + def test_collect_dispatch_preserves_settled_disputes_without_accepting_open_findings(self): + for include_open in (False, True): + with self.subTest(include_open=include_open): + store = self.make_store() + bundle = bundle_for(head_sha=SHA, mode="verify") + findings = [LedgerFinding("r1-1", "risk", "src/a.py", 1, "Rebutted", "Evidence", "disputed")] + if include_open: + findings.append(LedgerFinding("r1-2", "bug", "src/b.py", 2, "Unresolved", "Evidence", "open")) + lines = bundle["body"].splitlines() + lines[1] = encode_ledger(Ledger(3, tuple(findings), SHA, GENERATION), repo=REPO, pr_number=PR) + bundle["body"] = "\n".join(lines) + self.install_bundle(store, bundle, head_sha=MAIN_SHA, event="workflow_dispatch", head_branch="main") + if include_open: + with self.assertRaises(ProfileCompletionError): + self.reader(store).collect(PR, [self.review_record(bundle)]) + else: + items = self.reader(store).collect(PR, [self.review_record(bundle)]) + self.assertEqual(len(items), 1) + self.assertEqual(items[0].receipt.verdict, "clean") + self.assertEqual(items[0].receipt.head_sha, SHA) + def test_collect_dispatch_accepts_equal_source_and_pr_head(self): store = self.make_store() bundle = bundle_for(head_sha=SHA) diff --git a/tests/test_profile_workflow.py b/tests/test_profile_workflow.py index 70888b4..a024323 100644 --- a/tests/test_profile_workflow.py +++ b/tests/test_profile_workflow.py @@ -14,7 +14,7 @@ (ROOT / '.github/workflows/openrouter-profile-completion.yml').read_text(encoding='utf-8'), Loader=yaml.BaseLoader, ) -ACTION_PIN = '188cd5557765c858a37c1da78960cd353bcbcd60' +ACTION_PIN = '5bb16c7a5ba87a802d7884ccbfa5e99d10978a49' def job_steps(workflow, job_id): diff --git a/tests/test_review_configuration.py b/tests/test_review_configuration.py index b77246e..0becfdf 100644 --- a/tests/test_review_configuration.py +++ b/tests/test_review_configuration.py @@ -17,7 +17,7 @@ ) JOBS = WORKFLOW['jobs'] CONFIG = JOBS['review-config'] -ACTION_PIN = '188cd5557765c858a37c1da78960cd353bcbcd60' +ACTION_PIN = '5bb16c7a5ba87a802d7884ccbfa5e99d10978a49' SCRIPT = next(step['run'] for step in CONFIG['steps'] if step.get('id') == 'config') REGISTRY = json.dumps( json.loads((ROOT / 'review-profiles.json').read_text(encoding='utf-8')),