Skip to content

[Epic] 0.9.2 release fixes: API, core, tests and bot comments - #3630

Merged
integry merged 15 commits into
mainfrom
3616-epic-0-9-d8b
Nov 17, 2026
Merged

integry merged 15 commits into
mainfrom
3616-epic-0-9-d8b

Conversation

@propr-dev

@propr-dev propr-dev Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

0.9.2 release fixes: API, core, tests and bot comments

This Epic PR aggregates all changes for the plan: 0.9.2 release fixes: API, core, tests and bot comments

Issues in this Epic

Auto-close

When this PR is merged, the following issues will be automatically closed:

Fixes #3616
Fixes #3617
Fixes #3618
Fixes #3619
Fixes #3620
Fixes #3621
Fixes #3622


Created automatically by ProPR

…for every npm package against the public registry (502) (#3627)

Cause. On Node 22, Node asks the custom `lookup` for a list of addresses (`all: true`). The old callback returned a single address, so every request failed with `ERR_INVALID_IP_ADDRESS` and was reported as 502.

Changes
- `endpointPolicy.ts`: new exported `pinnedLookup(address, family)`. It returns `[{ address, family }]` when Node asks for a list and the single address otherwise. It still only ever answers with the vetted address, so the public-address check is unchanged and redirects are still not followed. MCP tool discovery in `requestExtensionMcp` now uses it.
- `extensionOAuthHttp.ts` (OAuth discovery and token requests): now uses `pinnedLookup`. This path, like MCP tool discovery, dials the vetted IP directly, so Node probably never calls the lookup there. I changed both anyway, as the issue asked.
- `packageRegistry.ts`: `registryGet` now uses `pinnedLookup`. It is also exported and takes an optional `vet` argument, which defaults to the real public-address check; this is only so the test can point the pinned connection at a local server. A missing package or version now returns the existing 404 "was not found in the npm registry" instead of 502.
- `packages/api/mcp/clients.ts`: outside the extensions code, but it had the same single-address callback when fetching OAuth client metadata by hostname. I fixed it inline the same way.

Tests. The new `packages/core/test/extensionPinnedLookup.test.ts` sends real HTTP requests through `registryGet` to a local server. The hostname used doesn't resolve, so a request can only arrive through the custom lookup. It runs once with `all: true` and once with `all: false`, and checks both a found package (200) and a missing one (404). A third test checks the helper's return value in both cases.
- With the old callback put back, the `all: true` case fails, so the test catches the bug on Node 22.23.
- With the fix, the new tests and the existing extension package-server, OAuth and profile suites pass (48 tests across the final runs). The profile suite needs `PROPR_DEMO_MODE=true`, or it exits early on the GitHub-auth check.
- ESLint (zero warnings) and `tsc` pass for core, and API `tsc` passes. The new test file is ignored by core's ESLint config, so lint covers only `src/extensions`.

No visual previews, since nothing in the UI changed.

Co-authored-by: propr-dev[bot] <1316198+propr-dev[bot]@users.noreply.github.com>
@propr-dev

propr-dev Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor Author

Epic progress: 0.9.2 release fixes: API, core, tests and bot comments

8 out of 8 PRs merged ✅

██████████ 100%

Merged child PRs: #3627, #3632, #3634, #3635, #3652, #3675, #3676, #3677

2 planned issues were closed without a merge and are not counted.

✅ This epic PR has been merged into main.


This comment is updated automatically by ProPR as child PRs open, change and merge.

@propr-dev propr-dev Bot added the AI label Nov 17, 2026
…cessor is reported "ready" ahead of unfinished earlier issues; /issues lacks skipped state and dependencies (#3634)

Scheduler (`packages/core/src/services/taskPlanning/epicQueueSchedule.ts`)
- Skips no longer let an issue jump ahead. A skipped issue that "satisfies its dependents" now passes its dependents on to its own prerequisites, all the way up the chain. If one of those is unfinished, the dependent is `waiting` and `waitingOn` names that issue. In your example, 3560 is now `waiting` on 3558. This also covers prerequisites outside the execution that aren't merged, and a dependency loop can't make it run forever.
- Sequential runs stay in order. I added a guard for sequential executions: an issue is never ready while an earlier issue is neither done nor skipped. This catches one more case: a later issue merged out of order no longer lets the one after it overtake an unfinished earlier issue. Sequential dispatch already started only the first unfinished issue; this makes the reported schedule agree with it.

`GET /api/planner/drafts/{id}/issues`
- The handler moved to a new file, `packages/api/routes/planIssueListHandler.ts`, because `planIssueHandlers.ts` was at the 400-line lint limit.
- `page` must be a whole number of 0 or more and `limit` must be 1 or more, otherwise the route returns 400. So `page=-1`, `limit=0`, `1.5`, `1e2` and empty values are all refused. A `limit` above 100 is still capped at 100 rather than refused.
- Every issue now has an `execution` field with the same data the execution-queue route returns:
  - its queue `state` (`skipped` shows up here, while `status` keeps the plan status)
  - `schedule`
  - the execution's `dependsOn` (the chain, in sequential mode)
  - `waitingOn` and `waitingOnSkipped`
  - `skipSatisfiesDependents`
  - `executionId`, `executionMode` and `queueStatus`

  It is `null` for issues not in the execution. `depends_on_issues` is unchanged: it is still the plan's declared dependencies, which is why it was `[]` for your sequential epic.
- I kept the bare array. Without paging parameters the route still returns a bare array, because the released CLI (`listPlanIssues` in `packages/cli/src/api/plans.ts`) and the UI's `getPlanIssues` both read that form. Changing it would break CLI versions already installed. With paging parameters it still returns `{ issues, total, page, limit, hasMore }`.
- I documented the route in OpenAPI (it was listed as undocumented) and regenerated the spec and the client types.
- I added the `execution` type to the UI's `PlanIssue` (`propr-ui/src/api/planIssuesApi.ts`) for the separate Studio issue.

Tests
- Scheduler tests (`packages/core/test/epicQueueSchedule.test.ts`):
  - your 3557–3560 chain, with the head in flight and then blocked
  - consecutive skips
  - an issue done out of order in a sequential run
  - the graph-mode transitive case, including a blocked head and a skip that doesn't satisfy its dependents
  - an outside prerequisite behind a skip
  - a dependency loop
- Route test (`test/planIssuesListEndpoint.test.ts`), run against SQLite with the real queue: both response shapes carry the same `execution` data, issues outside the execution get `null`, and bad paging returns 400.
- Changed existing test: in `packages/core/test/epicQueueBlockedEvents.test.ts`, one graph test expected the old behaviour, so I rewrote it. Skipping issue 2 used to start issue 3 straight away while issue 1 was in flight; now 3 waits on 1 and starts when 1 merges.

Results
- All the core epic-queue suites pass.
- The other planner, OpenAPI and dispatch suites I ran also pass, and `gen:openapi:check`, `tsc` and eslint are clean.
- The five failures, in `githubMetadataAuth.test.ts` and `planRevisions.test.ts`, appear identically on a clean copy of HEAD, so they come from this container rather than these changes.

Co-authored-by: propr-dev[bot] <1316198+propr-dev[bot]@users.noreply.github.com>
@propr-dev propr-dev Bot changed the title ◔ 1/7 [Epic] 0.9.2 release fixes: API, core, tests and bot comments ◔ 2/7 [Epic] 0.9.2 release fixes: API, core, tests and bot comments Nov 17, 2026
@propr-dev propr-dev Bot changed the title ◔ 2/7 [Epic] 0.9.2 release fixes: API, core, tests and bot comments ◔ 2/6 [Epic] 0.9.2 release fixes: API, core, tests and bot comments Nov 17, 2026
…nknown routes, bounded /api/activity paging, basic security headers (#3635)

* I've implemented all seven points of #3617. The new tests and the affected existing suites pass, except three suites that fail here for environment reasons and fail the same way with the old code.

What changed, by issue point

1. Bad request bodies and other errors return JSON. A new module, `packages/api/apiErrorBoundary.ts`, does three things:
   - An error handler right after the JSON parser in `server.ts` answers 400 (`INVALID_JSON`, or `INVALID_REQUEST_BODY` for a body that won't decompress), 413 (`PAYLOAD_TOO_LARGE`) and 415 (`UNSUPPORTED_MEDIA_TYPE`) before authentication.
   - It replaces Express's HTML final handler for the whole app. That covers unhandled errors (500 `INTERNAL_ERROR`, logged on the server only) and errors from the 7 MB archive parser and file uploads.
   - No response contains a message, stack or file path from the original error, whatever `NODE_ENV` is.
2. Unknown routes return a JSON 404 (`NOT_FOUND`). I hooked this into Express's final handler rather than adding a last route, because the MCP browser routes under `/mcp` are mounted after startup and a catch-all would have blocked them.
3. `/api/activity` paging is validated. `limit` must be 1–200 (default 50) and `offset` a non-negative integer; anything else, including an empty value, is 400 `INVALID_PAGINATION`.
4. GitHub `branches`/`workflows` routes check owner and repo names. Invalid ones, including `..`, `.` and encoded slashes, get 400 `INVALID_REPOSITORY`.
5. `/api/agent-definitions/templates` works. The alias is now registered before `/:id`, so `templates` is no longer read as an id.
6. Headers:
   - `X-Powered-By` is off.
   - Every response has `X-Content-Type-Options: nosniff`.
   - `Access-Control-Allow-Credentials` is only sent when the request has an allowed `Origin`; the CORS origin rules themselves are unchanged.
   - Every 401 gets `WWW-Authenticate: Bearer`, unless the handler set its own (MCP keeps its `resource_metadata` challenge).
7. Unknown task ids return 404 `TASK_NOT_FOUND` from `history`, `live-details` and `file-changes`. A task counts as known if it has a task row, a history row, live worker state or a queued job (new helper `routes/taskExistence.ts`). This check only runs when nothing else was found, so normal requests make no extra queries.

Web UI and CLI
- The web UI already shows the error message when a task fails to load, and the CLI `task` commands already handle 404.
- One CLI change: `implement` polling now keeps waiting for up to 60 s if a just-accepted task isn't known yet, instead of stopping on the first 404.

OpenAPI and changelog: I added the new 404s to the task route docs and regenerated the spec, which also picks up the templates alias. `gen:openapi:check` passes. I added an entry under Fixed in `CHANGELOG.md`.

Tests
- New: `apiErrorBoundaryServer.test.ts` runs every point against the real server wiring; it fails against the old `server.ts`. `apiErrorBoundary.test.ts` and `apiTaskNotFound.test.ts` are unit tests for the helpers and task routes.
- Updated: `agentDefinitionRoutes`, `openapiRouteCoverage` and `openapiResponseConformance` asserted the old behaviour (no templates alias; 200 with empty history for an unknown task). I changed them to expect the new behaviour.
- Unrelated failures: `extensionServerStartup` (symlink module resolution), `taskFollowupDestination` and `mcpWorkflows` (follow-up comment posting) fail here and fail the same way with the old source files swapped back in.
- `file-changes` is covered only by the unit test. In the full-server test it hangs, because core's file-changes cache read tries to reach Redis, which isn't running in this container.

The `/api/mcp` endpoint's own error responses are still `{ "error": "INVALID_REQUEST" }` with no `code`, because an existing test pins that exact shape. The MCP consent pages also still return their intentional HTML 403s.

This is an API-only change with nothing visual, so I made no previews.

* feat(ai): I fixed the Shard 2/4 failure: the new test file `packages/api/test/apiErrorBoundary.test.ts` never exited, so the runner killed it at its 180 s limit.

I fixed the Shard 2/4 failure: the new test file `packages/api/test/apiErrorBoundary.test.ts` never exited, so the runner killed it at its 180 s limit.

**Cause:** All four of its tests passed in CI. But the file imports `routes/queueRoutes.js` and `routes/githubRoutes.js`, and importing those opens core's SQLite connection. Nothing closed that connection, so the test process stayed alive until the runner killed it. The other two new API suites already close it in an `after` hook.

**Fix:** I added the same cleanup to this file: an `after` hook that imports `@propr/core` and calls `closeConnection()`. No production code changed.

**Verification**, using the same runner CI uses (`scripts/run-test-suite.mjs`):
- Old file: timed out after 180 s, the same failure as CI.
- New file: passes in 2.7 s, 4 of 4 tests.
- ESLint on the file reports no warnings.

I only ran this one file, not the full Shard 2/4. One of my runs failed to start because the container's disk was full; it passed once space freed up.

There was nothing visual in this change, so I made no previews.

PR: #3635
Comment by: @propr-dev[bot] (ID: 6937287824)
Model: Claude Opus 5.5

* feat(ai): I fixed the failing **Validate unsigned darwin-x64 package** check by giving one timing-sensitive desktop test more time. The cause wasn't this PR, which doesn't touch the desktop app; the test file is the same on `main`.

I fixed the failing **Validate unsigned darwin-x64 package** check by giving one timing-sensitive desktop test more time. The cause wasn't this PR, which doesn't touch the desktop app; the test file is the same on `main`.

**What failed:** one test out of 1,444, `nonzero exit escalates against a TERM-ignoring descendant before releasing the guard` in `apps/desktop/scripts/run-bounded-darwin-command.test.mjs`. In that test, a child process starts a second Node process and waits for it to write its process id to a file. Then it exits with code 23. If the file doesn't appear in time, it exits with 24 instead. The wait was only 1 second, and the busy macOS runner took longer than that to start the second process. The CI log shows the process ended with a non-zero exit but not with 23, which matches.

**The change** (only in that test file):
- The wait for the file is now 10 seconds, and the overall time limit for the run is now 20 seconds (was 2). The test still checks the same things: the run fails with exit code 23, and the second process, which ignores the normal stop signal, still gets killed.
- The single pass/fail check became separate assertions, so a future failure shows the actual exit code (24 means the file never appeared) instead of "validation function returned false".

**Checks:**
- With the wait set to 0, the test fails with `expected: 23, actual: 24`, the same failure as in CI.
- With the fix, all 14 tests in the file pass.

These runs were on Linux. Whether the macOS job passes will show on the next CI run.

PR: #3635
Comment by: @propr-dev[bot] (ID: 6937758726)
Model: Claude Opus 5.5

* feat(ai): I made the failing Shard 2/4 test wait properly, but I couldn't make the original failure happen here, so I haven't shown that this change prevents it.

I made the failing Shard 2/4 test wait properly, but I couldn't make the original failure happen here, so I haven't shown that this change prevents it.

**Shard 2/4.** The failing test is `AgentExtensionsOAuth.test.tsx`, a Settings UI test. This PR doesn't touch that file or the code it tests, which are the same on `main`. The test clicks Reconnect, waits for the "Finish signing in…" notice, then fires a window `focus` event and expects one more library read.

The problem is a race in the test:
- React adds the focus listener in an effect that runs just after the notice appears.
- On a busy CI runner, that effect may not have run yet when the test fires `focus`.
- With no listener, nothing happens, so the test sees 1 read instead of 2. That is the reported "expected 1 to be 2".

The test's last step, which checks that the listeners are gone, has the same race in reverse: the effect cleanup may not have run yet.

The fix is in `propr-ui/src/pages/SettingsPage/AgentExtensionsOAuth.test.tsx`. Before each of those two `focus` events, the test now runs `await act(async () => {})`, which makes React finish pending effects. What the test checks is unchanged, and the app code is untouched.

That file passes all 9 tests. The whole Settings page folder passed 297 of 297 tests in each of 3 runs, and lint with zero warnings is clean on the file.

**Finalize unsigned validation checksums.** That failure is on the older commit `a0aa067`. It only reports that the unsigned packaging job failed, which was the darwin-x64 check, and the latest commit `3f1a4fd` already fixed that. I made no change for it.

PR: #3635
Comment by: @propr-dev[bot] (ID: 6938161878)
Comment by: @propr-dev[bot] (ID: 6937760542)
Model: Claude Opus 5.5

---------

Co-authored-by: propr-dev[bot] <1316198+propr-dev[bot]@users.noreply.github.com>
@propr-dev propr-dev Bot changed the title ◔ 2/6 [Epic] 0.9.2 release fixes: API, core, tests and bot comments ◑ 3/6 [Epic] 0.9.2 release fixes: API, core, tests and bot comments Nov 17, 2026
Comment thread packages/api/apiErrorBoundary.ts Fixed
@propr-dev

propr-dev Bot commented Nov 17, 2026

Copy link
Copy Markdown
Contributor Author

CI failed: CodeQL

Please investigate and fix this CI failure.

Failure evidence

packages/api/apiErrorBoundary.ts:67 — Use of externally-controlled format string
Format string depends on a user-provided value.

@propr-dev

propr-dev Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ Applied the requested follow-up changes in commit 2dae8ed

Summary of Changes

That notice is from a watcher on a test run I had already stopped, so there is nothing new to report. No test processes are still running, and the fix and test results are the same as in my last summary.

Review digest

Risk-tiered paths

  • High risk: none
  • Normal risk (1 file)
    • packages/api/apiErrorBoundary.ts (+2/−1)
  • Low risk: none

Validation evidence

  • No repository validation commands ran.

Diff size: 1 file changed, +2/−1 lines


🤖 Implementation Details

  • Model: Claude Opus 5.5 (medium)
  • Requested By: @github-advanced-security[bot]
  • Time: 14m 21s
  • Tokens: 1,051,719 (1,051,324 in / 395 out)
  • Cost: $0.44

Undo Changes • View Task Execution


💡 ProPR Slash Commands
Command Description Example
/merge Merge target branch into this PR and resolve conflicts /merge
/review Request an AI code review /review or /review claude-sonnet
/fix Address review blockers, or blockers and suggestions with /fix all /fix, /fix all, or /fix F3 S5
/switch Change the AI model for this PR /switch claude-opus
/use Override the model for a single follow-up run /use claude-sonnet
/ultrafix Loop review→fix cycles until score goal is met /ultrafix or /ultrafix goal=8 max=10

🤖 Generated by ProPR
Processing comment ID: 4595557654✓

…topped, so there is nothing new to report. No test processes are still running, and the fix and test results are the same as in my last summary.

That notice is from a watcher on a test run I had already stopped, so there is nothing new to report. No test processes are still running, and the fix and test results are the same as in my last summary.

PR: #3630
Comment by: @github-advanced-security[bot] (ID: 4595557654)
Model: Claude Opus 5.5
@propr-dev

propr-dev Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor Author

ℹ️ Analyzed the follow-up request by @propr-dev[bot]

Analysis Summary

The CodeQL alert has already been fixed on this branch, so I made no further changes in this run.

Cause: CodeQL scanned commit 0cc96e1aa. In that commit, sendApiError in packages/api/apiErrorBoundary.ts put the request method and path inside the first argument to console.error, using a template string. Node treats that first argument as a format string, so a request path containing %s or %o could change the logged output.

Fix: The next commit on this branch, 2dae8ed78, changes it to a fixed format string with the request values passed in as separate arguments:

console.error('[api] Unhandled error for %s %s:', String(req.method), (req.url ?? '').split('?')[0], error);

That is at packages/api/apiErrorBoundary.ts:68. It is the standard fix for this CodeQL rule. The alert should close when CodeQL runs on 2dae8ed78 or later. The failed check is still showing the older commit.

Verification:

  • Typecheck: tsc on packages/api reports no errors in this file.
  • Unit tests: all 4 tests in test/apiErrorBoundary.test.ts pass. The server error now logs as [api] Unhandled error for GET /boom: ….
  • Server test not confirmed: the test that starts a full API process (test/apiErrorBoundaryServer.test.ts) failed when I ran it. I had to set PROPR_DEMO_MODE=true to get past the GitHub-auth startup check, and that mode switches off parts of the server. The process also hung at exit and was killed before it printed why it failed. That test doesn't look at log output, and the log line is the only change since 0cc96e1aa, so the fix is unlikely to be the cause. I didn't run it against 0cc96e1aa to rule that out.

Other files this branch touches still have template strings in log calls, such as routes/fileChangesRoutes.ts. CodeQL didn't flag them, and I left them alone.

There's nothing visual to preview.

No code changes were necessary based on the current state of the branch.


🤖 Analysis Details

  • Model: Claude Opus 5.5 (medium)
  • Time: 11m 43s
  • Tokens: 839,949 (839,763 in / 186 out)
  • Cost: $0.37

View Task Execution


💡 ProPR Slash Commands
Command Description Example
/merge Merge target branch into this PR and resolve conflicts /merge
/review Request an AI code review /review or /review claude-sonnet
/fix Address review blockers, or blockers and suggestions with /fix all /fix, /fix all, or /fix F3 S5
/switch Change the AI model for this PR /switch claude-opus
/use Override the model for a single follow-up run /use claude-sonnet
/ultrafix Loop review→fix cycles until score goal is met /ultrafix or /ultrafix goal=8 max=10

🤖 Generated by ProPR
Processing comment ID: 6939058555✓

…the instance does not monitor; repository filters are case-sensitive; goals expose host paths (#3632)

* 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_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.

* feat(ai): I fixed the CI failure in `packages/api/test/planRevisions.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

* feat(ai): 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.

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

* feat(ai): I fixed both findings, and the new tests pass.

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

* feat(ai): 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.

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

* feat(ai): 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.

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

---------

Co-authored-by: propr-dev[bot] <1316198+propr-dev[bot]@users.noreply.github.com>
@propr-dev propr-dev Bot changed the title ◑ 3/6 [Epic] 0.9.2 release fixes: API, core, tests and bot comments ◑ 4/6 [Epic] 0.9.2 release fixes: API, core, tests and bot comments Nov 17, 2026
@propr-dev propr-dev Bot changed the title ◑ 4/6 [Epic] 0.9.2 release fixes: API, core, tests and bot comments ◑ 4/7 [Epic] 0.9.2 release fixes: API, core, tests and bot comments Nov 17, 2026
Comment thread packages/api/repositoryScope.ts Fixed
@propr-dev

propr-dev Bot commented Nov 17, 2026

Copy link
Copy Markdown
Contributor Author

CI failed: CodeQL

Please investigate and fix this CI failure.

Failure evidence

packages/api/repositoryScope.ts:198 — Use of externally-controlled format string
Format string depends on a user-provided value.
Format string depends on a user-provided value.

@propr-dev

propr-dev Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ Applied the requested follow-up changes in commit 9039b96

Summary of Changes

I fixed the CodeQL "externally-controlled format string" alert in packages/api/repositoryScope.ts:199.

Cause: when resolving a repository fails unexpectedly, repositoryScopeOrRespond logs the error. That log line built console.error's first argument from a template literal containing options.context ?? req.path. console.error treats its first argument as a format string, and req.path comes from the caller. A path containing %s, %o and so on would be read as format directives and could garble the log entry.

Fix: the format string is now a constant, and the route name is passed as an argument:

console.error('Error resolving the repository of %s:', options.context ?? req.path, error);

The log text is the same as before, and no test checks the old message.

Checks:

  • eslint --max-warnings 0 passes on the file.
  • repositoryScope.test.ts and repositoryScopeRoutes.test.ts (run with PROPR_DEMO_MODE=true) logged 14 passes and no failures before the runner hit its timeout. Tests in this package are known to hang at exit after passing, so the timeout doesn't mean a test failed.

This is a logging-only change, so I didn't make any preview images.

Review digest

Risk-tiered paths

  • High risk: none
  • Normal risk (1 file)
    • packages/api/repositoryScope.ts (+2/−1)
  • Low risk: none

Validation evidence

  • No repository validation commands ran.

Diff size: 1 file changed, +2/−1 lines


🤖 Implementation Details

  • Model: Claude Opus 5.5 (medium)
  • Requested By: @github-advanced-security[bot]
  • Time: 10m 40s
  • Tokens: 911,355 (908,018 in / 3,337 out)
  • Cost: $0.47
  • Subscription usage: Weekly +1%

Undo Changes • View Task Execution


💡 ProPR Slash Commands
Command Description Example
/merge Merge target branch into this PR and resolve conflicts /merge
/review Request an AI code review /review or /review claude-sonnet
/fix Address review blockers, or blockers and suggestions with /fix all /fix, /fix all, or /fix F3 S5
/switch Change the AI model for this PR /switch claude-opus
/use Override the model for a single follow-up run /use claude-sonnet
/ultrafix Loop review→fix cycles until score goal is met /ultrafix or /ultrafix goal=8 max=10

🤖 Generated by ProPR
Processing comment ID: 4596444789✓

…ert in `packages/api/repositoryScope.ts:199`.

I fixed the CodeQL "externally-controlled format string" alert in `packages/api/repositoryScope.ts:199`.

**Cause:** when resolving a repository fails unexpectedly, `repositoryScopeOrRespond` logs the error. That log line built `console.error`'s first argument from a template literal containing `options.context ?? req.path`. `console.error` treats its first argument as a format string, and `req.path` comes from the caller. A path containing `%s`, `%o` and so on would be read as format directives and could garble the log entry.

**Fix:** the format string is now a constant, and the route name is passed as an argument:

```ts
console.error('Error resolving the repository of %s:', options.context ?? req.path, error);
```

The log text is the same as before, and no test checks the old message.

**Checks:**
- `eslint --max-warnings 0` passes on the file.
- `repositoryScope.test.ts` and `repositoryScopeRoutes.test.ts` (run with `PROPR_DEMO_MODE=true`) logged 14 passes and no failures before the runner hit its timeout. Tests in this package are known to hang at exit after passing, so the timeout doesn't mean a test failed.

This is a logging-only change, so I didn't make any preview images.

PR: #3630
Comment by: @github-advanced-security[bot] (ID: 4596444789)
Model: Claude Opus 5.5
@propr-dev

propr-dev Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor Author

ℹ️ Analyzed the follow-up request by @propr-dev[bot]

Analysis Summary

I made no new changes, because the branch head already contains the fix.

  • Which commit failed: the CodeQL run is on a7ef3d570. In that version, line 198 of packages/api/repositoryScope.ts passed `Error resolving the repository of ${options.context ?? req.path}:` as the first argument to console.error. console.error treats its first argument as a format string, and req.path comes from the request, which is what the alert reports. Both review comments (alerts 242 and 243) point at this same line.
  • What fixed it: the next commit, 9039b96de, which is the current HEAD, changed the line to use a fixed format string and pass the route name as an argument:
    console.error('Error resolving the repository of %s:', options.context ?? req.path, error);
    The log text stays the same.
  • Other cases: I searched every line the branch adds compared with main for any console.* call whose first argument is a template literal with ${…} in it. There are none, so no other spot should raise the same alert.

CodeQL should pass when it runs on 9039b96de or later, and the two alerts should close then. I couldn't confirm their status myself because the code-scanning API returns 403 to this integration. If either alert stays open after that run, it can be dismissed as fixed.

No code changes were necessary based on the current state of the branch.


🤖 Analysis Details

  • Model: Claude Opus 5.5 (medium)
  • Time: 4m 39s
  • Tokens: 230,655 (229,025 in / 1,630 out)
  • Cost: $0.25

View Task Execution


💡 ProPR Slash Commands
Command Description Example
/merge Merge target branch into this PR and resolve conflicts /merge
/review Request an AI code review /review or /review claude-sonnet
/fix Address review blockers, or blockers and suggestions with /fix all /fix, /fix all, or /fix F3 S5
/switch Change the AI model for this PR /switch claude-opus
/use Override the model for a single follow-up run /use claude-sonnet
/ultrafix Loop review→fix cycles until score goal is met /ultrafix or /ultrafix goal=8 max=10

🤖 Generated by ProPR
Processing comment ID: 6941399955✓

…cal/bin/node; an older image on a newer database dies with "migration directory is corrupt" (#3652)

1. Nightly bridge test fails on hosts without `/usr/local/bin/node`
- In `packages/core/test/extensionPackageServers.test.ts`, `bridgeSession()` now swaps the bridge's `executable` from `/usr/local/bin/node` to `process.execPath`, alongside the `args[0]` rewrite it already did.
- The suite passes (7/7), but only on this container, which does have `/usr/local/bin/node`. I didn't run it on a host without it, so the case the nightly hits isn't directly reproduced.
- The other tests that spawn the bridge don't make the same assumption. `extensionStdioBridge`, `extensionProfiles` and `agentToolPolicyRuntime` already use `/usr/bin/env`, `process.execPath`, or replace the path.

2. Older image on a newer database
- `packages/core/src/db/migrationGate.ts` has a new check that runs before `migrate.latest()`. It lists the names in `knex_migrations` that this build's migration folder doesn't contain. A blank database with no migrations table passes.
- If there are any, `runMigrations()` in `connection.ts` prints the exact message from the issue (`This database was migrated by a newer ProPR version (N newer migrations, latest: <name>). …`) to stderr, with no stack trace, and exits with code 1. stderr is where the launcher's migration phase reads its one-line failure reason from.
- Tests:
  - Unit tests in `test/databaseMigrationGate.test.ts` cover the blank, current, behind and newer cases.
  - A test in `test/sqliteSerializedStartup.test.ts` runs the real migrate command on a database with two extra migration rows. It checks for exit code 1, the exact message, no "corrupt" text and no stack lines.
  - With the check commented out, that test fails on knex's "migration directory is corrupt" error.

3. Demo-mode 403s in the browser console
- I fixed this in the UI, not by opening the routes in the API allow-list, because these endpoints probe Agent Tank, registries and stored credentials. It covers the eight endpoints in the issue plus `/api/instance/extensions/v1/history`.
- A new file, `propr-ui/src/api/demoModeRequestGate.ts`, holds the list of read endpoints the demo user may not make. When demo mode is on, `apiFetch` answers those GET requests itself with the same 403 body the API sends, without a network request. Pages behave as before, and nothing shows in the console.
- `DemoModeProvider` turns the gate on before the pages mount. If you close another route to the demo user later, it needs adding to this list as well.
- To keep `apiClient.ts` under the 400-line lint limit, I folded one retry branch in `apiFetch` into a single line; it does the same thing.
- Test: the new Playwright test `e2e/demo-mode-admin-reads.pw.ts` uses a mocked API in demo mode and opens Dashboard, Analytics, Coding agents, LLM Log, Settings and New automation. It checks that none of these endpoints is requested and that no 4xx errors appear in the console. It passes 6/6. With the gate turned off, all six fail and list exactly the endpoints from the issue.

Typecheck and lint are clean for `packages/core` and `propr-ui`, and the `propr-ui` API and context unit tests pass (164). I didn't create preview images, since the only visible difference is the missing console errors.

Co-authored-by: propr-dev[bot] <1316198+propr-dev[bot]@users.noreply.github.com>
@propr-dev propr-dev Bot changed the title ◑ 4/7 [Epic] 0.9.2 release fixes: API, core, tests and bot comments ◑ 5/7 [Epic] 0.9.2 release fixes: API, core, tests and bot comments Nov 17, 2026
@propr-dev propr-dev Bot changed the title ◑ 5/7 [Epic] 0.9.2 release fixes: API, core, tests and bot comments ⚠️ 5/7 [Epic] 0.9.2 release fixes: API, core, tests and bot comments Nov 17, 2026
@propr-dev propr-dev Bot changed the title ⚠️ 5/7 [Epic] 0.9.2 release fixes: API, core, tests and bot comments ◑ 5/7 [Epic] 0.9.2 release fixes: API, core, tests and bot comments Nov 17, 2026
@propr-dev propr-dev Bot changed the title ◑ 5/7 [Epic] 0.9.2 release fixes: API, core, tests and bot comments ⚠️ 5/7 [Epic] 0.9.2 release fixes: API, core, tests and bot comments Nov 17, 2026
@propr-dev propr-dev Bot changed the title ⚠️ 5/7 [Epic] 0.9.2 release fixes: API, core, tests and bot comments ◑ 5/8 [Epic] 0.9.2 release fixes: API, core, tests and bot comments Nov 17, 2026
@propr-dev propr-dev Bot changed the title ◑ 5/8 [Epic] 0.9.2 release fixes: API, core, tests and bot comments ◑ 5/9 [Epic] 0.9.2 release fixes: API, core, tests and bot comments Nov 17, 2026
…, 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>
@propr-dev propr-dev Bot changed the title ◑ 5/9 [Epic] 0.9.2 release fixes: API, core, tests and bot comments ◑ 6/9 [Epic] 0.9.2 release fixes: API, core, tests and bot comments Nov 17, 2026
@propr-dev

propr-dev Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ AI Code Review Complete requested by @propr-ultrafix

Posted 1 review:

View Task Details

@propr-dev

propr-dev Bot commented Nov 17, 2026

Copy link
Copy Markdown
Contributor Author

CI failed: Validate unsigned linux-arm64 package

Please investigate and fix this CI failure.

  • Check: Validate unsigned linux-arm64 package
  • Result: failure
  • Commit: 468922f784a6 (468922f784a63482330205742b3cbf3b898b9cfa)
  • Details: View CI failure

Failure evidence

.github:187
Process completed with exit code 1.

@propr-dev

propr-dev Bot commented Nov 17, 2026

Copy link
Copy Markdown
Contributor Author

CI failed: Validate unsigned darwin-x64 package

Please investigate and fix this CI failure.

  • Check: Validate unsigned darwin-x64 package
  • Result: failure
  • Commit: 468922f784a6 (468922f784a63482330205742b3cbf3b898b9cfa)
  • Details: View CI failure

Failure evidence

.github:387
Process completed with exit code 1.

@propr-dev

propr-dev Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ Applied the requested follow-up changes in commit 513f80a

Summary of Changes

I fixed the failing check. No code on this branch caused it: a new picomatch advisory, GHSA-fc5q-39xc-vjpf, was published with no fixed release. Locally, both audit gates the job runs (npm run audit:runtime and npm run desktop:audit:packaging) now pass, and so do the related test suites. CI hasn't run on the change yet.

Cause. The advisory covers every picomatch up to 4.0.7, which is the latest release. Patterns like +(*) or +(*a) make picomatch build a regex that takes exponentially long to fail. I reproduced it: about 35 seconds on a 29-character string, on both 2.3.2 and 4.0.7. main has the same problem, so other open branches will fail the same way. Both copies in our tree are affected: 4.0.7 (used by vite, vitest, tinyglobby) and 2.3.2 (used by micromatch, anymatch and readdirp, which fast-glob, Repomix and chokidar use).

Fix. I followed the same approach the repo already uses for braces: I didn't add an audit exception. Instead both picomatch copies now install from patched versions stored in the repo:

  • The patch: a small check in lib/parse.js treats any +(…)/*(…) pattern containing a bare * or + as plain text, using picomatch's existing handling for patterns it already considers risky. All the attack patterns now finish in under 2 ms.
  • vendor/picomatch: 4.0.7 plus the patch, used by everything that needs picomatch 4.
  • vendor/picomatch-v2: 2.3.2 plus the same patch, used by anymatch, micromatch and readdirp (overridden in package.json). I kept these on the 2.x code because the 4.x line changed path handling that micromatch and fast-glob rely on.
  • Version numbers: both versions must sort above 4.0.7 or the audit still flags them, so the 2.x one is named 4.0.8-v2.3.2-extglobguard.1.
  • Lockfile: npm 10 and npm 11 both kept collapsing the 2.x consumers onto the 4.x copy. I wrote those three lockfile entries by hand. They stay unchanged through npm install and lockfile-only installs on both npm versions, and a clean npm ci installs the right copy for each package.

Other changes:

  • Signed-RPM acceptance: its allowlist and Dockerfile now include the two new tarballs.
  • New test: test/vendoredPicomatch.test.mjs checks that the source, tarball, lockfile and installed copies match, and that normal matching still works.
  • Docs and notices: README provenance notes in each vendored folder, a section in docs/dependency-audit-exceptions.md, a CHANGELOG Security entry, and a regenerated THIRD_PARTY_LICENSES.md (new picomatch row, and the date moves to today).

Behaviour change and remaining risk. I ran picomatch's own test suite against both patched copies. Four assertions now fail, and each one checks that a vulnerable pattern (+(*)c, *(a*|b), */*(W*, *)*) still matches. Those patterns now match only their literal text, and no glob in this repo uses one. Nested repeats like +(a*(a)) are still slow. I left them alone because picomatch's own tests require the same shape (*(f*(o))) to keep working, and upstream tracks that case separately (issue #175).

Once picomatch publishes fixed releases, the vendored copies can be removed; the vendored READMEs list the steps.

Review digest

Risk-tiered paths

  • High risk (4 files)
    • package-lock.json (+13/−25): lockfile
    • package.json (+11/−0): dependency manifest
    • vendor/picomatch-v2/package.json (added, +20/−0): dependency manifest
    • vendor/picomatch/package.json (added, +22/−0): dependency manifest
  • Normal risk (19 files)
    • apps/desktop/scripts/signed-rpm-acceptance-context.mjs (+2/−1)
    • apps/desktop/scripts/signed-rpm-acceptance.Dockerfile (+3/−1)
    • vendor/picomatch-4.0.8-extglobguard.1.tgz (added, +0/−0)
    • vendor/picomatch-4.0.8-v2.3.2-extglobguard.1.tgz (added, +0/−0)
    • vendor/picomatch-v2/LICENSE (added, +21/−0)
    • vendor/picomatch-v2/index.js (added, +3/−0)
    • vendor/picomatch-v2/lib/constants.js (added, +184/−0)
    • vendor/picomatch-v2/lib/parse.js (added, +1,458/−0)
    • vendor/picomatch-v2/lib/picomatch.js (added, +342/−0)
    • vendor/picomatch-v2/lib/scan.js (added, +391/−0)
    • vendor/picomatch-v2/lib/utils.js (added, +64/−0)
    • vendor/picomatch/LICENSE (added, +21/−0)
    • vendor/picomatch/index.js (added, +17/−0)
    • vendor/picomatch/lib/constants.js (added, +184/−0)
    • vendor/picomatch/lib/parse.js (added, +1,491/−0)
    • vendor/picomatch/lib/picomatch.js (added, +361/−0)
    • vendor/picomatch/lib/scan.js (added, +403/−0)
    • vendor/picomatch/lib/utils.js (added, +72/−0)
    • vendor/picomatch/posix.js (added, +3/−0)
  • Low risk (7 files)
    • CHANGELOG.md (+13/−0)
    • THIRD_PARTY_LICENSES.md (+3/−2)
    • apps/desktop/scripts/signed-rpm-acceptance-context.test.mjs (+6/−3)
    • docs/dependency-audit-exceptions.md (+25/−0)
    • test/vendoredPicomatch.test.mjs (added, +150/−0)
    • vendor/picomatch-v2/README.md (added, +124/−0)
    • vendor/picomatch/README.md (added, +111/−0)

New dependencies (1): picomatch in package.json

Validation evidence

  • No repository validation commands ran.

Diff size: 30 files changed, +5,518/−32 lines


🤖 Implementation Details

  • Model: Claude Opus 5.5 (medium)
  • Requested By: @propr-dev[bot]
  • Time: 18m 36s
  • Tokens: 11,279,781 (11,223,253 in / 56,528 out)
  • Cost: $4.20

Undo Changes • View Task Execution


💡 ProPR Slash Commands
Command Description Example
/merge Merge target branch into this PR and resolve conflicts /merge
/review Request an AI code review /review or /review claude-sonnet
/fix Address review blockers, or blockers and suggestions with /fix all /fix, /fix all, or /fix F3 S5
/switch Change the AI model for this PR /switch claude-opus
/use Override the model for a single follow-up run /use claude-sonnet
/ultrafix Loop review→fix cycles until score goal is met /ultrafix or /ultrafix goal=8 max=10

🤖 Generated by ProPR
Processing comment ID: 6955352684✓

integry commented Nov 17, 2026

Copy link
Copy Markdown
Owner

One test fails on this epic after the merge from main (it passes on main and passed on this branch before the merge):

packages/api/test/costExport.test.ts → "MCP result redaction keeps the token columns of get_cost_breakdown, matching GET /api/stats/cost" (assert.deepEqual(data.rows, api.rows) gets undefined for api.rows).

Cause: that test came from main and builds the route with createCostExportRoutes({ db, now: () => NOW }). On this branch the cost route resolves the repository filter through repositoryScope, whose default resolver looks the repository up in the configured repositories, so the request for acme/alpha is answered with an error instead of rows. The other tests in the file already pass repositoryScope: unscopedRepositoryResolver.

Fix: pass repositoryScope: unscopedRepositoryResolver in that test, and also assert the response status is 200 there so a refused request cannot look like an empty comparison again. Then search the test suite for any other call of a route factory that gained a repositoryScope option on this branch but is constructed without it in a test that came from main, and fix those the same way. Test-only change; do not alter the route's behaviour.

…: a new picomatch advisory, GHSA-fc5q-39xc-vjpf, was published with no fixed release. Locally, both audit gates the job runs (`npm run audit:runtime` and `npm run desktop:audit:packaging`) now pass, and so do the related test suites. CI hasn't run on the change yet.

I fixed the failing check. No code on this branch caused it: a new picomatch advisory, GHSA-fc5q-39xc-vjpf, was published with no fixed release. Locally, both audit gates the job runs (`npm run audit:runtime` and `npm run desktop:audit:packaging`) now pass, and so do the related test suites. CI hasn't run on the change yet.

**Cause.** The advisory covers every `picomatch` up to 4.0.7, which is the latest release. Patterns like `+(*)` or `+(*a)` make picomatch build a regex that takes exponentially long to fail. I reproduced it: about 35 seconds on a 29-character string, on both 2.3.2 and 4.0.7. `main` has the same problem, so other open branches will fail the same way. Both copies in our tree are affected: 4.0.7 (used by `vite`, `vitest`, `tinyglobby`) and 2.3.2 (used by `micromatch`, `anymatch` and `readdirp`, which `fast-glob`, Repomix and `chokidar` use).

**Fix.** I followed the same approach the repo already uses for `braces`: I didn't add an audit exception. Instead both picomatch copies now install from patched versions stored in the repo:
- **The patch:** a small check in `lib/parse.js` treats any `+(…)`/`*(…)` pattern containing a bare `*` or `+` as plain text, using picomatch's existing handling for patterns it already considers risky. All the attack patterns now finish in under 2 ms.
- **`vendor/picomatch`:** 4.0.7 plus the patch, used by everything that needs picomatch 4.
- **`vendor/picomatch-v2`:** 2.3.2 plus the same patch, used by `anymatch`, `micromatch` and `readdirp` (overridden in `package.json`). I kept these on the 2.x code because the 4.x line changed path handling that `micromatch` and `fast-glob` rely on.
- **Version numbers:** both versions must sort above 4.0.7 or the audit still flags them, so the 2.x one is named `4.0.8-v2.3.2-extglobguard.1`.
- **Lockfile:** npm 10 and npm 11 both kept collapsing the 2.x consumers onto the 4.x copy. I wrote those three lockfile entries by hand. They stay unchanged through `npm install` and lockfile-only installs on both npm versions, and a clean `npm ci` installs the right copy for each package.

Other changes:
- **Signed-RPM acceptance:** its allowlist and Dockerfile now include the two new tarballs.
- **New test:** `test/vendoredPicomatch.test.mjs` checks that the source, tarball, lockfile and installed copies match, and that normal matching still works.
- **Docs and notices:** README provenance notes in each vendored folder, a section in `docs/dependency-audit-exceptions.md`, a CHANGELOG Security entry, and a regenerated `THIRD_PARTY_LICENSES.md` (new picomatch row, and the date moves to today).

**Behaviour change and remaining risk.** I ran picomatch's own test suite against both patched copies. Four assertions now fail, and each one checks that a vulnerable pattern (`+(*)c`, `*(a*|b)`, `*/*(W*, *)*`) still matches. Those patterns now match only their literal text, and no glob in this repo uses one. Nested repeats like `+(a*(a))` are still slow. I left them alone because picomatch's own tests require the same shape (`*(f*(o))`) to keep working, and upstream tracks that case separately (issue #175).

Once picomatch publishes fixed releases, the vendored copies can be removed; the vendored READMEs list the steps.

PR: #3630
Comment by: @propr-dev[bot] (ID: 6955352684)
Model: Claude Opus 5.5
@propr-dev

propr-dev Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ Applied the requested follow-up changes in commit aa2a3e8

Processed 2 comments:

  • Comment 1 by @propr-dev[bot] (ID: 6955359013✓)
  • Comment 2 by @integry (ID: 6955630093✓)

Summary of Changes

I fixed the failing cost test. The darwin-x64 failure was already fixed by the last commit on the branch, but CI hasn't run on that commit yet.

darwin-x64 package check. The job failed at the dependency audit step ("Audit committed dependency resolution"). The cause was the new picomatch advisory, GHSA-fc5q-39xc-vjpf, not code on this branch. The latest commit (513f80a) switched both picomatch copies to patched versions stored in the repo. On the current tree, npm run desktop:audit:packaging (the audit that failed) now prints "packaging dependency audit passed." No further change was needed.

packages/api/test/costExport.test.ts. In "MCP result redaction keeps the token columns of get_cost_breakdown…":

  • The route is now built with repositoryScope: unscopedRepositoryResolver, like the other tests in the file.
  • The test now asserts the response status is 200 before comparing rows, and shows the response body if it isn't. A refused request now fails with a clear message instead of comparing against undefined.

All 12 tests in the file pass. The route itself is unchanged.

Search for other affected tests. Nine route factories gained a repositoryScope option on this branch: dashboard, cost, goals, stats, tasks, planner, repository media, repo todos and review scores. I searched every test and fixture file for calls that don't pass it and found 8, in 7 files. All 7 files pass as they are, and none needed the same change:

  • Goal tests (goalRoutes, goalCliRoutes, goalContinueRoute, demoGoalVisibility, mcpGoalAttention, mcpGoalWait): the goals route only uses the repository resolver when the list request has a repository filter, and none of these tests send one.
  • demoMode.test.ts, planner routes: these calls send no repository filter either.
  • demoMode.test.ts, repo todo routes: this one does send integry/propr through the default resolver, but this branch changed the test on purpose to do that. It adds integry/propr to the configured repositories first and checks that demo mode uses the real resolver. Adding the unscoped resolver there would stop it testing that.

Review digest

Risk-tiered paths

  • High risk: none
  • Normal risk: none
  • Low risk (1 file)
    • packages/api/test/costExport.test.ts (+2/−1)

Validation evidence

  • No repository validation commands ran.

Diff size: 1 file changed, +2/−1 lines


🤖 Implementation Details

  • Model: Claude Opus 5.5 (medium)
  • Requested By: @propr-dev[bot], @integry
  • Time: 5m 24s
  • Tokens: 917,885 (912,468 in / 5,417 out)
  • Cost: $0.54

Undo Changes • View Task Execution


💡 ProPR Slash Commands
Command Description Example
/merge Merge target branch into this PR and resolve conflicts /merge
/review Request an AI code review /review or /review claude-sonnet
/fix Address review blockers, or blockers and suggestions with /fix all /fix, /fix all, or /fix F3 S5
/switch Change the AI model for this PR /switch claude-opus
/use Override the model for a single follow-up run /use claude-sonnet
/ultrafix Loop review→fix cycles until score goal is met /ultrafix or /ultrafix goal=8 max=10

🤖 Generated by ProPR
Processing comment IDs: 6955359013✓, 6955630093✓

…lready fixed by the last commit on the branch, but CI hasn't run on that commit yet.

I fixed the failing cost test. The darwin-x64 failure was already fixed by the last commit on the branch, but CI hasn't run on that commit yet.

**darwin-x64 package check.** The job failed at the dependency audit step ("Audit committed dependency resolution"). The cause was the new picomatch advisory, GHSA-fc5q-39xc-vjpf, not code on this branch. The latest commit (513f80a) switched both picomatch copies to patched versions stored in the repo. On the current tree, `npm run desktop:audit:packaging` (the audit that failed) now prints "packaging dependency audit passed." No further change was needed.

**`packages/api/test/costExport.test.ts`.** In "MCP result redaction keeps the token columns of get_cost_breakdown…":
- The route is now built with `repositoryScope: unscopedRepositoryResolver`, like the other tests in the file.
- The test now asserts the response status is 200 before comparing rows, and shows the response body if it isn't. A refused request now fails with a clear message instead of comparing against `undefined`.

All 12 tests in the file pass. The route itself is unchanged.

**Search for other affected tests.** Nine route factories gained a `repositoryScope` option on this branch: dashboard, cost, goals, stats, tasks, planner, repository media, repo todos and review scores. I searched every test and fixture file for calls that don't pass it and found 8, in 7 files. All 7 files pass as they are, and none needed the same change:
- **Goal tests** (`goalRoutes`, `goalCliRoutes`, `goalContinueRoute`, `demoGoalVisibility`, `mcpGoalAttention`, `mcpGoalWait`): the goals route only uses the repository resolver when the list request has a `repository` filter, and none of these tests send one.
- **`demoMode.test.ts`, planner routes:** these calls send no repository filter either.
- **`demoMode.test.ts`, repo todo routes:** this one does send `integry/propr` through the default resolver, but this branch changed the test on purpose to do that. It adds `integry/propr` to the configured repositories first and checks that demo mode uses the real resolver. Adding the unscoped resolver there would stop it testing that.

PR: #3630
Comment by: @propr-dev[bot] (ID: 6955359013)
Comment by: @integry (ID: 6955630093)
Model: Claude Opus 5.5
Comment thread vendor/picomatch-v2/lib/utils.js Fixed
Comment thread vendor/picomatch/lib/utils.js Fixed
@propr-dev

propr-dev Bot commented Nov 17, 2026

Copy link
Copy Markdown
Contributor Author

CI failed: CodeQL

Please investigate and fix this CI failure.

Failure evidence

vendor/picomatch-v2/lib/utils.js:19-21 — Polynomial regular expression used on uncontrolled data
This regular expression that depends on library input may run slow on strings starting with '[' and with many repetitions of '['.

vendor/picomatch/lib/utils.js:31-33 — Polynomial regular expression used on uncontrolled data
This regular expression that depends on library input may run slow on strings starting with '[' and with many repetitions of '['.

@propr-dev

propr-dev Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ Applied the requested follow-up changes in commit 688bc5f

Processed 2 comments:

  • Comment 1 by @github-advanced-security[bot] (ID: 4603531940✓)
  • Comment 2 by @github-advanced-security[bot] (ID: 4603532037✓)

Summary of Changes

I fixed both CodeQL alerts (#246 and #247) in the two vendored picomatch builds. The flagged regex really was slow: on a string of 65,000 [ characters, removeBackslashes took about 1.6 s. It now takes about 1 ms. CI hasn't run on the change yet.

Cause. removeBackslashes in lib/utils.js used upstream's REGEX_REMOVE_BACKSLASH (/(?:\[.*?[^\\]\]|\\(?=.))/g). From every [ with no closing ], that regex rescans to the end of the line, so the time grows with the square of the input length.

Fix. In both vendor/picomatch/lib/utils.js and vendor/picomatch-v2/lib/utils.js, removeBackslashes is now a single pass over the string. It returns exactly what the old regex returned:

  • It returns the input unchanged when there is no backslash, since only backslashes are ever removed.
  • A text in brackets is kept as is under the same rule the regex used.
  • A backslash followed by any character other than a line break is removed.

lib/constants.js is unchanged, so REGEX_REMOVE_BACKSLASH is still exported as part of constants. utils.js just no longer imports it.

Same output as before. I compared the new function with the old regex on every string up to six characters built from [, ], \, a, * and the four line terminators, plus 300,000 random strings. There were no differences in either build.

Other changes:

  • Tests: test/vendoredPicomatch.test.mjs has a new check for each build. It compares the function with the upstream regex on every short string, requires the 65,000-character inputs to finish in under 200 ms, and runs a few scan(..., { unescape: true }) cases.
  • Tarballs and lockfile: I repacked both tarballs and updated the four lockfile integrity entries. Only those integrity lines changed in package-lock.json. The version stays 4.0.8-extglobguard.1, so npm install didn't refresh the locally installed copies; I removed them and reinstalled.
  • Docs: both READMEs now say lib/utils.js differs from upstream and why. docs/dependency-audit-exceptions.md mentions it too.

Checks run:

  • test/vendoredPicomatch.test.mjs: 11 of 11 pass, including the byte-identity, lockfile-integrity and installed-copy checks.
  • apps/desktop/scripts/signed-rpm-acceptance-context.test.mjs: 5 of 5 pass. It checks the tarballs against the lockfile integrity.
  • npm run audit:runtime and npm run desktop:audit:packaging both pass.

There's nothing visual in this change, so there are no previews.

Review digest

Risk-tiered paths

  • High risk (1 file)
    • package-lock.json (+4/−4): lockfile
  • Normal risk (4 files)
    • vendor/picomatch-4.0.8-extglobguard.1.tgz (+0/−0)
    • vendor/picomatch-4.0.8-v2.3.2-extglobguard.1.tgz (+0/−0)
    • vendor/picomatch-v2/lib/utils.js (+46/−4)
    • vendor/picomatch/lib/utils.js (+46/−4)
  • Low risk (4 files)
    • docs/dependency-audit-exceptions.md (+3/−1)
    • test/vendoredPicomatch.test.mjs (+29/−0)
    • vendor/picomatch-v2/README.md (+18/−3)
    • vendor/picomatch/README.md (+18/−3)

Validation evidence

  • No repository validation commands ran.

Diff size: 9 files changed, +164/−19 lines


🤖 Implementation Details

  • Model: Claude Opus 5.5 (medium)
  • Requested By: @github-advanced-security[bot]
  • Time: 5m 25s
  • Tokens: 1,492,932 (1,480,131 in / 12,801 out)
  • Cost: $0.86

Undo Changes • View Task Execution


💡 ProPR Slash Commands
Command Description Example
/merge Merge target branch into this PR and resolve conflicts /merge
/review Request an AI code review /review or /review claude-sonnet
/fix Address review blockers, or blockers and suggestions with /fix all /fix, /fix all, or /fix F3 S5
/switch Change the AI model for this PR /switch claude-opus
/use Override the model for a single follow-up run /use claude-sonnet
/ultrafix Loop review→fix cycles until score goal is met /ultrafix or /ultrafix goal=8 max=10

🤖 Generated by ProPR
Processing comment IDs: 4603531940✓, 4603532037✓

…red picomatch builds. The flagged regex really was slow: on a string of 65,000 `[` characters, `removeBackslashes` took about 1.6 s. It now takes about 1 ms. CI hasn't run on the change yet.

I fixed both CodeQL alerts (#246 and #247) in the two vendored picomatch builds. The flagged regex really was slow: on a string of 65,000 `[` characters, `removeBackslashes` took about 1.6 s. It now takes about 1 ms. CI hasn't run on the change yet.

**Cause.** `removeBackslashes` in `lib/utils.js` used upstream's `REGEX_REMOVE_BACKSLASH` (`/(?:\[.*?[^\\]\]|\\(?=.))/g`). From every `[` with no closing `]`, that regex rescans to the end of the line, so the time grows with the square of the input length.

**Fix.** In both `vendor/picomatch/lib/utils.js` and `vendor/picomatch-v2/lib/utils.js`, `removeBackslashes` is now a single pass over the string. It returns exactly what the old regex returned:
- It returns the input unchanged when there is no backslash, since only backslashes are ever removed.
- A text in brackets is kept as is under the same rule the regex used.
- A backslash followed by any character other than a line break is removed.

`lib/constants.js` is unchanged, so `REGEX_REMOVE_BACKSLASH` is still exported as part of `constants`. `utils.js` just no longer imports it.

**Same output as before.** I compared the new function with the old regex on every string up to six characters built from `[`, `]`, `\`, `a`, `*` and the four line terminators, plus 300,000 random strings. There were no differences in either build.

**Other changes:**
- **Tests:** `test/vendoredPicomatch.test.mjs` has a new check for each build. It compares the function with the upstream regex on every short string, requires the 65,000-character inputs to finish in under 200 ms, and runs a few `scan(..., { unescape: true })` cases.
- **Tarballs and lockfile:** I repacked both tarballs and updated the four lockfile integrity entries. Only those integrity lines changed in `package-lock.json`. The version stays `4.0.8-extglobguard.1`, so `npm install` didn't refresh the locally installed copies; I removed them and reinstalled.
- **Docs:** both READMEs now say `lib/utils.js` differs from upstream and why. `docs/dependency-audit-exceptions.md` mentions it too.

**Checks run:**
- `test/vendoredPicomatch.test.mjs`: 11 of 11 pass, including the byte-identity, lockfile-integrity and installed-copy checks.
- `apps/desktop/scripts/signed-rpm-acceptance-context.test.mjs`: 5 of 5 pass. It checks the tarballs against the lockfile integrity.
- `npm run audit:runtime` and `npm run desktop:audit:packaging` both pass.

There's nothing visual in this change, so there are no previews.

PR: #3630
Comment by: @github-advanced-security[bot] (ID: 4603531940)
Comment by: @github-advanced-security[bot] (ID: 4603532037)
Model: Claude Opus 5.5
@propr-dev

propr-dev Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor Author

ℹ️ Analyzed the follow-up request by @propr-dev[bot]

Analysis Summary

I made no changes, because the branch already contains the fix for these two CodeQL alerts.

The failed run was on aa2a3e8. The commit after it, 688bc5f (now the PR head), fixed alerts #246 and #247. In both vendor/picomatch/lib/utils.js and vendor/picomatch-v2/lib/utils.js, removeBackslashes no longer uses the slow regex REGEX_REMOVE_BACKSLASH. It is now a single pass over the string, and nothing in the vendored code runs that regex any more.

What I checked on the current head:

  • Speed: a string of 65,000 [ characters plus a backslash now takes about 5 ms in both builds. The old regex took over a second on that kind of input.
  • Same output: on 200,000 random strings made of [, ], \, a and newlines, the new function gave exactly the same result as the old regex in both builds.

CodeQL has not finished a run on 688bc5f yet. Its "Analyze JavaScript and TypeScript" job ended as cancelled, along with the other checks on that commit, so it was stopped from outside rather than failing. I couldn't confirm the alerts are closed, because reading code-scanning alerts returns 403 with this token. The next CodeQL run on 688bc5f (a rerun or a new push) should close #246 and #247.

The change is not visual, so there are no previews.

No code changes were necessary based on the current state of the branch.


🤖 Analysis Details

  • Model: Claude Opus 5.5 (medium)
  • Time: 3m 8s
  • Tokens: 289,407 (287,491 in / 1,916 out)
  • Cost: $0.28

View Task Execution


💡 ProPR Slash Commands
Command Description Example
/merge Merge target branch into this PR and resolve conflicts /merge
/review Request an AI code review /review or /review claude-sonnet
/fix Address review blockers, or blockers and suggestions with /fix all /fix, /fix all, or /fix F3 S5
/switch Change the AI model for this PR /switch claude-opus
/use Override the model for a single follow-up run /use claude-sonnet
/ultrafix Loop review→fix cycles until score goal is met /ultrafix or /ultrafix goal=8 max=10

🤖 Generated by ProPR
Processing comment ID: 6956187956✓

@propr-dev

propr-dev Bot commented Nov 17, 2026

Copy link
Copy Markdown
Contributor Author

🔍 AI Code Review — codex:gpt-6-astra

Overall Evaluation

The PR addresses registry resolution, API response consistency, repository filtering, epic ordering, and published summaries. No verified merge blocker emerged from the supplied code. Merge readiness is conditional on the pending Validate Changes check completing successfully.

✅ Pinned DNS lookup — pinnedLookup handles both callback shapes while retaining the vetted address; socket tests exercise both family-selection settings.

✅ Sequential scheduling — Skipped prerequisites are traversed transitively, and the sequential guard prevents unfinished earlier issues being bypassed after an out-of-order completion.

✅ Requested test correction — The cost-export comparison now injects unscopedRepositoryResolver and asserts HTTP 200 before comparing rows.

This was a static review; no commands were run. The issue specifications and supplementary file context contain truncation notices, limiting verification of requirements not visible here.

Merge blockers

No merge blockers.

Suggestions

These are optional follow-ups and are not sent to /fix.

S1: 🟢 Distinguish migration mismatch causes

packages/core/src/db/migrationGate.ts, findNewerMigrations, treats every applied migration absent from the directory as evidence of a newer database. Missing packaging files or a divergent branch can produce the same result. Consider wording the diagnostic to acknowledge those possibilities while retaining the upgrade/restore guidance. This is optional because the new guard still safely refuses startup and correctly explains the intended older-build scenario.

S2: 🟢 Exercise delayed CI failure delivery

The new CI grouping tests cover successive failures and edit suppression. A follow-up test could document what happens when another check fails after the first follow-up has already finished without changing the head. The implementation deliberately edits the existing comment without starting another run; testing that boundary would clarify the operational tradeoff without changing the documented one-follow-up-per-head policy.

Score

The visible changes have substantial targeted regression coverage, and the authoritative checks report 37 passes and no failures. Static-review and abbreviated-specification limits prevent a stronger assessment.

Score: 8/10


🤖 Review Details

  • Model: GPT-6 Astra
  • Time: 46s
  • Tokens: 198,125 (197,328 in / 797 out)
  • Cost: $1.90

View Task


💡 Next step: Comment /fix to address every F# merge blocker, /fix all for every pending blocker and suggestion, or name records explicitly, as in /fix F3 S5.
F# and S# IDs increment across review comments and remain permanent, so selectors such as /fix F3 F5 stay unambiguous across cycles. S# suggestions stay optional: they are implemented only when you name them or request /fix all, and they never relax a merge blocker.

Copy and edit to choose records from this review:

/fix S1 S2

🤖 Review by ProPR

@propr-dev propr-dev Bot removed the ultrafix label Nov 17, 2026
@propr-dev propr-dev Bot changed the title ◕ 8/8 [Epic] 0.9.2 release fixes: API, core, tests and bot comments ✅ 8/8 [Epic] 0.9.2 release fixes: API, core, tests and bot comments Nov 17, 2026
@propr-dev

propr-dev Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor Author

🔀 Resolved merge conflicts from main into 3616-epic-0-9-d8b in commit cdfbd7a

Conflicting Files

  • package-lock.json
  • test/vendoredPicomatch.test.mjs
  • vendor/picomatch-4.0.8-extglobguard.1.tgz
  • vendor/picomatch-4.0.8-v2.3.2-extglobguard.1.tgz
  • vendor/picomatch-v2/README.md
  • vendor/picomatch-v2/lib/parse.js
  • vendor/picomatch/README.md
  • vendor/picomatch/lib/parse.js

Resolution Summary

I resolved all 8 conflicts by taking main's version of each file, and no conflict markers remain anywhere in the repo.

What the conflicts were about: this branch and main both fixed the same picomatch issues (advisory GHSA-fc5q-39xc-vjpf, then CodeQL alerts #246 and #247) by patching the two vendored picomatch builds. That's why every file shows as added or changed on both sides.

How I resolved them: this branch's latest fix commit (688bc5f) is identical, file for file, to main's commit f12e55e from PR #3678. main then has one more commit on top, 7b16ed4. So main's side already contains everything this branch did, plus that later work. In git diff HEAD MERGE_HEAD, all 8 files differ only by what 7b16ed4 changed:

  • vendor/picomatch/lib/parse.js and vendor/picomatch-v2/lib/parse.js: main adds more guarding for wildcards after brackets and quotes. I took main's version.
  • vendor/picomatch/README.md and vendor/picomatch-v2/README.md: main extends the patch notes to match. I took main's version.
  • test/vendoredPicomatch.test.mjs: main adds 18 lines of tests for those cases. I took main's version.
  • The two vendor/*.tgz tarballs: these are binary, so they can't be combined line by line. I took main's rebuilt tarballs.
  • package-lock.json: the only difference is the integrity hashes on the four picomatch entries. I took main's hashes, which match the new tarballs.

Why: both sides were making the same change, and main has the newer and fuller version. Combining them by hand would only risk mixing the older code with tarballs and hashes it doesn't match. The rest of this branch's changes merged cleanly and are untouched.

Checks:

  • package-lock.json parses as valid JSON, and both parse.js files pass node --check.
  • The SHA-512 hashes of both tarballs match the integrity values in package-lock.json.
  • test/vendoredPicomatch.test.mjs failed 3 of 13 tests at first. The installed picomatch copies in node_modules were still the old builds: one test reported them as differing from the tarballs, and two timed out on the pattern +([*) (77 s and 15 s). I unpacked the merged tarballs over those installed copies, which is what npm ci does, and all 13 tests passed.

🤖 Resolution Details

  • Model: Claude Opus 5.5
  • Time: 6m 38s

View Task Execution


System-triggered merge conflict resolution

@propr-dev propr-dev Bot changed the title ✅ 8/8 [Epic] 0.9.2 release fixes: API, core, tests and bot comments ◕ 8/8 [Epic] 0.9.2 release fixes: API, core, tests and bot comments Nov 17, 2026
Automatically resolved merge conflicts after merging target branch into PR branch.
Resolved conflicts in:
- package-lock.json
- test/vendoredPicomatch.test.mjs
- vendor/picomatch-4.0.8-extglobguard.1.tgz
- vendor/picomatch-4.0.8-v2.3.2-extglobguard.1.tgz
- vendor/picomatch-v2/README.md
- vendor/picomatch-v2/lib/parse.js
- vendor/picomatch/README.md
- vendor/picomatch/lib/parse.js

PR: #3630
Model: Claude Opus 5.5
@propr-dev propr-dev Bot changed the title ◕ 8/8 [Epic] 0.9.2 release fixes: API, core, tests and bot comments ✅ 8/8 [Epic] 0.9.2 release fixes: API, core, tests and bot comments Nov 17, 2026
@integry
integry merged commit 9e423a1 into main Nov 17, 2026
50 checks passed
@integry
integry deleted the 3616-epic-0-9-d8b branch November 17, 2026 20:55
@propr-dev propr-dev Bot changed the title ✅ 8/8 [Epic] 0.9.2 release fixes: API, core, tests and bot comments [Epic] 0.9.2 release fixes: API, core, tests and bot comments Nov 17, 2026
@propr-dev

propr-dev Bot commented Nov 17, 2026

Copy link
Copy Markdown
Contributor Author

✅ Epic merged: 0.9.2 release fixes: API, core, tests and bot comments

Epic PR #3630 has been merged into main.

8 out of 8 PRs merged into main through this epic PR.

All planned epic work is now merged.

Posted automatically by ProPR

motherskitchenblr2 pushed a commit to motherskitchenblr2/propr that referenced this pull request Nov 23, 2026
…: a new picomatch advisory, GHSA-fc5q-39xc-vjpf, was published with no fixed release. Locally, both audit gates the job runs (`npm run audit:runtime` and `npm run desktop:audit:packaging`) now pass, and so do the related test suites. CI hasn't run on the change yet.

I fixed the failing check. No code on this branch caused it: a new picomatch advisory, GHSA-fc5q-39xc-vjpf, was published with no fixed release. Locally, both audit gates the job runs (`npm run audit:runtime` and `npm run desktop:audit:packaging`) now pass, and so do the related test suites. CI hasn't run on the change yet.

**Cause.** The advisory covers every `picomatch` up to 4.0.7, which is the latest release. Patterns like `+(*)` or `+(*a)` make picomatch build a regex that takes exponentially long to fail. I reproduced it: about 35 seconds on a 29-character string, on both 2.3.2 and 4.0.7. `main` has the same problem, so other open branches will fail the same way. Both copies in our tree are affected: 4.0.7 (used by `vite`, `vitest`, `tinyglobby`) and 2.3.2 (used by `micromatch`, `anymatch` and `readdirp`, which `fast-glob`, Repomix and `chokidar` use).

**Fix.** I followed the same approach the repo already uses for `braces`: I didn't add an audit exception. Instead both picomatch copies now install from patched versions stored in the repo:
- **The patch:** a small check in `lib/parse.js` treats any `+(…)`/`*(…)` pattern containing a bare `*` or `+` as plain text, using picomatch's existing handling for patterns it already considers risky. All the attack patterns now finish in under 2 ms.
- **`vendor/picomatch`:** 4.0.7 plus the patch, used by everything that needs picomatch 4.
- **`vendor/picomatch-v2`:** 2.3.2 plus the same patch, used by `anymatch`, `micromatch` and `readdirp` (overridden in `package.json`). I kept these on the 2.x code because the 4.x line changed path handling that `micromatch` and `fast-glob` rely on.
- **Version numbers:** both versions must sort above 4.0.7 or the audit still flags them, so the 2.x one is named `4.0.8-v2.3.2-extglobguard.1`.
- **Lockfile:** npm 10 and npm 11 both kept collapsing the 2.x consumers onto the 4.x copy. I wrote those three lockfile entries by hand. They stay unchanged through `npm install` and lockfile-only installs on both npm versions, and a clean `npm ci` installs the right copy for each package.

Other changes:
- **Signed-RPM acceptance:** its allowlist and Dockerfile now include the two new tarballs.
- **New test:** `test/vendoredPicomatch.test.mjs` checks that the source, tarball, lockfile and installed copies match, and that normal matching still works.
- **Docs and notices:** README provenance notes in each vendored folder, a section in `docs/dependency-audit-exceptions.md`, a CHANGELOG Security entry, and a regenerated `THIRD_PARTY_LICENSES.md` (new picomatch row, and the date moves to today).

**Behaviour change and remaining risk.** I ran picomatch's own test suite against both patched copies. Four assertions now fail, and each one checks that a vulnerable pattern (`+(*)c`, `*(a*|b)`, `*/*(W*, *)*`) still matches. Those patterns now match only their literal text, and no glob in this repo uses one. Nested repeats like `+(a*(a))` are still slow. I left them alone because picomatch's own tests require the same shape (`*(f*(o))`) to keep working, and upstream tracks that case separately (issue integry#175).

Once picomatch publishes fixed releases, the vendored copies can be removed; the vendored READMEs list the steps.

PR: integry#3630
Comment by: @propr-dev[bot] (ID: 6955352684)
Model: Claude Opus 5.5
motherskitchenblr2 pushed a commit to motherskitchenblr2/propr that referenced this pull request Nov 23, 2026
… the two vendored picomatch builds. The flagged regex really was slow: on a string of 65,000 `[` characters, `removeBackslashes` took about 1.6 s. It now takes about 1 ms. CI hasn't run on the change yet.

I fixed both CodeQL alerts (integry#246 and integry#247) in the two vendored picomatch builds. The flagged regex really was slow: on a string of 65,000 `[` characters, `removeBackslashes` took about 1.6 s. It now takes about 1 ms. CI hasn't run on the change yet.

**Cause.** `removeBackslashes` in `lib/utils.js` used upstream's `REGEX_REMOVE_BACKSLASH` (`/(?:\[.*?[^\\]\]|\\(?=.))/g`). From every `[` with no closing `]`, that regex rescans to the end of the line, so the time grows with the square of the input length.

**Fix.** In both `vendor/picomatch/lib/utils.js` and `vendor/picomatch-v2/lib/utils.js`, `removeBackslashes` is now a single pass over the string. It returns exactly what the old regex returned:
- It returns the input unchanged when there is no backslash, since only backslashes are ever removed.
- A text in brackets is kept as is under the same rule the regex used.
- A backslash followed by any character other than a line break is removed.

`lib/constants.js` is unchanged, so `REGEX_REMOVE_BACKSLASH` is still exported as part of `constants`. `utils.js` just no longer imports it.

**Same output as before.** I compared the new function with the old regex on every string up to six characters built from `[`, `]`, `\`, `a`, `*` and the four line terminators, plus 300,000 random strings. There were no differences in either build.

**Other changes:**
- **Tests:** `test/vendoredPicomatch.test.mjs` has a new check for each build. It compares the function with the upstream regex on every short string, requires the 65,000-character inputs to finish in under 200 ms, and runs a few `scan(..., { unescape: true })` cases.
- **Tarballs and lockfile:** I repacked both tarballs and updated the four lockfile integrity entries. Only those integrity lines changed in `package-lock.json`. The version stays `4.0.8-extglobguard.1`, so `npm install` didn't refresh the locally installed copies; I removed them and reinstalled.
- **Docs:** both READMEs now say `lib/utils.js` differs from upstream and why. `docs/dependency-audit-exceptions.md` mentions it too.

**Checks run:**
- `test/vendoredPicomatch.test.mjs`: 11 of 11 pass, including the byte-identity, lockfile-integrity and installed-copy checks.
- `apps/desktop/scripts/signed-rpm-acceptance-context.test.mjs`: 5 of 5 pass. It checks the tarballs against the lockfile integrity.
- `npm run audit:runtime` and `npm run desktop:audit:packaging` both pass.

There's nothing visual in this change, so there are no previews.

PR: integry#3630
Comment by: @github-advanced-security[bot] (ID: 4603531940)
Comment by: @github-advanced-security[bot] (ID: 4603532037)
Model: Claude Opus 5.5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment