Repository navigation
[3618 by Claude Opus 5.5] API: PR readiness answers for repositories the instance does not monitor; repository filters are case-sensitive; goals expose host paths - #3632
Conversation
… pass, along with the new tests, the related core/MCP/root suites, the UI goal tests and the typecheck for API, core, CLI and UI. I did not run the Playwright e2e specs. One shared helper (`packages/api/repositoryScope.ts`) Every repository filter now goes through it. It takes the requested name, matches it to a configured repository ignoring capitalization, and returns the configured spelling. That spelling is used in the queries and echoed in responses; stored names are not rewritten. A repository that isn't configured returns 404 `REPOSITORY_NOT_ACCESSIBLE` without calling GitHub. A configured one is then checked against the caller's own GitHub read access. `all` and an absent filter still mean every repository, and repeated or nested parameters are rejected with 400. Things you might not expect: - GitHub check on every scoped read. The dashboard, stats, tasks and other listed endpoints now check the caller's GitHub access, not only readiness. A successful check is remembered per user and repository for 60 seconds, so dashboard polling doesn't make a GitHub call each time. - Demo mode skips the GitHub check (there is no GitHub identity) but still requires a configured repository. - Disabled repositories still work as filters on the history views. Readiness accepts only enabled ones, as repository-events already did. Per point 1. Readiness is only served for an enabled configured repository the caller can read on GitHub. Anything else gets 404 before the App is used, and the response echoes the configured name, which fixes the wrong name you saw (`"react/react"`). 2. Case-insensitive filters apply to `/api/stats/dashboard`, `/api/stats/cost` (and `.csv`), `/api/stats/review-scores` (and `.csv`), `/api/pull-requests/:n/scores`, `/api/dashboard/*`, `/api/tasks`, `/api/repos/todos` (reads, creates and reorders), `/api/repos/media`, `/api/planner/drafts` and `/api/goals`. Scores, drafts and to-dos also compare stored names with `COLLATE NOCASE`, so older rows saved in a different capitalization still show up. That includes the to-do service in core. 3. Unknown repositories return 404 `REPOSITORY_NOT_ACCESSIBLE` on all those endpoints instead of a 200 with zeros or empty lists. 4. `worktreePath` is removed from goal responses. No UI screen used it, so I didn't keep an admin-only version. 5. Limits: `/api/goals` now returns 50 by default (maximum 200), and `/api/tasks` accepts at most 200. - The web console's goal list now walks the pages explicitly and sorts by latest update, so it still shows every goal. - The CLI's goal list already sent explicit paging. `propr task list --limit` now rejects values above 200 with a clear message instead of a server error. Also changed - OpenAPI: the docs list the new 404s and the 200 maximum; I regenerated the spec and client types, and the drift check is clean. - CHANGELOG: entries under Fixed and Changed. Tests - New tests cover the helper itself and each route group: capitalization, unknown repositories, `all`, the 200 maximum, readiness refusing unconfigured or disabled repositories, goal paging limits and `worktreePath` being gone. - The UI has a test for the goal page walk. - Suites that build these routes now pass in a resolver that accepts any well-formed name, because the real one reads instance configuration they don't have. The demo-mode suite still runs with the real resolver against seeded configuration. No visual previews: the only UI change is how the goals list is fetched, and the screen looks the same.
|
/ultrafix goal=8 max=6 |
|
🔄 Ultrafix loop started (goal: 8/10, max cycles: 6) First action:
|
|
✅ AI Code Review Complete requested by @propr-ultrafix Posted 1 review: |
|
CI failed: Validate Changes Please investigate and fix this CI failure.
Failure evidence
|
|
✅ Applied the requested follow-up changes in commit cdaf8f9 Summary of ChangesI fixed the CI failure in Cause: the Fix: in the "HTTP update records both the rename and outgoing snapshot…" test, I merged two assertions into one: assert.deepEqual([snapshot.nameBefore, snapshot.nameAfter], [null, null]);It checks the same thing and brings the file back to 400 lines. No other files changed. Verification:
No previews, since this is a test-only change. Review digestRisk-tiered paths
Validation evidence
Diff size: 1 file changed, +1/−2 lines 🤖 Implementation Details
Undo Changes • View Task Execution 💡 ProPR Slash Commands
🤖 Generated by ProPR |
Checks FailedValidation failed during setup, tests, CLI packaging, linting, or build checks. View Logs |
…test.ts`; lint now passes and all 21 tests in that file pass locally. I fixed the CI failure in `packages/api/test/planRevisions.test.ts`; lint now passes and all 21 tests in that file pass locally. **Cause:** the `Validate Changes` job failed at the API lint step, which allows no warnings. The previous commit added an import to that file, taking it to 401 lines against the 400-line limit. Nothing else in that run failed: the API build, the CLI lint and the OpenAPI drift checks all passed. **Fix:** in the "HTTP update records both the rename and outgoing snapshot…" test, I merged two assertions into one: ```ts assert.deepEqual([snapshot.nameBefore, snapshot.nameAfter], [null, null]); ``` It checks the same thing and brings the file back to 400 lines. No other files changed. **Verification:** - `eslint . --max-warnings 0` in `packages/api` passes with no warnings. - The run then didn't exit on its own and was stopped by its 100s timeout; that is a known exit hang in the `packages/api` node tests. - When I ran the file in demo mode (`PROPR_DEMO_MODE=true`), the "HTTP handlers check ownership and input and refuse restoring a busy plan" test failed. It fails the same way on an unchanged copy of the file from the last commit, so my edit didn't cause it. With dummy GitHub relay settings instead of demo mode, it passes. No previews, since this is a test-only change. PR: #3632 Comment by: @propr-dev[bot] (ID: 6936293467) Model: Claude Opus 5.5
|
ℹ️ Analyzed the follow-up request by @github-actions[bot] Analysis SummaryI made no changes, because the branch already has the fix for this lint failure. The failing run (44003919276) built commit On I didn't make previews, since nothing visible changed. No code changes were necessary based on the current state of the branch. 🤖 Analysis Details
💡 ProPR Slash Commands
🤖 Generated by ProPR |
Full Test Suite ResultsValidation failed during: Test shard (shard 1).
View shard 1/4 outputDetails truncated; see the uploaded artifacts for complete failure rows and logs. |
|
CI failed: Run Full Test Suite Please investigate and fix this CI failure.
Failure evidence
|
|
CI failed: Full Test Suite Shard 1/4 Please investigate and fix this CI failure.
Failure evidence
|
|
✅ Applied the requested follow-up changes in commit 602f9a6 Processed 2 comments:
Summary of ChangesI fixed the shard 1 failure, which was the only thing failing. The "Run Full Test Suite" check fails whenever a shard fails, so it should clear too. Cause: Fix ( Verification:
I didn't make visual previews because nothing on screen changes. Review digestRisk-tiered paths
Validation evidence
Diff size: 1 file changed, +4/−1 lines 🤖 Implementation Details
Undo Changes • View Task Execution 💡 ProPR Slash Commands
🤖 Generated by ProPR |
…ng. The "Run Full Test Suite" check fails whenever a shard fails, so it should clear too.
I fixed the shard 1 failure, which was the only thing failing. The "Run Full Test Suite" check fails whenever a shard fails, so it should clear too.
**Cause:** `packages/api/test/mcpWorkflows.test.ts` failed at `create_todo_category` with `GITHUB_REAUTH_REQUIRED`. The MCP TODO tools call the existing TODO route handlers. On this branch those handlers run the new repository-scope resolver, which checks GitHub access a second time with a new client built from the caller's raw token. In the test that token is a placeholder, so the request went to the real GitHub, got rejected, and was reported as an expired sign-in. In production the token would be real, so it would have worked there, just with one extra GitHub call.
**Fix (`packages/api/mcp/tools.ts`):** the MCP tool list now gives the TODO routes a resolver made with `createRepositoryScopeResolver({ checksGitHubAccess: () => false })`. Before any tool runs, MCP dispatch (`packages/api/mcp/toolExecution.ts:145`) already checks the `repository` argument against the grant, the configured repositories and GitHub, using the grant's own verified GitHub client. Every TODO tool requires that argument, so this skips only the duplicate GitHub check. The route still matches the name against configured repositories and uses the configured spelling. No other route reached through MCP uses the resolver; the browser routes still use the full check.
**Verification:**
- `mcpWorkflows.test.ts` passes with the fix. With the HEAD version of `tools.ts` swapped back in, it fails with the same `GITHUB_REAUTH_REQUIRED` error as CI.
- All 55 `packages/api/test/mcp*.test.ts` suites pass. The first full run stopped after 23 because the container's disk was full (a shared cache filled it, not these tests); the other 32 passed once space freed up.
- Lint (zero warnings) and the `packages/api` typecheck pass.
I didn't make visual previews because nothing on screen changes.
PR: #3632
Comment by: @propr-dev[bot] (ID: 6937186531)
Comment by: @propr-dev[bot] (ID: 6937187475)
Model: Claude Opus 5.5
🔍 AI Code Review — codex:gpt-6-astraOverall EvaluationThe PR centralizes repository resolution, restricts readiness evaluation, removes goal host paths, and bounds list requests. It needs minor changes before merge: the readiness response does not enforce the promised repository spelling, and the UI silently stops loading goals after 10,000 entries. ✅ Configuration checked first — The resolver rejects unknown and disabled readiness repositories before verifying GitHub access or invoking the evaluator. ✅ Host-path removal — The shared goal projection removes ✅ Passing current checks — The authoritative status reports 35 passed checks and no failures or pending checks. This review uses static analysis of the supplied code; no commands were run. Merge blockersEvery finding below was introduced by this PR and must be resolved before merging. F1: 🔴 Readiness does not preserve configured spelling
F2: 🔴 Goal pagination silently drops remaining goals
SuggestionsThese are optional follow-ups and are not sent to S1: 🟢 Exercise mixed repository storageThe route tests configure and store ScoreThe shared implementation and passing checks provide a solid foundation, but two localized contract failures remain. Correcting them would bring the change substantially closer to merge readiness. Score: 6/10 🤖 Review Details
Copy and edit to choose records from this review: 🤖 Review by ProPR |
|
✅ Applied the requested follow-up changes in commit 29b06c0
Summary of ChangesI fixed both findings, and the new tests pass. F1: Readiness keeps the configured spelling. In F2: The goal list no longer stops at 50 pages.
The goal tests and the goals page tests pass (73/73). The UI and API typechecks and lint are clean. Separate from these findings: the MCP tool The UI looks the same, so I made no visual previews. Review digestRisk-tiered paths
Validation evidence
Diff size: 4 files changed, +61/−7 lines 🤖 Implementation Details
💡 ProPR Slash Commands
🤖 Generated by ProPR |
I fixed both findings, and the new tests pass. **F1: Readiness keeps the configured spelling.** In `packages/api/routes/pullRequestReadinessRoutes.ts`, the route now takes the evaluator's result and replaces its `repository` with the configured name before sending it. The evaluator itself is unchanged, so its internal reads still use GitHub's spelling. In the new test, the repository is configured as `Acme/App`, requested as `acme/APP`, and the evaluator reports `acme/app`, the way the real one does. The response must say `Acme/App`. That test fails against the previous route and passes now; the whole readiness suite passes (6/6). **F2: The goal list no longer stops at 50 pages.** `propr-ui/src/api/goals.ts` now keeps fetching pages until the server sends no `nextOffset`, so a page cap can no longer return part of the list. I replaced the cap with a different safeguard: if the server sends a continuation that doesn't move forward, or one that follows an empty page, the read fails with an error instead of returning a partial list as if it were complete. The server only sends a continuation after a full page, so neither case happens in normal use. New tests: - 51 pages (10,001 goals) all arrive, in latest-update order. - Both bad continuations make the read fail. The goal tests and the goals page tests pass (73/73). The UI and API typechecks and lint are clean. **Separate from these findings:** the MCP tool `get_pull_request_readiness` (`packages/api/mcp/toolsPullRequests.ts`) also passes the evaluator's result through unchanged, so it reports GitHub's spelling. This PR didn't change that code and nothing promises the configured name there, so I left it alone. The UI looks the same, so I made no visual previews. PR: #3632 Comment by: @propr-ultrafix (ID: 0) Model: Claude Opus 5.5
|
✅ AI Code Review Complete requested by @propr-ultrafix Posted 1 review: |
🔍 AI Code Review — codex:gpt-6-astraOverall EvaluationThe PR centralizes repository validation, restricts readiness evaluation, removes goal host paths, and bounds list requests. It needs a localized correction before merge. ✅ Readiness scope enforcement — Unconfigured and disabled repositories are rejected before access verification or readiness evaluation. ✅ Host-path removal — The shared goal projection removes ✅ Explicit UI pagination — The goal client follows continuation offsets and rejects nonadvancing or empty-page continuations. This is a static review of the supplied code; no commands were run. Current checks show no failures and four pending checks. Merge blockersEvery finding below was introduced by this PR and must be resolved before merging. F3: 🔴 Use the resolved media repository
SuggestionsThese are optional follow-ups and are not sent to S2: 🟢 Exercise different stored capitalizationThe new route fixtures generally use the same spelling for configuration and stored records. Additional cases with mixed-case configuration and differently capitalized historical rows would help verify the intended behavior across cost, task, dashboard, and goal readers. This is optional additional coverage; the supplied excerpts do not establish the underlying column collations sufficiently to report those readers as defective. ScoreThe implementation is largely coherent and has targeted coverage, but the media integration leaves an explicit requirement incomplete. Current checks have no failures, with four still pending. Score: 6/10 🤖 Review Details
Copy and edit to choose records from this review: 🤖 Review by ProPR |
|
✅ Applied the requested follow-up changes in commit 4a7bbff
Summary of ChangesI fixed F3: the media route now uses the repository name the resolver returns instead of just checking that one came back. The new test passes, and it fails when run against the old route code. The fix (
The new test (
Checks
Other routes: I looked at every other place that calls the resolver: readiness, to-dos, tasks, cost, review scores, dashboard, stats, goals and planner. They all keep and use the resolved name, so the media route was the only one with this gap. I found nothing else outside F3's scope. There is no visual change, so I made no previews. Review digestRisk-tiered paths
Validation evidence
Diff size: 2 files changed, +35/−5 lines 🤖 Implementation Details
💡 ProPR Slash Commands
🤖 Generated by ProPR |
…e resolver returns instead of just checking that one came back. The new test passes, and it fails when run against the old route code.
I fixed F3: the media route now uses the repository name the resolver returns instead of just checking that one came back. The new test passes, and it fails when run against the old route code.
**The fix (`packages/api/routes/repositoryMediaRoutes.ts`)**
- The route keeps the configured spelling the resolver returns (for example `Integry/ProPR`).
- That spelling is passed to `reader.enabledRepositories`. The membership check uses its lowercase form, because that function returns lowercase keys.
- The `tasks` and `goals` lookups match on the lowercase form against `LOWER(repository)`, so stored rows are found whatever capitalization they were saved with.
- The preview sources handed to `reader.project` carry the configured spelling, not whatever spelling the row was stored under. The goal-artifact URL check still compares against the stored row's own name, since that is what the stored URL contains.
**The new test (`packages/api/test/repositoryScopeRoutes.test.ts`)**
It configures the repository as `Integry/ProPR` and requests `INTEGRY/propr`, while the task row is stored as `integry/propr`. It asserts:
- the preview-policy check receives `['Integry/ProPR']`.
- the stored lowercase task is found and projected as `{ repository: 'Integry/ProPR', prNumbers: [3583] }`.
- the previews are returned.
**Checks**
- `repositoryScopeRoutes.test.ts` and `previewMediaProjection.test.ts` pass.
- With the route swapped back to the HEAD version, the new test fails.
- ESLint with zero warnings and `tsc --noEmit` both pass for `packages/api`.
**Other routes:** I looked at every other place that calls the resolver: readiness, to-dos, tasks, cost, review scores, dashboard, stats, goals and planner. They all keep and use the resolved name, so the media route was the only one with this gap. I found nothing else outside F3's scope.
There is no visual change, so I made no previews.
PR: #3632
Comment by: @propr-ultrafix (ID: 0)
Model: Claude Opus 5.5
|
✅ AI Code Review Complete requested by @propr-ultrafix Posted 1 review: |
|
🔀 Resolved merge conflicts from Conflicting Files
Resolution SummaryI resolved both conflicts. No conflict markers are left anywhere in the repository, and the API package typechecks cleanly ( 1.
|
…-5-5-api-pr-readiness-answers--20261117-0149-a7q Automatically resolved merge conflicts after merging target branch into PR branch. Resolved conflicts in: - CHANGELOG.md - packages/api/mcp/tools.ts PR: #3632 Model: Claude Opus 5.5
🔍 AI Code Review — codex:gpt-6-astraOverall EvaluationThe PR centralizes repository resolution, restricts readiness evaluation, removes goal host paths, and bounds list requests. It needs a localized correction before merge: canonicalizing a filter does not consistently make the underlying database lookup case-insensitive. ✅ Readiness gating — Unconfigured and disabled repositories are rejected before access verification or readiness evaluation. ✅ Host-path removal — The shared goal projection removes ✅ Pagination handling — The UI follows goal continuations and rejects non-advancing or empty-page continuations. Current-head checks report 35 passed and 12 neutral/skipped, with no failures. This review used static inspection only; no commands were run. Merge blockersEvery finding below was introduced by this PR and must be resolved before merging. F4: 🔴 Match cost records independently of configured capitalization
SuggestionsThese are optional follow-ups and are not sent to S3: 🟢 Broaden capitalization fixturesUse mixed-case configured names and differently capitalized stored records across the route tests. Most new fixtures vary only the request spelling, which verifies resolver behavior but cannot establish that downstream queries preserve historical records. The media test already provides a useful example. ScoreThe implementation has useful shared validation and green checks, but the cost-query capitalization concern requires verification and potentially a small correction before merge. Score: 6/10 🤖 Review Details
Copy and edit to choose records from this review: 🤖 Review by ProPR |
|
✅ AI Code Review Complete requested by @propr-ultrafix Posted 1 review: |
🔍 AI Code Review — codex:gpt-6-astraOverall EvaluationThe PR centralizes repository resolution, restricts readiness evaluation, removes host paths, and bounds list requests. It needs a localized pagination correction before merge. This review used the supplied code only; no commands were run. Current-head checks report no failures. ✅ Readiness scope enforcement — Unconfigured and disabled repositories are rejected before GitHub access checks or readiness evaluation. ✅ Host-path removal — The shared goal projection removes Merge blockersEvery finding below was introduced by this PR and must be resolved before merging. F5: 🔴 Preserve ordering across default goal pages
SuggestionsThese are optional follow-ups and are not sent to S4: 🟢 Expand stored-capitalization coverageAdd fixtures where configured and stored repository spellings differ for cost, task, and dashboard reads. The new route tests generally align configuration and stored names, whereas the media test deliberately varies them. This would help distinguish input normalization from database matching; it is optional additional coverage rather than a demonstrated blocker in the supplied context. ScoreThe shared resolver and targeted tests are solid, and current checks pass. The default goal pagination contract still needs correction to prevent omitted results. Score: 6/10 🤖 Review Details
Copy and edit to choose records from this review: 🤖 Review by ProPR |
|
✅ Applied the requested follow-up changes in commit 8f1e1d7
Summary of ChangesI fixed F4 and F5. Both new regressions fail when run against the current branch code and pass with the fix. All 45 affected API suites pass, and lint and typecheck are clean for the changed files and tests. F4: cost records with different capitalization. The finding was real. The The same mistake was in every other read this PR moved onto the configured spelling, so I fixed those too:
The new test in F5: goal pages without parameters. Every goal page now uses the same fixed order: newest created first, ties broken by goal ID. That includes the first page read without paging parameters. The new test creates 51 goals whose creation and update orders differ, starts from To keep Other things you should know (not changed):
There are no visual previews because nothing on screen changed. Review digestRisk-tiered paths
Validation evidence
Diff size: 13 files changed, +176/−35 lines 🤖 Implementation Details
💡 ProPR Slash Commands
🤖 Generated by ProPR |
…st the current branch code and pass with the fix. All 45 affected API suites pass, and lint and typecheck are clean for the changed files and tests. I fixed F4 and F5. Both new regressions fail when run against the current branch code and pass with the fix. All 45 affected API suites pass, and lint and typecheck are clean for the changed files and tests. **F4: cost records with different capitalization.** The finding was real. The `tasks.repository` column compares case-sensitively (SQLite's default), so with `Integry/ProPR` configured, rows stored as `integry/propr` returned zero executions and a header-only CSV. I added a small shared helper, `packages/api/routes/repositoryPredicate.ts`, that compares the repository name ignoring capitalization. The cost query now uses it, and responses still echo the configured name. The same mistake was in every other read this PR moved onto the configured spelling, so I fixed those too: - **`/api/stats/dashboard`:** task summary and recorded spend (`analyticsAggregates.ts`). - **`/api/stats/review-scores`:** the summary (`reviewScoreStats.ts`). - **`/api/tasks`:** `taskHelpers.ts`. - **`/api/goals`:** the repository filter (`goalRoutes.ts`). - **`/api/dashboard/*`:** - summary, attention and active: tasks, plan issues waiting on a decision, running goals. - outcomes: completions, summaries and the history lookup. - narrative: the plans query. The new test in `packages/api/test/repositoryScopeRoutes.test.ts` configures `Integry/ProPR` against lowercase stored rows. It requests both the stored spelling and another one, and checks cost JSON and CSV, dashboard stats, review scores, tasks and all the dashboard reads above. `goalCliRoutes.test.ts` does the same for the goal list. I reverted each fixed file on its own, and every one makes the tests fail. **F5: goal pages without parameters.** Every goal page now uses the same fixed order: newest created first, ties broken by goal ID. That includes the first page read without paging parameters. The new test creates 51 goals whose creation and update orders differ, starts from `GET /api/goals` with no parameters and follows `nextOffset`. It gets each goal exactly once; the old code repeats G1 and never returns G2. I added a sentence to the CHANGELOG entry saying the unparameterised read no longer sorts by latest update. The web console already pages explicitly and sorts by update itself, so it's unaffected. To keep `dashboardOutcomeQueries.ts` under the 400-line lint limit, I put one of its imports on a single line. **Other things you should know (not changed):** - **MCP cost tool:** `get_cost_breakdown` shares the cost query, so its `repository` argument now also matches any capitalization. That's the same GitHub repository, but the tool's description still says "Exact repository handle". - **Slower scoped reads:** a case-insensitive comparison can't use the existing index on `tasks.repository`, so these reads scan rather than seek. That's fine at current sizes; a dedicated case-insensitive index, like the one `repository_events` already has, would fix it. - **`/api/goals/attention`:** it still compares the raw `repository` value exactly. This PR didn't change that route, so I left it alone. There are no visual previews because nothing on screen changed. PR: #3632 Comment by: @propr-ultrafix (ID: 0) Model: Claude Opus 5.5
|
✅ AI Code Review Complete requested by @propr-ultrafix Posted 1 review: |
🔍 AI Code Review — codex:gpt-6-astraOverall EvaluationThe PR is merge-ready within the supplied scope. It centralizes repository resolution, applies case-insensitive database filtering, removes goal host paths, and updates pagination consumers. The change size is largely explained by route integration, tests, and generated contracts. ✅ Configuration before GitHub — The resolver rejects unconfigured repositories before checking GitHub access; readiness additionally requires an enabled repository. ✅ Stored capitalization preserved — Case-insensitive predicates find historical rows without rewriting their repository names, with regression coverage for differing configured and stored capitalization. ✅ Pagination consumer updated — The UI follows goal continuations, deduplicates results, and rejects invalid continuations instead of silently returning an incomplete list. The authoritative current checks show 35 passed and no failures or pending checks. This review used static tracing of the supplied code; no commands or tests were run. Merge blockersNo merge blockers. SuggestionsThese are optional follow-ups and are not sent to S5: 🟢 Coalesce concurrent access checksIn S6: 🟢 Clarify pagination stability guaranteesThe comments in ScoreThe implementation addresses the scoped changes with focused regression coverage and passing current-head checks. Static review found no verified merge blocker. Score: 9/10 🤖 Review Details
Copy and edit to choose records from this review: 🤖 Review by ProPR |
…n item 5. I left out one part of item 5: the `AI`/`llm-*` labels being applied twice when a PR is created. That should be named in the PR description. The new test file `test/botCommentText.test.ts` passes (16 tests, using the quoted examples as inputs), and so do the existing suites that touch these comments. Lint and typecheck are clean. No file under `src/jobs` gains locking, Redis keys or queue logic. 1. Failed or invalid review comments (`reviewCommentFormatter.ts`, new `reviewCompletionComment.ts`) - Invalid output: "⚠️ Review output was invalid." now gives one of three reasons: - the review output could not be parsed. - the reviewer returned no text. - the review cited files the PR doesn't change. - Invalid output, continued: these comments drop the "Next step: /fix" block and carry the `error="true"` marker. - Provider failure: "❌ Review failed." is always followed by a sentence. An empty error gives "The provider call failed without an error message." - Parent comment: "Posted N reviews" no longer counts error reviews, and failed links are marked "(failed)". It now also says "Posted 0 reviews" instead of "Posted 0 review". The hidden marker that tracks whether a run failed still follows the provider result, so nothing about scheduling changes. 2. Failure comments - PR follow-up failures now open with a plain cause, such as "Provider authentication failed." or "The agent process stopped unexpectedly.", and link to the task. - Comment IDs: "Comment ID: 0" is gone. Real comment IDs keep their `✓` receipts, because polling reads them. - Removed text: "Please check the logs for more details." is gone. - Issue failure comments get the same cause line. - Upstream HTML page titles become the status code, e.g. "403 Attention Required! | Cloudflare" → "HTTP 403". GitHub HTML error pages are reported by status only. - Completion reports no longer show the `<synthetic>` model line, or the token and cost lines when no tokens were used. 3. PR bodies (`logFiles.ts`): the "Detailed Logs" block and the "Latest Conversation Messages" block are replaced by one "View task" link. Log files are still written on the worker. Existing PR bodies are not touched. 4. CI-failure comment: "Commit:" now links to the commit, and a separate "Run:" line links to the job run. 5. Labels and ids - Task ids: the `-undefined-` came from comments with no `updated_at`. The revision id now uses the body digest alone in that case. - `AI` with `AI-done`: the current code already removes `AI` when it adds `AI-done`; a test pins this. The closed issues I checked that kept both (#3512, #3529) were labelled on Nov 13 and show a different label order from this code. My guess is that the running instance was on an older build. - Left out — double labels at PR creation: on #3632 and #3635 the bot applied `AI` and `llm-*` twice, about a second apart. The only label call has a retry delay of at least 2 seconds and isn't reached by the fallback path, so the second call probably comes from a duplicate run. Fixing that is not a text change. To fit the 400-line lint limit I removed a duplicate `sanitizeErrorMessage` from `errorHandlers.ts` (it now imports the shared one) and moved link-building into small helpers. I updated a few existing tests: some used placeholder review text that is now invalid output, and one checked for the conversation preview that was removed. No previews were made, since this only changes comment text.
…, drop internal paths and debug blocks (text only) (#3676) 1. Failed or invalid review comments (`reviewCommentFormatter.ts`, new `reviewCompletionComment.ts`) - Invalid output: "⚠️ Review output was invalid." now gives one of three reasons: - the review output could not be parsed. - the reviewer returned no text. - the review cited files the PR doesn't change. - Invalid output, continued: these comments drop the "Next step: /fix" block and carry the `error="true"` marker. - Provider failure: "❌ Review failed." is always followed by a sentence. An empty error gives "The provider call failed without an error message." - Parent comment: "Posted N reviews" no longer counts error reviews, and failed links are marked "(failed)". It now also says "Posted 0 reviews" instead of "Posted 0 review". The hidden marker that tracks whether a run failed still follows the provider result, so nothing about scheduling changes. 2. Failure comments - PR follow-up failures now open with a plain cause, such as "Provider authentication failed." or "The agent process stopped unexpectedly.", and link to the task. - Comment IDs: "Comment ID: 0" is gone. Real comment IDs keep their `✓` receipts, because polling reads them. - Removed text: "Please check the logs for more details." is gone. - Issue failure comments get the same cause line. - Upstream HTML page titles become the status code, e.g. "403 Attention Required! | Cloudflare" → "HTTP 403". GitHub HTML error pages are reported by status only. - Completion reports no longer show the `<synthetic>` model line, or the token and cost lines when no tokens were used. 3. PR bodies (`logFiles.ts`): the "Detailed Logs" block and the "Latest Conversation Messages" block are replaced by one "View task" link. Log files are still written on the worker. Existing PR bodies are not touched. 4. CI-failure comment: "Commit:" now links to the commit, and a separate "Run:" line links to the job run. 5. Labels and ids - Task ids: the `-undefined-` came from comments with no `updated_at`. The revision id now uses the body digest alone in that case. - `AI` with `AI-done`: the current code already removes `AI` when it adds `AI-done`; a test pins this. The closed issues I checked that kept both (#3512, #3529) were labelled on Nov 13 and show a different label order from this code. My guess is that the running instance was on an older build. - Left out — double labels at PR creation: on #3632 and #3635 the bot applied `AI` and `llm-*` twice, about a second apart. The only label call has a retry delay of at least 2 seconds and isn't reached by the fallback path, so the second call probably comes from a duplicate run. Fixing that is not a text change. To fit the 400-line lint limit I removed a duplicate `sanitizeErrorMessage` from `errorHandlers.ts` (it now imports the shared one) and moved link-building into small helpers. I updated a few existing tests: some used placeholder review text that is now invalid output, and one checked for the conversation preview that was removed. No previews were made, since this only changes comment text. Co-authored-by: propr-dev[bot] <1316198+propr-dev[bot]@users.noreply.github.com>
AI Implementation Summary
Closes #3618
Branch:
3618/claude-opus-5-5-api-pr-readiness-answers--20261117-0149-a7qCommits: ✅ Changes committed (91c19d2)
AI Processing Completed
Execution Details:
Summary:
I've implemented all five points of #3618. The 37 affected API suites pass, along with the new tests, the related core/MCP/root suites, the UI goal tests and the typecheck for API, core, CLI and UI. I did not run the Playwright e2e specs.
One shared helper (
packages/api/repositoryScope.ts)Every repository filter now goes through it. It takes the requested name, matches it to a configured repository ignoring capitalization, and returns the configured spelling. That spelling is used in the queries and echoed in responses; stored names are not rewritten. A repository that isn't configured returns 404
REPOSITORY_NOT_ACCESSIBLEwithout calling GitHub. A configured one is then checked against the caller's own GitHub read access.alland an absent filter still mean every repository, and repeated or nested parameters are rejected with 400.Things you might not expect:
Per point
"react/react")./api/stats/dashboard,/api/stats/cost(and.csv),/api/stats/review-scores(and.csv),/api/pull-requests/:n/scores,/api/dashboard/*,/api/tasks,/api/repos/todos(reads, creates and reorders),/api/repos/media,/api/planner/draftsand/api/goals. Scores, drafts and to-dos also compare stored names withCOLLATE NOCASE, so older rows saved in a different capitalization still show up. That includes the to-do service in core.REPOSITORY_NOT_ACCESSIBLEon all those endpoints instead of a 200 with zeros or empty lists.worktreePathis removed from goal responses. No UI screen used it, so I didn't keep an admin-only version./api/goalsnow returns 50 by default (maximum 200), and/api/tasksaccepts at most 200.propr task list --limitnow rejects values above 200 with a clear message instead of a server error.Also changed
Tests
all, the 200 maximum, readiness refusing unconfigured or disabled repositories, goal paging limits andworktreePathbeing gone.No visual previews: the only UI change is how the goals list is fetched, and the screen looks the same.
Review digest
Risk-tiered paths
packages/api/openapi/routeDocsStats.ts(+3/−1)packages/api/openapi/routeDocsTasks.ts(+4/−3)packages/api/openapi/schemas.ts(+2/−2)packages/api/repositoryScope.ts(added, +202/−0)packages/api/routes/costExport.ts(+10/−9)packages/api/routes/dashboardRoutes.ts(+12/−16)packages/api/routes/goalRoutes.ts(+12/−3)packages/api/routes/plannerRoutes.ts(+12/−7)packages/api/routes/pullRequestReadinessRoutes.ts(+18/−46)packages/api/routes/repoTodoRoutes.ts(+34/−9)packages/api/routes/repositoryMediaRoutes.ts(+5/−1)packages/api/routes/reviewScoreStats.ts(+12/−17)packages/api/routes/statsRoutes.ts(+7/−8)packages/api/routes/taskRoutes.ts(+13/−10)packages/api/services/goalProjection.ts(+1/−1)packages/cli/src/commands/taskCommands.ts(+13/−4)packages/client/src/generated/apiTypes.ts(+3/−3)packages/core/src/services/repoTodosService.ts(+6/−6)propr-ui/src/api/goals.ts(+26/−3)CHANGELOG.md(+17/−0)docs/static/openapi/propr-api.yaml(+26/−8)packages/api/test/costExport.test.ts(+4/−3)packages/api/test/creatorProjection.test.ts(+7/−6)packages/api/test/dashboardLiveActivity.test.ts(+2/−1)packages/api/test/dashboardNarrativeStatus.test.ts(+4/−3)packages/api/test/dashboardOutcomeRoutes.test.ts(+3/−2)packages/api/test/dashboardReadService.test.ts(+5/−4)packages/api/test/dashboardRoutes.test.ts(+5/−4)packages/api/test/dashboardStatsRoutes.test.ts(+6/−5)packages/api/test/dashboardTestHarness.ts(+4/−0)packages/api/test/demoMode.test.ts(+2/−0)packages/api/test/goalCliRoutes.test.ts(+18/−0)packages/api/test/openapiResponseConformance.test.ts(+2/−1)packages/api/test/planItemDependencies.test.ts(+2/−1)packages/api/test/planProvenanceUpdates.test.ts(+2/−1)packages/api/test/planRevisions.test.ts(+2/−1)packages/api/test/previewMediaProjection.test.ts(+2/−1)packages/api/test/pullRequestReadinessRoutes.test.ts(+42/−0)packages/api/test/repositoryScope.test.ts(added, +126/−0)packages/api/test/repositoryScopeRoutes.test.ts(added, +143/−0)packages/api/test/repositoryScopeTestHelpers.ts(added, +22/−0)packages/api/test/reviewScoreStats.test.ts(+4/−3)packages/api/test/statsAnalyticsTimeframe.test.ts(+13/−12)packages/api/test/taskAssigneeFilter.test.ts(+2/−1)packages/api/test/taskDeleteRoutes.test.ts(+2/−1)packages/api/test/taskFollowupFixture.ts(+2/−1)packages/api/test/taskReviewRoutes.test.ts(+2/−1)propr-ui/e2e/creator-attribution.pw.ts(+1/−1)propr-ui/e2e/goal-attention.pw.ts(+1/−1)propr-ui/e2e/goal-details-visual-previews.pw.ts(+1/−1)Validation evidence
Diff size: 58 files changed, +904/−220 lines
Detailed Logs:
3c679d01-0b7f-482c-9d15-7e1490711543Log files stored at:
/usr/src/app/logs/executions/issue-3618-2026-11-17T02-33-47-295Z-conversation.json/usr/src/app/logs/executions/issue-3618-2026-11-17T02-33-47-295Z-output.txtLatest Conversation Messages
This PR was created automatically by ProPR after processing issue #3618.
💡 Need changes?
Comment on this PR to request refinements — the AI agent monitors comments and will update the implementation based on your feedback. Keep iterating until you're satisfied!