Skip to content

Name pull-request runs by repository name, not owner/name - #36

Closed
fsodre wants to merge 1 commit into
prooflinedev:mainfrom
fsodre:fix/pr-repository-name
Closed

fsodre wants to merge 1 commit into
prooflinedev:mainfrom
fsodre:fix/pr-repository-name

Conversation

@fsodre

@fsodre fsodre commented Nov 4, 2026

Copy link
Copy Markdown

Problem

proofline history --repo owner/name --pr N and proofline run --repo owner/name --pr N --run M, the forms the README documents, don't work against the live server:

Command Before After
history --repo fsodretest/cli --pr 1 items: [], so the PR appears to have no runs lists run 1
run --repo fsodretest/cli --pr 1 --run 1 HTTP 404 review not found returns the run

The CLI sent owner/name as one percent-encoded path segment (/reviews/pr/fsodretest%2Fcli/1). The server addresses pull-request runs by the repository's own name (/reviews/pr/cli/1), the same segment the console uses in its run URLs. history therefore silently reported no runs for a pull request that had them. Omitting --repo hit the same bug, because the name taken from the git remote is also owner/name.

Fix

  • history and run check owner/name against the repositories with reviews, using the existing reviewed_repository lookup that findings --pr relies on, and send only name.
  • Another owner's repository with the same name is refused with the existing "has no reviews" error instead of being read under the wrong name. This matches how the CLI already refuses names it can't resolve exactly.
  • A bare --repo name is still sent as given, without a lookup, so anyone already using that workaround is unaffected.

Tests

  • New pull_request_runs_name_the_repository_without_its_owner (tests/http.rs) checks the exact request path for history and run with owner/name, with a bare name, and with a name whose letter case differs from the server's. It also checks that a mismatched owner exits 1 without requesting any pull-request path. The test fails on main (the request goes to /reviews/pr/acme%2Fweb/7) and passes with the fix.
  • native_tools_keep_tenant_paths_and_reruns_make_one_attempt now serves the review list that history reads first.
  • Checked against the live server: the commands in the table above, history --remote <remote> --pr 1, and the refusal for --repo other/cli.
  • cargo fmt --check, cargo clippy --locked --all-targets -- -D warnings, cargo test --locked and cargo deny check all pass.

🤖 Generated with Claude Code

https://claude.ai/code/session_01XSEfqvPGJbbk5j8rGSup7H

`history` and `run` sent `--repo owner/name` as one encoded path segment
(`owner%2Fname`). The server addresses pull-request runs by the
repository's own name, so `history` reported no runs for a pull request
that had them and `run` returned 404. This affected the documented form
and the default taken from the git remote.

The owner/name is now checked against the repositories with reviews, and
only the name is sent. Another owner's repository of the same name is
refused. A bare name is still sent as given.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XSEfqvPGJbbk5j8rGSup7H

mohsen1 commented Nov 17, 2026

Copy link
Copy Markdown
Member

Codex

Closing as superseded: the repository-routing fix is already on main.

@mohsen1 mohsen1 closed this Nov 17, 2026
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