chore(pragent): upgrade the embedded runtime to pr-agent 0.45.0 - #225
Conversation
Assessed by diffing the 0.45.0 wheel against the vendored 0.39.0 rather than reading release notes: 82 of 123 files changed, including all eight we patch. Two patches are retired because upstream fixed the bugs. extract_hunk_headers now defaults an omitted hunk size to 1 instead of 0, so a single-line change no longer renders its old value as a still-present context line; get_diff_files now skips a file that fails to decode instead of crashing the review on a binary. Both were confirmed against the installed runtime, not assumed. The four remaining patches were probed under 0.45.0 and all apply -- none silently skipped by the version guard -- and get_line_link's call sites are unchanged, so the structured /review anchor still works. Three upstream features now default to on and append to the very output this app parses, which would have surfaced as bogus findings rather than as an obvious break: persistent_finding_state (upstream cross-run state the app already owns through drafts, finding closures and re-review verdicts) and two coverage footers. They are pinned off in buildPragentEnv, verified to be true by default and false under the override. Telemetry is new in 0.45.0 but ships disabled with no built-in endpoint, so it needs no handling. Also bumps the development version to 0.12.0-dev. Not exercised end to end: 0.45.0 revises six prompt files, and whether the rendered markdown still matches the parser needs a real /describe /review /ask against a live PR. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…eadings splitting it Three defects surfaced by a real /describe run. None was introduced by the 0.45.0 upgrade -- the relevant upstream code is identical in 0.39.0 -- they had simply never been noticed. Line counts rendered as "+-1/--1". FilePatchInfo defaults num_plus_lines and num_minus_lines to -1 and only the real platform providers fill them in; LocalGitProvider does not. get_diff_files is wrapped rather than reimplemented to backfill both from the patch text, counted by the same rule the platform providers use, so upstream keeps owning how the diff is produced. Every walkthrough link pointed at "#L-1". Upstream passes relevant_line_start=-1 to mean "the whole file", and -1 is truthy, so a plain falsiness check let it through. The resulting fragment was then rejected by the anchor parser entirely (its line group accepts only digits), so the link yielded no anchor at all -- the fix therefore also recovers a path-level anchor for these rows. A merge tail in the PR description tore the result apart. `# Conflicts:` and the `#<tab>path` lines beneath it are markdown H1s, and /describe frames its own structure at H3, so the author's prose outranked the tool's structure and produced sections named after conflicted files. Section splitting now takes a minimum heading level, and describe splits only at H3 or deeper: quoted content stays inside the section that quotes it. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Follow-up: three defects found by a live
|
Upgrades the embedded review engine from 0.39.0 to 0.45.0, and bumps the development version to
0.12.0-dev.How this was assessed
By diffing the 0.45.0 wheel against the vendored 0.39.0 tree, not by reading release notes: 82 of 123 files changed, including all eight we patch. Every claim below was then verified against the actually-installed runtime.
Two patches retired — upstream fixed the bugs
extract_hunk_headersnow defaults an omitted hunk size to 1 instead of 0 — exactly what we were patchingget_diff_filesnow skips a file that fails to decode (with a warning) instead of crashing the reviewConfirmed by probing the installed runtime (
extract_hunk_headers("@@ -1 +1 @@") -> ("", 1, 1, 1, 1)), not assumed from a changelog. Two fewer things to keep in step with upstream.Three new defaults would have corrupted our parsed output
This is the part of the upgrade that fails silently rather than loudly, and the reason it warranted a real diff. 0.45.0 turns on three features that append to the output this app parses as structured markdown:
pr_reviewer.persistent_finding_statepr_reviewer.enable_review_coverage_footerpr_code_suggestions.enable_suggestions_coverage_footerAll three are now pinned off in
buildPragentEnv, verified both ways:trueby default,falseunder the override. The design doc records this as something to re-check on every upgrade — upstream adding a section is not a free improvement when you parse the output.Everything else checked
get_line_link/get_repo_file_content/_prepare_repoinjected,_get_completionwrapped, and the/describeassessment field injected (both prompt anchors still present).get_line_linkcall sites are unchanged, so the structured/reviewline anchor — the primary source for jumping to a file:line — still works._get_completionstill returns a 3-tuple on both return paths; the streaming path''sMockResponsenow even carriesfinalized_usage, so token accounting may improve.telemetry/) ships disabled (otel.is_enabled = False, verified) with no built-in endpoint — nothing to handle for privacy or intranet use.gpt-5.6, butCONFIG__MODELis always set explicitly, so it does not reach us.New capabilities worth knowing about (none adopted here)
algo/run_details.py— upstream now collects token usage natively via a ContextVar, which is what our_get_completionwrapper does. Could retire another patch, though we would still need a shim to get the data out of the process.algo/review_merge.py+pr_reviewer.max_number_of_calls = 3— chunked/reviewmerged into one verdict. Real value for very large diffs, but it makes a single review cost up to 3 model calls; enabling it is a product decision.git_providers/plain_diff_provider.py— a provider that does not need a git repo. Potentially removes the need to materialize a worktree; an architectural change worth evaluating separately.algo/inline_comment_dedup.py— cross-run inline-comment dedup via fingerprint markers. Not applicable: we post comments ourselves rather than through pr-agent.Verification
lint/typecheck/test/buildpass; the runtime assembles and its build-time smoke test passes on 0.45.0.Not exercised end to end. 0.45.0 revises six prompt
.tomlfiles, so the rendered markdown may have shifted in ways only a live run reveals — and the parser matches on section headings. Before merging, worth running/describe,/reviewand/askonce against a real PR and checking that findings still split into separate items, line anchors still jump, and no extra sections appear.🤖 Generated with Claude Code