Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .github/workflows/openrouter-code-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,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
Expand All @@ -400,7 +400,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 }}
Expand Down Expand Up @@ -448,7 +448,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:
Expand Down Expand Up @@ -825,7 +825,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
Expand All @@ -844,7 +844,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 }}
Expand Down Expand Up @@ -892,7 +892,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:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/openrouter-profile-completion.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand All @@ -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) |
Expand Down Expand Up @@ -188,7 +192,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
Expand Down
23 changes: 22 additions & 1 deletion tests/test_profile_completion.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion tests/test_profile_workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
2 changes: 1 addition & 1 deletion tests/test_review_configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')),
Expand Down