Repository navigation
[Epic] 0.9.2 release fixes: API, core, tests and bot comments - #3630
Conversation
…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>
Epic progress: 0.9.2 release fixes: API, core, tests and bot comments8 out of 8 PRs merged ✅
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. |
…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>
…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>
|
CI failed: CodeQL Please investigate and fix this CI failure.
Failure evidence
|
|
✅ Applied the requested follow-up changes in commit 2dae8ed Summary of ChangesThat 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 digestRisk-tiered paths
Validation evidence
Diff size: 1 file changed, +2/−1 lines 🤖 Implementation Details
Undo Changes • View Task Execution 💡 ProPR Slash Commands
🤖 Generated by ProPR |
…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
|
ℹ️ Analyzed the follow-up request by @propr-dev[bot] Analysis SummaryThe CodeQL alert has already been fixed on this branch, so I made no further changes in this run. Cause: CodeQL scanned commit Fix: The next commit on this branch, console.error('[api] Unhandled error for %s %s:', String(req.method), (req.url ?? '').split('?')[0], error);That is at Verification:
Other files this branch touches still have template strings in log calls, such as There's nothing visual to preview. No code changes were necessary based on the current state of the branch. 🤖 Analysis Details
💡 ProPR Slash Commands
🤖 Generated by ProPR |
…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>
|
CI failed: CodeQL Please investigate and fix this CI failure.
Failure evidence
|
|
✅ Applied the requested follow-up changes in commit 9039b96 Summary of ChangesI fixed the CodeQL "externally-controlled format string" alert in Cause: when resolving a repository fails unexpectedly, 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:
This is a logging-only change, so I didn't make any preview images. Review digestRisk-tiered paths
Validation evidence
Diff size: 1 file changed, +2/−1 lines 🤖 Implementation Details
Undo Changes • View Task Execution 💡 ProPR Slash Commands
🤖 Generated by ProPR |
…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
|
ℹ️ Analyzed the follow-up request by @propr-dev[bot] Analysis SummaryI made no new changes, because the branch head already contains the fix.
CodeQL should pass when it runs on No code changes were necessary based on the current state of the branch. 🤖 Analysis Details
💡 ProPR Slash Commands
🤖 Generated by ProPR |
…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>
…, drop internal paths and debug blocks (text only) (#3676) 1. Failed or invalid review comments (`reviewCommentFormatter.ts`, new `reviewCompletionComment.ts`) - Invalid output: "⚠️ Review output was invalid." now gives one of three reasons: - the review output could not be parsed. - the reviewer returned no text. - the review cited files the PR doesn't change. - Invalid output, continued: these comments drop the "Next step: /fix" block and carry the `error="true"` marker. - Provider failure: "❌ Review failed." is always followed by a sentence. An empty error gives "The provider call failed without an error message." - Parent comment: "Posted N reviews" no longer counts error reviews, and failed links are marked "(failed)". It now also says "Posted 0 reviews" instead of "Posted 0 review". The hidden marker that tracks whether a run failed still follows the provider result, so nothing about scheduling changes. 2. Failure comments - PR follow-up failures now open with a plain cause, such as "Provider authentication failed." or "The agent process stopped unexpectedly.", and link to the task. - Comment IDs: "Comment ID: 0" is gone. Real comment IDs keep their `✓` receipts, because polling reads them. - Removed text: "Please check the logs for more details." is gone. - Issue failure comments get the same cause line. - Upstream HTML page titles become the status code, e.g. "403 Attention Required! | Cloudflare" → "HTTP 403". GitHub HTML error pages are reported by status only. - Completion reports no longer show the `<synthetic>` model line, or the token and cost lines when no tokens were used. 3. PR bodies (`logFiles.ts`): the "Detailed Logs" block and the "Latest Conversation Messages" block are replaced by one "View task" link. Log files are still written on the worker. Existing PR bodies are not touched. 4. CI-failure comment: "Commit:" now links to the commit, and a separate "Run:" line links to the job run. 5. Labels and ids - Task ids: the `-undefined-` came from comments with no `updated_at`. The revision id now uses the body digest alone in that case. - `AI` with `AI-done`: the current code already removes `AI` when it adds `AI-done`; a test pins this. The closed issues I checked that kept both (#3512, #3529) were labelled on Nov 13 and show a different label order from this code. My guess is that the running instance was on an older build. - Left out — double labels at PR creation: on #3632 and #3635 the bot applied `AI` and `llm-*` twice, about a second apart. The only label call has a retry delay of at least 2 seconds and isn't reached by the fallback path, so the second call probably comes from a duplicate run. Fixing that is not a text change. To fit the 400-line lint limit I removed a duplicate `sanitizeErrorMessage` from `errorHandlers.ts` (it now imports the shared one) and moved link-building into small helpers. I updated a few existing tests: some used placeholder review text that is now invalid output, and one checked for the conversation preview that was removed. No previews were made, since this only changes comment text. Co-authored-by: propr-dev[bot] <1316198+propr-dev[bot]@users.noreply.github.com>
|
✅ AI Code Review Complete requested by @propr-ultrafix Posted 1 review: |
|
CI failed: Validate unsigned linux-arm64 package Please investigate and fix this CI failure.
Failure evidence
|
|
CI failed: Validate unsigned darwin-x64 package Please investigate and fix this CI failure.
Failure evidence
|
|
✅ Applied the requested follow-up changes in commit 513f80a Summary of ChangesI 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 ( Cause. The advisory covers every Fix. I followed the same approach the repo already uses for
Other changes:
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 ( Once picomatch publishes fixed releases, the vendored copies can be removed; the vendored READMEs list the steps. Review digestRisk-tiered paths
New dependencies (1): Validation evidence
Diff size: 30 files changed, +5,518/−32 lines 🤖 Implementation Details
Undo Changes • View Task Execution 💡 ProPR Slash Commands
🤖 Generated by ProPR |
|
One test fails on this epic after the merge from
Cause: that test came from Fix: pass |
…: 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
|
✅ Applied the requested follow-up changes in commit aa2a3e8 Processed 2 comments:
Summary of ChangesI 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,
All 12 tests in the file pass. The route itself is unchanged. Search for other affected tests. Nine route factories gained a
Review digestRisk-tiered paths
Validation evidence
Diff size: 1 file changed, +2/−1 lines 🤖 Implementation Details
Undo Changes • View Task Execution 💡 ProPR Slash Commands
🤖 Generated by ProPR |
…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
|
CI failed: CodeQL Please investigate and fix this CI failure.
Failure evidence
|
|
✅ Applied the requested follow-up changes in commit 688bc5f Processed 2 comments:
Summary of ChangesI 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 Cause. Fix. In both
Same output as before. I compared the new function with the old regex on every string up to six characters built from Other changes:
Checks run:
There's nothing visual in this change, so there are no previews. Review digestRisk-tiered paths
Validation evidence
Diff size: 9 files changed, +164/−19 lines 🤖 Implementation Details
Undo Changes • View Task Execution 💡 ProPR Slash Commands
🤖 Generated by ProPR |
…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
|
ℹ️ Analyzed the follow-up request by @propr-dev[bot] Analysis SummaryI made no changes, because the branch already contains the fix for these two CodeQL alerts. The failed run was on What I checked on the current head:
CodeQL has not finished a run on 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
💡 ProPR Slash Commands
🤖 Generated by ProPR |
🔍 AI Code Review — codex:gpt-6-astraOverall EvaluationThe 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 — ✅ 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 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 blockersNo merge blockers. SuggestionsThese are optional follow-ups and are not sent to S1: 🟢 Distinguish migration mismatch causes
S2: 🟢 Exercise delayed CI failure deliveryThe 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. ScoreThe 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
Copy and edit to choose records from this review: 🤖 Review by ProPR |
|
🔀 Resolved merge conflicts from Conflicting Files
Resolution SummaryI resolved all 8 conflicts by taking What the conflicts were about: this branch and How I resolved them: this branch's latest fix commit (688bc5f) is identical, file for file, to
Why: both sides were making the same change, and Checks:
🤖 Resolution Details
System-triggered merge conflict resolution |
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
✅ Epic merged: 0.9.2 release fixes: API, core, tests and bot commentsEpic 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 |
…: 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
… 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
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