Skip to content

[Epic] Repository Search and Read MCP Tools Implementation - #2832

Merged
integry merged 12 commits into
mainfrom
2797-epic-repository-search-sgj
Oct 7, 2026
Merged

integry merged 12 commits into
mainfrom
2797-epic-repository-search-sgj

Conversation

@propr-dev

@propr-dev propr-dev Bot commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

Repository Search and Read MCP Tools Implementation

This Epic PR aggregates all changes for the plan: Repository Search and Read MCP Tools Implementation

Issues in this Epic

Auto-close

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

Fixes #2797
Fixes #2798
Fixes #2799


Created automatically by ProPR

… suite (22 tests) passes, as does the existing `planningUtils` test that covers the relevance engine I touched. `tsc --noEmit` and eslint come back clean for the core package. Nothing in the app calls the service yet, so it hasn't been exercised against a real clone or database outside the tests.

`searchRepositoryFiles` (`packages/core/src/services/repositoryRetrievalService.ts`)
- Semantic mode (default): it reads `indexing_status`, `last_indexed_at` and `last_indexed_hash` from `repositories` for the branch (`'HEAD'` if none is given). It then calls `findRelevantFiles` with summary scoring and the default agent from the agent registry.
- Fallback: if the repo isn't indexed, indexing is in progress or failed, or no default agent is configured, it uses keyword, path and git-history scoring only. `freshness.caveat` says why.
- Older index: if the index was built from an older commit than the one being searched, it still uses the summaries but sets `stale: true` with a caveat.
- Semantic results: each file has a score and its match reasons (`semantic`, `path-match`, `git-history`), filtered by path prefix and paginated with `offset`, `limit`, `nextOffset` and `totalMatches`.
- Literal mode: it runs `git grep -n -I -z -F` against the exact commit the ref points to. It's case-insensitive unless `caseSensitive` is set, and returns per-file match counts plus the first few matching lines (5 by default). No matches gives an empty result, not an error.
- Literal search, not regex: I added the `-F` flag, so a query like `validateToken()` matches that text exactly.

`readRepositoryFileContent`
- It rejects paths containing `..`, a leading `/`, backslashes or null bytes. Binary files and directories get a 400, and missing files a 404.
- Content comes from `git show <commit>:<path>`, so it doesn't depend on what's checked out in the shared clone.
- It returns the requested line range, capped at `maxLines` (800) and `maxBytes` (120,000). `truncated` and `nextStartLine` tell the caller where to continue.

Where the repo comes from: both functions accept a `repoPath` to use an existing clone. Otherwise they use the standard clone path, and only call `ensureRepoCloned` when there's no local clone or the ref isn't found locally.

Additions beyond the spec:
- Error type: errors are thrown as `RepositoryRetrievalError` with an HTTP-style `status`, so an API or MCP layer can map them directly.
- Ref restrictions: refs that start with `-` or contain `..`, `~`, `^`, `:` or similar are rejected. Plain branch names and commit SHAs work, but forms like `HEAD~1` don't.
- Hard caps: there are hard caps of 5,000 lines and 1 MB per read, and files over 20 MB are refused before being loaded.
- Small change to the shared relevance engine: `findRelevantFiles` results now include an optional `signals` list, because its single `reason: 'combined'` value hid which signals contributed. Existing callers are unaffected.

To keep files under the lint size limit, the types and input checks live in `repositoryRetrievalTypes.ts` and `repositoryRetrievalValidation.ts`. Everything is exported from `packages/core/src/index.ts`.

Tests: `packages/core/test/repositoryRetrievalService.test.ts` runs grep and file reads against a real temporary git repo. The database, agent registry and relevance engine are mocked for the semantic cases. To run the tests I installed dependencies with `npm ci` and built `packages/shared` locally.

This is backend-only, so there are no visual previews.
@propr-dev propr-dev Bot added the AI label Oct 6, 2026
propr-dev Bot and others added 2 commits October 6, 2026 15:52
…wait for that.

* The watcher I started will notify me when the test finishes, so I'll wait for that.

* feat(ai): I fixed F1. The test now runs the executor with the real policy, and its final traversal call produces the standard `INVALID_PATH` envelope. The test passes.

I fixed F1. The test now runs the executor with the real policy, and its final traversal call produces the standard `INVALID_PATH` envelope. The test passes.

**What changed** (only `packages/api/test/mcpRepositoryRetrieval.test.ts`):

- **Policy dependency:** the stub that only had `repository` is gone. The test now uses `Object.create(McpPolicy.prototype)`, so the executor calls the real `requireScope`, `requirePermission` and `repository` methods. It skips the constructor, which only sets up OAuth/JWKS state these methods don't use.
- **A second error in the same assertion:** with the policy fixed, the last call still failed. `executeTool` doesn't return an error envelope; it throws. The envelope is built one layer up, in `packages/api/mcp/server.ts:65`, via `toToolErrorResult(classifyError(error, …))`. The test now runs a rejected `executeTool` call through that same conversion. It checks that a traversal path gives `{ code: 'INVALID_PATH', status: 400 }`.
- **New regression checks:**
  - A caller without the `read` scope gets an `INSUFFICIENT_SCOPE` envelope from the executor. This proves the scope check really runs.
  - Neither executor call reaches the file-read service.

**Checking for the same mistake elsewhere:** the other MCP tests that fake a policy already provide `requireScope`. This was the only executor test in the PR with an incomplete policy.

**Verification:** `NODE_ENV=test npx tsx --experimental-test-module-mocks --test --test-force-exit packages/api/test/mcpRepositoryRetrieval.test.ts` passes (1/1). With the old stub, the final call would fail with a `TypeError` instead of `INVALID_PATH`.

**Separate findings, not changed:**
- Run without `--test-force-exit`, the test file passed nothing and was killed after 300s by my timeout. Something seems to keep the process open, probably the SQLite connection it opens. I didn't check whether this happens on the code before my change. This file also isn't in the `test:mcp` script list.
- The run prints `[mcp] Access log write failed: db is not a function` because `deps.db` is an empty stub. The executor catches and logs this, so the test still passes.
- ESLint ignores `packages/api/test`, and the api `tsconfig.json` doesn't include test files, so neither lint nor `tsc` covered this file. It does run cleanly under `tsx`.

PR: #2833
Comment by: @propr-ultrafix (ID: 0)
Model: Claude Opus 5.5

* feat(ai): I fixed the shard 3 timeout. `packages/api/test/mcpRepositoryRetrieval.test.ts` passed but never exited. Using the executor opened the core SQLite connection, and nothing closed it, so the process stayed alive until CI's 180s limit killed it.

I fixed the shard 3 timeout. `packages/api/test/mcpRepositoryRetrieval.test.ts` passed but never exited. Using the executor opened the core SQLite connection, and nothing closed it, so the process stayed alive until CI's 180s limit killed it.

**The fix:** the test now imports `closeConnection` from `@propr/core` and calls it in `after(async () => closeConnection())`. The neighbouring MCP tests, like `mcpRepositoryConsent.test.ts` and `mcpAccessLogDispatch.test.ts`, close the connection the same way. No other file changed.

**Checked locally**, without `--test-force-exit`, which is closer to how CI runs it:
- **Before:** a copy of the previous version still hadn't exited at a 40s timeout (exit code 124).
- **After:** the test passes 1/1, logs "SQLite database connection closed", and the process exits in about 3.5s.

I only ran this one file, not the full shard. The shard also warned that `test/taskIntentWithdrawal.test.ts` passed but used 85% of its time limit (152.9s of 180s). This PR doesn't touch it.

There is no visual change, so no previews were made.

PR: #2833
Comment by: @github-actions[bot] (ID: 6019780816)
Model: Claude Opus 5.5

---------

Co-authored-by: propr-dev[bot] <1316198+propr-dev[bot]@users.noreply.github.com>
…es` and `read_repository_file`. The full `npm run test:mcp` suite passes (325 tests, 0 failures), including the 16 new tests. I didn't make preview images because nothing in the app's UI changed.

Tests (`packages/api/test/mcpRepositoryRetrieval.test.ts`). The branch already had a version of this file, but it replaced the retrieval service with a fake. I rewrote it so the tools now run against real code:
- Setup: a real git repository is cloned into the folder the service reads clones from, and index state and file summaries live in the SQLite test database.
- What runs for real: the tool catalog, the executor with the real access policy, and the retrieval service.
- What's faked: only the list of configured repositories, and the model that ranks files by their summaries. The fake model still receives the real summaries from the database.

The new tests cover:
- Semantic search, indexed: ranked paths with their reasons and freshness details. There is also a test for an index built from an older commit, which is marked stale.
- Semantic search, unindexed: still returns results from path and history matching, with a caveat that the repository isn't indexed.
- Literal search: match counts and matching lines, case sensitivity on and off, no matches returning an empty list with `totalMatches: 0`, paging with `offset`/`limit`/`nextOffset`, and the path filter.
- Reading files: whole file, a line range, and the `maxLines`/`maxBytes` caps setting `truncated` and `nextStartLine`.
- Errors: missing file (`FILE_NOT_FOUND`), binary file (`BINARY_FILE`), and `../` or absolute paths (`INVALID_PATH`).
- Access: both tools return `REPOSITORY_FORBIDDEN` for a repository that isn't in the grant, isn't configured on the instance, or isn't accessible on GitHub. A caller without the read scope gets `INSUFFICIENT_SCOPE`.
- End to end: a real MCP client over HTTP lists the tools, runs a search, then reads the matching line.

Other changes:
- I added the file to the `test:mcp` script in `package.json`; it wasn't listed there before.
- I also had to edit `packages/api/test/mcpObservableSurface.test.ts`. That test checks every backticked lowercase word in `docs/mcp.md` against a list of known tool and field names. The new guide text uses words like `ref`, `commit`, `freshness` and `semantic`, so I added them to that list.

Docs:
- `docs/mcp-coverage.md`: a new row next to `get_repository_context` describing both tools, their parameters, freshness behaviour and error codes, plus an entry in the verification checklist for the new tests.
- `docs/mcp.md`: a new section, "Searching and reading repository files". It has parameter tables, example results for both search modes and for a read, and the freshness caveats. It also has a four-step search-then-read example that reuses the returned `commit` as `ref` so every step reads the same snapshot. The new error codes are added to the errors table.
- `docs/docs/features/mcp.md`: a row in the "Common operator workflows" table and a short operator note on freshness, output limits and errors.

The test run logs warnings about Redis and model pricing. They come from the code that records usage metrics for summary ranking; there's no Redis in the test environment, and the code continues past the failure, so tests still pass and the process exits normally.
@integry

integry commented Oct 6, 2026

Copy link
Copy Markdown
Owner

/merge

@propr-dev

propr-dev Bot commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor Author

🔀 Resolved merge conflicts from main into 2797-epic-repository-search-sgj in commit 0868567

Conflicting Files

  • test/sharedRepoPreparation.test.ts

Resolution Summary

I resolved the conflict in test/sharedRepoPreparation.test.ts, which was the only file with conflict markers. The file is now identical to main's version, and all 13 tests in it pass with 0 skipped.

What the conflict was about
Both branches changed how the two "unwritable .git directory" permission tests behave when run as root. Root ignores directory permission bits, so a 0o555 directory stays writable and the tests can't trigger a real permission error.

  • This PR (commit d522abd07) worked around that by skipping the tests. It added a directoryModeDeniesWrites() probe and a MODE_BYPASS_SKIP message, and both permission tests called t.skip(...) when permissions weren't enforced. Those were the PR's only changes to this file; it isn't part of the PR's actual feature, the repository search/read service.
  • main fixed the root case properly. Under root it hands the test clone to an unprivileged user (UID 65534) and runs the real Git as that user through a wrapper on PATH. It also added a new test checking that the fixture path is the validated canonical path. The two conflict regions were the helper block above denyGitDirWrites and the opening of the "unwritable shared config" test.

How I resolved it
I used main's version for both conflict regions. I also removed the PR's skip from the second permission test ("preparation of an unwritable shared clone…"). Git had merged that line without a conflict, but it called the skip probe that the resolution removes. Once those were gone, nothing else in the PR's version of the file remained, so the result matches main exactly.

Why
main makes the PR's workaround unnecessary, and keeping it would be harmful: under root, the probe would skip exactly the tests that main now makes work there. Taking main's approach keeps what the PR wanted (no failures under root) while actually running the tests.

Verification

  • No conflict markers remain anywhere in the repository.
  • PROPR_DEMO_MODE=true npx tsx --test test/sharedRepoPreparation.test.ts passes all 13 tests. Without PROPR_DEMO_MODE=true the file fails before any test runs, because GitHub authentication isn't configured in this container.
  • git add failed because the worktree's git index is on a read-only file system (index.lock: Read-only file system), so the file is resolved on disk but not marked resolved in git's index.

🤖 Resolution Details

  • Model: Claude Opus 5.5
  • Time: 2m 51s

View Task Execution


System-triggered merge conflict resolution

Automatically resolved merge conflicts after merging target branch into PR branch.
Resolved conflicts in:
- test/sharedRepoPreparation.test.ts

PR: #2832
Model: Claude Opus 5.5
@integry

integry commented Oct 6, 2026

Copy link
Copy Markdown
Owner

/review astra fable

@propr-dev

propr-dev Bot commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ AI Code Review Complete requested by @integry

Posted 2 reviews:

View Task Details

@propr-dev

propr-dev Bot commented Oct 6, 2026

Copy link
Copy Markdown
Contributor Author

🔍 AI Code Review — astra

Overall Evaluation

The PR adds reusable repository retrieval services, MCP tools, integration tests, and operator documentation. It needs changes before merge: the MCP output pipeline can alter file contents, and accepted read sizes can exceed the transport’s response limit.

✅ Commit-scoped retrieval — Literal search, file reads, and relevance filtering use a resolved commit rather than working-tree contents.

✅ Authorization coverage — Both tools enforce repository access, with integration tests covering grant, configuration, GitHub-access, and scope denials.

✅ Continuation handling — Bounded reads preserve whole lines and provide a continuation cursor instead of silently dropping oversized line fragments.

The supplied current-head status reports 17 passed checks, no failures, and no pending checks. This review uses static tracing only; no commands were run.

Merge blockers

Every finding below was introduced by this PR and must be resolved before merging.

F1: 🔴 Preserve source text through MCP redaction

  • Required behavior: The new file-reading tool must return the requested source lines with accurate line and continuation metadata.

  • Evidence: packages/api/mcp/toolsContext.ts:read_repository_file — the new handler returns source text through the shared MCP result transformation.

    1. An authorized caller reads a complete, pretty-printed JSON file, such as a JSON array containing 201 non-secret entries.
    2. readRepositoryFileContent returns the source text and computes its line counts, byte counts, and completion state.
    3. The handler returns that text in content. The supplied execution path applies result redaction; adapter.redact parses strings beginning with [ or {, recursively transforms their contents, and serializes them again.
    4. The array is shortened to 200 entries and compacted onto one line. JSON objects can also lose fields whose names match the redaction filter.
    5. The caller receives altered or incomplete source while the original metadata still reports a complete read with no continuation.

    Existing authorization and read bounds do not prevent this transformation. The new protocol test reads TypeScript text, so it does not exercise JSON parsing by the redactor. static trace: the new handler and supplied toolExecution.ts and adapter.ts excerpts establish this sequence; no regression test was executed.

  • Minimum fix: Treat repository source content and literal line previews as opaque text during result redaction. Preserve line structure and non-secret source fields, retain necessary textual credential masking, and ensure reported byte metadata describes the delivered content.

F2: 🔴 Align read bounds with the response envelope

  • Required behavior: Accepted bounded reads must produce usable chunks or an accurate file-size refusal; their advertised limits must be compatible with the MCP response limit.

  • Evidence: packages/api/mcp/toolsContext.ts:read_repository_file, packages/core/src/services/repositoryRetrievalService.ts:readRepositoryFileContent.

    1. An authorized caller requests a text file containing one 300,000-byte ASCII line with maxBytes: 300000.
    2. The MCP schema accepts this value because its maximum is 500,000. The core reader also accepts the blob and whole line, returning a successful result.
    3. The shared executor serializes that result and rejects it because its JSON size exceeds 256 KiB, returning RESULT_TOO_LARGE.
    4. Retrying with a smaller page cannot retrieve the line: any maxBytes below 300,000 causes the reader to return FILE_TOO_LARGE with advice to request at least 300,000 bytes.
    5. The caller is therefore directed between two incompatible limits and cannot read a line the tool explicitly accepts.

    maxLines cannot split the line, and the core byte accounting does not include the JSON envelope or escaping. Existing tests use small ASCII chunks and do not cover this boundary. static trace: the changed schema and reader, followed by the supplied executor’s 256 KiB check, establish the failure.

  • Minimum fix: Bound MCP reads by the serialized response budget, including escaping and metadata. Return a continuation when whole lines can fit; otherwise return FILE_TOO_LARGE with an attainable limit rather than advising a request the executor will reject.

Suggestions

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

S1: 🟢 Explain managed-clone freshness

resolveTarget returns locally resolvable refs without refreshing their branch tips, and direct resolution prefers local branches over remote-tracking branches. Document this cache behavior and consider an explicit refresh policy. Results identify their exact commit, so this is an optional clarification rather than a blocker based on an unstated guarantee of remote freshness.

S2: 🟢 Stream literal search output

searchLiteral buffers all matching lines before applying preview caps and pagination. Streaming aggregation could preserve complete match counts while retaining only bounded previews, reducing memory use for common queries in large repositories. This is an optional resource-efficiency improvement.

Score

The implementation has substantial coverage and passing current-head checks, but two concrete MCP integration defects prevent merge readiness. Both can be corrected locally without redesigning the retrieval service.

Score: 6/10


🤖 Review Details

  • Model: GPT-6 Astra
  • Time: 1m 27s
  • Tokens: 83,224 (81,077 in / 2,147 out)
  • Cost: $0.81

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 F1 F2 S1 S2

🤖 Review by ProPR

@propr-dev

propr-dev Bot commented Oct 6, 2026

Copy link
Copy Markdown
Contributor Author

🔍 AI Code Review — fable

Overall Evaluation

This PR adds a repository retrieval layer to @propr/core (repositoryRetrievalService.ts, repositoryManagedClone.ts, validation/types modules), threads an optional commit through the planner relevance engine so scoring reads an exact tree/history instead of the checkout, and exposes search_repository_files / read_repository_file as read-only MCP tools with documentation and two substantial test suites. The core service is carefully written: ref validation, fixed-string git grep -z parsing that survives : and newlines in paths, whole-line byte bounding with a continuation cursor, tag-before-branch resolution, and explicit per-ref fetching into shallow single-branch clones are all handled and tested.

The PR is not merge-ready. Two defects sit at the boundary the PR introduces: (1) the default branch resolution reads the shared clone's stale local branch, so the most common call silently returns old code; (2) the MCP result pipeline the tools were plugged into re-parses and reshapes any content/line text that is valid JSON, so reads of JSON files return altered content that no longer matches the reported line metadata. A third, smaller contract inconsistency (maxBytes up to 500000 vs. the 256 KiB executor cap) is also deterministic. All three are localized fixes.

✅ Robust git grep parsing — parseGitGrepOutput reads path and line number up to their NUL delimiters before reading text to the newline, and --no-column guards against a configured grep.column; both are covered with real-git fixtures including a filename containing a newline (packages/core/test/repositoryRetrievalService.test.ts).

✅ Commit-scoped relevance is genuinely commit-scoped — scorePaths, mineGitHistory, getCommitHistory and restrictToCommitTree all take the resolved commit, and relevanceServiceCommit.test.ts proves that files and history absent from the target commit are excluded and that usedSummaryScoring is recomputed after filtering.

✅ Shallow-clone ref fetching is correct and well-tested — remoteRefMappings keeps qualified namespaces, maps origin/x to branch x, prefers tags for short names, and fetchRequestedRef distinguishes "remote lacks ref" (404) from transport failure (502) with depth-preserving fetches; the managed-clone tests exercise branch, tag, SHA, ambiguous tag/branch and cold-clone paths.

Merge blockers

Every finding below was introduced by this PR and must be resolved before merging.

F3: 🔴 Default branch resolution returns the stale local branch of the shared clone

  • Required behavior: The tools must read "at a branch, ref or commit straight from git" and, per the PR's own docs/mcp.md, resolve "an exact commit resolved from ref, else branch, else the repository's configured base branch, so the answer never depends on what is checked out." Search and read results for the configured base branch must reflect that branch, not a clone-time snapshot.

  • Evidence: packages/core/src/services/repositoryRetrievalService.ts:76-118 (revParseCommit, resolveCommit, resolveManagedCommit, resolveTarget) and packages/core/src/services/repositoryManagedClone.ts:36-48 (cloneOrRefresh)

    Static trace:

    1. Repository acme/web is configured with baseBranch: main and already has a shared clone at GIT_CLONES_BASE_PATH/acme/web from earlier worker runs; its local refs/heads/main is at commit A. Since then main on GitHub advanced to B. (Worker runs call ensureRepoCloned, whose updateExistingRepo does git fetch origin --prune + git checkout main and never fast-forwards the local branch; only the indexing path fetchLatestChanges does a reset --hard origin/<branch>.)
    2. An MCP client calls read_repository_file { repository, path } with no ref. toolsContext.ts defaultBranch supplies branch: 'main'; resolveTarget computes ref = 'main'.
    3. The clone exists, so resolveManagedCommit(localPath, 'main') runs resolveCommit, whose first step is git rev-parse --verify main^{commit}. Git resolves the short name to refs/heads/main → A. The mapped locals (refs/remotes/origin/main) are only consulted when the direct lookup fails.
    4. resolveManagedCommit sees two mappings, probes refs/tags/main, finds none, calls fetchRequestedRef(repoPath, 'refs/tags/main', …) (a network fetch that only tries the tag refspec, ignored as missing), then resolveCommit('main') again → A. cloneOrRefresh is never reached because a commit resolved; even if it were, ensureRepoCloned leaves refs/heads/main at A.
    5. The tool returns { ref: 'main', commit: A, content: <file at A> }. A file added in B returns FILE_NOT_FOUND; search_repository_files in literal mode greps tree A; semantic mode, when the index was built at B, emits the caveat "Index … built at B, but main is at A", which is backwards.

    No freshness signal exists for literal search or reads, so the agent cannot tell the answer is stale. The PR's own tests cannot observe this: every fixture either clones fresh or never advances origin after the managed clone exists (clones without the index branch…, reports a nonexistent branch…). Note the same code already pays a per-request network fetch (the tag probe) but never fetches the branch it is actually answering for. HEAD and origin/<branch> are affected the same way (refs/remotes/origin/<branch> is refreshed only when some other process fetches). Proposed regression: with an existing managed clone, push a new commit to the fixture origin's main, call readRepositoryFileContent({ repository, branch: 'main', path }) and assert commit equals the new origin head.

  • Minimum fix: For unqualified names, origin/<name> and HEAD, fetch the branch refspec (+refs/heads/<name>:refs/remotes/origin/<name>) in resolveManagedCommit alongside the existing tag probe, and make resolveCommit try the mapped locals (refs/tags/<name>, then refs/remotes/origin/<name>) before the bare name so a stale refs/heads/<name> never shadows the freshly fetched remote-tracking ref. Add the regression above.

F4: 🔴 read_repository_file content and literal line previews are reshaped by the result redactor when they parse as JSON

  • Required behavior: read_repository_file must return the file's actual lines for the reported startLine..endLine so that totalLines, returnedBytes, nextStartLine and lineMatches[].text describe the content returned; the PR's own integration test encodes this (read.content === match.lineMatches[0].text).

  • Evidence: packages/api/mcp/toolsContext.ts:97-105 (read_repository_file registration) and :89-96 (search_repository_files), returning content / lineMatches[].text through ok(...) into the shared executor

    Static trace:

    1. Every tool result passes through redactToolResult → redact() (toolExecution.ts, adapter.ts, unchanged). redact() takes any string whose trimmed value starts with { or [, JSON.parses it, recursively drops object keys matching /token|secret|password|credential|private.?key|api.?key|access.?key|cookie|authorization|…/i, truncates arrays to 200 items, and JSON.stringifys the result (minified, single line). The executor already special-cases get_doc for exactly this reason ("re-redacting a continuation that happens to start with JSON can otherwise parse and reshape the text"); this PR adds two tools that return raw file text and does not extend that exemption.
    2. Client calls read_repository_file { repository, path: 'package.json' } (or tsconfig.json, any .json, a JSON i18n/config file, a .propr/*.json). The whole file fits the default 800-line/120 KB window, so content is the complete document and parses.
    3. The returned content is one minified line; keys such as "credentials", "apiKey", "password", "accessToken" (common in config/schema/i18n files) are silently removed; arrays longer than 200 elements are cut. Meanwhile startLine: 1, endLine: 40, totalLines: 40, returnedBytes: <original> still describe the original file, and nextStartLine-based continuation no longer corresponds to anything in the returned text.
    4. In literal mode a matching line such as [1, 2, 3] or { "a": 1 } is re-serialized as [1,2,3] / {"a":1}, so lineMatches[].text differs from what read_repository_file returns for the same line (and from the repository).

    The existing secret-pattern replacement (gh[pousr]_…, Bearer …) is the intended protection and is unaffected by the fix; the key-dropping/minifying JSON path is the defect. No test covers a JSON file read or a JSON-looking matched line (mcpRepositoryRetrieval.test.ts reads only .ts, .md, .txt). Proposed regression: commit a config.json containing {"name":"x","password":"y","list":[…]} in the fixture, read it through executeTool, and assert content is byte-identical to the committed text.

  • Minimum fix: Extend the get_doc exemption in redactToolResult to read_repository_file.content and search_repository_files.matches[].lineMatches[].text, applying only the plain secret-pattern string replacement to those fields (not the JSON parse/re-stringify path), and add the JSON-file regression above.

F5: 🔴 Advertised maxBytes upper bound cannot be served through the executor's 256 KiB result cap

  • Required behavior: The tool contract must be internally consistent: read_repository_file advertises maxBytes up to 500000 (schema) and the docs state "at most 500000", but the executor rejects any result whose JSON exceeds 262144 bytes.

  • Evidence: packages/api/mcp/toolsContext.ts:99 (maxBytes: z.number().int().min(1).max(500000).default(120000)), docs/mcp.md (maxBytes "at most 500000"), docs/mcp-coverage.md (same)

    Static trace:

    1. Client calls read_repository_file { repository, path: 'big.generated.ts', maxBytes: 400000 } on a file ≥ 400 KB (the point of raising maxBytes is exactly such files).
    2. readRepositoryFileContent fills ~400000 bytes of content and returns truncated/nextStartLine correctly.
    3. runTool computes jsonBytes (> 400000 after JSON escaping) and throws RESULT_TOO_LARGE ("Request a smaller page or narrower target."). The page the tool promised is never delivered; the generic message does not say which parameter to lower. Any maxBytes above roughly 240000 that is actually filled fails the same way, so the documented range above that point is unreachable.

    No test exercises maxBytes above the default. Proposed regression: read a ≥ 300 KB fixture file with maxBytes: 300000 through executeTool and assert success (after the bound is corrected).

  • Minimum fix: Lower the schema maximum (and docs/mcp.md / docs/mcp-coverage.md) to a value that leaves headroom under 256 KiB after JSON escaping (for example 200000), or have the tool clamp maxBytes to that bound before calling the service.

Suggestions

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

S3: 🟢 Avoid a network fetch on every short-name request and keep serving cached refs when origin is unreachable

resolveManagedCommit probes refs/tags/<name> and, when the tag is absent (the normal case for main), calls fetchRequestedRef, which resolves an installation token and runs git fetch against GitHub on every search/read for an unqualified branch name. If origin is unreachable that fetch raises a 502 even though the ref already resolved locally. Once F1 adds a branch fetch, consider a short negative cache for "no such tag" and treating a transport failure after a successful local resolution as a stale-but-answerable result (with a caveat) rather than an error.

S4: 🟢 Redundant repository authorization call per invocation

runTool already calls deps.policy.repository(principal, args.repository) for every tool with a repository argument (one GET /repos/{owner}/{repo} per call). Both new tools call policy.repository again in run, doubling the GitHub request. get_repository_context relies on the executor's check alone; the new tools could do the same.

S5: 🟢 Bound git grep output before it is buffered

Literal mode accepts a 1-character query and buffers the entire git grep output in memory before paginating. On a large monorepo a query like e can produce hundreds of megabytes. Consider --max-count per file (git ≥ 2.38) combined with a separate -c count pass, or streaming the child process and stopping after a hard record budget, and reporting scanTruncated as the other bounded tools do.

S6: 🟢 Document INVALID_REF and the REPOSITORY_RETRIEVAL_FAILED code

retrieval() emits INVALID_REF for refs rejected by assertSafeRef and REPOSITORY_RETRIEVAL_FAILED (502, retryable) for clone/fetch/credential failures, but neither appears in the error-code table added to docs/mcp.md or in docs/mcp-coverage.md.

S7: 🟢 Literal search pages can also approach the 256 KiB cap

With limit: 100, five previews per file and a 500-character preview cap, a worst-case literal page is ~250 KB before JSON escaping and can trip RESULT_TOO_LARGE. Lowering MAX_LINE_MATCH_TEXT_LENGTH or the effective page size for literal mode, or exposing maxLineMatchesPerFile through the schema, would make the bound predictable.

S8: 🟢 Retrieval-driven ensureRepoCloned changes the shared clone's checkout

When a ref does not resolve locally, cloneOrRefresh calls ensureRepoCloned without baseBranch, which detects and checks out the remote default branch in the shared clone. For repositories configured with a non-default baseBranch this switches the shared checkout under worker/indexing code that also manipulates it. It is pre-existing behavior of ensureRepoCloned, but a read-only MCP tool triggering a checkout is worth noting; a fetch-only refresh path would avoid it.

S9: 🟢 Surface non-retrieval errors from the relevance engine as stable codes

retrieval() only maps RepositoryRetrievalError; a git ls-tree failure inside restrictToCommitTree or an unexpected error in findRelevantFiles propagates as a generic internal error. Wrapping those in a RepositoryRetrievalError(…, 500) would keep the envelope consistent.

Score

The core retrieval service and relevance-engine changes are well designed and thoroughly tested, but the two defects at the integration boundary (stale default-branch resolution and JSON content reshaping) make the most common calls return incorrect results, and the maxBytes contract is unattainable; all three have localized fixes.

Score: 5/10


🤖 Review Details

  • Model: Claude Fable 5.1
  • Time: 7m 21s
  • Tokens: 842,602 (811,333 in / 31,269 out)
  • Cost: $6.05

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 F3 F4 F5 S3 S4 S5 S6 S7 S8 S9

🤖 Review by ProPR

@integry

integry commented Oct 6, 2026

Copy link
Copy Markdown
Owner

/fix all

@propr-dev

propr-dev Bot commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ Applied the requested follow-up changes in commit 61388ee

Addressed 2 AI review comments (IDs: 6024975832, 6025095258)

Addressed findings F1, F2, F3, F4, F5 · suggestions S1, S2, S3, S4, S5, S6, S7, S8, S9

Summary of Changes

All 14 selected records (F1–F5, S1–S9) are done. The full npm run test:mcp run had 330 of 331 tests passing. The one failure was a docs check in mcpObservableSurface.test.ts: my new docs mention content, so I added it to that test's list of allowed field names. That test passes now, but I haven't re-run the whole suite since. The core retrieval tests pass (44/44), as does the existing relevanceServiceCommit test. Both packages typecheck and lint clean. Nothing in the UI changed, so there are no previews.

Findings

  • F1 / F4 – source text came back altered. The result redactor no longer parses or rewrites file content, line previews, paths or the echoed query as JSON for the two new tools (toolExecution.ts). Those fields still have tokens and Bearer … values masked, through a new redactText helper in adapter.ts. returnedBytes is recalculated from the content actually returned. New tests read a pretty-printed config.json (keys like password, a 201-item array, a fake token) and check it comes back exactly as committed apart from the masked token. Another checks that a [1, 2, 3] match preview equals the line read_repository_file returns.
  • F2 / F5 – sizes the tool accepted but the response cap rejected.
    • The maxBytes maximum is now 200000 in the schema and both docs.
    • The core reader takes two new options. One caps the content's size after JSON escaping, so a read stops early and returns nextStartLine. The other is the largest maxBytes the caller accepts, so error hints never suggest a value the tool would reject.
    • A line that can't fit in any response now gets FILE_TOO_LARGE, saying no maxBytes will work.
    • There's also a final size check in the tool.
    • New tests read a 300 KB file with maxBytes: 200000 and continue from nextStartLine, check that 300000 is rejected up front, and read a line of 150,000 quote characters.
  • F3 – reads used the clone's stale local branch. Every branch, origin/<x>, refs/heads/<x>, tag or HEAD request now fetches that ref from GitHub first. It then resolves from the fetched copy, so an old local refs/heads/main can't win. HEAD now means GitHub's default branch, kept in a private ref (refs/propr/retrieval/origin-head). A branch that has been deleted on GitHub now returns REF_NOT_FOUND instead of its leftover copy. I added the proposed regression in core and an MCP-level version of it.

Suggestions

  • S1: docs/mcp.md now explains how fresh results are and how the shared clone's cache behaves.
  • S2 / S5: git grep output is now streamed, keeping full counts but only a few preview lines per file. The scan stops after 10,000 matching files or 64 MiB of output and reports scanTruncated (new file repositoryLiteralGrep.ts).
  • S3: "this name isn't a tag" is remembered for 60 seconds, and identical fetches running at the same time share one request. If GitHub can't be reached but the ref is cached, the result answers from the cache and adds a refCaveat.
  • S4: I removed the duplicate repository authorization check in both handlers; the executor already does it.
  • S6: INVALID_REF and REPOSITORY_RETRIEVAL_FAILED are now documented.
  • S7: a literal search page that would exceed 256 KiB now ends early, and nextOffset picks up at the first file left out (covered by a test with 100 wide matches).
  • S8: retrieval only clones when no clone exists yet. It never calls ensureRepoCloned on an existing clone, so it no longer changes what's checked out. Tests check the checkout stays on the worker's branch.
  • S9: relevance-engine failures now become REPOSITORY_RETRIEVAL_FAILED with status 500 (not retryable). Fetch failures stay 502 and retryable.

To keep repositoryRetrievalService.ts within lint limits, I moved the line-selection code into repositoryFileLines.ts.

Two side effects of S3

  • Because "not a tag" is remembered for 60 seconds, a tag created on GitHub with the same name as a branch can be missed for up to a minute.
  • HEAD with nothing cached now fails with 502 when GitHub is unreachable, where before it answered from the local checkout.

Found separately, not fixed (outside this scope)

  • presentResultText copies the full result into the plain-text fallback. That text isn't covered by the 256 KiB check, so a large file read is sent roughly twice.
  • If a tag is deleted on GitHub while a local copy remains, the cached "not a tag" entry lets that local tag keep answering until the 60 seconds run out. This is a rare edge case.

The Gmail, Google Calendar and Google Drive connectors need authorizing in your claude.ai connector settings before they can be used; this task didn't need them.


🤖 Implementation Details

  • Model: Claude Opus 5.5 (medium)
  • Requested By: @integry
  • Time: 14m 56s
  • Tokens: 6,019,706 (5,957,454 in / 62,252 out)
  • Cost: $3.16
  • Subscription usage: Session +4%, 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: 6025149105✓

…npm run test:mcp` run had 330 of 331 tests passing. The one failure was a docs check in `mcpObservableSurface.test.ts`: my new docs mention `content`, so I added it to that test's list of allowed field names. That test passes now, but I haven't re-run the whole suite since. The core retrieval tests pass (44/44), as does the existing `relevanceServiceCommit` test. Both packages typecheck and lint clean. Nothing in the UI changed, so there are no previews.

All 14 selected records (F1–F5, S1–S9) are done. The full `npm run test:mcp` run had 330 of 331 tests passing. The one failure was a docs check in `mcpObservableSurface.test.ts`: my new docs mention `content`, so I added it to that test's list of allowed field names. That test passes now, but I haven't re-run the whole suite since. The core retrieval tests pass (44/44), as does the existing `relevanceServiceCommit` test. Both packages typecheck and lint clean. Nothing in the UI changed, so there are no previews.

**Findings**
- **F1 / F4 – source text came back altered.** The result redactor no longer parses or rewrites file content, line previews, paths or the echoed query as JSON for the two new tools (`toolExecution.ts`). Those fields still have tokens and `Bearer …` values masked, through a new `redactText` helper in `adapter.ts`. `returnedBytes` is recalculated from the content actually returned. New tests read a pretty-printed `config.json` (keys like `password`, a 201-item array, a fake token) and check it comes back exactly as committed apart from the masked token. Another checks that a `[1, 2, 3]` match preview equals the line `read_repository_file` returns.
- **F2 / F5 – sizes the tool accepted but the response cap rejected.**
  - The `maxBytes` maximum is now 200000 in the schema and both docs.
  - The core reader takes two new options. One caps the content's size after JSON escaping, so a read stops early and returns `nextStartLine`. The other is the largest `maxBytes` the caller accepts, so error hints never suggest a value the tool would reject.
  - A line that can't fit in any response now gets `FILE_TOO_LARGE`, saying no `maxBytes` will work.
  - There's also a final size check in the tool.
  - New tests read a 300 KB file with `maxBytes: 200000` and continue from `nextStartLine`, check that 300000 is rejected up front, and read a line of 150,000 quote characters.
- **F3 – reads used the clone's stale local branch.** Every branch, `origin/<x>`, `refs/heads/<x>`, tag or `HEAD` request now fetches that ref from GitHub first. It then resolves from the fetched copy, so an old local `refs/heads/main` can't win. `HEAD` now means GitHub's default branch, kept in a private ref (`refs/propr/retrieval/origin-head`). A branch that has been deleted on GitHub now returns `REF_NOT_FOUND` instead of its leftover copy. I added the proposed regression in core and an MCP-level version of it.

**Suggestions**
- **S1:** `docs/mcp.md` now explains how fresh results are and how the shared clone's cache behaves.
- **S2 / S5:** `git grep` output is now streamed, keeping full counts but only a few preview lines per file. The scan stops after 10,000 matching files or 64 MiB of output and reports `scanTruncated` (new file `repositoryLiteralGrep.ts`).
- **S3:** "this name isn't a tag" is remembered for 60 seconds, and identical fetches running at the same time share one request. If GitHub can't be reached but the ref is cached, the result answers from the cache and adds a `refCaveat`.
- **S4:** I removed the duplicate repository authorization check in both handlers; the executor already does it.
- **S6:** `INVALID_REF` and `REPOSITORY_RETRIEVAL_FAILED` are now documented.
- **S7:** a literal search page that would exceed 256 KiB now ends early, and `nextOffset` picks up at the first file left out (covered by a test with 100 wide matches).
- **S8:** retrieval only clones when no clone exists yet. It never calls `ensureRepoCloned` on an existing clone, so it no longer changes what's checked out. Tests check the checkout stays on the worker's branch.
- **S9:** relevance-engine failures now become `REPOSITORY_RETRIEVAL_FAILED` with status 500 (not retryable). Fetch failures stay 502 and retryable.

To keep `repositoryRetrievalService.ts` within lint limits, I moved the line-selection code into `repositoryFileLines.ts`.

**Two side effects of S3**
- Because "not a tag" is remembered for 60 seconds, a tag created on GitHub with the same name as a branch can be missed for up to a minute.
- `HEAD` with nothing cached now fails with 502 when GitHub is unreachable, where before it answered from the local checkout.

**Found separately, not fixed (outside this scope)**
- `presentResultText` copies the full result into the plain-text fallback. That text isn't covered by the 256 KiB check, so a large file read is sent roughly twice.
- If a tag is deleted on GitHub while a local copy remains, the cached "not a tag" entry lets that local tag keep answering until the 60 seconds run out. This is a rare edge case.

The Gmail, Google Calendar and Google Drive connectors need authorizing in your claude.ai connector settings before they can be used; this task didn't need them.

PR: #2832
Comment by: @integry (ID: 6025149105)
Model: Claude Opus 5.5
@integry

integry commented Oct 6, 2026

Copy link
Copy Markdown
Owner

/review fable astra

@propr-dev

propr-dev Bot commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ AI Code Review Complete requested by @integry

Posted 2 reviews:

View Task Details

@propr-dev

propr-dev Bot commented Oct 6, 2026

Copy link
Copy Markdown
Contributor Author

🔍 AI Code Review — fable

Overall Evaluation

This PR adds a repository retrieval service to @propr/core (semantic ranking via the planner relevance engine scoped to an exact commit, streamed literal git grep, bounded git show reads with whole-line selection and JSON-encoded size accounting), a managed-clone ref-refresh layer that never touches the shared checkout, two read-only MCP tools with policy authorization and stable error codes, opaque-text handling in the result redactor, extensive core and API integration tests, and documentation. The design is careful: every ref is refreshed from origin and resolved through the fetched copy, grep output is parsed incrementally with NUL/newline-safe records and hard budgets, and the response-size math is done both in the service (encodedByteLimit) and the tool layer (fitReadResult/fitSearchResult). The code quality is high and the test fixtures exercise real git repositories.

One contract gap remains: the documented error mapping for clone failures is not implemented, because errors from ensureRepoCloned (and raw git show/cat-file -s failures) are not RepositoryRetrievalError and so fall through the tool's retrieval() mapper into the generic INTERNAL_ERROR envelope. The PR needs that minor change; otherwise it is close to merge-ready.

✅ Byte-exact source text through the redactor — toolExecution.ts redactToolResult restores content/path/query/pathPrefix/line previews with in-place redactText only, and mcpRepositoryRetrieval.test.ts proves a pretty-printed .json with a 201-entry array and redactor-looking keys comes back line-for-line while a ghp_… token is still masked.

✅ Origin-first ref resolution that leaves the shared clone alone — repositoryManagedClone.ts fetches each requested branch/tag/HEAD into dedicated local refs (including refs/propr/retrieval/origin-head) with shallow-aware --depth, and the tests verify a stale local main, a worker checkout on another branch, a branch deleted on origin, and the offline cached-commit caveat all behave as documented.

✅ Streamed grep with chunk-boundary safety — GrepAggregator.drain only consumes complete <path>\0<line>\0<text>\n records, the chunk-size sweep test (sizes 1–7) and the newline-in-filename fixture confirm parsing, and streamGitGrep kills the child once the 10 000-file or 64 MiB budget is hit while still reporting complete counts for retained files.

Merge blockers

Every finding below was introduced by this PR and must be resolved before merging.

F6: 🔴 Clone and raw git failures bypass the documented error mapping

  • Required behavior: Issue Expose Repository Search and Read as Composable MCP Tools with Policy Authorization #2798 requires the tools to return standard error envelopes, and the PR's own docs (docs/mcp.md Errors table, docs/mcp-coverage.md) promise REPOSITORY_RETRIEVAL_FAILED "502 and retryable when cloning or fetching from GitHub failed", with 500 reserved for local git failures. The changed code does not deliver that for the clone path.

  • Evidence: packages/core/src/services/repositoryManagedClone.ts:48 (cloneManagedRepository), packages/core/src/services/repositoryRetrievalService.ts:160 (resolveTarget), packages/api/mcp/toolsContext.ts:18 (retrieval)

    Static trace:

    1. An MCP caller invokes read_repository_file or search_repository_files for a granted repository that has no managed clone yet (!(await fs.pathExists(path.join(repoPath, '.git'))) in resolveTarget).
    2. cloneManagedRepository calls ensureRepoCloned; GitHub is unreachable (or the installation token cannot read the repository). cloneNewRepo in the unchanged repoManager.ts throws new Error(redactAuthenticatedGitUrl(message)) — a plain Error, not a RepositoryRetrievalError. cloneManagedRepository and resolveTarget do not catch it.
    3. In toolsContext.ts retrieval(), the first line of the catch is if (!(error instanceof RepositoryRetrievalError)) throw error;, so the plain Error is rethrown unmapped.
    4. server.ts passes it to classifyError; classifyKnown in the (unchanged, verified) errorEnvelope.ts has no match for a plain Error and returns { code: 'INTERNAL_ERROR', message: 'The request could not be completed.', stage: 'internal', retryable: false, status: 500 }.

    Observable consequence: a transient network/clone failure is reported to the agent as a non-retryable internal error with no code it can act on, directly contradicting the contract the PR documents and that the same tool returns for the fetch path (fetchRequestedRefOnce correctly raises a 502 RepositoryRetrievalError). The same gap applies to readBlob in repositoryRetrievalService.ts:412-420: git.raw(['cat-file','-s',…]) and git.show([object]) are not wrapped, so a local git failure there also surfaces as INTERNAL_ERROR rather than the documented 500 REPOSITORY_RETRIEVAL_FAILED. Existing tests do not cover this: repositoryRetrievalService.test.ts mocks ensureRepoCloned to succeed or to throw a sentinel that is never asserted on, and mcpRepositoryRetrieval.test.ts pre-creates the clone. Proposed regression: mock ensureRepoCloned to reject with new Error('fatal: unable to access …') on a repository with no clone and assert the tool envelope is REPOSITORY_RETRIEVAL_FAILED with status: 502, retryable: true.

  • Minimum fix: In cloneManagedRepository, wrap the ensureRepoCloned call in try/catch and rethrow new RepositoryRetrievalError(\Failed to clone repository: ${redactAuthenticatedGitUrl(message)}`, 502); in readBlob, wrap the cat-file -sandgit.showcalls so non-retrieval errors become a 500RepositoryRetrievalError`. Add the regression test above.

Suggestions

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

S10: 🟢 .. rejected anywhere in a path, not only as a segment

assertSafeRepositoryPath in repositoryRetrievalValidation.ts throws when value.includes('..'), so legitimate git paths such as CHANGELOG..md or a...b/x.ts cannot be read or used as a search prefix, while the MCP-level assertRelativePath correctly checks split('/').includes('..'). Aligning the service check with the segment-based rule (or path.posix.normalize containment) would close the mismatch. Rare in practice, hence optional.

S11: 🟢 Abbreviated-SHA fallback can resolve a local-only branch

resolveManagedCommit deliberately refuses to answer from stale local refs when origin lacks the name, but the ABBREVIATED_SHA fallback calls rev-parse <ref>^{commit}, where git resolves a same-named local branch before an abbreviated object id. A worker branch named with only hex characters (e.g. facade, deadbeef) would therefore answer for a name origin does not have. Using rev-parse --disambiguate= or checking refs/heads/<ref> absence first would keep the "origin only" invariant strict. Extremely unlikely input, so a follow-up.

S12: 🟢 Malformed ref names surface as 502 retryable instead of INVALID_REF

assertSafeRef catches option injection and revision syntax, but names git itself rejects (a.lock, foo//bar, a bare @, a component starting with .) pass validation and fail inside git fetch, which fetchRequestedRefOnce reports as a 502 "Failed to fetch" retryable error. Running git check-ref-format --allow-onelevel (or mirroring its rules) up front would map these to INVALID_REF as the docs describe for malformed refs.

S13: 🟢 Core unit tests are not wired into a named suite

packages/core/test/repositoryRetrievalService.test.ts and relevanceServiceCommit.test.ts are substantial, but only the API integration test was added to test:mcp; the full test suite jobs were skipped on this head. If scripts/run-test-suite.mjs does not glob packages/core/test, consider adding these files to a script so the managed-clone and commit-scoped relevance coverage runs in CI.

S14: 🟢 Symlinks are read as their target path text

readBlob checks cat-file -t (a symlink is also a blob) and git show returns the link target string, which is then reported as file content with totalLines: 1. Checking the mode via ls-tree and reporting a distinct error or following the link within the tree would be more honest for agents. Pre-existing git semantics, so optional.

S15: 🟢 Per-call cost of semantic search

Every semantic search_repository_files call performs a fetch from origin, a git ls-tree of the full tree twice (once in scorePaths, once in restrictToCommitTree), and an LLM ranking pass over all indexed summaries. The tool is read-only and bounded, but for agents issuing many searches a short-lived cache keyed on (repository, commit, query) or a per-principal concurrency limit would reduce cost; the duplicate ls-tree could be shared as a small refactor.

Score

A well-designed and thoroughly tested feature; the only required change is a localized fix so clone (and raw git) failures take the documented REPOSITORY_RETRIEVAL_FAILED mapping instead of falling through to INTERNAL_ERROR.

Score: 6/10


🤖 Review Details

  • Model: Claude Fable 5.1
  • Time: 6m 40s
  • Tokens: 947,523 (919,223 in / 28,300 out)
  • Cost: $6.19

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 F6 S10 S11 S12 S13 S14 S15

🤖 Review by ProPR

@propr-dev

propr-dev Bot commented Oct 6, 2026

Copy link
Copy Markdown
Contributor Author

🔍 AI Code Review — astra

Overall Evaluation

The PR adds composable repository search and bounded reads with substantial integration coverage. It needs changes before merge: cached tags can override successfully refreshed branches, and credential masking can corrupt returned line structure.

✅ Authorization before retrieval — Both tools use the executor’s scope and repository checks before accessing git.

✅ Commit-scoped retrieval — Searches and reads use resolved commits, and semantic candidates are restricted to the requested commit’s tree.

✅ Response bounds and coverage — The implementation handles encoded response limits and tests pagination, authorization, freshness, and an MCP search-then-read loop.

The supplied current-head checks report 17 passed, none failed or pending. This review used static analysis only; no commands were run.

Merge blockers

Every finding below was introduced by this PR and must be resolved before merging.

F7: 🔴 Deleted cached tags shadow refreshed branches

  • Required behavior: Managed retrieval must resolve through the ref successfully fetched from origin, rather than return an obsolete cached ref.

  • Evidence: packages/core/src/services/repositoryManagedClone.ts, fetchRequestedRefOnce; packages/core/src/services/repositoryRetrievalService.ts, resolveFetchedCommit and resolveManagedCommit.

    1. Origin has a branch and tag both named release, pointing to different commits. A previous retrieval caches the tag.
    2. The tag is deleted on origin while the branch remains.
    3. A new request for ref: "release" tries fetching the tag, receives a missing-ref error, then successfully fetches the branch. fetchRequestedRefOnce returns only true.
    4. resolveFetchedCommit independently walks the mappings tag-first. The deleted tag still exists locally, so it returns that obsolete commit instead of the freshly fetched branch.

    Both search and read consequently return the wrong snapshot without a refCaveat. The explicit fetch has no pruning step, and the missing-tag cache suppresses fetch attempts without excluding that tag from resolution. Existing collision tests keep the tag present; the deletion test covers a branch without a competing cached tag.

    static trace: Verified across the supplied fetch and resolution implementations. proposed regression: Cache a colliding tag, delete it remotely, and assert that short-name reads and searches resolve to the surviving branch.

  • Minimum fix: Return the successful mapping or resolved commit from the fetch operation and resolve that exact target. Do not reconsider missing cached mappings after a successful refresh.

F8: 🔴 Credential masking removes repository newlines

  • Required behavior: Bounded reads must preserve source line structure so startLine, endLine, and continuation positions describe the delivered content correctly.

  • Evidence: packages/api/mcp/adapter.ts, redactText; packages/api/mcp/toolsContext.ts, fitReadResult; packages/api/mcp/toolExecution.ts, restoreOpaqueText.

    1. A committed text file contains three lines: Bearer, example, and tail.
    2. Reading those lines produces content: "Bearer\nexample\ntail" with endLine: 3.
    3. fitReadResult applies /Bearer\s+[A-Za-z0-9._~+/-]+/gi. Because \s+ consumes the newline, the delivered text becomes "Bearer [redacted]\ntail".
    4. Both remaining lines fit, so the function retains the original endLine: 3, although the returned text now contains only two lines. Reading the same source in separate line chunks also produces different masking behavior.

    This corrupts source layout and the correspondence between search line numbers and read content. The byte-limit calculations cannot prevent it because they operate after the newline has disappeared. The existing fidelity tests cover single-line credentials, not cross-line matches.

    static trace: Verified directly from the regular expression and fitReadResult’s unchanged-metadata return branch. proposed regression: Compare whole-file and chunked reads of this fixture and assert preservation of line boundaries.

  • Minimum fix: Make repository credential masking preserve newline boundaries, including the executor’s repeated masking. Restrict bearer-token separators to horizontal whitespace or preserve matched line separators explicitly.

Suggestions

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

S16: 🟢 Bound missing-tag cache retention

The new missingTags map removes expired entries only when the same key is requested again. Requests for many distinct nonexistent refs therefore leave expired entries resident indefinitely. A bounded cache or periodic expiration sweep would improve long-running memory behavior; this is optional operational hardening.

Score

The implementation has strong authorization, bounded-response handling, and test coverage, with passing current-head checks. Two demonstrated correctness defects require localized fixes before merge.

Score: 6/10


🤖 Review Details

  • Model: GPT-6 Astra
  • Time: 1m 15s
  • Tokens: 95,650 (93,570 in / 2,080 out)
  • Cost: $0.91

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 F7 F8 S16

🤖 Review by ProPR

@integry

integry commented Oct 6, 2026

Copy link
Copy Markdown
Owner

/fix all

@propr-dev

propr-dev Bot commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ Applied the requested follow-up changes in commit 194a412

Addressed 2 AI review comments (IDs: 6025705569, 6025725019)

Addressed findings F6, F7, F8 · suggestions S10, S11, S12, S13, S14, S15, S16

Summary of Changes

All ten selected records are fixed (F6–F8 and S10–S16), each with a regression test. The full npm run test:mcp run passes 391 of 391, which now includes the two core test files. Core and API both typecheck and lint clean. I checked that every new core regression fails against the old code. The F8 test I didn't run against the old code, but it follows directly from the old regex. Nothing visible in the UI changed, so there are no previews.

Findings

  • F6 – clone and local git failures:
    • A failed clone now returns REPOSITORY_RETRIEVAL_FAILED 502, retryable, with credentials removed from the URL in the message. This covers read, literal search and semantic search.
    • In readBlob, a git failure on a file that exists now returns 500. While testing this I found a worse case: when git show hits a corrupt object it can exit with an error without printing to stderr. simple-git then treats it as success and returns an empty string, so the file looked empty. The read now fetches the raw bytes and checks the length against cat-file -s.
    • Both changes have core regressions. I couldn't do an end-to-end MCP test with no clone, because the real clone would reach out to github.com. The step that maps a 502 to the retryable envelope is unchanged and already covered.
  • F7 – deleted tag hiding a branch: the fetch now returns the exact local ref it stored, and resolution uses only that. When GitHub is unreachable, the cached fallback also skips tags GitHub recently reported missing. One related change: if fetching the tag fails for a reason other than "not found", the fetch stops there instead of falling through to the branch. You then get the cached answer with a refCaveat, rather than a silent switch from tag to branch. The regression caches a tag, deletes it on the remote, and checks that reads, searches and the offline fallback all land on the surviving branch.
  • F8 – masking removed newlines: the Bearer pattern in redactText now matches only spaces and tabs, never a line break. That fixes both the tool's masking and the executor's second pass. The MCP regression checks that reading the whole file and reading it one line at a time give the same text with the same line numbers.

Suggestions

  • S10: a path is rejected only when one of its segments is exactly .., so names like CHANGELOG..md now work.
  • S11: a hex-only name now resolves only as a commit ID (via rev-parse --disambiguate). A local branch with the same name can no longer answer.
  • S12: assertSafeRef now applies the same rules as git check-ref-format (.lock, //, a bare @, parts starting with ., control characters, and so on). Bad names return INVALID_REF before any fetch or clone.
  • S13: repositoryRetrievalService.test.ts and relevanceServiceCommit.test.ts are now part of test:mcp.
  • S14: reading a symlink returns INVALID_PATH with a message naming the link's target, instead of returning the target path as file content. The blob reader moved into its own module, repositoryBlobReader.ts.
  • S15:
    • The relevance engine now lists the commit's files once and shares that list between path scoring and the commit filter.
    • Relevance results are cached for 60 seconds, up to 50 entries, in the new repositoryRelevanceCache.ts. The cache key includes the commit, query, model and index build. Failed runs, and runs where summary scoring didn't contribute, aren't cached. Paging through results no longer repeats the LLM ranking pass.
    • Nothing tests the shared file listing directly; the existing commit-scoped relevance tests still pass.
  • S16: the missing-tag cache now holds at most 1,000 entries and clears out expired ones whenever a new one is added. There's a test for the expiry sweep but not for the 1,000 limit, because reaching it would need over a thousand real fetches.

I updated docs/mcp.md and docs/mcp-coverage.md to describe the new path, ref, symlink, masking and caching behaviour.


🤖 Implementation Details

  • Model: Claude Opus 5.5 (medium)
  • Requested By: @integry
  • Time: 16m 4s
  • Tokens: 6,950,404 (6,904,273 in / 46,131 out)
  • Cost: $3.04
  • Subscription usage: Session +6%, 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: 6025848769✓

…h with a regression test. The full `npm run test:mcp` run passes 391 of 391, which now includes the two core test files. Core and API both typecheck and lint clean. I checked that every new core regression fails against the old code. The F8 test I didn't run against the old code, but it follows directly from the old regex. Nothing visible in the UI changed, so there are no previews.

All ten selected records are fixed (F6–F8 and S10–S16), each with a regression test. The full `npm run test:mcp` run passes 391 of 391, which now includes the two core test files. Core and API both typecheck and lint clean. I checked that every new core regression fails against the old code. The F8 test I didn't run against the old code, but it follows directly from the old regex. Nothing visible in the UI changed, so there are no previews.

**Findings**
- **F6 – clone and local git failures:**
  - A failed clone now returns `REPOSITORY_RETRIEVAL_FAILED` 502, retryable, with credentials removed from the URL in the message. This covers read, literal search and semantic search.
  - In `readBlob`, a git failure on a file that exists now returns 500. While testing this I found a worse case: when `git show` hits a corrupt object it can exit with an error without printing to stderr. simple-git then treats it as success and returns an empty string, so the file looked empty. The read now fetches the raw bytes and checks the length against `cat-file -s`.
  - Both changes have core regressions. I couldn't do an end-to-end MCP test with no clone, because the real clone would reach out to github.com. The step that maps a 502 to the retryable envelope is unchanged and already covered.
- **F7 – deleted tag hiding a branch:** the fetch now returns the exact local ref it stored, and resolution uses only that. When GitHub is unreachable, the cached fallback also skips tags GitHub recently reported missing. One related change: if fetching the tag fails for a reason other than "not found", the fetch stops there instead of falling through to the branch. You then get the cached answer with a `refCaveat`, rather than a silent switch from tag to branch. The regression caches a tag, deletes it on the remote, and checks that reads, searches and the offline fallback all land on the surviving branch.
- **F8 – masking removed newlines:** the `Bearer` pattern in `redactText` now matches only spaces and tabs, never a line break. That fixes both the tool's masking and the executor's second pass. The MCP regression checks that reading the whole file and reading it one line at a time give the same text with the same line numbers.

**Suggestions**
- **S10:** a path is rejected only when one of its segments is exactly `..`, so names like `CHANGELOG..md` now work.
- **S11:** a hex-only name now resolves only as a commit ID (via `rev-parse --disambiguate`). A local branch with the same name can no longer answer.
- **S12:** `assertSafeRef` now applies the same rules as `git check-ref-format` (`.lock`, `//`, a bare `@`, parts starting with `.`, control characters, and so on). Bad names return `INVALID_REF` before any fetch or clone.
- **S13:** `repositoryRetrievalService.test.ts` and `relevanceServiceCommit.test.ts` are now part of `test:mcp`.
- **S14:** reading a symlink returns `INVALID_PATH` with a message naming the link's target, instead of returning the target path as file content. The blob reader moved into its own module, `repositoryBlobReader.ts`.
- **S15:**
  - The relevance engine now lists the commit's files once and shares that list between path scoring and the commit filter.
  - Relevance results are cached for 60 seconds, up to 50 entries, in the new `repositoryRelevanceCache.ts`. The cache key includes the commit, query, model and index build. Failed runs, and runs where summary scoring didn't contribute, aren't cached. Paging through results no longer repeats the LLM ranking pass.
  - Nothing tests the shared file listing directly; the existing commit-scoped relevance tests still pass.
- **S16:** the missing-tag cache now holds at most 1,000 entries and clears out expired ones whenever a new one is added. There's a test for the expiry sweep but not for the 1,000 limit, because reaching it would need over a thousand real fetches.

I updated `docs/mcp.md` and `docs/mcp-coverage.md` to describe the new path, ref, symlink, masking and caching behaviour.

PR: #2832
Comment by: @integry (ID: 6025848769)
Model: Claude Opus 5.5
@integry

integry commented Oct 6, 2026

Copy link
Copy Markdown
Owner

/review fable astra

@propr-dev

propr-dev Bot commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ AI Code Review Complete requested by @integry

Posted 2 reviews:

View Task Details

@propr-dev

propr-dev Bot commented Oct 6, 2026

Copy link
Copy Markdown
Contributor Author

🔍 AI Code Review — fable

Overall Evaluation

This PR adds a repository retrieval service to @propr/core (semantic search via the planner relevance engine scoped to an exact commit, literal git grep streamed under a budget, and bounded blob reads from the object database), exposes it as two read-only MCP tools with policy authorization and stable error codes, keeps results byte-exact through the executor's redaction boundary, and documents and tests the surface end to end. The decomposition into small modules (repositoryManagedClone, repositoryLiteralGrep, repositoryFileLines, repositoryBlobReader, repositoryRelevanceCache, validation/types) is clean, and the hard parts — ref refresh in a shared, possibly shallow, single-branch clone; tag-before-branch resolution; deleted-tag shadowing; offline fallback; response-size fitting — are handled deliberately and covered by tests against real git fixtures.

I traced the changed control paths (authorization → defaultBranch → resolveTarget → fetch/resolve → search/read → fit*Result → executor redactToolResult → size bound) and the relevance-engine changes against the unchanged planner caller, and found no PR-introduced correctness, security, or contract regression that I could drive to an observable failure. The planner path (commit undefined) is behaviorally unchanged: scorePaths still uses ls-files, mineGitHistory/getCommitHistory get no revision, and no tree restriction runs.

✅ Opaque-text handling through the redactor is correct and tested — redactToolResult restores content/path/query/pathPrefix/matches[].path/lineMatches[].text with only in-place redactText, so a .json file with 201-element arrays and redactor-looking keys, and a [1, 2, 3] preview line, come back byte-for-byte; redactText is idempotent and never spans a newline, so fitReadResult's endLine/returnedBytes/nextStartLine stay true to the delivered content (packages/api/mcp/toolExecution.ts, packages/api/mcp/toolsContext.ts, verified by mcpRepositoryRetrieval.test.ts fidelity cases).

✅ Ref resolution refuses to answer from stale local state — resolveManagedCommit resolves exactly the ref the fetch stored (refs/remotes/origin/<b>, refs/tags/<t>, refs/propr/retrieval/origin-head), treats "couldn't find remote ref" as 404 rather than falling back to a stale remote-tracking ref, skips a negatively-cached tag so a deleted tag cannot shadow a same-named branch, and only resolves hex-only names as abbreviated object ids (never via a same-named worker branch). Covered by the deleted-branch, deleted-tag, hex-branch and stale-main fixtures.

✅ Response-size accounting is conservative and consistent — selectLines and fitReadResult use the same JSON-encoded cost formula (jsonBytes(line) - 2, +2 per separator), the envelope is measured with sentinel maxima, and fitSearchResult overcounts by one byte per match, so the executor's MAX_TOOL_RESULT_BYTES check cannot fire for a well-formed page; a first line that fits no response is a 413 with a message that does not advise an unreachable maxBytes.

Verdict: ready to merge within scope, conditional on the test:mcp run passing on the current head (no check runs were reported, and I could not execute tests in this review).

Merge blockers

No merge blockers.

Suggestions

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

S17: 🟢 Canonicalize repository casing before cloning and index lookup

McpPolicy.repository and defaultBranch match the configured repository case-insensitively, but resolveRepositoryClonePath(CLONES_BASE_PATH, owner, repoName), loadIndexRow({ full_name: repository }) and scoreSemanticRelevance's repoName prefix use the caller's exact spelling. A client that passes Acme/Repo for a repository configured as acme/repo is authorized, then triggers a second full clone under /clones/Acme/Repo (GitHub serves the redirect) and sees a "not indexed" caveat with heuristics only. Results remain correct, so this is a cost/degradation issue, not a blocker; resolving repository to the matched repo.name in toolsContext.ts before calling the service would close it.

S18: 🟢 Measure response size after masking path, query and keywordsDetected

fitReadResult and fitSearchResult mask content/lineMatches before measuring, but the executor additionally masks path, query (and redacts keywordsDetected, refCaveat), which can grow a string (ghp_a → [redacted]). Only a page sitting within a few hundred bytes of the 256 KiB limit and carrying token-shaped words in those fields could tip into RESULT_TOO_LARGE, so this is theoretical today; applying redactText to those fields inside the fit* helpers (they are idempotent) would make the bound exact.

S19: 🟢 Classify retrieval errors by a typed kind rather than message prefixes

retrieval() in toolsContext.ts maps 400s via /binary file/i, /^Invalid ref/ and /^(path|")/. It is correct for every message the service currently emits, but a directory literally named binary file would be reported as BINARY_FILE, and any future message rewording silently changes the MCP code. Adding an optional kind ('invalid_path' | 'binary' | 'invalid_ref' | …) to RepositoryRetrievalError and switching on it would make the contract robust.

S20: 🟢 Accept upper-case hexadecimal commit SHAs

isFullCommitSha, ABBREVIATED_SHA and revParseCommit's result check are lower-case only. A client passing ABCDEF… (40 chars) falls into the tag/branch fetch path, gets no match, fails the abbreviated-SHA test and receives REF_NOT_FOUND even though git itself would resolve it. Lower-casing a ref that matches /^[0-9a-fA-F]{4,64}$/ before classification is a one-line fix.

S21: 🟢 Skip the generic redact() pass for opaque fields

redactToolResult still runs redact(result) over the whole payload before restoring opaque fields, so a 200 KB .json read is JSON.parsed, recursively redacted and re-stringified only to be discarded, and content is regex-scanned three times (fitReadResult, redact, restoreOpaqueText). Harmless functionally; shallow-copying the result with opaque fields stripped before redact would avoid the wasted CPU on the largest payloads this surface produces.

S22: 🟢 Use -z in mineGitHistory so quoted paths survive the commit-tree restriction

restrictToCommitTree intersects scores with git ls-tree -z paths (verbatim), but mineGitHistory/getCommitHistory use --name-only without -z, so paths with non-ASCII or special characters arrive core.quotePath-quoted and are silently dropped from commit-scoped results. The quoting is pre-existing (it only cost a mismatch in the unscoped planner path), so this is a follow-up rather than a regression.

S23: 🟢 Mirror the semantic scorer's HEAD fallback in freshness reporting

scoreSemanticRelevance falls back to HEAD summaries when none exist for the requested branch, but searchSemantic consults only the repositories row for indexBranch and, when that row is missing, sets usedIndex=false and passes useSummaryScoring: false, so an instance indexed under HEAD gets heuristics only for branch: "main". This matches get_repository_context's existing exact-branch behavior, so it is a consistency choice rather than a defect; if desired, fall back to the HEAD row and report indexBranch: "HEAD" in freshness.

Score

No PR-introduced blockers were found; the implementation is careful about the shared-clone, redaction and size-bound invariants and has strong real-git test coverage, with merge readiness conditional only on the (unreported) current-head test:mcp run.

Score: 8/10


🤖 Review Details

  • Model: Claude Fable 5.1
  • Time: 9m 25s
  • Tokens: 202,291 (163,261 in / 39,030 out)
  • Cost: $3.72

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 S17 S18 S19 S20 S21 S22 S23

🤖 Review by ProPR

@propr-dev

propr-dev Bot commented Oct 6, 2026

Copy link
Copy Markdown
Contributor Author

🔍 AI Code Review — astra

Overall Evaluation

The PR adds composable repository search and bounded reading with substantial integration coverage. It needs localized correctness fixes before merge.

✅ Snapshot consistency — Retrieval resolves a commit and uses it for literal search, blob reads, and semantic tree/history scoring.

✅ Authorization enforcement — Both tools pass through repository policy and read-scope checks before retrieval.

✅ Response bounds — Reads preserve whole-line continuation, and oversized search pages return a continuation offset.

This review is based on static analysis of the supplied code. No commands were run; no current-head check runs were reported.

Merge blockers

Every finding below was introduced by this PR and must be resolved before merging.

F9: 🔴 Truncated scans report incomplete counts as complete

  • Required behavior: Literal search promises complete per-file matchCount values; scan truncation must accurately identify which results are incomplete.

  • Evidence: packages/core/src/services/repositoryLiteralGrep.ts, streamGitGrep and GrepAggregator.finish; packages/core/src/services/repositoryRetrievalService.ts, searchLiteral.

    1. Search a committed text file containing two million needle lines for needle.
    2. Git emits a record containing the commit, path, line number, and text for every matching line. Output exceeds 64 MiB before all matches in that file are emitted.
    3. streamGitGrep kills the process at the byte budget. aggregator.finish() retains the partially counted file.
    4. searchLiteral returns its accumulated count as matchCount, although additional matching lines remain in that same file.

    The observable result understates that file’s matches. scanTruncated identifies an incomplete scan, but the public options explicitly say counts are always complete, and the result documentation describes missing later files rather than incomplete retained-file counts. The file-budget test only exercises stopping between files, so it does not prevent this failure. static trace: verified through the byte-budget stop, aggregation, and result mapping; not executed.

  • Minimum fix: Track whether the final file was fully scanned. Omit an incomplete file or explicitly expose its count as a lower bound, updating the result contract and adding a regression for stopping within one file.

F10: 🔴 Missing index revision is reported as fresh

  • Required behavior: Semantic freshness must distinguish an index verified against the searched commit from one whose revision is unknown.

  • Evidence: packages/core/src/services/repositoryRetrievalService.ts, describeIndexCaveat and searchSemantic.

    1. A repository has a completed index row with last_indexed_hash: null and usable file summaries. This state is permitted by the supplied indexing producer, whose commit information is optional.
    2. describeIndexCaveat returns null, enabling summary scoring.
    3. stale initializes to false. The revision comparison is skipped because row.last_indexed_hash is falsy.
    4. When summaries contribute, the response retains usedIndex: true, stale: false, and no caveat despite having no evidence that the summaries describe the requested commit.

    Clients receive an unjustified freshness assurance, including when searching another revision. Commit-tree filtering only establishes that paths exist; it cannot establish summary freshness. static trace: verified against the nullable index fields, optional-hash producer, and freshness branches; not executed.

  • Minimum fix: Treat a missing indexed hash as unknown freshness: retain summary scoring if desired, but return stale: true with an explanatory caveat. Add coverage for a completed index without a hash.

Suggestions

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

S24: 🟢 Align stale-index documentation

docs/mcp-coverage.md says a stale index degrades to heuristics, whereas searchSemantic deliberately continues using outdated summaries and reports a caveat. Align this sentence with the more accurate explanation in docs/mcp.md. This is optional documentation cleanup; the implemented fallback distinction is otherwise explicit.

Score

The implementation has strong authorization, snapshot handling, and targeted tests. Two localized result-contract defects remain, so it is not yet merge-ready.

Score: 6/10


🤖 Review Details

  • Model: GPT-6 Astra
  • Time: 1m 21s
  • Tokens: 99,846 (97,634 in / 2,212 out)
  • Cost: $0.98

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 F9 F10 S24

🤖 Review by ProPR

Repository owner deleted a comment from propr-dev Bot Oct 6, 2026
@integry

integry commented Oct 6, 2026

Copy link
Copy Markdown
Owner

/merge

@propr-dev

propr-dev Bot commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor Author

🔀 Resolved merge conflicts from main into 2797-epic-repository-search-sgj in commit e36663a

Conflicting Files

  • package.json

Resolution Summary

The merge conflict is resolved. package.json was the only file with conflict markers, and none are left anywhere in the repository.

What the conflict was: Both branches changed the same line, the test:mcp script, by adding different test files to it.

  • This PR added three repository-search tests: packages/api/test/mcpRepositoryRetrieval.test.ts, packages/core/test/repositoryRetrievalService.test.ts and packages/core/test/relevanceServiceCommit.test.ts.
  • main added packages/api/test/mcpRepositoryAutoResolve.test.ts, placed right after settingsCatalog.test.ts.

How I resolved it: I started from the PR's version of the line and inserted main's new test file in the same spot main used, right after settingsCatalog.test.ts. Nothing else in the line changed.

Why: The two sides only added things and didn't overlap, so keeping both is safe. Dropping either side would leave tests out of npm run test:mcp. Using the PR's line as the starting point keeps its intent, and putting main's file where main put it keeps the diff against main small.

Checks: package.json still parses as valid JSON, the test:mcp script contains all four test files, and all four files exist on disk. I didn't run the test suite.

git add package.json failed because the git index is on a read-only file system, so git may still list the file as unmerged. That is the expected sandbox restriction.


🤖 Resolution Details

  • Model: Claude Opus 5.5
  • Time: 23s

View Task Execution


System-triggered merge conflict resolution

Automatically resolved merge conflicts after merging target branch into PR branch.
Resolved conflicts in:
- package.json

PR: #2832
Model: Claude Opus 5.5
@integry

integry commented Oct 6, 2026

Copy link
Copy Markdown
Owner

/fix all

@integry

integry commented Oct 6, 2026

Copy link
Copy Markdown
Owner

/ultrafix

@propr-dev

propr-dev Bot commented Oct 6, 2026

Copy link
Copy Markdown
Contributor Author

🔄 Ultrafix loop started (goal: 8/10, max cycles: 10)

First action: /review

💡 Tip: Remove the ultrafix label from this PR to stop further ultrafix cycles.

@propr-dev propr-dev Bot added the ultrafix label Oct 6, 2026
Waiting for the MCP suite to finish.

PR: #2832
Comment by: @integry (ID: 6027132499)
Model: Claude Opus 5.5
@propr-dev

propr-dev Bot commented Oct 6, 2026

Copy link
Copy Markdown
Contributor Author

⏳ Ultrafix is waiting for CI before the next /review.

These blocking checks on 75b9799 are holding the loop back:

  • CLI Node Compatibility Guard — not finished
  • Classify changed surfaces — not finished
  • Select PR check runners — not finished
  • Classify changed surfaces — not finished
  • Classify changed surfaces — not finished
  • Select PR check runners — not finished
  • Review dependency changes — not finished
  • Analyze JavaScript and TypeScript — not finished

Checks matching this repository's non-blocking checks never gate Ultrafix. The loop continues automatically once the blocking checks pass; if they have not settled within 2 hours, Ultrafix stops.

@propr-dev

propr-dev Bot commented Oct 6, 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 Oct 6, 2026

Copy link
Copy Markdown
Contributor Author

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

Overall Evaluation

The PR implements repository search and bounded reading with substantial integration coverage. It needs a localized correction before merge because credential masking can exceed the caller’s requested byte limit.

✅ Authorization before retrieval — Both tools use the executor’s scope and repository checks before accessing git.

✅ Commit-scoped retrieval — Search and reads resolve a commit, and semantic candidates are restricted to its tree.

✅ Protocol coverage — Added tests exercise catalog dispatch, authorization failures, pagination, and an MCP search-then-read loop. Current checks report 17 passed, none failed or pending.

Merge blockers

Every finding below was introduced by this PR and must be resolved before merging.

F11: 🔴 Preserve maxBytes after credential masking

  • Required behavior: Bounded file reads must respect the requested maxBytes; returnedBytes describes the content actually delivered.

  • Evidence: packages/api/mcp/toolsContext.ts, fitReadResult and read_repository_file registration; packages/core/src/services/repositoryFileLines.ts, selectLines.

    1. An authorized caller reads a committed file containing ghp_a\n with maxBytes: 5.
    2. selectLines accepts the five-byte line and returns content: "ghp_a".
    3. fitReadResult masks it to [redacted], which is ten bytes. Its fitting loop checks only the 256 KiB response limit and never receives the requested maxBytes.
    4. The successful response therefore contains returnedBytes: 10, exceeding the requested five-byte bound. The same expansion can exceed larger requested limits.

    The service’s byte check runs before masking, and the executor only enforces the overall response ceiling. Existing masking tests verify content and byte accounting, but not preservation of the requested byte bound. Verification provenance — static trace: the complete service-to-tool-to-executor path supplied in the diff; no commands were run.

  • Minimum fix: Pass the effective maxBytes into fitReadResult and fit masked whole lines against both the requested byte limit and the serialized response ceiling. Preserve continuation metadata when dropping lines, and return an appropriate 413 when the first masked line cannot fit.

Suggestions

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

S25: 🟢 Exercise real cold-clone preparation

The cold-clone tests mock ensureRepoCloned. A focused integration test using its real implementation would strengthen the read-only guarantee, particularly for an empty remote: the supplied implementation calls ensureSeedCommitIfEmpty. The excerpt does not establish that helper’s external effects, so this is a coverage suggestion rather than a verified blocker.

Score

The implementation has strong authorization, snapshot handling, documentation, and tests, with passing current checks. One demonstrated output-bound violation remains and requires a localized fix.

Score: 6/10


🤖 Review Details

  • Model: GPT-6 Astra
  • Time: 1m 14s
  • Tokens: 107,740 (105,575 in / 2,165 out)
  • Cost: $1.10

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 F11 S25

🤖 Review by ProPR

@propr-dev

propr-dev Bot commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ Applied the requested follow-up changes in commit 459e06f

Addressed 1 AI review comment (IDs: 6027515517)

Addressed finding F11

Summary of Changes

I fixed F11: read_repository_file no longer returns more bytes than the requested maxBytes after credentials are masked. The repository-retrieval MCP tests pass (29 of 29), and the typecheck shows no errors in the changed files.

Cause: fitReadResult masked each line (for example, ghp_a becomes [redacted]) after the service had already applied maxBytes. It then only checked the overall 256 KiB response limit, so a 5-byte request could return returnedBytes: 10.

Fix (packages/api/mcp/toolsContext.ts):

  • fitReadResult now takes the requested maxBytes, and read_repository_file passes it in.
  • Lines are now kept only while they fit both the requested byte limit and the response limit, counting whole lines after masking.
  • When later lines are dropped, the result still reports where to continue: endLine, returnedBytes, truncated: true and nextStartLine all match the content actually returned.
  • If the first masked line is larger than maxBytes, the tool returns a 413 FILE_TOO_LARGE error. Like the service's existing error, it says how large maxBytes needs to be. The older 413 for a line that can never fit in a response is unchanged.

New tests (packages/api/test/mcpRepositoryRetrievalResults.test.ts):

  • Direct fitReadResult tests:
    • Masking pushes the second line over maxBytes, so it is dropped and nextStartLine points to it.
    • A page the service already truncated keeps its nextStartLine when the masked content still fits.
    • Reading ghp_a with maxBytes: 5 returns a 413 that asks for at least 10 bytes.
  • An end-to-end read_repository_file test confirms the requested maxBytes reaches the masking step. The file's mock can now return a successful result as well as an error.

Similar code: fitSearchResult also masks before measuring, but search_repository_files has no maxBytes setting, so the same problem can't happen there. Nothing else calls fitReadResult.

No visual preview was created, since this change has no visible UI.


🤖 Implementation Details

  • Model: Claude Opus 5.5 (medium)
  • Requested By: @propr-ultrafix
  • Time: 3m 37s
  • Tokens: 581,389 (574,791 in / 6,598 out)
  • Cost: $0.45

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

…bytes than the requested `maxBytes` after credentials are masked. The repository-retrieval MCP tests pass (29 of 29), and the typecheck shows no errors in the changed files.

I fixed F11: `read_repository_file` no longer returns more bytes than the requested `maxBytes` after credentials are masked. The repository-retrieval MCP tests pass (29 of 29), and the typecheck shows no errors in the changed files.

**Cause:** `fitReadResult` masked each line (for example, `ghp_a` becomes `[redacted]`) after the service had already applied `maxBytes`. It then only checked the overall 256 KiB response limit, so a 5-byte request could return `returnedBytes: 10`.

**Fix** (`packages/api/mcp/toolsContext.ts`):
- `fitReadResult` now takes the requested `maxBytes`, and `read_repository_file` passes it in.
- Lines are now kept only while they fit both the requested byte limit and the response limit, counting whole lines after masking.
- When later lines are dropped, the result still reports where to continue: `endLine`, `returnedBytes`, `truncated: true` and `nextStartLine` all match the content actually returned.
- If the first masked line is larger than `maxBytes`, the tool returns a 413 `FILE_TOO_LARGE` error. Like the service's existing error, it says how large `maxBytes` needs to be. The older 413 for a line that can never fit in a response is unchanged.

**New tests** (`packages/api/test/mcpRepositoryRetrievalResults.test.ts`):
- Direct `fitReadResult` tests:
  - Masking pushes the second line over `maxBytes`, so it is dropped and `nextStartLine` points to it.
  - A page the service already truncated keeps its `nextStartLine` when the masked content still fits.
  - Reading `ghp_a` with `maxBytes: 5` returns a 413 that asks for at least 10 bytes.
- An end-to-end `read_repository_file` test confirms the requested `maxBytes` reaches the masking step. The file's mock can now return a successful result as well as an error.

**Similar code:** `fitSearchResult` also masks before measuring, but `search_repository_files` has no `maxBytes` setting, so the same problem can't happen there. Nothing else calls `fitReadResult`.

No visual preview was created, since this change has no visible UI.

PR: #2832
Comment by: @propr-ultrafix (ID: 0)
Model: Claude Opus 5.5
@propr-dev

propr-dev Bot commented Oct 6, 2026

Copy link
Copy Markdown
Contributor Author

⏳ Ultrafix is waiting for CI before the next /review.

These blocking checks on 459e06f are holding the loop back:

  • Windows Connect Discovery (ordinary user, Node 22) — not finished
  • Connect Discovery and Darwin ACL (Node 22) — not finished
  • Validate Changes — not finished

Checks matching this repository's non-blocking checks never gate Ultrafix. The loop continues automatically once the blocking checks pass; if they have not settled within 2 hours, Ultrafix stops.

@propr-dev

propr-dev Bot commented Oct 6, 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 Oct 6, 2026

Copy link
Copy Markdown
Contributor Author

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

Overall Evaluation

The PR implements shared repository retrieval, authorized MCP tools, and extensive integration coverage. It needs a localized correctness fix before merge.

✅ Authorization before retrieval — The executor checks scope, repository grants, configuration, and current GitHub access before invoking either tool.

✅ Bounded responses — Reads preserve whole-line continuation, and search pages account for JSON encoding and credential masking.

✅ Commit-scoped retrieval — Search and reading use resolved commits rather than the shared checkout.

This review used static analysis only, as requested. Current checks report 15 passed, none failed, and one pending.

Merge blockers

Every finding below was introduced by this PR and must be resolved before merging.

F12: 🔴 Normalize paths before detecting symlinks

  • Required behavior: Symbolic links must be rejected as INVALID_PATH, rather than returned as ordinary file content.

  • Evidence: packages/core/src/services/repositoryRetrievalService.ts, readRepositoryFileContent; packages/core/src/services/repositoryBlobReader.ts, readBlob.

    1. A repository contains util-link.ts, a committed symbolic link to src/util.ts. Call read_repository_file with path: "././util-link.ts".
    2. Both path validators accept the input. The service removes only one leading ./, leaving ./util-link.ts.
    3. Git resolves <commit>:./util-link.ts relative to the repository root and returns the symlink’s blob.
    4. The mode check compares the tree entry’s canonical path, util-link.ts, against the supplied spelling, ./util-link.ts. They differ, so isSymlink remains false.
    5. The tool successfully returns src/util.ts as file content instead of rejecting the symbolic link.

    The traversal checks do not reject repeated ./ components, and the existing symlink test exercises only the canonical spelling. static trace: the accepted input flows through single-prefix removal, Git’s relative object-path resolution, and the exact-string mode comparison. No commands or tests were executed.

  • Minimum fix: Canonicalize validated repository-relative paths before both blob lookup and tree-mode comparison. Add a regression asserting that canonical and repeated-./ spellings of a symlink produce the same INVALID_PATH result.

Suggestions

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

S26: 🟢 Clarify trailing newline behavior

The documentation describes content as “exactly as committed,” but splitLines removes the terminal newline and returned lines are rejoined without it. Clarify this line-oriented representation in the documentation. The behavior is intentional in the supplied tests, so this wording improvement is non-blocking.

Score

The implementation has strong authorization, response bounds, and test coverage, but the symlink rejection bypass needs correction. The pending check alone does not lower the score.

Score: 6/10


🤖 Review Details

  • Model: GPT-6 Astra
  • Time: 1m 37s
  • Tokens: 109,693 (107,000 in / 2,693 out)
  • Cost: $1.09

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 F12 S26

🤖 Review by ProPR

@propr-dev

propr-dev Bot commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ Applied the requested follow-up changes in commit 8eb2e4d

Addressed 1 AI review comment (IDs: 6027694099)

Addressed finding F12

Summary of Changes

I fixed F12. A symlink is now rejected as INVALID_PATH however its path is spelled, so ././util-link.ts no longer returns the contents of src/util.ts.

Fix

  • I added canonicalRepositoryPath in packages/core/src/services/repositoryRetrievalValidation.ts. It runs the existing safety checks, then drops empty and . segments, so ./a, ././a, a//b and a/./b all become one path. A path that ends up empty, such as ., ./ or ././, is rejected as invalid_path.
  • readRepositoryFileContent uses it in place of stripping a single leading ./ (packages/core/src/services/repositoryRetrievalService.ts:482). The Git lookup and the symlink check in readBlob now get the same path the tree uses, so the comparison in repositoryBlobReader.ts:57 matches. The path field in the result is also the canonical form now.
  • readBlob has only this one caller, so nothing else needed the change.

Regression tests (packages/core/test/repositoryRetrievalService.test.ts)

  • A symlink read as util-link.ts, ./util-link.ts, ././util-link.ts and .//util-link.ts gives the same 400 invalid_path "symbolic link" error each time.
  • An ordinary file read as ././src/util.ts, src//util.ts and src/./util.ts returns path: 'src/util.ts', and the empty paths are rejected.
  • With the old single-prefix stripping put back, both new tests fail. With the fix, they pass.

Test results

  • The core retrieval suite passes: 61 of 61.
  • The MCP retrieval suites (mcpRepositoryRetrieval, mcpRepositoryRetrievalResults) pass: 29 of 29.
  • The typecheck shows no errors in the changed files, and ESLint reports no errors on them. ESLint skipped the test file because no lint configuration covers it.
  • I didn't add a symlink to the MCP-level test fixture, because that fixture is shared and a new file could change other tests' search results. The MCP layer turns invalid_path into INVALID_PATH, so the core tests cover this path.

Separate issue, not fixed: normalizePathPrefix, used by search_repository_files, still strips only one leading ./, so a prefix like ././src won't match anything. It doesn't let a symlink through, so it's outside F12 and I left it alone.

This change has nothing visible, so I made no previews.


🤖 Implementation Details

  • Model: Claude Opus 5.5 (medium)
  • Requested By: @propr-ultrafix
  • Time: 3m 29s
  • Tokens: 615,973 (609,911 in / 6,062 out)
  • Cost: $0.42

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

…wever its path is spelled, so `././util-link.ts` no longer returns the contents of `src/util.ts`.

I fixed F12. A symlink is now rejected as `INVALID_PATH` however its path is spelled, so `././util-link.ts` no longer returns the contents of `src/util.ts`.

**Fix**
- I added `canonicalRepositoryPath` in `packages/core/src/services/repositoryRetrievalValidation.ts`. It runs the existing safety checks, then drops empty and `.` segments, so `./a`, `././a`, `a//b` and `a/./b` all become one path. A path that ends up empty, such as `.`, `./` or `././`, is rejected as `invalid_path`.
- `readRepositoryFileContent` uses it in place of stripping a single leading `./` (`packages/core/src/services/repositoryRetrievalService.ts:482`). The Git lookup and the symlink check in `readBlob` now get the same path the tree uses, so the comparison in `repositoryBlobReader.ts:57` matches. The `path` field in the result is also the canonical form now.
- `readBlob` has only this one caller, so nothing else needed the change.

**Regression tests** (`packages/core/test/repositoryRetrievalService.test.ts`)
- A symlink read as `util-link.ts`, `./util-link.ts`, `././util-link.ts` and `.//util-link.ts` gives the same 400 `invalid_path` "symbolic link" error each time.
- An ordinary file read as `././src/util.ts`, `src//util.ts` and `src/./util.ts` returns `path: 'src/util.ts'`, and the empty paths are rejected.
- With the old single-prefix stripping put back, both new tests fail. With the fix, they pass.

**Test results**
- The core retrieval suite passes: 61 of 61.
- The MCP retrieval suites (`mcpRepositoryRetrieval`, `mcpRepositoryRetrievalResults`) pass: 29 of 29.
- The typecheck shows no errors in the changed files, and ESLint reports no errors on them. ESLint skipped the test file because no lint configuration covers it.
- I didn't add a symlink to the MCP-level test fixture, because that fixture is shared and a new file could change other tests' search results. The MCP layer turns `invalid_path` into `INVALID_PATH`, so the core tests cover this path.

**Separate issue, not fixed:** `normalizePathPrefix`, used by `search_repository_files`, still strips only one leading `./`, so a prefix like `././src` won't match anything. It doesn't let a symlink through, so it's outside F12 and I left it alone.

This change has nothing visible, so I made no previews.

PR: #2832
Comment by: @propr-ultrafix (ID: 0)
Model: Claude Opus 5.5
@propr-dev

propr-dev Bot commented Oct 6, 2026

Copy link
Copy Markdown
Contributor Author

⏳ Ultrafix is waiting for CI before the next /review.

These blocking checks on 8eb2e4d are holding the loop back:

  • Validate Changes — not finished
  • Windows Connect Discovery (ordinary user, Node 22) — not finished
  • Connect Discovery and Darwin ACL (Node 22) — not finished

Checks matching this repository's non-blocking checks never gate Ultrafix. The loop continues automatically once the blocking checks pass; if they have not settled within 2 hours, Ultrafix stops.

@propr-dev

propr-dev Bot commented Oct 7, 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 Oct 7, 2026

Copy link
Copy Markdown
Contributor Author

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

Overall Evaluation

The PR implements the shared retrieval service, authorized MCP search/read tools, integration coverage, and documentation. The supplied code supports merge readiness within scope, conditional on the remaining JavaScript/TypeScript analysis check completing successfully.

✅ Commit-scoped retrieval — Reads and literal searches use resolved commits; semantic ranking restricts candidates to the requested commit’s tree.

✅ Authorization before retrieval — Both tools pass through the executor’s scope and repository policy checks before accessing git.

✅ Bounded, resumable results — Whole-line reads and fitted search pages preserve continuation cursors, with explicit truncation and freshness metadata.

This was a static review of the supplied diff and context; no commands or tests were run. The authoritative check summary reports no failures, 15 passes, and one pending check.

Merge blockers

No merge blockers.

Suggestions

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

S27: 🟢 Clarify terminal newline handling

docs/mcp.md describes content as “exactly as committed,” but repositoryFileLines.ts removes the final empty split element and repositoryRetrievalService.ts joins selected lines without restoring the terminal newline. Clarify that reads preserve line text while omitting the final line terminator. This is optional documentation precision: the implementation and supplied tests consistently use that representation.

Score

The implementation addresses the stated objective with substantial coverage of authorization, ref resolution, response bounds, and failure handling. No merge-blocking defect was verified; the remaining check is pending.

Score: 9/10


🤖 Review Details

  • Model: GPT-6 Astra
  • Time: 1m 1s
  • Tokens: 108,125 (106,636 in / 1,489 out)
  • Cost: $1.01

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 S27

🤖 Review by ProPR

@propr-dev propr-dev Bot removed the ultrafix label Oct 7, 2026
@integry
integry marked this pull request as ready for review October 7, 2026 09:20
@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown

Full Test Suite Results

Validation failed during: Test shard (shard 2).

  • Dependency install: success
  • Workspace build: success
  • Docs validation: success
  • Shard coverage verification: success
  • Hosted native Electron units: skipped (classifier decision: false)
  • Shard 1/4: passed in 420.5s on GitHub Actions 1000070141
  • Shard 2/4: failed during Test shard in 487.0s on GitHub Actions 1000070143
    • packages/core/test/repositoryWorkflow.test.ts: exit 1
  • Shard 3/4: passed in 421.7s on GitHub Actions 1000070144
  • Shard 4/4: passed in 584.4s on GitHub Actions 1000070142
View shard 2/4 output
...(truncated)

e mocking is an experimental feature and might change at any time
# (Use `node --trace-warnings ...` to show where the warning was created)
# Subtest: Ultrafix CI deferral notice
    # Subtest: posts one comment per deferral, not per poll
    ok 1 - posts one comment per deferral, not per poll
      ---
      duration_ms: 2.686636
      type: 'test'
      ...
    # Subtest: a new head or a new loop epoch is a new deferral
    ok 2 - a new head or a new loop epoch is a new deferral
      ---
      duration_ms: 0.575884
      type: 'test'
      ...
    # Subtest: stops the loop with "CI did not settle" once the wait exceeds the timeout
    ok 3 - stops the loop with "CI did not settle" once the wait exceeds the timeout
      ---
      duration_ms: 0.782298
      type: 'test'
      ...
    # Subtest: the timeout comment reuses the "Ultrafix stopped" wording with the CI reason
    ok 4 - the timeout comment reuses the "Ultrafix stopped" wording with the CI reason
      ---
      duration_ms: 0.310388
      type: 'test'
      ...
    # Subtest: formats wait durations for comments
    ok 5 - formats wait durations for comments
      ---
      duration_ms: 0.154117
      type: 'test'
      ...
    1..5
ok 1 - Ultrafix CI deferral notice
  ---
  duration_ms: 5.646443
  type: 'suite'
  ...
1..1
# tests 5
# suites 1
# pass 5
# fail 0
# cancelled 0
# skipped 0
# todo 0
# duration_ms 308.086535
[168/179] passed test/ultrafixCiWait.test.ts in 0.4s

[169/179] test/ultrafixEscalationPolicy.test.ts
TAP version 13
# Subtest: equal and lower scores stall; strict improvement resets; best survives handoff
ok 1 - equal and lower scores stall; strict improvement resets; best survives handoff
  ---
  duration_ms: 1.284554
  type: 'test'
  ...
# Subtest: climbs at most N then hands off at its own base effort and fresh patience
ok 2 - climbs at most N then hands off at its own base effort and fresh patience
  ---
  duration_ms: 0.297284
  type: 'test'
  ...
# Subtest: N=0 with patience=4 never touches the reasoning dial
ok 3 - N=0 with patience=4 never touches the reasoning dial
  ---
  duration_ms: 0.194723
  type: 'test'
  ...
# Subtest: two-tier provider switches its encoded model effort then retains its final effort
ok 4 - two-tier provider switches its encoded model effort then retains its final effort
  ---
  duration_ms: 0.39171
  type: 'test'
  ...
# Subtest: single-tier GPT-OSS immediately hands off once stalled
ok 5 - single-tier GPT-OSS immediately hands off once stalled
  ---
  duration_ms: 0.187059
  type: 'test'
  ...
# Subtest: skips unavailable models and keeps the current model when none remain
ok 6 - skips unavailable models and keeps the current model when none remain
  ---
  duration_ms: 0.884057
  type: 'test'
  ...
# Subtest: unspecified effort takes the first explicit step for each dial runtime
ok 7 - unspecified effort takes the first explicit step for each dial runtime
  ---
  duration_ms: 0.299648
  type: 'test'
  ...
# Subtest: all later models unavailable retains the current stage and execution across reviews
ok 8 - all later models unavailable retains the current stage and execution across reviews
  ---
  duration_ms: 0.44505
  type: 'test'
  ...
1..8
# tests 8
# suites 0
# pass 8
# fail 0
# cancelled 0
# skipped 0
# todo 0
# duration_ms 302.369212
[169/179] passed test/ultrafixEscalationPolicy.test.ts in 0.4s

[170/179] test/ultrafixLoopContinuation.test.ts
TAP version 13
# Subtest: Ultrafix loop continuation logic
    # Subtest: review-success-stop: explicitly clean review
        # Subtest: determineNextAction returns null when the review is valid and clean
        ok 1 - determineNextAction returns null when the review is valid and clean
          ---
          duration_ms: 6.742496
          type: 'test'
          ...
        # Subtest: determineNextAction returns fix when a passing review still has blockers
        ok 2 - determineNextAction returns fix when a passing review still has blockers
          ---
          duration_ms: 1.842774
          type: 'test'
          ...
        # Subtest: goal completion is persisted as a successful terminal state
        ok 3 - goal completion is persisted as a successful terminal state
          ---
          duration_ms: 3.421897
          type: 'test'
          ...
        1..3
    ok 1 - review-success-stop: explicitly clean review
      ---
      duration_ms: 12.998695
      type: 'suite'
      ...
    # Subtest: review-success-continue: score below goal
        # Subtest: clean review below goal stops without a fix and persists an unsuccessful completion
        ok 1 - clean review below goal stops without a fix and persists an unsuccessful completion
          ---
          duration_ms: 0.665179
          type: 'test'
          ...
        # Subtest: determineNextAction returns fix when score is below goal
        ok 2 - determineNextAction returns fix when score is below goal
          ---
          duration_ms: 3.250989
          type: 'test'
          ...
        # Subtest: determineNextAction returns fix when score is null
        ok 3 - determineNextAction returns fix when score is null
          ---
          duration_ms: 1.260058
          type: 'test'
          ...
        1..3
    ok 2 - review-success-continue: score below goal
      ---
      duration_ms: 5.748914
      type: 'suite'
      ...
    # Subtest: fix-completion: schedules review
        # Subtest: determineNextAction returns review after fix
        ok 1 - determineNextAction returns review after fix
          ---
          duration_ms: 1.907234
          type: 'test'
          ...
        # Subtest: recordAction increments cycleCount after fix
        ok 2 - recordAction increments cycleCount after fix
          ---
          duration_ms: 1.809041
          type: 'test'
          ...
        # Subtest: recordAction does not increment cycleCount after review
        ok 3 - recordAction does not increment cycleCount after review
          ---
          duration_ms: 1.583041
          type: 'test'
          ...
        1..3
    ok 3 - fix-completion: schedules review
      ---
      duration_ms: 5.960398
      type: 'suite'
      ...
    # Subtest: terminal conditions: state persisted
        # Subtest: failed terminal state is persisted when max cycles are reached
        ok 1 - failed terminal state is persisted when max cycles are reached
          ---
          duration_ms: 2.041284
          type: 'test'
          ...
        # Subtest: inactive loop returns null action
        ok 2 - inactive loop returns null action
          ---
          duration_ms: 5.509969
          type: 'test'
          ...
        1..2
    ok 4 - terminal conditions: state persisted
      ---
      duration_ms: 7.81263
      type: 'suite'
      ...
    # Subtest: label-based loop control
        # Subtest: loop stops when no active state exists
        ok 1 - loop stops when no active state exists
          ---
          duration_ms: 0.259694
          type: 'test'
          ...
        # Subtest: clearState removes loop state completely
        ok 2 - clearState removes loop state completely
          ---
          duration_ms: 0.331318
          type: 'test'
          ...
        1..2
    ok 5 - label-based loop control
      ---
      duration_ms: 0.726464
      type: 'suite'
      ...
    # Subtest: multi-cycle progression
        # Subtest: full cycle: review → fix → review with incrementing cycle count
        ok 1 - full cycle: review → fix → review with incrementing cycle count
          ---
          duration_ms: 3.72915
          type: 'test'
          ...
        # Subtest: stops at max cycles even if goal not met
        ok 2 - stops at max cycles even if goal not met
          ---
          duration_ms: 1.532736
          type: 'test'
          ...
        # Subtest: max cycle limit allows five review and five fix steps
        ok 3 - max cycle limit allows five review and five fix steps
          ---
          duration_ms: 2.55395
          type: 'test'
          ...
        1..3
    ok 6 - multi-cycle progression
      ---
      duration_ms: 8.094936
      type: 'suite'
      ...
    1..6
ok 1 - Ultrafix loop continuation logic
  ---
  duration_ms: 42.456895
  type: 'suite'
  ...
1..1
# tests 16
# suites 7
# pass 16
# fail 0
# cancelled 0
# skipped 0
# todo 0
# duration_ms 320.379075
[170/179] passed test/ultrafixLoopContinuation.test.ts in 0.5s

[171/179] test/ultrafixSettings.test.ts
TAP version 13
# Subtest: VALID_SETTING_KEYS includes new ultrafix keys
    # Subtest: should include pr_review_model
    ok 1 - should include pr_review_model
      ---
      duration_ms: 0.823715
      type: 'test'
      ...
    # Subtest: should include model_reasoning_level
    ok 2 - should include model_reasoning_level
      ---
      duration_ms: 0.126456
      type: 'test'
      ...
    # Subtest: should include ultrafix_rating_goal
    ok 3 - should include ultrafix_rating_goal
      ---
      duration_ms: 0.130253
      type: 'test'
      ...
    # Subtest: should include ultrafix_max_cycles
    ok 4 - should include ultrafix_max_cycles
      ---
      duration_ms: 0.141534
      type: 'test'
      ...
    # Subtest: should include ultrafix_pause_seconds
    ok 5 - should include ultrafix_pause_seconds
      ---
      duration_ms: 0.101349
      type: 'test'
      ...
    # Subtest: should include PR review context settings
    ok 6 - should include PR review context settings
      ---
      duration_ms: 0.104755
      type: 'test'
      ...
    # Subtest: should keep expected setting keys valid
    ok 7 - should keep expected setting keys valid
      ---
      duration_ms: 0.135854
      type: 'test'
      ...
    1..7
ok 1 - VALID_SETTING_KEYS includes new ultrafix keys
  ---
  duration_ms: 2.690895
  type: 'suite'
  ...
# Subtest: isValidSettingKey for new keys
    # Subtest: pr_review_model is valid
    ok 1 - pr_review_model is valid
      ---
      duration_ms: 0.262128
      type: 'test'
      ...
    # Subtest: model_reasoning_level is valid
    ok 2 - model_reasoning_level is valid
      ---
      duration_ms: 0.169416
      type: 'test'
      ...
    # Subtest: ultrafix_rating_goal is valid
    ok 3 - ultrafix_rating_goal is valid
      ---
      duration_ms: 0.233986
      type: 'test'
      ...
    # Subtest: ultrafix_max_cycles is valid
    ok 4 - ultrafix_max_cycles is valid
      ---
      duration_ms: 0.107891
      type: 'test'
      ...
    # Subtest: ultrafix_pause_seconds is valid
    ok 5 - ultrafix_pause_seconds is valid
      ---
      duration_ms: 0.09121
      type: 'test'
      ...
    # Subtest: unknown_key is not valid
    ok 6 - unknown_key is not valid
      ---
      duration_ms: 0.078866
      type: 'test'
      ...
    1..6
ok 2 - isValidSettingKey for new keys
  ---
  duration_ms: 1.356889
  type: 'suite'
  ...
# Subtest: parseSettingValue for pr_review_model
    # Subtest: should accept any string value
    ok 1 - should accept any string value
      ---
      duration_ms: 0.37036
      type: 'test'
      ...
    # Subtest: should accept empty string
    ok 2 - should accept empty string
      ---
      duration_ms: 0.08573
      type: 'test'
      ...
    1..2
ok 3 - parseSettingValue for pr_review_model
  ---
  duration_ms: 0.544445
  type: 'suite'
  ...
# Subtest: parseSettingValue for PR review context
    # Subtest: parses the enable switch
    ok 1 - parses the enable switch
      ---
      duration_ms: 0.151462
      type: 'test'
      ...
    # Subtest: accepts automatic and explicit context token limits
    ok 2 - accepts automatic and explicit context token limits
      ---
      duration_ms: 0.171119
      type: 'test'
      ...
    # Subtest: rejects context token limits below the supported explicit minimum
    ok 3 - rejects context token limits below the supported explicit minimum
      ---
      duration_ms: 0.383354
      type: 'test'
      ...
    # Subtest: accepts review context budget percentages in 10% increments
    ok 4 - accepts review context budget percentages in 10% increments
      ---
      duration_ms: 0.212266
      type: 'test'
      ...
    # Subtest: rejects unsupported review context budget percentages
    ok 5 - rejects unsupported review context budget percentages
      ---
      duration_ms: 0.257199
      type: 'test'
      ...
    1..5
ok 4 - parseSettingValue for PR review context
  ---
  duration_ms: 1.337282
  type: 'suite'
  ...
# Subtest: parseSettingValue for ultrafix_rating_goal
    # Subtest: should parse valid value 7
    ok 1 - should parse valid value 7
      ---
      duration_ms: 0.15517
      type: 'test'
      ...
    # Subtest: should accept minimum value 1
    ok 2 - should accept minimum value 1
      ---
      duration_ms: 0.087844
      type: 'test'
      ...
    # Subtest: should accept maximum value 10
    ok 3 - should accept maximum value 10
      ---
      duration_ms: 0.090669
      type: 'test'
      ...
    # Subtest: should reject value 0
    ok 4 - should reject value 0
      ---
      duration_ms: 0.140882
      type: 'test'
      ...
    # Subtest: should reject value 11
    ok 5 - should reject value 11
      ---
      duration_ms: 0.203549
      type: 'test'
      ...
    # Subtest: should reject non-numeric value
    ok 6 - should reject non-numeric value
      ---
      duration_ms: 0.134301
      type: 'test'
      ...
    # Subtest: should reject negative value
    ok 7 - should reject negative value
      ---
      duration_ms: 0.119994
      type: 'test'
      ...
    1..7
ok 5 - parseSettingValue for ultrafix_rating_goal
  ---
  duration_ms: 1.213342
  type: 'suite'
  ...
# Subtest: parseSettingValue for ultrafix_max_cycles
    # Subtest: should parse valid value 5
    ok 1 - should parse valid value 5
      ---
      duration_ms: 0.156151
      type: 'test'
      ...
    # Subtest: should accept minimum value 1
    ok 2 - should accept minimum value 1
      ---
      duration_ms: 0.166611
      type: 'test'
      ...
    # Subtest: should accept large values (no upper limit)
    ok 3 - should accept large values (no upper limit)
      ---
      duration_ms: 0.126086
      type: 'test'
      ...
    # Subtest: should reject value 0
    ok 4 - should reject value 0
      ---
      duration_ms: 0.135232
      type: 'test'
      ...
    # Subtest: should reject non-numeric value
    ok 5 - should reject non-numeric value
      ---
      duration_ms: 0.122699
      type: 'test'
      ...
    1..5
ok 6 - parseSettingValue for ultrafix_max_cycles
  ---
  duration_ms: 0.883707
  type: 'suite'
  ...
# Subtest: parseSettingValue for ultrafix_pause_seconds
    # Subtest: should parse valid value 60
    ok 1 - should parse valid value 60
      ---
      duration_ms: 0.148848
      type: 'test'
      ...
    # Subtest: should accept minimum value 0
    ok 2 - should accept minimum value 0
      ---
      duration_ms: 0.090048
      type: 'test'
      ...
    # Subtest: should accept large values (no upper limit)
    ok 3 - should accept large values (no upper limit)
      ---
      duration_ms: 0.10734
      type: 'test'
      ...
    # Subtest: should reject value -1
    ok 4 - should reject value -1
      ---
      duration_ms: 0.145731
      type: 'test'
      ...
    # Subtest: should reject non-numeric value
    ok 5 - should reject non-numeric value
      ---
      duration_ms: 0.127979
      type: 'test'
      ...
    1..5
ok 7 - parseSettingValue for ultrafix_pause_seconds
  ---
  duration_ms: 0.790813
  type: 'suite'
  ...
# Subtest: Ultrafix escalation CLI settings
    # Subtest: parses the instance toggle, ordered model list, patience, and N=0
    ok 1 - parses the instance toggle, ordered model list, patience, and N=0
      ---
      duration_ms: 0.832692
      type: 'test'
      ...
    1..1
ok 8 - Ultrafix escalation CLI settings
  ---
  duration_ms: 0.913372
  type: 'suite'
  ...
1..8
# tests 38
# suites 8
# pass 38
# fail 0
# cancelled 0
# skipped 0
# todo 0
# duration_ms 488.079834
[171/179] passed test/ultrafixSettings.test.ts in 0.6s

[172/179] test/userWhitelist.test.ts
TAP version 13
# Subtest: empty whitelist allows everyone (open access)
ok 1 - empty whitelist allows everyone (open access)
  ---
  duration_ms: 0.908473
  type: 'test'
  ...
# Subtest: non-empty whitelist gates by membership (case-insensitive)
ok 2 - non-empty whitelist gates by membership (case-insensitive)
  ---
  duration_ms: 0.755628
  type: 'test'
  ...
1..2
# tests 2
# suites 0
# pass 2
# fail 0
# cancelled 0
# skipped 0
# todo 0
# duration_ms 434.323075
[172/179] passed test/userWhitelist.test.ts in 0.6s

[173/179] test/vibeModelSelection.test.ts
TAP version 13
# Subtest: GLM labels and aliases resolve to the configured Vibe account
ok 1 - GLM labels and aliases resolve to the configured Vibe account
  ---
  duration_ms: 5.479051
  type: 'test'
  ...
# [2026-10-07 09:28:39.349 +0000] �[32mINFO�[39m: �[36mSQLite database connection established successfully�[39m
#     filename: "/tmp/propr-test-suite-8UxTpH/173-vibeModelSelection.test.ts/propr.test.sqlite"
#     environment: "test"
# [2026-10-07 09:28:39.350 +0000] �[32mINFO�[39m: �[36mSQLite database connection closed�[39m
1..1
# tests 1
# suites 0
# pass 1
# fail 0
# cancelled 0
# skipped 0
# todo 0
# duration_ms 1602.899661
[173/179] passed test/vibeModelSelection.test.ts in 1.7s

[174/179] test/webhookReplayProtection.test.ts
TAP version 13
# [webhook] Missing x-github-delivery header
# Subtest: Webhook Replay Protection
    # Subtest: Missing delivery ID
        # Subtest: rejects request with no x-github-delivery header
        ok 1 - rejects request with no x-github-delivery header
          ---
          duration_ms: 26.161859
          type: 'test'
          ...
        1..1
    ok 1 - Missing delivery ID
      ---
      duration_ms: 26.990042
      type: 'suite'
      ...
# [webhook] Rejecting multi-valued x-github-delivery header
    # Subtest: Array-valued delivery ID
        # Subtest: rejects request with multi-valued x-github-delivery header
        ok 1 - rejects request with multi-valued x-github-delivery header
          ---
          duration_ms: 5.310808
          type: 'test'
          ...
        1..1
    ok 2 - Array-valued delivery ID
      ---
      duration_ms: 5.530939
      type: 'suite'
      ...
# [webhook] Event received: issues, action: opened, repo: test/repo, delivery: unique-delivery-001
    # Subtest: Duplicate delivery rejection
        # Subtest: accepts first delivery
        ok 1 - accepts first delivery
          ---
          duration_ms: 5.690475
          type: 'test'
          ...
# [webhook] Event received: issues, action: opened, repo: test/repo, delivery: unique-delivery-002
# [webhook] Duplicate delivery rejected: unique-delivery-002
        # Subtest: rejects second delivery with same ID
        ok 2 - rejects second delivery with same ID
          ---
          duration_ms: 6.135194
          type: 'test'
          ...
# [webhook] Event received: issues, action: opened, repo: test/repo, delivery: delivery-aaa
# [webhook] Event received: issues, action: opened, repo: test/repo, delivery: delivery-bbb
        # Subtest: accepts different delivery IDs with same body
        ok 3 - accepts different delivery IDs with same body
          ---
          duration_ms: 5.00053
          type: 'test'
          ...
        1..3
    ok 3 - Duplicate delivery rejection
      ---
      duration_ms: 17.254307
      type: 'suite'
      ...
# [webhook] Event received: issues, action: opened, repo: test/repo, delivery: test-delivery-123
    # Subtest: Redis key storage
        # Subtest: stores delivery ID with correct key prefix and TTL
        ok 1 - stores delivery ID with correct key prefix and TTL
          ---
          duration_ms: 4.363772
          type: 'test'
          ...
# [webhook] Missing x-github-delivery header
        # Subtest: does not store key when delivery ID is missing
        ok 2 - does not store key when delivery ID is missing
          ---
          duration_ms: 4.838908
          type: 'test'
          ...
        1..2
    ok 4 - Redis key storage
      ---
      duration_ms: 9.563714
      type: 'suite'
      ...
# [webhook] Event received: issues, action: opened, repo: test/repo, delivery: delivery-will-fail
# [webhook] Duplicate delivery rejected: delivery-will-fail
    # Subtest: Failure keeps delivery ID reserved
        # Subtest: retains Redis key when processing fails to prevent duplicate side effects
        ok 1 - retains Redis key when processing fails to prevent duplicate side effects
          ---
          duration_ms: 6.882708
          type: 'test'
          ...
# [webhook] Failed to parse JSON body for delivery delivery-bad-parse
        # Subtest: retains Redis key when body parsing fails and returns generic 400
        ok 2 - retains Redis key when body parsing fails and returns generic 400
          ---
          duration_ms: 3.948689
          type: 'test'
          ...
        1..2
    ok 5 - Failure keeps delivery ID reserved
      ---
      duration_ms: 11.038352
      type: 'suite'
      ...
# [webhook] No signature provided
    # Subtest: Signature verification
        # Subtest: rejects request with missing signature
        ok 1 - rejects request with missing signature
          ---
          duration_ms: 3.819018
          type: 'test'
          ...
# [webhook] Signature mismatch
        # Subtest: rejects request with invalid signature
        ok 2 - rejects request with invalid signature
          ---
          duration_ms: 3.495946
          type: 'test'
          ...
# [webhook] Signature mismatch
        # Subtest: rejects request with malformed signature of different length
        ok 3 - rejects request with malformed signature of different length
          ---
          duration_ms: 3.054432
          type: 'test'
          ...
# [webhook] Rejecting multi-valued x-hub-signature-256 header
        # Subtest: rejects request with multi-valued x-hub-signature-256 header
        ok 4 - rejects request with multi-valued x-hub-signature-256 header
          ---
          duration_ms: 2.690244
          type: 'test'
          ...
# [webhook] Signature mismatch
        # Subtest: does not store delivery ID when signature is invalid
        ok 5 - does not store delivery ID when signature is invalid
          ---
          duration_ms: 2.609894
          type: 'test'
          ...
        1..5
    ok 6 - Signature verification
      ---
      duration_ms: 16.060682
      type: 'suite'
      ...
# [webhook] Missing x-github-event header
    # Subtest: Missing x-github-event header
        # Subtest: rejects request with no x-github-event header
        ok 1 - rejects request with no x-github-event header
          ---
          duration_ms: 3.432156
          type: 'test'
          ...
        1..1
    ok 7 - Missing x-github-event header
      ---
      duration_ms: 3.563903
      type: 'suite'
      ...
# [webhook] GH_WEBHOOK_SECRET is not configured — rejecting request. Set GH_WEBHOOK_SECRET in the environment to accept webhooks. This is a security requirement: all webhook deliveries are rejected until a secret is provisioned.
    # Subtest: Webhook secret not configured (fail closed)
        # Subtest: rejects request when webhookSecret is undefined
        ok 1 - rejects request when webhookSecret is undefined
          ---
          duration_ms: 4.317988
          type: 'test'
          ...
        1..1
    ok 8 - Webhook secret not configured (fail closed)
      ---
      duration_ms: 4.450965
      type: 'suite'
      ...
# [webhook] Ignoring unsupported event type: unknown_event_type
    # Subtest: Unsupported event type
        # Subtest: ignores request with unsupported x-github-event value with 200
        ok 1 - ignores request with unsupported x-github-event value with 200
          ---
          duration_ms: 3.787008
          type: 'test'
          ...
        1..1
    ok 9 - Unsupported event type
      ---
      duration_ms: 4.009733
      type: 'suite'
      ...
# [webhook] Event received: issues, action: opened, repo: test/repo, delivery: delivery-for-forwarding
    # Subtest: Preview routing: delivery ID passed to processor
        # Subtest: processor receives the delivery ID for downstream forwarding
        ok 1 - processor receives the delivery ID for downstream forwarding
          ---
          duration_ms: 5.636555
          type: 'test'
          ...
# [2026-10-07 09:28:41.867 +0000] �[32mINFO�[39m: �[36mSQLite database connection established successfully�[39m
#     filename: "/tmp/propr-test-suite-8UxTpH/174-webhookReplayProtection.test.ts/propr.test.sqlite"
#     environment: "test"
# [webhook] Event received: issues, action: opened, repo: test/repo, delivery: delivery-original
# [webhook] Event received: issues, action: opened, repo: test/repo, delivery: fwd-delivery-original
        # Subtest: forwarded delivery with fwd- prefix is accepted as a distinct delivery
        ok 2 - forwarded delivery with fwd- prefix is accepted as a distinct delivery
          ---
          duration_ms: 4.6784
          type: 'test'
          ...
        1..2
    ok 10 - Preview routing: delivery ID passed to processor
      ---
      duration_ms: 10.717575
      type: 'suite'
      ...
    # Subtest: Redis adapter shape (server.ts integration path)
        # Subtest: adapter reshapes NX/EX options correctly
        ok 1 - adapter reshapes NX/EX options correctly
          ---
          duration_ms: 1.867761
          type: 'test'
          ...
        # Subtest: adapter passes through plain set without options
        ok 2 - adapter passes through plain set without options
          ---
          duration_ms: 0.80499
          type: 'test'
          ...
        # Subtest: adapter returns null when NX key already exists
        ok 3 - adapter returns null when NX key already exists
          ---
          duration_ms: 0.877034
          type: 'test'
          ...
        1..3
    ok 11 - Redis adapter shape (server.ts integration path)
      ---
      duration_ms: 3.837582
      type: 'suite'
      ...
    1..11
ok 1 - Webhook Replay Protection
  ---
  duration_ms: 114.562303
  type: 'suite'
  ...
# [2026-10-07 09:28:41.974 +0000] �[32mINFO�[39m: �[36mSQLite database connection closed�[39m
1..1
# tests 22
# suites 12
# pass 22
# fail 0
# cancelled 0
# skipped 0
# todo 0
# duration_ms 2282.447862
[174/179] passed test/webhookReplayProtection.test.ts in 2.4s

[175/179] test/worker.integration.test.ts
TAP version 13
# Subtest: Worker Integration - Concurrent Model Execution
    # Subtest: concurrent jobs with different models create unique worktrees
    ok 1 - concurrent jobs with different models create unique worktrees
      ---
      duration_ms: 11.955351
      type: 'test'
      ...
    # Subtest: delay function prevents exact simultaneous execution
    ok 2 - delay function prevents exact simultaneous execution
      ---
      duration_ms: 281.297548
      type: 'test'
      ...
    # Subtest: worktree cleanup after concurrent execution
    ok 3 - worktree cleanup after concurrent execution
      ---
      duration_ms: 5.629372
      type: 'test'
      ...
    # Subtest: file system isolation between concurrent workers
    ok 4 - file system isolation between concurrent workers
      ---
      duration_ms: 5.56686
      type: 'test'
      ...
    # Subtest: error handling in concurrent execution
    ok 5 - error handling in concurrent execution
      ---
      duration_ms: 81.381894
      type: 'test'
      ...
    1..5
ok 1 - Worker Integration - Concurrent Model Execution
  ---
  duration_ms: 387.577561
  type: 'suite'
  ...
1..1
# tests 5
# suites 1
# pass 5
# fail 0
# cancelled 0
# skipped 0
# todo 0
# duration_ms 702.52733
[175/179] passed test/worker.integration.test.ts in 0.8s

[176/179] test/workerGitAuthentication.test.ts
TAP version 13
# (node:47728) ExperimentalWarning: Module mocking is an experimental feature and might change at any time
# (Use `node --trace-warnings ...` to show where the warning was created)
# Subtest: push refreshes once after could not read Username for 'https://github.com': No such device or address
ok 1 - push refreshes once after could not read Username for 'https://github.com': No such device or address
  ---
  duration_ms: 3.845136
  type: 'test'
  ...
# Subtest: push refreshes once after could not read Password for 'https://github.com': terminal prompts disabled
ok 2 - push refreshes once after could not read Password for 'https://github.com': terminal prompts disabled
  ---
  duration_ms: 1.268394
  type: 'test'
  ...
# Subtest: push refreshes once after Authentication failed
ok 3 - push refreshes once after Authentication failed
  ---
  duration_ms: 1.125467
  type: 'test'
  ...
# Subtest: unrelated push failures do not refresh credentials
ok 4 - unrelated push failures do not refresh credentials
  ---
  duration_ms: 5.539635
  type: 'test'
  ...
# Subtest: a second authentication failure is returned without an unbounded retry
ok 5 - a second authentication failure is returned without an unbounded retry
  ---
  duration_ms: 1.638744
  type: 'test'
  ...
# Subtest: push and merge authenticate the selected named remote or URL
ok 6 - push and merge authenticate the selected named remote or URL
  ---
  duration_ms: 1.484507
  type: 'test'
  ...
# Subtest: legacy URL snapshots still get process credentials if cleanup strips the stored token
ok 7 - legacy URL snapshots still get process credentials if cleanup strips the stored token
  ---
  duration_ms: 0.654721
  type: 'test'
  ...
1..7
# tests 7
# suites 0
# pass 7
# fail 0
# cancelled 0
# skipped 0
# todo 0
# duration_ms 403.981531
[176/179] passed test/workerGitAuthentication.test.ts in 0.5s

[177/179] test/workerTaskStateRecovery.test.ts
TAP version 13
# (node:47767) ExperimentalWarning: Module mocking is an experimental feature and might change at any time
# (Use `node --trace-warnings ...` to show where the warning was created)
# Subtest: coalesces overlapping runs and releases the distributed lease
ok 1 - coalesces overlapping runs and releases the distributed lease
  ---
  duration_ms: 2.92459
  type: 'test'
  ...
# Subtest: does not reconcile when another worker owns the lease
ok 2 - does not reconcile when another worker owns the lease
  ---
  duration_ms: 3.73446
  type: 'test'
  ...
# Subtest: contains lease acquisition failures instead of creating an unhandled rejection
ok 3 - contains lease acquisition failures instead of creating an unhandled rejection
  ---
  duration_ms: 0.913793
  type: 'test'
  ...
# Subtest: retains an unfinished page backlog across recovery runs
ok 4 - retains an unfinished page backlog across recovery runs
  ---
  duration_ms: 1.975753
  type: 'test'
  ...
# Subtest: bounds a stalled lease acquisition by the recovery budget
ok 5 - bounds a stalled lease acquisition by the recovery budget
  ---
  duration_ms: 10.475514
  type: 'test'
  ...
# Subtest: close aborts a stalled active recovery run
ok 6 - close aborts a stalled active recovery run
  ---
  duration_ms: 1.517459
  type: 'test'
  ...
# Subtest: runs once at startup and continues on the configured interval
ok 7 - runs once at startup and continues on the configured interval
  ---
  duration_ms: 20.364874
  type: 'test'
  ...
# Subtest: reconciles follow-up CI suspensions under the same lease
ok 8 - reconciles follow-up CI suspensions under the same lease
  ---
  duration_ms: 0.757522
  type: 'test'
  ...
1..8
# tests 8
# suites 0
# pass 8
# fail 0
# cancelled 0
# skipped 0
# todo 0
# duration_ms 701.082137
[177/179] passed test/workerTaskStateRecovery.test.ts in 0.8s

[178/179] test/workRefHelpers.test.ts
TAP version 13
# Subtest: buildTaskWorkRef — task execution flow
    # Subtest: produces correct workRef for a standard issue task
    ok 1 - produces correct workRef for a standard issue task
      ---
      duration_ms: 0.961291
      type: 'test'
      ...
    # Subtest: includes prNumber when provided (PR follow-up)
    ok 2 - includes prNumber when provided (PR follow-up)
      ---
      duration_ms: 2.756077
      type: 'test'
      ...
    # Subtest: handles undefined taskId gracefully
    ok 3 - handles undefined taskId gracefully
      ---
      duration_ms: 1.446957
      type: 'test'
      ...
    1..3
ok 1 - buildTaskWorkRef — task execution flow
  ---
  duration_ms: 6.910028
  type: 'suite'
  ...
# Subtest: buildAnalysisWorkRef — plan flow
    # Subtest: plan-generation produces plan workRef with planDraftId
    ok 1 - plan-generation produces plan workRef with planDraftId
      ---
      duration_ms: 0.320186
      type: 'test'
      ...
    # Subtest: plan-refinement produces plan workRef with planDraftId
    ok 2 - plan-refinement produces plan workRef with planDraftId
      ---
      duration_ms: 0.133669
      type: 'test'
      ...
    # Subtest: plan without taskId still has workType plan and undefined planDraftId
    ok 3 - plan without taskId still has workType plan and undefined planDraftId
      ---
      duration_ms: 0.11768
      type: 'test'
      ...
    # Subtest: plan ignores taskNumber and prNumber
    ok 4 - plan ignores taskNumber and prNumber
      ---
      duration_ms: 0.220631
      type: 'test'
      ...
    1..4
ok 2 - buildAnalysisWorkRef — plan flow
  ---
  duration_ms: 1.210165
  type: 'suite'
  ...
# Subtest: buildAnalysisWorkRef — repository flow
    # Subtest: repo-chat without taskId produces repository workRef
    ok 1 - repo-chat without taskId produces repository workRef
      ---
      duration_ms: 0.189443
      type: 'test'
      ...
    # Subtest: repo-improvements without taskId produces repository workRef
    ok 2 - repo-improvements without taskId produces repository workRef
      ---
      duration_ms: 0.172231
      type: 'test'
      ...
    # Subtest: summarization without taskId produces repository workRef
    ok 3 - summarization without taskId produces repository workRef
      ---
      duration_ms: 0.27374
      type: 'test'
      ...
    # Subtest: undefined executionType with taskId produces task workRef
    ok 4 - undefined executionType with taskId produces task workRef
      ---
      duration_ms: 0.128439
      type: 'test'
      ...
    # Subtest: undefined executionType without taskId produces repository workRef
    ok 5 - undefined executionType without taskId produces repository workRef
      ---
      duration_ms: 0.101429
      type: 'test'
      ...
    1..5
ok 3 - buildAnalysisWorkRef — repository flow
  ---
  duration_ms: 1.111351
  type: 'suite'
  ...
# Subtest: buildAnalysisWorkRef — task with taskNumber/prNumber
    # Subtest: carries taskNumber when provided
    ok 1 - carries taskNumber when provided
      ---
      duration_ms: 0.144229
      type: 'test'
      ...
    # Subtest: carries both taskNumber and prNumber when provided
    ok 2 - carries both taskNumber and prNumber when provided
      ---
      duration_ms: 0.119343
      type: 'test'
      ...
    1..2
ok 4 - buildAnalysisWorkRef — task with taskNumber/prNumber
  ---
  duration_ms: 0.359591
  type: 'suite'
  ...
# Subtest: PR follow-up workRef — insert row mapping
    # Subtest: maps prNumber to pr_number DB column
    ok 1 - maps prNumber to pr_number DB column
      ---
      duration_ms: 0.161701
      type: 'test'
      ...
    # Subtest: pr_number is null for non-PR tasks
    ok 2 - pr_number is null for non-PR tasks
      ---
      duration_ms: 0.096008
      type: 'test'
      ...
    1..2
ok 5 - PR follow-up workRef — insert row mapping
  ---
  duration_ms: 0.408802
  type: 'suite'
  ...
# Subtest: buildAnalysisWorkRef — edge cases
    # Subtest: all undefined inputs produce repository workRef with undefined fields
    ok 1 - all undefined inputs produce repository workRef with undefined fields
      ---
      duration_ms: 0.129651
      type: 'test'
      ...
    # Subtest: non-plan executionType with taskId produces task workRef
    ok 2 - non-plan executionType with taskId produces task workRef
      ---
      duration_ms: 0.082253
      type: 'test'
      ...
    # Subtest: taskNumber without taskId produces task workRef (issue-scoped analysis)
    ok 3 - taskNumber without taskId produces task workRef (issue-scoped analysis)
      ---
      duration_ms: 0.09685
      type: 'test'
      ...
    # Subtest: taskNumber without taskId for PR follow-up carries prNumber
    ok 4 - taskNumber without taskId for PR follow-up carries prNumber
      ---
      duration_ms: 0.093053
      type: 'test'
      ...
    1..4
ok 6 - buildAnalysisWorkRef — edge cases
  ---
  duration_ms: 0.521261
  type: 'suite'
  ...
# [2026-10-07 09:28:45.701 +0000] �[32mINFO�[39m: �[36mSQLite database connection established successfully�[39m
#     filename: "/tmp/propr-test-suite-8UxTpH/178-workRefHelpers.test.ts/propr.test.sqlite"
#     environment: "test"
# [2026-10-07 09:28:45.707 +0000] �[32mINFO�[39m: �[36mSQLite database connection closed�[39m
1..6
# tests 20
# suites 6
# pass 20
# fail 0
# cancelled 0
# skipped 0
# todo 0
# duration_ms 1385.94097
[178/179] passed test/workRefHelpers.test.ts in 1.5s

[179/179] propr-ui#2/4 (workspace test script)

> [email protected] test
> vitest run --shard=2/4


�[1m�[30m�[46m RUN �[49m�[39m�[22m �[36mv5.0.0 �[39m�[90m/home/runner/work/propr/propr/propr-ui�[39m

�[90mstdout�[2m | src/components/TaskDetails/useTaskData.followup.test.ts�[2m > �[22m�[2mfull history follow-up regressions�[2m > �[22m�[2mrefetches on task completion with initial HTTP pending=false
�[22m�[39m[useTaskData] Received task update via WebSocket: { taskId: �[32m'task'�[39m, state: �[32m'COMPLETED'�[39m }

�[90mstdout�[2m | src/components/TaskDetails/useTaskData.followup.test.ts�[2m > �[22m�[2mfull history follow-up regressions�[2m > �[22m�[2mrefetches on task completion with initial HTTP pending=true
�[22m�[39m[useTaskData] Received task update via WebSocket: { taskId: �[32m'task'�[39m, state: �[32m'COMPLETED'�[39m }

�[90mstderr�[2m | src/config/runtimeConfig.test.ts�[2m > �[22m�[2mgetApiBaseUrl�[2m > �[22m�[2mblocks API client construction when the hosted UI has no selected stack
�[22m�[39m[propr] HOSTED_STACK_REQUIRED

�[90mstderr�[2m | src/config/runtimeConfig.test.ts�[2m > �[22m�[2mgetApiBaseUrl�[2m > �[22m�[2mblocks API client construction for a non-Connect hosted runtime URL
�[22m�[39m[propr] INVALID_RUNTIME_CONFIGURATION

�[90mstderr�[2m | src/config/runtimeConfig.test.ts�[2m > �[22m�[2mhosted tunnel query API base�[2m > �[22m�[2mdoes not let an encoded tunnel name fall through to valid runtime configuration
�[22m�[39m[propr] INVALID_RUNTIME_CONFIGURATION

�[90mstderr�[2m | src/config/runtimeConfig.test.ts�[2m > �[22m�[2mhosted tunnel query API base�[2m > �[22m�[2mdoes not let an encoded tunnel name fall through to a valid stored endpoint
�[22m�[39m[propr] INVALID_RUNTIME_CONFIGURATION

 �[32m✓�[39m src/config/runtimeConfig.test.ts �[2m(�[22m�[2m67 tests�[22m�[2m)�[22m�[33m 1318�[2mms�[22m�[39m
   �[32m✓�[39m getApiBaseUrl �[2m(16)�[22m
     �[33m�[2m✓�[22m�[39m uses the runtime-configured apiBaseUrl when present�[33m 511�[2mms�[22m�[39m
�[90mstdout�[2m | src/components/TaskDetails/useTaskData.followup.test.ts�[2m > �[22m�[2mfull history follow-up regressions�[2m > �[22m�[2mtask page replays a large increment once during HTTP/completion
�[22m�[39m[useTaskData] Received task update via WebSocket: { taskId: �[32m'task'�[39m, state: �[32m'COMPLETED'�[39m }

�[90mstdout�[2m | src/components/TaskDetails/useTaskData.followup.test.ts�[2m > �[22m�[2mfull history follow-up regressions�[2m > �[22m�[2mtask page orders growing messages: HTTP past socket
�[22m�[39m[useTaskData] Received task update via WebSocket: { taskId: �[32m'task'�[39m, state: �[32m'COMPLETED'�[39m }

�[90mstdout�[2m | src/components/TaskDetails/useTaskData.followup.test.ts�[2m > �[22m�[2mfull history follow-up regressions�[2m > �[22m�[2mtask page orders growing messages: socket past HTTP
�[22m�[39m[useTaskData] Received task update via WebSocket: { taskId: �[32m'task'�[39m, state: �[32m'COMPLETED'�[39m }

�[90mstdout�[2m | src/components/TaskDetails/useTaskData.followup.test.ts�[2m > �[22m�[2mfull history follow-up regressions�[2m > �[22m�[2mbuffered updates of an execution a newer read replaced�[2m > �[22m�[2mtask page discards a buffered old increment and its late deliveries after a new-execution read
�[22m�[39m[useTaskData] Received task update via WebSocket: { taskId: �[32m'task'�[39m, state: �[32m'COMPLETED'�[39m }

�[90mstdout�[2m | src/components/TaskDetails/useTaskData.followup.test.ts�[2m > �[22m�[2mfull history follow-up regressions�[2m > �[22m�[2mbuffered updates of an execution a newer read replaced�[2m > �[22m�[2mtask page discards a buffered old full state and its late deliveries after a new-execution read
�[22m�[39m[useTaskData] Received task update via WebSocket: { taskId: �[32m'task'�[39m, state: �[32m'COMPLETED'�[39m }

�[90mstdout�[2m | src/components/TaskDetails/useTaskData.followup.test.ts�[2m > �[22m�[2mfull history follow-up regressions�[2m > �[22m�[2mbuffered updates of an execution a newer read replaced�[2m > �[22m�[2mtask page keeps the newer HTTP execution over an intermediate execution received during the read
�[22m�[39m[useTaskData] Received task update via WebSocket: { taskId: �[32m'task'�[39m, state: �[32m'COMPLETED'�[39m }

 �[32m✓�[39m src/components/TaskDetails/useTaskData.followup.test.ts �[2m(�[22m�[2m45 tests�[22m�[2m)�[22m�[33m 1066�[2mms�[22m�[39m
   �[32m✓�[39m full history follow-up regressions �[2m(45)�[22m
     �[33m�[2m✓�[22m�[39m merges large full histories, including unshared prefixes and suffixes, without positional arguments�[33m 772�[2mms�[22m�[39m
�[90mstdout�[2m | src/contexts/SocketProvider.test.tsx�[2m > �[22m�[2mSocketProvider�[2m > �[22m�[2mcreates one force-new scoped Manager on null-to-A activation
�[22m�[39m[SocketContext] Cleaning up socket connection

�[90mstdout�[2m | src/contexts/SocketProvider.test.tsx�[2m > �[22m�[2mSocketProvider�[2m > �[22m�[2mfully detaches A before creating a distinct Manager for scope rotation
�[22m�[39m[SocketContext] Cleaning up socket connection

�[90mstdout�[2m | src/contexts/SocketProvider.test.tsx�[2m > �[22m�[2mSocketProvider�[2m > �[22m�[2mfully detaches A before creating a distinct Manager for scope rotation
�[22m�[39m[SocketContext] Cleaning up socket connection

�[90mstdout�[2m | src/contexts/SocketProvider.test.tsx�[2m > �[22m�[2mSocketProvider�[2m > �[22m�[2mfully detaches A before creating a distinct Manager for same-origin A-to-B
�[22m�[39m[SocketContext] Cleaning up socket connection

�[90mstdout�[2m | src/contexts/SocketProvider.test.tsx�[2m > �[22m�[2mSocketProvider�[2m > �[22m�[2mfully detaches A before creating a distinct Manager for same-origin A-to-B
�[22m�[39m[SocketContext] Cleaning up socket connection

�[90mstdout�[2m | src/contexts/SocketProvider.test.tsx�[2m > �[22m�[2mSocketProvider�[2m > �[22m�[2mreports a replacement Manager as disconnected until its own connect event
�[22m�[39m[SocketContext] Connected to WebSocket server
[SocketContext] Cleaning up socket connection
[SocketContext] Connected to WebSocket server

�[90mstderr�[2m | src/contexts/SocketProvider.test.tsx�[2m > �[22m�[2mSocketProvider�[2m > �[22m�[2mreports a replacement Manager as disconnected until its own connect event
�[22m�[39m[SocketContext] Connection error: not connected

�[90mstdout�[2m | src/contexts/SocketProvider.test.tsx�[2m > �[22m�[2mSocketProvider�[2m > �[22m�[2mreports a replacement Manager as disconnected until its own connect event
�[22m�[39m[SocketContext] Cleaning up socket connection

�[90mstdout�[2m | src/contexts/SocketProvider.test.tsx�[2m > �[22m�[2mSocketProvider�[2m > �[22m�[2mrotates the Manager when the effective API origin changes
�[22m�[39m[SocketContext] Cleaning up socket connection

�[90mstdout�[2m | src/contexts/SocketProvider.test.tsx�[2m > �[22m�[2mSocketProvider�[2m > �[22m�[2mrotates the Manager when the effective API origin changes
�[22m�[39m[SocketContext] Cleaning up socket connection

�[90mstdout�[2m | src/contexts/SocketProvider.test.tsx�[2m > �[22m�[2mSocketProvider�[2m > �[22m�[2mdisconnects on deactivate and creates no replacement
�[22m�[39m[SocketContext] Cleaning up socket connection

�[90mstdout�[2m | src/contexts/SocketProvider.test.tsx�[2m > �[22m�[2mSocketProvider�[2m > �[22m�[2mkeeps the hosted browser cookie socket without a desktop marker
�[22m�[39m[SocketContext] Cleaning up socket connection

�[90mstdout�[2m | src/contexts/SocketProvider.test.tsx�[2m > �[22m�[2mSocketProvider�[2m > �[22m�[2mclassifies authentication errors against the immutable activation scope
�[22m�[39m[SocketContext] Cleaning up socket connection

�[90mstdout�[2m | src/contexts/SocketProvider.test.tsx�[2m > �[22m�[2mSocketProvider�[2m > �[22m�[2mreconnects the current Manager when authorization changes without invalidating its token
�[22m�[39m[SocketContext] Cleaning up socket connection

�[90mstdout�[2m | src/contexts/SocketProvider.test.tsx�[2m > �[22m�[2mSocketProvider�[2m > �[22m�[2mnever reconnects a stale same-origin Manager after deferred authorization work resolves
�[22m�[39m[SocketContext] Cleaning up socket connection

�[90mstdout�[2m | src/contexts/SocketProvider.test.tsx�[2m > �[22m�[2mSocketProvider�[2m > �[22m�[2mnever reconnects a stale same-origin Manager after deferred authorization work resolves
�[22m�[39m[SocketContext] Cleaning up socket connection

�[90mstdout�[2m | src/contexts/SocketProvider.test.tsx�[2m > �[22m�[2mSocketProvider�[2m > �[22m�[2mdrops application events delivered by an old desktop scope
�[22m�[39m[SocketContext] Cleaning up socket connection
[SocketContext] Received task update: { eventType: �[32m'task:update'�[39m }

�[90mstdout�[2m | src/contexts/SocketProvider.test.tsx�[2m > �[22m�[2mSocketProvider�[2m > �[22m�[2mdrops application events delivered by an old desktop scope
�[22m�[39m[SocketContext] Cleaning up socket connection

�[90mstdout�[2m | src/contexts/SocketProvider.test.tsx�[2m > �[22m�[2mSocketProvider�[2m > �[22m�[2mdelivers live events without logging their potentially large payload
�[22m�[39m[SocketContext] Cleaning up socket connection

�[90mstdout�[2m | src/contexts/SocketProvider.test.tsx�[2m > �[22m�[2mSocketProvider�[2m > �[22m�[2mreference-counts the activity room and rejoins it after a reconnect
�[22m�[39m[SocketContext] Connected to WebSocket server
[SocketContext] Disconnected from WebSocket server: transport close
[SocketContext] Connected to WebSocket server
[SocketContext] Unsubscribed from activity

�[90mstdout�[2m | src/contexts/SocketProvider.test.tsx�[2m > �[22m�[2mSocketProvider�[2m > �[22m�[2mreference-counts the activity room and rejoins it after a reconnect
�[22m�[39m[SocketContext] Cleaning up socket connection

�[90mstdout�[2m | src/contexts/SocketProvider.test.tsx�[2m > �[22m�[2mSocketProvider�[2m > �[22m�[2mnegotiates direct snapshots without recreating the connection
�[22m�[39m[SocketContext] Connected to WebSocket server
[SocketContext] Disconnected from WebSocket server: transport close

�[90mstdout�[2m | src/contexts/SocketProvider.test.tsx�[2m > �[22m�[2mSocketProvider�[2m > �[22m�[2mnegotiates direct snapshots without recreating the connection
�[22m�[39m[SocketContext] Cleaning up socket connection

�[90mstdout�[2m | src/contexts/SocketProvider.test.tsx�[2m > �[22m�[2mSocketProvider�[2m > �[22m�[2mrefreshes browser authorization before reconnecting after a permission change
�[22m�[39m[SocketContext] Cleaning up socket connection

�[90mstdout�[2m | src/contexts/SocketProvider.test.tsx�[2m > �[22m�[2mSocketProvider�[2m > �[22m�[2mdelivers activity, goal, notification and usage events without logging their payloads
�[22m�[39m[SocketContext] Cleaning up socket connection

�[90mstdout�[2m | src/contexts/SocketProvider.test.tsx�[2m > �[22m�[2mSocketProvider�[2m > �[22m�[2mdrops activity events delivered by an old desktop scope
�[22m�[39m[SocketContext] Cleaning up socket connection

�[90mstdout�[2m | src/contexts/SocketProvider.test.tsx�[2m > �[22m�[2mSocketProvider�[2m > �[22m�[2mdrops activity events delivered by an old desktop scope
�[22m�[39m[SocketContext] Cleaning up socket connection

�[90mstdout�[2m | src/contexts/SocketProvider.test.tsx�[2m > �[22m�[2mSocketProvider�[2m > �[22m�[2mfully detaches listeners and disconnects on unmount
�[22m�[39m[SocketContext] Cleaning up socket connection

 �[32m✓�[39m src/contexts/SocketProvider.test.tsx �[2m(�[22m�[2m19 tests�[22m�[2m)�[22m�[32m 169�[2mms�[22m�[39m
 �[32m✓�[39m src/components/RepositorySelector.test.tsx �[2m(�[22m�[2m26 tests�[22m�[2m)�[22m�[33m 1428�[2mms�[22m�[39m
 �[32m✓�[39m src/pages/NewTaskPage.test.tsx �[2m(�[22m�[2m15 tests�[22m�[2m)�[22m�[33m 3345�[2mms�[22m�[39m
   �[32m✓�[39m New Task issue launcher �[2m(15)�[22m
     �[33m�[2m✓�[22m�[39m opens a modal with collapsed settings and no promotional cards�[33m 357�[2mms�[22m�[39m
     �[33m�[2m✓�[22m�[39m reopens unresolved work after starting another request and reloading, preserving its key and files�[33m 633�[2mms�[22m�[39m
 �[32m✓�[39m src/serviceWorker.test.ts �[2m(�[22m�[2m24 tests�[22m�[2m)�[22m�[32m 72�[2mms�[22m�[39m
 �[32m✓�[39m src/hooks/useBrowserPush.test.tsx �[2m(�[22m�[2m20 tests�[22m�[2m)�[22m�[33m 501�[2mms�[22m�[39m
 �[32m✓�[39m src/api/demoMode.test.ts �[2m(�[22m�[2m21 tests�[22m�[2m)�[22m�[32m 44�[2mms�[22m�[39m
�[90mstderr�[2m | src/desktop/DesktopExperience.transport.test.tsx�[2m > �[22m�[2mDesktopExperience transport and fencing�[2m > �[22m�[2mignores a delayed access-invalid event from A after B has connected
�[22m�[39mAn update to DesktopExperience inside a test was not wrapped in act(...).

When testing, code that causes React state updates should be wrapped into act(...):

act(() => {
  /* fire events that update state */
});
/* assert on the output */

This ensures that you're testing the behavior the user would see in the browser. Learn more at https://react.dev/link/wrap-tests-with-act

 �[32m✓�[39m src/desktop/DesktopExperience.transport.test.tsx �[2m(�[22m�[2m11 tests�[22m�[2m)�[22m�[33m 710�[2mms�[22m�[39m
 �[32m✓�[39m src/hooks/useGenerationPolling.test.tsx �[2m(�[22m�[2m10 tests�[22m�[2m)�[22m�[32m 57�[2mms�[22m�[39m
�[90mstdout�[2m | src/desktop/account-switching.integration.test.tsx�[2m > �[22m�[2mpairs two users through the production bridge, fences late A traffic, logs B out offline and preserves identity after reload
�[22m�[39m[SocketContext] Connected to WebSocket server

�[90mstdout�[2m | src/desktop/account-switching.integration.test.tsx�[2m > �[22m�[2mpairs two users through the production bridge, fences late A traffic, logs B out offline and preserves identity after reload
�[22m�[39m[SocketContext] Received task update: { id: �[32m'101'�[39m, username: �[32m'alice'�[39m, avatarUrl: �[1mnull�[22m }

�[90mstdout�[2m | src/desktop/account-switching.integration.test.tsx�[2m > �[22m�[2mpairs two users through the production bridge, fences late A traffic, logs B out offline and preserves identity after reload
�[22m�[39m[SocketContext] Cleaning up socket connection

�[90mstdout�[2m | src/desktop/account-switching.integration.test.tsx�[2m > �[22m�[2mpairs two users through the production bridge, fences late A traffic, logs B out offline and preserves identity after reload
�[22m�[39m[SocketContext] Connected to WebSocket server

�[90mstderr�[2m | src/desktop/account-switching.integration.test.tsx�[2m > �[22m�[2mpairs two users through the production bridge, fences late A traffic, logs B out offline and preserves identity after reload
�[22m�[39mAn update to SocketProvider inside a test was not wrapped in act(...).

When testing, code that causes React state updates should be wrapped into act(...):

act(() => {
  /* fire events that update state */
});
/* assert on the output */

This ensures that you're testing the behavior the user would see in the browser. Learn more at https://react.dev/link/wrap-tests-with-act

�[90mstdout�[2m | src/desktop/account-switching.integration.test.tsx�[2m > �[22m�[2mpairs two users through the production bridge, fences late A traffic, logs B out offline and preserves identity after reload
�[22m�[39m[SocketContext] Received task update: { id: �[32m'202'�[39m, username: �[32m'bob'�[39m, avatarUrl: �[1mnull�[22m }

�[90mstdout�[2m | src/desktop/account-switching.integration.test.tsx�[2m > �[22m�[2mpairs two users through the production bridge, fences late A traffic, logs B out offline and preserves identity after reload
�[22m�[39m[SocketContext] Cleaning up socket connection

 �[32m✓�[39m src/desktop/account-switching.integration.test.tsx �[2m(�[22m�[2m1 test�[22m�[2m)�[22m�[33m 1039�[2mms�[22m�[39m
   �[33m�[2m✓�[22m�[39m pairs two users through the production bridge, fences late A traffic, logs B out offline and preserves identity after reload�[33m 1036�[2mms�[22m�[39m
 �[32m✓�[39m src/pages/inboxUtils.test.ts �[2m(�[22m�[2m25 tests�[22m�[2m)�[22m�[32m 33�[2mms�[22m�[39m
 �[32m✓�[39m src/desktop/DesktopExperience.deep-link-presentation.test.tsx �[2m(�[22m�[2m5 tests�[22m�[2m)�[22m�[33m 944�[2mms�[22m�[39m
   �[33m�[2m✓�[22m�[39m preserves the warm Open account after tunnel presentation with cold delivery after profile loading�[33m 481�[2mms�[22m�[39m
 �[32m✓�[39m src/components/PreviewLightbox.test.tsx �[2m(�[22m�[2m13 tests�[22m�[2m)�[22m�[33m 740�[2mms�[22m�[39m
 �[32m✓�[39m src/components/GlobalHeader.desktop.test.tsx �[2m(�[22m�[2m16 tests�[22m�[2m)�[22m�[33m 1154�[2mms�[22m�[39m
   �[32m✓�[39m GlobalHeader desktop toolbar �[2m(16)�[22m
     �[33m�[2m✓�[22m�[39m uses the route action and remaining menu options on /�[33m 327�[2mms�[22m�[39m
 �[32m✓�[39m src/desktop/DesktopExperience.recovery.test.tsx �[2m(�[22m�[2m16 tests�[22m�[2m)�[22m�[33m 847�[2mms�[22m�[39m
   �[32m✓�[39m DesktopExperience managed Connect recovery �[2m(16)�[22m
     �[33m�[2m✓�[22m�[39m shows bounded recovery guidance without endpoint or raw failure details�[33m 320�[2mms�[22m�[39m
 �[32m✓�[39m src/components/Layout.desktop.test.tsx �[2m(�[22m�[2m8 tests�[22m�[2m)�[22m�[33m 1152�[2mms�[22m�[39m
   �[32m✓�[39m Layout desktop instance selector �[2m(8)�[22m
     �[33m�[2m✓�[22m�[39m keeps version and copyright on web but out of the desktop sidebar�[33m 410�[2mms�[22m�[39m
 �[32m✓�[39m src/desktop/DesktopExperience.discovery.test.tsx �[2m(�[22m�[2m4 tests�[22m�[2m)�[22m�[33m 713�[2mms�[22m�[39m
   �[32m✓�[39m DesktopExperience production Connect discovery pipeline �[2m(4)�[22m
     �[33m�[2m✓�[22m�[39m prefills through main discovery, IPC, preload, and the MacIntel Electron adapter before explicit confirmation�[33m 387�[2mms�[22m�[39m
 �[32m✓�[39m src/desktop/DesktopExperience.authentication.test.tsx �[2m(�[22m�[2m8 tests�[22m�[2m)�[22m�[33m 711�[2mms�[22m�[39m
 �[32m✓�[39m src/components/TaskList/rowModel.test.ts �[2m(�[22m�[2m14 tests�[22m�[2m)�[22m�[32m 17�[2mms�[22m�[39m
 �[32m✓�[39m src/hooks/useContextRefresh.test.tsx �[2m(�[22m�[2m8 tests�[22m�[2m)�[22m�[32m 77�[2mms�[22m�[39m
 �[32m✓�[39m src/pages/SettingsPage/AIModelSelectionSection.test.tsx �[2m(�[22m�[2m6 tests�[22m�[2m)�[22m�[33m 534�[2mms�[22m�[39m
 �[32m✓�[39m src/pages/SettingsPage/SettingsNavigation.test.tsx �[2m(�[22m�[2m7 tests�[22m�[2m)�[22m�[33m 696�[2mms�[22m�[39m
   �[32m✓�[39m SettingsNavigation �[2m(7)�[22m
     �[33m�[2m✓�[22m�[39m organizes settings into category tabs�[33m 363�[2mms�[22m�[39m
 �[32m✓�[39m src/components/Mcp/McpConnectedAppRow.test.tsx �[2m(�[22m�[2m13 tests�[22m�[2m)�[22m�[33m 609�[2mms�[22m�[39m
 �[32m✓�[39m src/api/voiceApi.test.ts �[2m(�[22m�[2m11 tests�[22m�[2m)�[22m�[32m 109�[2mms�[22m�[39m
 �[32m✓�[39m src/components/TaskDetails/reviewPromptOverview.test.ts �[2m(�[22m�[2m18 tests�[22m�[2m)�[22m�[32m 26�[2mms�[22m�[39m
 �[32m✓�[39m src/pages/LoginPage.oauthUrl.test.tsx �[2m(�[22m�[2m16 tests�[22m�[2m)�[22m�[32m 16�[2mms�[22m�[39m
 �[32m✓�[39m src/components/GlobalHeaderComponents.status.test.tsx �[2m(�[22m�[2m7 tests�[22m�[2m)�[22m�[33m 411�[2mms�[22m�[39m
 �[32m✓�[39m src/components/Dashboard/UsageTipsSection.test.tsx �[2m(�[22m�[2m10 tests�[22m�[2m)�[22m�[33m 1434�[2mms�[22m�[39m
   �[32m✓�[39m usage tips �[2m(10)�[22m
     �[33m�[2m✓�[22m�[39m removes immediately, reuses event ID on bounded retries, and fetches replacements�[33m 311�[2mms�[22m�[39m
     �[33m�[2m✓�[22m�[39m restores a failed dismissal with a retry control using the original event�[33m 814�[2mms�[22m�[39m
 �[32m✓�[39m src/hooks/useHeaderStats.scope.test.tsx �[2m(�[22m�[2m2 tests�[22m�[2m)�[22m�[33m 391�[2mms�[22m�[39m
   �[32m✓�[39m useHeaderStats request scope reconciliation �[2m(2)�[22m
     �[33m�[2m✓�[22m�[39m discards an in-flight live read across reconnect and completes the full recovery�[33m 330�[2mms�[22m�[39m
 �[32m✓�[39m src/desktop/windowChromeStyles.test.ts �[2m(�[22m�[2m6 tests�[22m�[2m)�[22m�[32m 11�[2mms�[22m�[39m
 �[32m✓�[39m src/pages/LoginPage.hostedOAuthLifecycle.test.tsx �[2m(�[22m�[2m2 tests�[22m�[2m)�[22m�[33m 331�[2mms�[22m�[39m
 �[32m✓�[39m src/serviceWorkerRegistration.test.ts �[2m(�[22m�[2m11 tests�[22m�[2m)�[22m�[32m 13�[2mms�[22m�[39m
 �[32m✓�[39m src/components/TaskPlanner/SetupWizardHeaders.test.tsx �[2m(�[22m�[2m4 tests�[22m�[2m)�[22m�[33m 312�[2mms�[22m�[39m
 �[32m✓�[39m src/api/notificationApi.test.ts �[2m(�[22m�[2m2 tests�[22m�[2m)�[22m�[32m 16�[2mms�[22m�[39m
 �[32m✓�[39m src/api/agentHealthApi.test.ts �[2m(�[22m�[2m4 tests�[22m�[2m)�[22m�[32m 27�[2mms�[22m�[39m
 �[32m✓�[39m src/pages/SettingsPage/SettingsLayout.test.tsx �[2m(�[22m�[2m4 tests�[22m�[2m)�[22m�[32m 244�[2mms�[22m�[39m
 �[32m✓�[39m src/components/ui/loadingStates.guard.test.ts �[2m(�[22m�[2m38 tests�[22m�[2m)�[22m�[32m 14�[2mms�[22m�[39m
 �[32m✓�[39m src/pages/LoginPage.desktopAuthentication.test.tsx �[2m(�[22m�[2m1 test�[22m�[2m)�[22m�[33m 329�[2mms�[22m�[39m
   �[32m✓�[39m LoginPage desktop authentication �[2m(1)�[22m
     �[33m�[2m✓�[22m�[39m refreshes shared authentication state and resumes the return path after completion�[33m 325�[2mms�[22m�[39m
 �[32m✓�[39m src/api/goals.test.ts �[2m(�[22m�[2m3 tests�[22m�[2m)�[22m�[32m 20�[2mms�[22m�[39m
 �[32m✓�[39m src/pages/SettingsPage/ManagedPreviewStorageSection.test.tsx �[2m(�[22m�[2m4 tests�[22m�[2m)�[22m�[32m 284�[2mms�[22m�[39m
 �[32m✓�[39m src/components/AIActivityMonitor.test.tsx �[2m(�[22m�[2m5 tests�[22m�[2m)�[22m�[33m 471�[2mms�[22m�[39m
�[90mstderr�[2m | src/components/GlobalSearch.loading.test.tsx�[2m > �[22m�[2mGlobalSearch loading states�[2m > �[22m�[2mrenders a search failure as an error rather than an empty result
�[22m�[39mSearch failed: Error: Search unavailable
    at �[90m/home/runner/work/propr/propr/propr-ui/�[39msrc/components/GlobalSearch.loading.test.tsx:49:44
    at file:///home/runner/work/propr/propr/node_modules/�[4mvitest�[24m/dist/chunks/run.CQOUYP-x.js:1628:35
    at file:///home/runner/work/propr/propr/node_modules/�[4mvitest�[24m/dist/chunks/run.CQOUYP-x.js:2783:26
    at file:///home/runner/work/propr/propr/node_modules/�[4mvitest�[24m/dist/chunks/run.CQOUYP-x.js:3319:20
    at new Promise (<anonymous>)
    at runWithCancel (file:///home/runner/work/propr/propr/node_modules/�[4mvitest�[24m/dist/chunks/run.CQOUYP-x.js:3314:10)
    at file:///home/runner/work/propr/propr/node_modules/�[4mvitest�[24m/dist/chunks/run.CQOUYP-x.js:3299:20
    at new Promise (<anonymous>)
    at runWithTimeout (file:///home/runner/work/propr/propr/node_modules/�[4mvitest�[24m/dist/chunks/run.CQOUYP-x.js:3257:10)
    at file:///home/runner/work/propr/propr/node_modules/�[4mvitest�[24m/dist/chunks/run.CQOUYP-x.js:3876:64

 �[32m✓�[39m src/components/GlobalSearch.loading.test.tsx �[2m(�[22m�[2m2 tests�[22m�[2m)�[22m�[33m 896�[2mms�[22m�[39m
   �[32m✓�[39m GlobalSearch loading states �[2m(2)�[22m
     �[33m�[2m✓�[22m�[39m waits for successful task and plan reads before showing no results�[33m 553�[2mms�[22m�[39m
     �[33m�[2m✓�[22m�[39m renders a search failure as an error rather than an empty result�[33m 339�[2mms�[22m�[39m
 �[32m✓�[39m src/components/Dashboard/sectionState.visibility.test.tsx �[2m(�[22m�[2m2 tests�[22m�[2m)�[22m�[32m 34�[2mms�[22m�[39m
 �[32m✓�[39m src/desktop/preloadWindowFrame.test.ts �[2m(�[22m�[2m2 tests�[22m�[2m)�[22m�[32m 18�[2mms�[22m�[39m
 �[32m✓�[39m src/desktop/electronAdapters.localSetup.test.ts �[2m(�[22m�[2m2 tests�[22m�[2m)�[22m�[32m 10�[2mms�[22m�[39m
 �[32m✓�[39m src/App.invalidConfiguration.test.tsx �[2m(�[22m�[2m4 tests�[22m�[2m)�[22m�[33m 1186�[2mms�[22m�[39m
   �[32m✓�[39m invalid eager API configuration �[2m(4)�[22m
     �[33m�[2m✓�[22m�[39m renders a bounded safe connection screen without leaking configured input�[33m 977�[2mms�[22m�[39m
 �[32m✓�[39m src/components/TaskDetails/thoughtContent.test.ts �[2m(�[22m�[2m4 tests�[22m�[2m)�[22m�[32m 7�[2mms�[22m�[39m
 �[32m✓�[39m src/api/taskPathEncoding.test.ts �[2m(�[22m�[2m1 test�[22m�[2m)�[22m�[32m 12�[2mms�[22m�[39m
 �[32m✓�[39m src/hooks/headerStatsRequestCoordinator.test.ts �[2m(�[22m�[2m2 tests�[22m�[2m)�[22m�[32m 11�[2mms�[22m�[39m
 �[32m✓�[39m src/components/TaskDetails/TaskHeader.test.tsx �[2m(�[22m�[2m2 tests�[22m�[2m)�[22m�[32m 216�[2mms�[22m�[39m
 �[32m✓�[39m src/components/TaskList/ReferenceChips.test.tsx �[2m(�[22m�[2m3 tests�[22m�[2m)�[22m�[32m 72�[2mms�[22m�[39m
 �[32m✓�[39m src/hooks/useDesktopLayout.test.tsx �[2m(�[22m�[2m1 test�[22m�[2m)�[22m�[32m 21�[2mms�[22m�[39m
 �[32m✓�[39m src/api/previewStorageApi.test.ts �[2m(�[22m�[2m2 tests�[22m�[2m)�[22m�[32m 15�[2mms�[22m�[39m
 �[32m✓�[39m src/components/TaskPlanner/AgentModelSelectorParts.responsive.test.tsx �[2m(�[22m�[2m1 test�[22m�[2m)�[22m�[32m 56�[2mms�[22m�[39m
 �[32m✓�[39m src/components/TaskDetails/apiDataGuards.test.ts �[2m(�[22m�[2m1 test�[22m�[2m)�[22m�[32m 5�[2mms�[22m�[39m
 �[32m✓�[39m src/components/ui/SystemAlert.test.tsx �[2m(�[22m�[2m2 tests�[22m�[2m)�[22m�[32m 241�[2mms�[22m�[39m
 �[32m✓�[39m src/components/creationActions.test.ts �[2m(�[22m�[2m20 tests�[22m�[2m)�[22m�[32m 15�[2mms�[22m�[39m

�[2m Test Files �[22m �[1m�[32m58 passed�[39m�[22m�[90m (58)�[39m
�[2m      Tests �[22m �[1m�[32m601 passed�[39m�[22m�[90m (601)�[39m
�[2m   Start at �[22m 09:28:46
�[2m   Duration �[22m 53.09s�[2m (environment 51%, tests 26%, setup 10%, import 9%, transform 4%)�[22m

�[2mEnvironment �[22m �[33mjsdom was created 58 times�[39m�[2m · 49.23s total, 51% of tracked time�[22m
�[2m            �[22m �[2mcreate it once per worker with �[22m�[33mpool: 'vmThreads'�[39m�[2m (keeps per-file isolation) or �[22m�[33misolate: false�[39m�[2m (shares it across files)�[22m
�[2m            �[22m �[2mlearn more: https://vitest.dev/guide/improving-performance#test-environments�[22m


> [email protected] posttest
> npm run test:docker-context


> [email protected] test:docker-context
> node --test scripts/docker-context-inputs.test.mjs

TAP version 13
# Subtest: focused UI selectors are forwarded only to Vitest
ok 1 - focused UI selectors are forwarded only to Vitest
  ---
  duration_ms: 1.034437
  type: 'test'
  ...
# Subtest: the UI Docker context contains its complete non-type external source import closure
ok 2 - the UI Docker context contains its complete non-type external source import closure
  ---
  duration_ms: 60.121138
  type: 'test'
  ...
1..2
# tests 2
# suites 0
# pass 2
# fail 0
# cancelled 0
# skipped 0
# todo 0
# duration_ms 125.431234
[179/179] passed propr-ui#2/4 (workspace test script) in 54.0s

### Shard 2/4: 178/179 passed in 487.0s

Assigned 179 of 716 discovered units.

| Duration | Status | Unit |
| ---: | --- | --- |
| 82.1s | passed | `test/integrationImageHarness.test.mjs` |
| 54.0s | passed | `propr-ui#2/4` (workspace) |
| 17.1s | passed | `test/prPublicationRecoveryJob.test.ts` |
| 11.7s | failed | `packages/core/test/repositoryWorkflow.test.ts` |
| 11.7s | passed | `packages/api/test/planProvenanceUpdates.test.ts` |
| 10.7s | passed | `test/previewRuntimeSmokeCleanup.test.mjs` |
| 8.1s | passed | `apps/desktop/scripts/desktop-native-menu.test.mjs` |
| 7.8s | passed | `packages/cli/src/commands/initCommands.test.ts` |
| 7.7s | passed | `packages/api/test/mcpRepoImprovements.test.ts` |
| 7.2s | passed | `test/notificationSchema.test.ts` |
| 5.9s | passed | `packages/api/test/connectAuthCallback.test.ts` |
| 5.6s | passed | `test/codexAppServerGoal.test.ts` |
| 5.5s | passed | `packages/api/test/mcpGoalTaskDepth.test.ts` |
| 5.4s | passed | `packages/api/test/mcpWorkOverview.test.ts` |
| 5.3s | passed | `apps/desktop/scripts/macos-window-chrome.test.mjs` |


1/179 test runs failed in shard 2/4 after 487.0s:
- packages/core/test/repositoryWorkflow.test.ts: exit 1

Details truncated; see the uploaded artifacts for complete failure rows and logs.

View Workflow
View uploaded artifacts

@propr-dev

propr-dev Bot commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ Applied the requested follow-up changes in commit 2417683

Summary of Changes

I fixed the shard 2 failure in packages/core/test/repositoryWorkflow.test.ts. It was an intermittent timing bug in the validation wrapper, not a problem with this PR's repository search/read changes.

Cause: The CI log shows test 32 (validation distinguishes a timeout from a command killed or exiting 124 before its limit) failing because exit 124 was reported as "Timed out" instead of "Failed (exit 124)". The wrapper in packages/core/src/workflow/workflowExecution.ts decides whether a 124/137 exit was a real timeout by checking elapsed time with bash's $SECONDS, which only counts whole seconds. The test uses a 1-second limit, so an exit 124 that returns instantly but happens to cross a second boundary looks like it ran for a full second.

Fix: I added a clock_ms helper that reads bash 5's microsecond clock (EPOCHREALTIME), and the check now compares elapsed milliseconds against the limit in milliseconds. On bash older than 5 it falls back to the old $SECONDS behaviour, so the flake could still happen there. A real timeout is still always detected, because timeout(1) starts after the start time is recorded.

Verification:

  • The bug itself: in 300 back-to-back immediate exit 124 runs, the old seconds check called one a timeout and the new check called none.
  • The failing suite: repositoryWorkflow.test.ts passed 35/35 three times in a row through scripts/run-test-suite.mjs. It also passed before the change, so the local runs don't reproduce the flake; the stress loop is the evidence for the fix.
  • Related suites: workflowContainerSmoke, repositoryWorkflowAdmission and prPublicationJob pass.
  • Typecheck and lint: tsc for packages/core reports no errors. ESLint skipped the file because no lint config covers it, so lint wasn't actually checked.

There's no visual change, so I didn't create any previews.


🤖 Implementation Details

  • Model: Claude Opus 5.5 (medium)
  • Requested By: @github-actions[bot]
  • Time: 4m 37s
  • Tokens: 1,086,045 (1,080,711 in / 5,334 out)
  • Cost: $0.66
  • Subscription usage: Session +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: 6035114858✓

…ryWorkflow.test.ts`. It was an intermittent timing bug in the validation wrapper, not a problem with this PR's repository search/read changes.

I fixed the shard 2 failure in `packages/core/test/repositoryWorkflow.test.ts`. It was an intermittent timing bug in the validation wrapper, not a problem with this PR's repository search/read changes.

**Cause:** The CI log shows test 32 (`validation distinguishes a timeout from a command killed or exiting 124 before its limit`) failing because `exit 124` was reported as "Timed out" instead of "Failed (exit 124)". The wrapper in `packages/core/src/workflow/workflowExecution.ts` decides whether a 124/137 exit was a real timeout by checking elapsed time with bash's `$SECONDS`, which only counts whole seconds. The test uses a 1-second limit, so an `exit 124` that returns instantly but happens to cross a second boundary looks like it ran for a full second.

**Fix:** I added a `clock_ms` helper that reads bash 5's microsecond clock (`EPOCHREALTIME`), and the check now compares elapsed milliseconds against the limit in milliseconds. On bash older than 5 it falls back to the old `$SECONDS` behaviour, so the flake could still happen there. A real timeout is still always detected, because `timeout(1)` starts after the start time is recorded.

**Verification:**
- **The bug itself:** in 300 back-to-back immediate `exit 124` runs, the old seconds check called one a timeout and the new check called none.
- **The failing suite:** `repositoryWorkflow.test.ts` passed 35/35 three times in a row through `scripts/run-test-suite.mjs`. It also passed before the change, so the local runs don't reproduce the flake; the stress loop is the evidence for the fix.
- **Related suites:** `workflowContainerSmoke`, `repositoryWorkflowAdmission` and `prPublicationJob` pass.
- **Typecheck and lint:** `tsc` for `packages/core` reports no errors. ESLint skipped the file because no lint config covers it, so lint wasn't actually checked.

There's no visual change, so I didn't create any previews.

PR: #2832
Comment by: @github-actions[bot] (ID: 6035114858)
Model: Claude Opus 5.5
@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown

Full Test Suite Results

Validation failed during: Test shard (shard 1), Test shard (shard 2).

  • Dependency install: success
  • Workspace build: success
  • Docs validation: success
  • Shard coverage verification: success
  • Hosted native Electron units: skipped (classifier decision: false)
  • Shard 1/4: failed during Test shard in 387.8s on GitHub Actions 1000070244
    • test/prPublicationRecoveryJob.test.ts: exit 1
  • Shard 2/4: failed during Test shard in 471.5s on GitHub Actions 1000070242
    • test/ultrafixContinuationEntryPoint.test.ts: exit 1
  • Shard 3/4: passed in 527.4s on GitHub Actions 1000070241
  • Shard 4/4: passed in 546.8s on GitHub Actions 1000070245
View shard 1/4 output
...(truncated)

elled 0
# skipped 0
# todo 0
# duration_ms 555.938518
[178/180] passed test/workerTaskStateRecovery.test.ts in 0.7s

[179/180] test/workRefHelpers.test.ts
TAP version 13
# Subtest: buildTaskWorkRef — task execution flow
    # Subtest: produces correct workRef for a standard issue task
    ok 1 - produces correct workRef for a standard issue task
      ---
      duration_ms: 0.677414
      type: 'test'
      ...
    # Subtest: includes prNumber when provided (PR follow-up)
    ok 2 - includes prNumber when provided (PR follow-up)
      ---
      duration_ms: 2.153855
      type: 'test'
      ...
    # Subtest: handles undefined taskId gracefully
    ok 3 - handles undefined taskId gracefully
      ---
      duration_ms: 1.222208
      type: 'test'
      ...
    1..3
ok 1 - buildTaskWorkRef — task execution flow
  ---
  duration_ms: 5.396984
  type: 'suite'
  ...
# Subtest: buildAnalysisWorkRef — plan flow
    # Subtest: plan-generation produces plan workRef with planDraftId
    ok 1 - plan-generation produces plan workRef with planDraftId
      ---
      duration_ms: 0.2191
      type: 'test'
      ...
    # Subtest: plan-refinement produces plan workRef with planDraftId
    ok 2 - plan-refinement produces plan workRef with planDraftId
      ---
      duration_ms: 0.071491
      type: 'test'
      ...
    # Subtest: plan without taskId still has workType plan and undefined planDraftId
    ok 3 - plan without taskId still has workType plan and undefined planDraftId
      ---
      duration_ms: 0.059092
      type: 'test'
      ...
    # Subtest: plan ignores taskNumber and prNumber
    ok 4 - plan ignores taskNumber and prNumber
      ---
      duration_ms: 0.107425
      type: 'test'
      ...
    1..4
ok 2 - buildAnalysisWorkRef — plan flow
  ---
  duration_ms: 0.770077
  type: 'suite'
  ...
# Subtest: buildAnalysisWorkRef — repository flow
    # Subtest: repo-chat without taskId produces repository workRef
    ok 1 - repo-chat without taskId produces repository workRef
      ---
      duration_ms: 0.120857
      type: 'test'
      ...
    # Subtest: repo-improvements without taskId produces repository workRef
    ok 2 - repo-improvements without taskId produces repository workRef
      ---
      duration_ms: 0.106483
      type: 'test'
      ...
    # Subtest: summarization without taskId produces repository workRef
    ok 3 - summarization without taskId produces repository workRef
      ---
      duration_ms: 0.151241
      type: 'test'
      ...
    # Subtest: undefined executionType with taskId produces task workRef
    ok 4 - undefined executionType with taskId produces task workRef
      ---
      duration_ms: 0.064689
      type: 'test'
      ...
    # Subtest: undefined executionType without taskId produces repository workRef
    ok 5 - undefined executionType without taskId produces repository workRef
      ---
      duration_ms: 0.049151
      type: 'test'
      ...
    1..5
ok 3 - buildAnalysisWorkRef — repository flow
  ---
  duration_ms: 0.669285
  type: 'suite'
  ...
# Subtest: buildAnalysisWorkRef — task with taskNumber/prNumber
    # Subtest: carries taskNumber when provided
    ok 1 - carries taskNumber when provided
      ---
      duration_ms: 0.076928
      type: 'test'
      ...
    # Subtest: carries both taskNumber and prNumber when provided
    ok 2 - carries both taskNumber and prNumber when provided
      ---
      duration_ms: 0.057836
      type: 'test'
      ...
    1..2
ok 4 - buildAnalysisWorkRef — task with taskNumber/prNumber
  ---
  duration_ms: 0.182743
  type: 'suite'
  ...
# Subtest: PR follow-up workRef — insert row mapping
    # Subtest: maps prNumber to pr_number DB column
    ok 1 - maps prNumber to pr_number DB column
      ---
      duration_ms: 0.090608
      type: 'test'
      ...
    # Subtest: pr_number is null for non-PR tasks
    ok 2 - pr_number is null for non-PR tasks
      ---
      duration_ms: 0.046156
      type: 'test'
      ...
    1..2
ok 5 - PR follow-up workRef — insert row mapping
  ---
  duration_ms: 0.220888
  type: 'suite'
  ...
# Subtest: buildAnalysisWorkRef — edge cases
    # Subtest: all undefined inputs produce repository workRef with undefined fields
    ok 1 - all undefined inputs produce repository workRef with undefined fields
      ---
      duration_ms: 0.110667
      type: 'test'
      ...
    # Subtest: non-plan executionType with taskId produces task workRef
    ok 2 - non-plan executionType with taskId produces task workRef
      ---
      duration_ms: 0.040513
      type: 'test'
      ...
    # Subtest: taskNumber without taskId produces task workRef (issue-scoped analysis)
    ok 3 - taskNumber without taskId produces task workRef (issue-scoped analysis)
      ---
      duration_ms: 0.044693
      type: 'test'
      ...
    # Subtest: taskNumber without taskId for PR follow-up carries prNumber
    ok 4 - taskNumber without taskId for PR follow-up carries prNumber
      ---
      duration_ms: 0.042741
      type: 'test'
      ...
    1..4
ok 6 - buildAnalysisWorkRef — edge cases
  ---
  duration_ms: 0.302947
  type: 'suite'
  ...
# [2026-10-07 09:44:12.023 +0000] �[32mINFO�[39m: �[36mSQLite database connection established successfully�[39m
#     filename: "/tmp/propr-test-suite-5i7cYr/179-workRefHelpers.test.ts/propr.test.sqlite"
#     environment: "test"
# [2026-10-07 09:44:12.027 +0000] �[32mINFO�[39m: �[36mSQLite database connection closed�[39m
1..6
# tests 20
# suites 6
# pass 20
# fail 0
# cancelled 0
# skipped 0
# todo 0
# duration_ms 954.275503
[179/180] passed test/workRefHelpers.test.ts in 1.1s

[180/180] propr-ui#2/4 (workspace test script)

> [email protected] test
> vitest run --shard=2/4


�[1m�[30m�[46m RUN �[49m�[39m�[22m �[36mv5.0.0 �[39m�[90m/home/runner/work/propr/propr/propr-ui�[39m

�[90mstdout�[2m | src/components/TaskDetails/useTaskData.followup.test.ts�[2m > �[22m�[2mfull history follow-up regressions�[2m > �[22m�[2mrefetches on task completion with initial HTTP pending=false
�[22m�[39m[useTaskData] Received task update via WebSocket: { taskId: �[32m'task'�[39m, state: �[32m'COMPLETED'�[39m }

�[90mstdout�[2m | src/components/TaskDetails/useTaskData.followup.test.ts�[2m > �[22m�[2mfull history follow-up regressions�[2m > �[22m�[2mrefetches on task completion with initial HTTP pending=true
�[22m�[39m[useTaskData] Received task update via WebSocket: { taskId: �[32m'task'�[39m, state: �[32m'COMPLETED'�[39m }

�[90mstderr�[2m | src/config/runtimeConfig.test.ts�[2m > �[22m�[2mgetApiBaseUrl�[2m > �[22m�[2mblocks API client construction when the hosted UI has no selected stack
�[22m�[39m[propr] HOSTED_STACK_REQUIRED

�[90mstderr�[2m | src/config/runtimeConfig.test.ts�[2m > �[22m�[2mgetApiBaseUrl�[2m > �[22m�[2mblocks API client construction for a non-Connect hosted runtime URL
�[22m�[39m[propr] INVALID_RUNTIME_CONFIGURATION

�[90mstderr�[2m | src/config/runtimeConfig.test.ts�[2m > �[22m�[2mhosted tunnel query API base�[2m > �[22m�[2mdoes not let an encoded tunnel name fall through to valid runtime configuration
�[22m�[39m[propr] INVALID_RUNTIME_CONFIGURATION

�[90mstderr�[2m | src/config/runtimeConfig.test.ts�[2m > �[22m�[2mhosted tunnel query API base�[2m > �[22m�[2mdoes not let an encoded tunnel name fall through to a valid stored endpoint
�[22m�[39m[propr] INVALID_RUNTIME_CONFIGURATION

 �[32m✓�[39m src/config/runtimeConfig.test.ts �[2m(�[22m�[2m67 tests�[22m�[2m)�[22m�[33m 977�[2mms�[22m�[39m
   �[32m✓�[39m getApiBaseUrl �[2m(16)�[22m
     �[33m�[2m✓�[22m�[39m uses the runtime-configured apiBaseUrl when present�[33m 412�[2mms�[22m�[39m
�[90mstdout�[2m | src/components/TaskDetails/useTaskData.followup.test.ts�[2m > �[22m�[2mfull history follow-up regressions�[2m > �[22m�[2mtask page replays a large increment once during HTTP/completion
�[22m�[39m[useTaskData] Received task update via WebSocket: { taskId: �[32m'task'�[39m, state: �[32m'COMPLETED'�[39m }

�[90mstdout�[2m | src/components/TaskDetails/useTaskData.followup.test.ts�[2m > �[22m�[2mfull history follow-up regressions�[2m > �[22m�[2mtask page orders growing messages: HTTP past socket
�[22m�[39m[useTaskData] Received task update via WebSocket: { taskId: �[32m'task'�[39m, state: �[32m'COMPLETED'�[39m }

�[90mstdout�[2m | src/components/TaskDetails/useTaskData.followup.test.ts�[2m > �[22m�[2mfull history follow-up regressions�[2m > �[22m�[2mtask page orders growing messages: socket past HTTP
�[22m�[39m[useTaskData] Received task update via WebSocket: { taskId: �[32m'task'�[39m, state: �[32m'COMPLETED'�[39m }

�[90mstdout�[2m | src/components/TaskDetails/useTaskData.followup.test.ts�[2m > �[22m�[2mfull history follow-up regressions�[2m > �[22m�[2mbuffered updates of an execution a newer read replaced�[2m > �[22m�[2mtask page discards a buffered old increment and its late deliveries after a new-execution read
�[22m�[39m[useTaskData] Received task update via WebSocket: { taskId: �[32m'task'�[39m, state: �[32m'COMPLETED'�[39m }

�[90mstdout�[2m | src/components/TaskDetails/useTaskData.followup.test.ts�[2m > �[22m�[2mfull history follow-up regressions�[2m > �[22m�[2mbuffered updates of an execution a newer read replaced�[2m > �[22m�[2mtask page discards a buffered old full state and its late deliveries after a new-execution read
�[22m�[39m[useTaskData] Received task update via WebSocket: { taskId: �[32m'task'�[39m, state: �[32m'COMPLETED'�[39m }

�[90mstdout�[2m | src/components/TaskDetails/useTaskData.followup.test.ts�[2m > �[22m�[2mfull history follow-up regressions�[2m > �[22m�[2mbuffered updates of an execution a newer read replaced�[2m > �[22m�[2mtask page keeps the newer HTTP execution over an intermediate execution received during the read
�[22m�[39m[useTaskData] Received task update via WebSocket: { taskId: �[32m'task'�[39m, state: �[32m'COMPLETED'�[39m }

 �[32m✓�[39m src/components/TaskDetails/useTaskData.followup.test.ts �[2m(�[22m�[2m45 tests�[22m�[2m)�[22m�[33m 838�[2mms�[22m�[39m
   �[32m✓�[39m full history follow-up regressions �[2m(45)�[22m
     �[33m�[2m✓�[22m�[39m merges large full histories, including unshared prefixes and suffixes, without positional arguments�[33m 613�[2mms�[22m�[39m
�[90mstdout�[2m | src/contexts/SocketProvider.test.tsx�[2m > �[22m�[2mSocketProvider�[2m > �[22m�[2mcreates one force-new scoped Manager on null-to-A activation
�[22m�[39m[SocketContext] Cleaning up socket connection

�[90mstdout�[2m | src/contexts/SocketProvider.test.tsx�[2m > �[22m�[2mSocketProvider�[2m > �[22m�[2mfully detaches A before creating a distinct Manager for scope rotation
�[22m�[39m[SocketContext] Cleaning up socket connection

�[90mstdout�[2m | src/contexts/SocketProvider.test.tsx�[2m > �[22m�[2mSocketProvider�[2m > �[22m�[2mfully detaches A before creating a distinct Manager for scope rotation
�[22m�[39m[SocketContext] Cleaning up socket connection

�[90mstdout�[2m | src/contexts/SocketProvider.test.tsx�[2m > �[22m�[2mSocketProvider�[2m > �[22m�[2mfully detaches A before creating a distinct Manager for same-origin A-to-B
�[22m�[39m[SocketContext] Cleaning up socket connection

�[90mstdout�[2m | src/contexts/SocketProvider.test.tsx�[2m > �[22m�[2mSocketProvider�[2m > �[22m�[2mfully detaches A before creating a distinct Manager for same-origin A-to-B
�[22m�[39m[SocketContext] Cleaning up socket connection

�[90mstdout�[2m | src/contexts/SocketProvider.test.tsx�[2m > �[22m�[2mSocketProvider�[2m > �[22m�[2mreports a replacement Manager as disconnected until its own connect event
�[22m�[39m[SocketContext] Connected to WebSocket server
[SocketContext] Cleaning up socket connection
[SocketContext] Connected to WebSocket server

�[90mstderr�[2m | src/contexts/SocketProvider.test.tsx�[2m > �[22m�[2mSocketProvider�[2m > �[22m�[2mreports a replacement Manager as disconnected until its own connect event
�[22m�[39m[SocketContext] Connection error: not connected

�[90mstdout�[2m | src/contexts/SocketProvider.test.tsx�[2m > �[22m�[2mSocketProvider�[2m > �[22m�[2mreports a replacement Manager as disconnected until its own connect event
�[22m�[39m[SocketContext] Cleaning up socket connection

�[90mstdout�[2m | src/contexts/SocketProvider.test.tsx�[2m > �[22m�[2mSocketProvider�[2m > �[22m�[2mrotates the Manager when the effective API origin changes
�[22m�[39m[SocketContext] Cleaning up socket connection

�[90mstdout�[2m | src/contexts/SocketProvider.test.tsx�[2m > �[22m�[2mSocketProvider�[2m > �[22m�[2mrotates the Manager when the effective API origin changes
�[22m�[39m[SocketContext] Cleaning up socket connection

�[90mstdout�[2m | src/contexts/SocketProvider.test.tsx�[2m > �[22m�[2mSocketProvider�[2m > �[22m�[2mdisconnects on deactivate and creates no replacement
�[22m�[39m[SocketContext] Cleaning up socket connection

�[90mstdout�[2m | src/contexts/SocketProvider.test.tsx�[2m > �[22m�[2mSocketProvider�[2m > �[22m�[2mkeeps the hosted browser cookie socket without a desktop marker
�[22m�[39m[SocketContext] Cleaning up socket connection

�[90mstdout�[2m | src/contexts/SocketProvider.test.tsx�[2m > �[22m�[2mSocketProvider�[2m > �[22m�[2mclassifies authentication errors against the immutable activation scope
�[22m�[39m[SocketContext] Cleaning up socket connection

�[90mstdout�[2m | src/contexts/SocketProvider.test.tsx�[2m > �[22m�[2mSocketProvider�[2m > �[22m�[2mreconnects the current Manager when authorization changes without invalidating its token
�[22m�[39m[SocketContext] Cleaning up socket connection

�[90mstdout�[2m | src/contexts/SocketProvider.test.tsx�[2m > �[22m�[2mSocketProvider�[2m > �[22m�[2mnever reconnects a stale same-origin Manager after deferred authorization work resolves
�[22m�[39m[SocketContext] Cleaning up socket connection

�[90mstdout�[2m | src/contexts/SocketProvider.test.tsx�[2m > �[22m�[2mSocketProvider�[2m > �[22m�[2mnever reconnects a stale same-origin Manager after deferred authorization work resolves
�[22m�[39m[SocketContext] Cleaning up socket connection

�[90mstdout�[2m | src/contexts/SocketProvider.test.tsx�[2m > �[22m�[2mSocketProvider�[2m > �[22m�[2mdrops application events delivered by an old desktop scope
�[22m�[39m[SocketContext] Cleaning up socket connection
[SocketContext] Received task update: { eventType: �[32m'task:update'�[39m }

�[90mstdout�[2m | src/contexts/SocketProvider.test.tsx�[2m > �[22m�[2mSocketProvider�[2m > �[22m�[2mdrops application events delivered by an old desktop scope
�[22m�[39m[SocketContext] Cleaning up socket connection

�[90mstdout�[2m | src/contexts/SocketProvider.test.tsx�[2m > �[22m�[2mSocketProvider�[2m > �[22m�[2mdelivers live events without logging their potentially large payload
�[22m�[39m[SocketContext] Cleaning up socket connection

�[90mstdout�[2m | src/contexts/SocketProvider.test.tsx�[2m > �[22m�[2mSocketProvider�[2m > �[22m�[2mreference-counts the activity room and rejoins it after a reconnect
�[22m�[39m[SocketContext] Connected to WebSocket server
[SocketContext] Disconnected from WebSocket server: transport close
[SocketContext] Connected to WebSocket server
[SocketContext] Unsubscribed from activity

�[90mstdout�[2m | src/contexts/SocketProvider.test.tsx�[2m > �[22m�[2mSocketProvider�[2m > �[22m�[2mreference-counts the activity room and rejoins it after a reconnect
�[22m�[39m[SocketContext] Cleaning up socket connection

�[90mstdout�[2m | src/contexts/SocketProvider.test.tsx�[2m > �[22m�[2mSocketProvider�[2m > �[22m�[2mnegotiates direct snapshots without recreating the connection
�[22m�[39m[SocketContext] Connected to WebSocket server
[SocketContext] Disconnected from WebSocket server: transport close

�[90mstdout�[2m | src/contexts/SocketProvider.test.tsx�[2m > �[22m�[2mSocketProvider�[2m > �[22m�[2mnegotiates direct snapshots without recreating the connection
�[22m�[39m[SocketContext] Cleaning up socket connection

�[90mstdout�[2m | src/contexts/SocketProvider.test.tsx�[2m > �[22m�[2mSocketProvider�[2m > �[22m�[2mrefreshes browser authorization before reconnecting after a permission change
�[22m�[39m[SocketContext] Cleaning up socket connection

�[90mstdout�[2m | src/contexts/SocketProvider.test.tsx�[2m > �[22m�[2mSocketProvider�[2m > �[22m�[2mdelivers activity, goal, notification and usage events without logging their payloads
�[22m�[39m[SocketContext] Cleaning up socket connection

�[90mstdout�[2m | src/contexts/SocketProvider.test.tsx�[2m > �[22m�[2mSocketProvider�[2m > �[22m�[2mdrops activity events delivered by an old desktop scope
�[22m�[39m[SocketContext] Cleaning up socket connection

�[90mstdout�[2m | src/contexts/SocketProvider.test.tsx�[2m > �[22m�[2mSocketProvider�[2m > �[22m�[2mdrops activity events delivered by an old desktop scope
�[22m�[39m[SocketContext] Cleaning up socket connection

�[90mstdout�[2m | src/contexts/SocketProvider.test.tsx�[2m > �[22m�[2mSocketProvider�[2m > �[22m�[2mfully detaches listeners and disconnects on unmount
�[22m�[39m[SocketContext] Cleaning up socket connection

 �[32m✓�[39m src/contexts/SocketProvider.test.tsx �[2m(�[22m�[2m19 tests�[22m�[2m)�[22m�[32m 172�[2mms�[22m�[39m
 �[32m✓�[39m src/pages/NewTaskPage.test.tsx �[2m(�[22m�[2m15 tests�[22m�[2m)�[22m�[33m 2277�[2mms�[22m�[39m
   �[32m✓�[39m New Task issue launcher �[2m(15)�[22m
     �[33m�[2m✓�[22m�[39m reopens unresolved work after starting another request and reloading, preserving its key and files�[33m 367�[2mms�[22m�[39m
 �[32m✓�[39m src/components/RepositorySelector.test.tsx �[2m(�[22m�[2m26 tests�[22m�[2m)�[22m�[33m 984�[2mms�[22m�[39m
 �[32m✓�[39m src/serviceWorker.test.ts �[2m(�[22m�[2m24 tests�[22m�[2m)�[22m�[32m 53�[2mms�[22m�[39m
 �[32m✓�[39m src/hooks/useBrowserPush.test.tsx �[2m(�[22m�[2m20 tests�[22m�[2m)�[22m�[33m 384�[2mms�[22m�[39m
 �[32m✓�[39m src/api/demoMode.test.ts �[2m(�[22m�[2m21 tests�[22m�[2m)�[22m�[32m 37�[2mms�[22m�[39m
�[90mstderr�[2m | src/desktop/DesktopExperience.transport.test.tsx�[2m > �[22m�[2mDesktopExperience transport and fencing�[2m > �[22m�[2mignores a delayed access-invalid event from A after B has connected
�[22m�[39mAn update to DesktopExperience inside a test was not wrapped in act(...).

When testing, code that causes React state updates should be wrapped into act(...):

act(() => {
  /* fire events that update state */
});
/* assert on the output */

This ensures that you're testing the behavior the user would see in the browser. Learn more at https://react.dev/link/wrap-tests-with-act

 �[32m✓�[39m src/desktop/DesktopExperience.transport.test.tsx �[2m(�[22m�[2m11 tests�[22m�[2m)�[22m�[33m 540�[2mms�[22m�[39m
 �[32m✓�[39m src/hooks/useGenerationPolling.test.tsx �[2m(�[22m�[2m10 tests�[22m�[2m)�[22m�[32m 47�[2mms�[22m�[39m
�[90mstdout�[2m | src/desktop/account-switching.integration.test.tsx�[2m > �[22m�[2mpairs two users through the production bridge, fences late A traffic, logs B out offline and preserves identity after reload
�[22m�[39m[SocketContext] Connected to WebSocket server

�[90mstdout�[2m | src/desktop/account-switching.integration.test.tsx�[2m > �[22m�[2mpairs two users through the production bridge, fences late A traffic, logs B out offline and preserves identity after reload
�[22m�[39m[SocketContext] Received task update: { id: �[32m'101'�[39m, username: �[32m'alice'�[39m, avatarUrl: �[1mnull�[22m }

�[90mstdout�[2m | src/desktop/account-switching.integration.test.tsx�[2m > �[22m�[2mpairs two users through the production bridge, fences late A traffic, logs B out offline and preserves identity after reload
�[22m�[39m[SocketContext] Cleaning up socket connection

�[90mstdout�[2m | src/desktop/account-switching.integration.test.tsx�[2m > �[22m�[2mpairs two users through the production bridge, fences late A traffic, logs B out offline and preserves identity after reload
�[22m�[39m[SocketContext] Connected to WebSocket server

�[90mstderr�[2m | src/desktop/account-switching.integration.test.tsx�[2m > �[22m�[2mpairs two users through the production bridge, fences late A traffic, logs B out offline and preserves identity after reload
�[22m�[39mAn update to SocketProvider inside a test was not wrapped in act(...).

When testing, code that causes React state updates should be wrapped into act(...):

act(() => {
  /* fire events that update state */
});
/* assert on the output */

This ensures that you're testing the behavior the user would see in the browser. Learn more at https://react.dev/link/wrap-tests-with-act

�[90mstdout�[2m | src/desktop/account-switching.integration.test.tsx�[2m > �[22m�[2mpairs two users through the production bridge, fences late A traffic, logs B out offline and preserves identity after reload
�[22m�[39m[SocketContext] Received task update: { id: �[32m'202'�[39m, username: �[32m'bob'�[39m, avatarUrl: �[1mnull�[22m }

�[90mstdout�[2m | src/desktop/account-switching.integration.test.tsx�[2m > �[22m�[2mpairs two users through the production bridge, fences late A traffic, logs B out offline and preserves identity after reload
�[22m�[39m[SocketContext] Cleaning up socket connection

 �[32m✓�[39m src/desktop/account-switching.integration.test.tsx �[2m(�[22m�[2m1 test�[22m�[2m)�[22m�[33m 810�[2mms�[22m�[39m
   �[33m�[2m✓�[22m�[39m pairs two users through the production bridge, fences late A traffic, logs B out offline and preserves identity after reload�[33m 808�[2mms�[22m�[39m
 �[32m✓�[39m src/pages/inboxUtils.test.ts �[2m(�[22m�[2m25 tests�[22m�[2m)�[22m�[32m 19�[2mms�[22m�[39m
 �[32m✓�[39m src/desktop/DesktopExperience.deep-link-presentation.test.tsx �[2m(�[22m�[2m5 tests�[22m�[2m)�[22m�[33m 855�[2mms�[22m�[39m
   �[33m�[2m✓�[22m�[39m preserves the warm Open account after tunnel presentation with cold delivery after profile loading�[33m 441�[2mms�[22m�[39m
 �[32m✓�[39m src/components/PreviewLightbox.test.tsx �[2m(�[22m�[2m13 tests�[22m�[2m)�[22m�[33m 598�[2mms�[22m�[39m
 �[32m✓�[39m src/components/GlobalHeader.desktop.test.tsx �[2m(�[22m�[2m16 tests�[22m�[2m)�[22m�[33m 875�[2mms�[22m�[39m
 �[32m✓�[39m src/desktop/DesktopExperience.recovery.test.tsx �[2m(�[22m�[2m16 tests�[22m�[2m)�[22m�[33m 596�[2mms�[22m�[39m
 �[32m✓�[39m src/components/Layout.desktop.test.tsx �[2m(�[22m�[2m8 tests�[22m�[2m)�[22m�[33m 838�[2mms�[22m�[39m
   �[32m✓�[39m Layout desktop instance selector �[2m(8)�[22m
     �[33m�[2m✓�[22m�[39m keeps version and copyright on web but out of the desktop sidebar�[33m 317�[2mms�[22m�[39m
 �[32m✓�[39m src/desktop/DesktopExperience.discovery.test.tsx �[2m(�[22m�[2m4 tests�[22m�[2m)�[22m�[33m 535�[2mms�[22m�[39m
   �[32m✓�[39m DesktopExperience production Connect discovery pipeline �[2m(4)�[22m
     �[33m�[2m✓�[22m�[39m prefills through main discovery, IPC, preload, and the MacIntel Electron adapter before explicit confirmation�[33m 302�[2mms�[22m�[39m
 �[32m✓�[39m src/desktop/DesktopExperience.authentication.test.tsx �[2m(�[22m�[2m8 tests�[22m�[2m)�[22m�[33m 489�[2mms�[22m�[39m
 �[32m✓�[39m src/components/TaskList/rowModel.test.ts �[2m(�[22m�[2m14 tests�[22m�[2m)�[22m�[32m 14�[2mms�[22m�[39m
 �[32m✓�[39m src/hooks/useContextRefresh.test.tsx �[2m(�[22m�[2m8 tests�[22m�[2m)�[22m�[32m 41�[2mms�[22m�[39m
 �[32m✓�[39m src/pages/SettingsPage/AIModelSelectionSection.test.tsx �[2m(�[22m�[2m6 tests�[22m�[2m)�[22m�[33m 371�[2mms�[22m�[39m
 �[32m✓�[39m src/pages/SettingsPage/SettingsNavigation.test.tsx �[2m(�[22m�[2m7 tests�[22m�[2m)�[22m�[33m 477�[2mms�[22m�[39m
 �[32m✓�[39m src/components/Mcp/McpConnectedAppRow.test.tsx �[2m(�[22m�[2m13 tests�[22m�[2m)�[22m�[33m 453�[2mms�[22m�[39m
 �[32m✓�[39m src/api/voiceApi.test.ts �[2m(�[22m�[2m11 tests�[22m�[2m)�[22m�[32m 85�[2mms�[22m�[39m
 �[32m✓�[39m src/components/TaskDetails/reviewPromptOverview.test.ts �[2m(�[22m�[2m18 tests�[22m�[2m)�[22m�[32m 31�[2mms�[22m�[39m
 �[32m✓�[39m src/pages/LoginPage.oauthUrl.test.tsx �[2m(�[22m�[2m16 tests�[22m�[2m)�[22m�[32m 14�[2mms�[22m�[39m
 �[32m✓�[39m src/components/GlobalHeaderComponents.status.test.tsx �[2m(�[22m�[2m7 tests�[22m�[2m)�[22m�[32m 272�[2mms�[22m�[39m
 �[32m✓�[39m src/hooks/useHeaderStats.scope.test.tsx �[2m(�[22m�[2m2 tests�[22m�[2m)�[22m�[33m 383�[2mms�[22m�[39m
   �[32m✓�[39m useHeaderStats request scope reconciliation �[2m(2)�[22m
     �[33m�[2m✓�[22m�[39m discards an in-flight live read across reconnect and completes the full recovery�[33m 324�[2mms�[22m�[39m
 �[32m✓�[39m src/components/Dashboard/UsageTipsSection.test.tsx �[2m(�[22m�[2m10 tests�[22m�[2m)�[22m�[33m 1395�[2mms�[22m�[39m
   �[32m✓�[39m usage tips �[2m(10)�[22m
     �[33m�[2m✓�[22m�[39m removes immediately, reuses event ID on bounded retries, and fetches replacements�[33m 341�[2mms�[22m�[39m
     �[33m�[2m✓�[22m�[39m restores a failed dismissal with a retry control using the original event�[33m 820�[2mms�[22m�[39m
 �[32m✓�[39m src/pages/LoginPage.hostedOAuthLifecycle.test.tsx �[2m(�[22m�[2m2 tests�[22m�[2m)�[22m�[32m 239�[2mms�[22m�[39m
 �[32m✓�[39m src/desktop/windowChromeStyles.test.ts �[2m(�[22m�[2m6 tests�[22m�[2m)�[22m�[32m 6�[2mms�[22m�[39m
 �[32m✓�[39m src/serviceWorkerRegistration.test.ts �[2m(�[22m�[2m11 tests�[22m�[2m)�[22m�[32m 13�[2mms�[22m�[39m
 �[32m✓�[39m src/components/TaskPlanner/SetupWizardHeaders.test.tsx �[2m(�[22m�[2m4 tests�[22m�[2m)�[22m�[32m 220�[2mms�[22m�[39m
 �[32m✓�[39m src/api/notificationApi.test.ts �[2m(�[22m�[2m2 tests�[22m�[2m)�[22m�[32m 12�[2mms�[22m�[39m
 �[32m✓�[39m src/api/agentHealthApi.test.ts �[2m(�[22m�[2m4 tests�[22m�[2m)�[22m�[32m 13�[2mms�[22m�[39m
 �[32m✓�[39m src/pages/SettingsPage/SettingsLayout.test.tsx �[2m(�[22m�[2m4 tests�[22m�[2m)�[22m�[32m 208�[2mms�[22m�[39m
 �[32m✓�[39m src/pages/LoginPage.desktopAuthentication.test.tsx �[2m(�[22m�[2m1 test�[22m�[2m)�[22m�[32m 183�[2mms�[22m�[39m
 �[32m✓�[39m src/components/ui/loadingStates.guard.test.ts �[2m(�[22m�[2m38 tests�[22m�[2m)�[22m�[32m 13�[2mms�[22m�[39m
 �[32m✓�[39m src/pages/SettingsPage/ManagedPreviewStorageSection.test.tsx �[2m(�[22m�[2m4 tests�[22m�[2m)�[22m�[32m 200�[2mms�[22m�[39m
 �[32m✓�[39m src/api/goals.test.ts �[2m(�[22m�[2m3 tests�[22m�[2m)�[22m�[32m 12�[2mms�[22m�[39m
 �[32m✓�[39m src/components/AIActivityMonitor.test.tsx �[2m(�[22m�[2m5 tests�[22m�[2m)�[22m�[33m 341�[2mms�[22m�[39m
 �[32m✓�[39m src/components/Dashboard/sectionState.visibility.test.tsx �[2m(�[22m�[2m2 tests�[22m�[2m)�[22m�[32m 23�[2mms�[22m�[39m
�[90mstderr�[2m | src/components/GlobalSearch.loading.test.tsx�[2m > �[22m�[2mGlobalSearch loading states�[2m > �[22m�[2mrenders a search failure as an error rather than an empty result
�[22m�[39mSearch failed: Error: Search unavailable
    at �[90m/home/runner/work/propr/propr/propr-ui/�[39msrc/components/GlobalSearch.loading.test.tsx:49:44
    at file:///home/runner/work/propr/propr/node_modules/�[4mvitest�[24m/dist/chunks/run.CQOUYP-x.js:1628:35
    at file:///home/runner/work/propr/propr/node_modules/�[4mvitest�[24m/dist/chunks/run.CQOUYP-x.js:2783:26
    at file:///home/runner/work/propr/propr/node_modules/�[4mvitest�[24m/dist/chunks/run.CQOUYP-x.js:3319:20
    at new Promise (<anonymous>)
    at runWithCancel (file:///home/runner/work/propr/propr/node_modules/�[4mvitest�[24m/dist/chunks/run.CQOUYP-x.js:3314:10)
    at file:///home/runner/work/propr/propr/node_modules/�[4mvitest�[24m/dist/chunks/run.CQOUYP-x.js:3299:20
    at new Promise (<anonymous>)
    at runWithTimeout (file:///home/runner/work/propr/propr/node_modules/�[4mvitest�[24m/dist/chunks/run.CQOUYP-x.js:3257:10)
    at file:///home/runner/work/propr/propr/node_modules/�[4mvitest�[24m/dist/chunks/run.CQOUYP-x.js:3876:64

 �[32m✓�[39m src/components/GlobalSearch.loading.test.tsx �[2m(�[22m�[2m2 tests�[22m�[2m)�[22m�[33m 796�[2mms�[22m�[39m
   �[32m✓�[39m GlobalSearch loading states �[2m(2)�[22m
     �[33m�[2m✓�[22m�[39m waits for successful task and plan reads before showing no results�[33m 460�[2mms�[22m�[39m
     �[33m�[2m✓�[22m�[39m renders a search failure as an error rather than an empty result�[33m 333�[2mms�[22m�[39m
 �[32m✓�[39m src/desktop/preloadWindowFrame.test.ts �[2m(�[22m�[2m2 tests�[22m�[2m)�[22m�[32m 13�[2mms�[22m�[39m
 �[32m✓�[39m src/App.invalidConfiguration.test.tsx �[2m(�[22m�[2m4 tests�[22m�[2m)�[22m�[33m 842�[2mms�[22m�[39m
   �[32m✓�[39m invalid eager API configuration �[2m(4)�[22m
     �[33m�[2m✓�[22m�[39m renders a bounded safe connection screen without leaking configured input�[33m 689�[2mms�[22m�[39m
 �[32m✓�[39m src/desktop/electronAdapters.localSetup.test.ts �[2m(�[22m�[2m2 tests�[22m�[2m)�[22m�[32m 5�[2mms�[22m�[39m
 �[32m✓�[39m src/components/TaskDetails/thoughtContent.test.ts �[2m(�[22m�[2m4 tests�[22m�[2m)�[22m�[32m 5�[2mms�[22m�[39m
 �[32m✓�[39m src/api/taskPathEncoding.test.ts �[2m(�[22m�[2m1 test�[22m�[2m)�[22m�[32m 9�[2mms�[22m�[39m
 �[32m✓�[39m src/hooks/headerStatsRequestCoordinator.test.ts �[2m(�[22m�[2m2 tests�[22m�[2m)�[22m�[32m 7�[2mms�[22m�[39m
 �[32m✓�[39m src/components/TaskDetails/TaskHeader.test.tsx �[2m(�[22m�[2m2 tests�[22m�[2m)�[22m�[32m 180�[2mms�[22m�[39m
 �[32m✓�[39m src/components/TaskList/ReferenceChips.test.tsx �[2m(�[22m�[2m3 tests�[22m�[2m)�[22m�[32m 45�[2mms�[22m�[39m
 �[32m✓�[39m src/hooks/useDesktopLayout.test.tsx �[2m(�[22m�[2m1 test�[22m�[2m)�[22m�[32m 22�[2mms�[22m�[39m
 �[32m✓�[39m src/api/previewStorageApi.test.ts �[2m(�[22m�[2m2 tests�[22m�[2m)�[22m�[32m 13�[2mms�[22m�[39m
 �[32m✓�[39m src/components/TaskPlanner/AgentModelSelectorParts.responsive.test.tsx �[2m(�[22m�[2m1 test�[22m�[2m)�[22m�[32m 37�[2mms�[22m�[39m
 �[32m✓�[39m src/components/TaskDetails/apiDataGuards.test.ts �[2m(�[22m�[2m1 test�[22m�[2m)�[22m�[32m 4�[2mms�[22m�[39m
 �[32m✓�[39m src/components/ui/SystemAlert.test.tsx �[2m(�[22m�[2m2 tests�[22m�[2m)�[22m�[32m 149�[2mms�[22m�[39m
 �[32m✓�[39m src/components/creationActions.test.ts �[2m(�[22m�[2m20 tests�[22m�[2m)�[22m�[32m 12�[2mms�[22m�[39m

�[2m Test Files �[22m �[1m�[32m58 passed�[39m�[22m�[90m (58)�[39m
�[2m      Tests �[22m �[1m�[32m601 passed�[39m�[22m�[90m (601)�[39m
�[2m   Start at �[22m 09:44:12
�[2m   Duration �[22m 38.34s�[2m (environment 48%, tests 27%, setup 10%, import 9%, transform 5%)�[22m

�[2mEnvironment �[22m �[33mjsdom was created 58 times�[39m�[2m · 33.95s total, 48% of tracked time�[22m
�[2m            �[22m �[2mcreate it once per worker with �[22m�[33mpool: 'vmThreads'�[39m�[2m (keeps per-file isolation) or �[22m�[33misolate: false�[39m�[2m (shares it across files)�[22m
�[2m            �[22m �[2mlearn more: https://vitest.dev/guide/improving-performance#test-environments�[22m


> [email protected] posttest
> npm run test:docker-context


> [email protected] test:docker-context
> node --test scripts/docker-context-inputs.test.mjs

TAP version 13
# Subtest: focused UI selectors are forwarded only to Vitest
ok 1 - focused UI selectors are forwarded only to Vitest
  ---
  duration_ms: 0.67963
  type: 'test'
  ...
# Subtest: the UI Docker context contains its complete non-type external source import closure
ok 2 - the UI Docker context contains its complete non-type external source import closure
  ---
  duration_ms: 38.623202
  type: 'test'
  ...
1..2
# tests 2
# suites 0
# pass 2
# fail 0
# cancelled 0
# skipped 0
# todo 0
# duration_ms 87.594897
[180/180] passed propr-ui#2/4 (workspace test script) in 39.0s

### Shard 1/4: 179/180 passed in 387.8s

Assigned 180 of 719 discovered units.

| Duration | Status | Unit |
| ---: | --- | --- |
| 66.5s | passed | `test/integrationImageHarness.test.mjs` |
| 39.0s | passed | `propr-ui#2/4` (workspace) |
| 16.0s | passed | `packages/core/test/notificationService.test.ts` |
| 12.7s | passed | `apps/desktop/scripts/electron-pairing-zstd.test.mjs` |
| 10.0s | passed | `test/previewRuntimeSmokeCleanup.test.mjs` |
| 8.0s | passed | `apps/desktop/src/authentication-handoff.test.ts` |
| 7.4s | passed | `packages/api/test/mcpAccessLogDispatch.test.ts` |
| 6.5s | passed | `test/notificationSchema.test.ts` |
| 5.5s | passed | `packages/api/test/mcpIntegration.test.ts` |
| 5.3s | passed | `packages/cli/src/commands/imagePresence.test.ts` |
| 5.3s | passed | `packages/api/test/notificationProjectionService.test.ts` |
| 4.9s | passed | `packages/api/test/dashboardReadService.test.ts` |
| 4.4s | passed | `packages/api/test/mcpVisualPreviews.test.ts` |
| 4.2s | passed | `apps/desktop/scripts/test-native-artifact-lifecycle.test.mjs` |
| 3.8s | passed | `packages/api/test/notificationBackgroundService.test.ts` |


1/180 test runs failed in shard 1/4 after 387.8s:
- test/prPublicationRecoveryJob.test.ts: exit 1

View shard 2/4 output
...(truncated)

-x.js:2768:51)
�[90m    at processTicksAndRejections (node:internal/process/task_queues:103:5)�[39m
    at file:///home/runner/work/propr/propr/node_modules/�[4mvitest�[24m/dist/chunks/run.CQOUYP-x.js:3449:26
    at collectTests (file:///home/runner/work/propr/propr/node_modules/�[4mvitest�[24m/dist/chunks/run.CQOUYP-x.js:3422:3)
    at startTests (file:///home/runner/work/propr/propr/node_modules/�[4mvitest�[24m/dist/chunks/run.CQOUYP-x.js:4156:17)
    at file:///home/runner/work/propr/propr/node_modules/�[4mvitest�[24m/dist/chunks/base.BTS5G301.js:90:6

�[90mstderr�[2m | src/components/TaskPlanner/setupWizardHooks.test.tsx�[2m > �[22m�[2msetupWizardHooks branch resolution�[2m > �[22m�[2mpersists editable draft settings to context_config after debounce
�[22m�[39mFailed to persist draft settings: Error: Transient update failure
    at �[90m/home/runner/work/propr/propr/propr-ui/�[39msrc/components/TaskPlanner/setupWizardHooks.test.tsx:323:97
    at file:///home/runner/work/propr/propr/node_modules/�[4mvitest�[24m/dist/chunks/run.CQOUYP-x.js:2763:52
    at runWithSuite (file:///home/runner/work/propr/propr/node_modules/�[4mvitest�[24m/dist/chunks/run.CQOUYP-x.js:3248:8)
    at Object.collect (file:///home/runner/work/propr/propr/node_modules/�[4mvitest�[24m/dist/chunks/run.CQOUYP-x.js:2763:22)
    at Object.collect (file:///home/runner/work/propr/propr/node_modules/�[4mvitest�[24m/dist/chunks/run.CQOUYP-x.js:2768:51)
�[90m    at processTicksAndRejections (node:internal/process/task_queues:103:5)�[39m
    at file:///home/runner/work/propr/propr/node_modules/�[4mvitest�[24m/dist/chunks/run.CQOUYP-x.js:3449:26
    at collectTests (file:///home/runner/work/propr/propr/node_modules/�[4mvitest�[24m/dist/chunks/run.CQOUYP-x.js:3422:3)
    at startTests (file:///home/runner/work/propr/propr/node_modules/�[4mvitest�[24m/dist/chunks/run.CQOUYP-x.js:4156:17)
    at file:///home/runner/work/propr/propr/node_modules/�[4mvitest�[24m/dist/chunks/base.BTS5G301.js:90:6

 �[32m✓�[39m src/components/TaskPlanner/setupWizardHooks.test.tsx �[2m(�[22m�[2m24 tests�[22m�[2m)�[22m�[33m 321�[2mms�[22m�[39m
�[90mstderr�[2m | src/desktop/LocalSetupWizard.integration.test.tsx�[2m > �[22m�[2mproduction local setup journey�[2m > �[22m�[2mshows the authenticated identity, installation types, and explicit recovery controls
�[22m�[39mAn update to LocalSetupWizard inside a test was not wrapped in act(...).

When testing, code that causes React state updates should be wrapped into act(...):

act(() => {
  /* fire events that update state */
});
/* assert on the output */

This ensures that you're testing the behavior the user would see in the browser. Learn more at https://react.dev/link/wrap-tests-with-act
An update to LocalSetupWizard inside a test was not wrapped in act(...).

When testing, code that causes React state updates should be wrapped into act(...):

act(() => {
  /* fire events that update state */
});
/* assert on the output */

This ensures that you're testing the behavior the user would see in the browser. Learn more at https://react.dev/link/wrap-tests-with-act

�[90mstderr�[2m | src/desktop/LocalSetupWizard.integration.test.tsx�[2m > �[22m�[2mproduction local setup journey�[2m > �[22m�[2mhands completion into pairing, authenticated reprobe, and the current dashboard flow
�[22m�[39mAn update to LocalSetupWizard inside a test was not wrapped in act(...).

When testing, code that causes React state updates should be wrapped into act(...):

act(() => {
  /* fire events that update state */
});
/* assert on the output */

This ensures that you're testing the behavior the user would see in the browser. Learn more at https://react.dev/link/wrap-tests-with-act
An update to LocalSetupWizard inside a test was not wrapped in act(...).

When testing, code that causes React state updates should be wrapped into act(...):

act(() => {
  /* fire events that update state */
});
/* assert on the output */

This ensures that you're testing the behavior the user would see in the browser. Learn more at https://react.dev/link/wrap-tests-with-act

�[90mstderr�[2m | src/desktop/LocalSetupWizard.integration.test.tsx�[2m > �[22m�[2mproduction local setup journey�[2m > �[22m�[2mrequires a supported choice when a legacy saved setup used Demo mode
�[22m�[39mAn update to LocalSetupWizard inside a test was not wrapped in act(...).

When testing, code that causes React state updates should be wrapped into act(...):

act(() => {
  /* fire events that update state */
});
/* assert on the output */

This ensures that you're testing the behavior the user would see in the browser. Learn more at https://react.dev/link/wrap-tests-with-act
An update to LocalSetupWizard inside a test was not wrapped in act(...).

When testing, code that causes React state updates should be wrapped into act(...):

act(() => {
  /* fire events that update state */
});
/* assert on the output */

This ensures that you're testing the behavior the user would see in the browser. Learn more at https://react.dev/link/wrap-tests-with-act

�[90mstderr�[2m | src/desktop/LocalSetupWizard.integration.test.tsx�[2m > �[22m�[2mproduction local setup journey�[2m > �[22m�[2mshows and confirms corrected WebSocket intake for stale ProPR Connect recovery
�[22m�[39mAn update to LocalSetupWizard inside a test was not wrapped in act(...).

When testing, code that causes React state updates should be wrapped into act(...):

act(() => {
  /* fire events that update state */
});
/* assert on the output */

This ensures that you're testing the behavior the user would see in the browser. Learn more at https://react.dev/link/wrap-tests-with-act
An update to LocalSetupWizard inside a test was not wrapped in act(...).

When testing, code that causes React state updates should be wrapped into act(...):

act(() => {
  /* fire events that update state */
});
/* assert on the output */

This ensures that you're testing the behavior the user would see in the browser. Learn more at https://react.dev/link/wrap-tests-with-act

 �[32m✓�[39m src/desktop/LocalSetupWizard.integration.test.tsx �[2m(�[22m�[2m19 tests�[22m�[2m)�[22m�[33m 1714�[2mms�[22m�[39m
   �[32m✓�[39m production local setup journey �[2m(19)�[22m
     �[33m�[2m✓�[22m�[39m shows the authenticated identity, installation types, and explicit recovery controls�[33m 318�[2mms�[22m�[39m
 �[32m✓�[39m src/desktop/electronAdapters.test.ts �[2m(�[22m�[2m18 tests�[22m�[2m)�[22m�[32m 239�[2mms�[22m�[39m
�[90mstdout�[2m | src/components/TaskDetails/useTaskData.test.ts�[2m > �[22m�[2mtask detail history refreshes�[2m > �[22m�[2mturns the fixture baseline of three burst invalidations into one additional history request
�[22m�[39m[useTaskData] Received task update via WebSocket: { taskId: �[32m'task-1'�[39m, state: �[32m'processing'�[39m }
[useTaskData] Received task update via WebSocket: { taskId: �[32m'task-1'�[39m, state: �[32m'processing'�[39m }
[useTaskData] Received task update via WebSocket: { taskId: �[32m'task-1'�[39m, state: �[32m'processing'�[39m }

 �[32m✓�[39m src/components/TaskDetails/useTaskData.test.ts �[2m(�[22m�[2m23 tests�[22m�[2m)�[22m�[32m 70�[2mms�[22m�[39m
 �[32m✓�[39m src/components/TaskPlanner/setupWizardHooks.persistence.test.tsx �[2m(�[22m�[2m10 tests�[22m�[2m)�[22m�[32m 58�[2mms�[22m�[39m
 �[32m✓�[39m src/components/ConnectPlusBanner.test.tsx �[2m(�[22m�[2m19 tests�[22m�[2m)�[22m�[33m 1751�[2mms�[22m�[39m
 �[32m✓�[39m src/components/TaskDetails/ExecutionEventLog.test.tsx �[2m(�[22m�[2m20 tests�[22m�[2m)�[22m�[33m 567�[2mms�[22m�[39m
 �[32m✓�[39m src/pages/McpLogsPage.test.tsx �[2m(�[22m�[2m15 tests�[22m�[2m)�[22m�[33m 1255�[2mms�[22m�[39m
   �[32m✓�[39m McpLogsPage �[2m(15)�[22m
     �[33m�[2m✓�[22m�[39m renders the newest-first table and the window summary�[33m 310�[2mms�[22m�[39m
 �[32m✓�[39m src/components/Dashboard/DashboardSummary.test.tsx �[2m(�[22m�[2m14 tests�[22m�[2m)�[22m�[33m 504�[2mms�[22m�[39m
 �[32m✓�[39m src/components/AgentTankSidebar.test.tsx �[2m(�[22m�[2m15 tests�[22m�[2m)�[22m�[33m 784�[2mms�[22m�[39m
�[90mstderr�[2m | src/pages/SettingsPage/AgentsListSection.test.tsx�[2m > �[22m�[2mAgentsListSection web login�[2m > �[22m�[2mfolds legacy models within each provider until requested
�[22m�[39mAn update to AgentsListSection inside a test was not wrapped in act(...).

When testing, code that causes React state updates should be wrapped into act(...):

act(() => {
  /* fire events that update state */
});
/* assert on the output */

This ensures that you're testing the behavior the user would see in the browser. Learn more at https://react.dev/link/wrap-tests-with-act

�[90mstderr�[2m | src/pages/SettingsPage/AgentsListSection.test.tsx�[2m > �[22m�[2mAgentsListSection web login�[2m > �[22m�[2mshows Sonnet 5.5 as current and folds older Sonnet models
�[22m�[39mAn update to AgentsListSection inside a test was not wrapped in act(...).

When testing, code that causes React state updates should be wrapped into act(...):

act(() => {
  /* fire events that update state */
});
/* assert on the output */

This ensures that you're testing the behavior the user would see in the browser. Learn more at https://react.dev/link/wrap-tests-with-act

�[90mstderr�[2m | src/pages/SettingsPage/AgentsListSection.test.tsx�[2m > �[22m�[2mAgentsListSection web login�[2m > �[22m�[2moffers login for supported agents and opens their dialog
�[22m�[39mAn update to AgentsListSection inside a test was not wrapped in act(...).

When testing, code that causes React state updates should be wrapped into act(...):

act(() => {
  /* fire events that update state */
});
/* assert on the output */

This ensures that you're testing the behavior the user would see in the browser. Learn more at https://react.dev/link/wrap-tests-with-act
An update to AgentsListSection inside a test was not wrapped in act(...).

When testing, code that causes React state updates should be wrapped into act(...):

act(() => {
  /* fire events that update state */
});
/* assert on the output */

This ensures that you're testing the behavior the user would see in the browser. Learn more at https://react.dev/link/wrap-tests-with-act

 �[32m✓�[39m src/pages/SettingsPage/AgentsListSection.test.tsx �[2m(�[22m�[2m11 tests�[22m�[2m)�[22m�[33m 964�[2mms�[22m�[39m
   �[32m✓�[39m AgentsListSection web login �[2m(5)�[22m
     �[33m�[2m✓�[22m�[39m folds legacy models within each provider until requested�[33m 301�[2mms�[22m�[39m
�[90mstdout�[2m | src/hooks/useDraft.test.tsx�[2m > �[22m�[2museDraft�[2m > �[22m�[2mapplies generation socket snapshots without refetching the draft
�[22m�[39m[useDraft] Received draft update via WebSocket: {
  eventType: �[32m'draft:update'�[39m,
  draftId: �[32m'draft-1'�[39m,
  step: �[32m'context'�[39m,
  status: �[32m'in_progress'�[39m,
  timestamp: �[32m'2026-05-05T00:00:05Z'�[39m,
  draftStatus: �[32m'generating'�[39m,
  generationTrace: { steps: [ �[36m[Object]�[39m, �[36m[Object]�[39m ] }
}

�[90mstdout�[2m | src/hooks/useDraft.test.tsx�[2m > �[22m�[2museDraft�[2m > �[22m�[2mresyncs once when a socket event reports a terminal draft status
�[22m�[39m[useDraft] Received draft update via WebSocket: {
  eventType: �[32m'draft:update'�[39m,
  draftId: �[32m'draft-1'�[39m,
  step: �[32m'llm'�[39m,
  status: �[32m'completed'�[39m,
  timestamp: �[32m'2026-05-05T00:00:10Z'�[39m,
  draftStatus: �[32m'review'�[39m,
  generationTrace: { steps: [ �[36m[Object]�[39m, �[36m[Object]�[39m, �[36m[Object]�[39m ] }
}

�[90mstdout�[2m | src/hooks/useDraft.test.tsx�[2m > �[22m�[2museDraft�[2m > �[22m�[2minstalls the next run ID before accepting its first socket snapshot
�[22m�[39m[useDraft] Received draft update via WebSocket: {
  eventType: �[32m'draft:update'�[39m,
  draftId: �[32m'draft-1'�[39m,
  runId: �[32m'generation-run-2'�[39m,
  step: �[32m'context'�[39m,
  status: �[32m'in_progress'�[39m,
  timestamp: �[32m'2026-05-05T00:00:10Z'�[39m,
  draftStatus: �[32m'generating'�[39m,
  generationTrace: { runId: �[32m'generation-run-2'�[39m, steps: [ �[36m[Object]�[39m ] }
}

�[90mstdout�[2m | src/hooks/useDraft.test.tsx�[2m > �[22m�[2museDraft�[2m > �[22m�[2mapplies terminal draft status from the socket before the follow-up fetch resolves
�[22m�[39m[useDraft] Received draft update via WebSocket: {
  eventType: �[32m'draft:update'�[39m,
  draftId: �[32m'draft-1'�[39m,
  step: �[32m'complete'�[39m,
  status: �[32m'completed'�[39m,
  timestamp: �[32m'2026-05-05T00:00:10Z'�[39m,
  draftStatus: �[32m'review'�[39m,
  generationTrace: { steps: [ �[36m[Object]�[39m, �[36m[Object]�[39m, �[36m[Object]�[39m ] }
}

 �[32m✓�[39m src/hooks/useDraft.test.tsx �[2m(�[22m�[2m6 tests�[22m�[2m)�[22m�[32m 299�[2mms�[22m�[39m
 �[32m✓�[39m src/components/GlobalSearch.palette.test.tsx �[2m(�[22m�[2m17 tests�[22m�[2m)�[22m�[33m 6361�[2mms�[22m�[39m
   �[32m✓�[39m GlobalSearch palette �[2m(17)�[22m
     �[33m�[2m✓�[22m�[39m shows full titles in one linear list grouped by type, with a live preview�[33m 575�[2mms�[22m�[39m
     �[33m�[2m✓�[22m�[39m walks the list with arrow keys, updating the preview, and opens the highlighted item on Enter�[33m 407�[2mms�[22m�[39m
     �[33m�[2m✓�[22m�[39m shows fresh plan and task timestamps as "just now", never "just now ago"�[33m 384�[2mms�[22m�[39m
     �[33m�[2m✓�[22m�[39m advertises the GitHub shortcut with the MacIntel modifier�[33m 352�[2mms�[22m�[39m
     �[33m�[2m✓�[22m�[39m advertises the GitHub shortcut with the Win32 modifier�[33m 371�[2mms�[22m�[39m
     �[33m�[2m✓�[22m�[39m advertises the GitHub shortcut with the Linux x86_64 modifier�[33m 349�[2mms�[22m�[39m
     �[33m�[2m✓�[22m�[39m cycles category scopes with Tab and filters the list�[33m 434�[2mms�[22m�[39m
     �[33m�[2m✓�[22m�[39m opens the highlighted task on GitHub with Cmd+Enter�[33m 350�[2mms�[22m�[39m
     �[33m�[2m✓�[22m�[39m previews a plan with its objective, the owner-stripped repo, and a status pill�[33m 349�[2mms�[22m�[39m
     �[33m�[2m✓�[22m�[39m caps and truncates a long repository name in the result row, keeping the full slug in a tooltip�[33m 329�[2mms�[22m�[39m
     �[33m�[2m✓�[22m�[39m shows a failure reason as a finding with the file path as code�[33m 334�[2mms�[22m�[39m
     �[33m�[2m✓�[22m�[39m closes when the backdrop is clicked�[33m 333�[2mms�[22m�[39m
     �[33m�[2m✓�[22m�[39m labels the footer link for the active scope�[33m 420�[2mms�[22m�[39m
     �[33m�[2m✓�[22m�[39m keeps a full plan search reachable from the All scope�[33m 345�[2mms�[22m�[39m
     �[33m�[2m✓�[22m�[39m runs the active scope's full search with Shift+Enter�[33m 347�[2mms�[22m�[39m
     �[33m�[2m✓�[22m�[39m opens the full plan search with Shift+Enter in the Plans scope�[33m 352�[2mms�[22m�[39m
     �[33m�[2m✓�[22m�[39m hangs the palette left-aligned under the search input�[33m 327�[2mms�[22m�[39m
 �[32m✓�[39m src/pages/SettingsPage/DesktopNotificationSettingsSection.test.tsx �[2m(�[22m�[2m8 tests�[22m�[2m)�[22m�[33m 570�[2mms�[22m�[39m
 �[32m✓�[39m src/components/Dashboard/HappeningNowSection.test.tsx �[2m(�[22m�[2m6 tests�[22m�[2m)�[22m�[33m 657�[2mms�[22m�[39m
 �[32m✓�[39m src/components/TaskDetails/index.embedded.test.tsx �[2m(�[22m�[2m8 tests�[22m�[2m)�[22m�[33m 516�[2mms�[22m�[39m
�[90mstderr�[2m | src/components/Repositories/RepoMediaPanel.test.tsx�[2m > �[22m�[2mrepository Media tab�[2m > �[22m�[2momits tab and requests for disabled/legacy repositories (false)
�[22m�[39mAn update to RepoActionContainer inside a test was not wrapped in act(...).

When testing, code that causes React state updates should be wrapped into act(...):

act(() => {
  /* fire events that update state */
});
/* assert on the output */

This ensures that you're testing the behavior the user would see in the browser. Learn more at https://react.dev/link/wrap-tests-with-act
An update to RepoActionContainer inside a test was not wrapped in act(...).

When testing, code that causes React state updates should be wrapped into act(...):

act(() => {
  /* fire events that update state */
});
/* assert on the output */

This ensures that you're testing the behavior the user would see in the browser. Learn more at https://react.dev/link/wrap-tests-with-act
An update to RepoActionContainer inside a test was not wrapped in act(...).

When testing, code that causes React state updates should be wrapped into act(...):

act(() => {
  /* fire events that update state */
});
/* assert on the output */

This ensures that you're testing the behavior the user would see in the browser. Learn more at https://react.dev/link/wrap-tests-with-act

�[90mstderr�[2m | src/components/Repositories/RepoMediaPanel.test.tsx�[2m > �[22m�[2mrepository Media tab�[2m > �[22m�[2momits tab and requests for disabled/legacy repositories (undefined)
�[22m�[39mAn update to RepoActionContainer inside a test was not wrapped in act(...).

When testing, code that causes React state updates should be wrapped into act(...):

act(() => {
  /* fire events that update state */
});
/* assert on the output */

This ensures that you're testing the behavior the user would see in the browser. Learn more at https://react.dev/link/wrap-tests-with-act
An update to RepoActionContainer inside a test was not wrapped in act(...).

When testing, code that causes React state updates should be wrapped into act(...):

act(() => {
  /* fire events that update state */
});
/* assert on the output */

This ensures that you're testing the behavior the user would see in the browser. Learn more at https://react.dev/link/wrap-tests-with-act
An update to RepoActionContainer inside a test was not wrapped in act(...).

When testing, code that causes React state updates should be wrapped into act(...):

act(() => {
  /* fire events that update state */
});
/* assert on the output */

This ensures that you're testing the behavior the user would see in the browser. Learn more at https://react.dev/link/wrap-tests-with-act

�[90mstderr�[2m | src/components/Repositories/RepoMediaPanel.test.tsx�[2m > �[22m�[2mrepository Media tab�[2m > �[22m�[2mclears media on repository change and disabling, ignoring stale requests
�[22m�[39mAn update to RepoActionContainer inside a test was not wrapped in act(...).

When testing, code that causes React state updates should be wrapped into act(...):

act(() => {
  /* fire events that update state */
});
/* assert on the output */

This ensures that you're testing the behavior the user would see in the browser. Learn more at https://react.dev/link/wrap-tests-with-act
An update to RepoActionContainer inside a test was not wrapped in act(...).

When testing, code that causes React state updates should be wrapped into act(...):

act(() => {
  /* fire events that update state */
});
/* assert on the output */

This ensures that you're testing the behavior the user would see in the browser. Learn more at https://react.dev/link/wrap-tests-with-act

 �[32m✓�[39m src/App.hostedFlow.test.tsx �[2m(�[22m�[2m5 tests�[22m�[2m)�[22m�[33m 1509�[2mms�[22m�[39m
   �[32m✓�[39m HostedFlowRouteSync �[2m(5)�[22m
     �[33m�[2m✓�[22m�[39m preserves the validated active flow across actual React Router navigation without duplicating query parameters�[33m 1166�[2mms�[22m�[39m
 �[32m✓�[39m src/components/Repositories/RepoMediaPanel.test.tsx �[2m(�[22m�[2m12 tests�[22m�[2m)�[22m�[33m 1263�[2mms�[22m�[39m
 �[32m✓�[39m src/hooks/useHeaderStats.status.test.tsx �[2m(�[22m�[2m5 tests�[22m�[2m)�[22m�[33m 303�[2mms�[22m�[39m
 �[32m✓�[39m src/hooks/useLiveRefreshScheduler.test.tsx �[2m(�[22m�[2m7 tests�[22m�[2m)�[22m�[32m 44�[2mms�[22m�[39m
�[90mstderr�[2m | src/components/AddRepositoryModal.test.tsx�[2m > �[22m�[2mAddRepositoryModal�[2m > �[22m�[2mkeeps branch selection in the scroll-owned form and submits through one form path
�[22m�[39mIn HTML, <button> cannot be a descendant of <button>.
This will cause a hydration error.

  <AddRepositoryModal isOpen={true} newRepo="integry/propr" newAlias="Production" newBaseBranch="release/20..." ...>
    <div className="fixed inse..." onClick={function handleBackdropClick}>
      <div ref={{...}} role="dialog" aria-modal="true" aria-labelledby="_r_9_" tabIndex={-1} className="bg-white r...">
        <div>
        <form onSubmit={function handleSubmit} className="flex min-h...">
          <div data-testid="add-reposi..." className="min-h-0 fl...">
            <div>
            <div>
            <div>
              <label>
              <BaseBranchSelector repoName="integry/propr" value="release/20..." onChange={function Mock} ...>
                <div className="relative" ref={{...}}>
>                 <button
>                   id="_r_d_"
>                   type="button"
>                   onClick={function handleOpen}
>                   disabled={false}
>                   aria-labelledby="_r_e_ _r_h_"
>                   aria-describedby="_r_f_"
>                   aria-haspopup="listbox"
>                   aria-expanded={false}
>                   className="w-full px-3 py-2 text-left bg-white border border-gray-300 rounded-md font-mono text-sm..."
>                 >
                    <span>
                    <div className="flex items...">
>                     <button
>                       type="button"
>                       onClick={function handleClear}
>                       className="p-0.5 hover:bg-gray-200 rounded text-gray-400 hover:text-gray-600"
>                       title="Clear selection"
>                     >
                      ...
              ...
            ...
          ...

<button> cannot contain a nested <button>.
See this log for the ancestor stack trace.

 �[32m✓�[39m src/pages/SettingsPage/VisualPreviewAuthSection.test.tsx �[2m(�[22m�[2m6 tests�[22m�[2m)�[22m�[33m 435�[2mms�[22m�[39m
 �[32m✓�[39m src/components/AddRepositoryModal.test.tsx �[2m(�[22m�[2m5 tests�[22m�[2m)�[22m�[33m 566�[2mms�[22m�[39m
 �[32m✓�[39m src/components/SummaryBrowser/index.test.tsx �[2m(�[22m�[2m3 tests�[22m�[2m)�[22m�[32m 169�[2mms�[22m�[39m
 �[32m✓�[39m src/components/SystemHealthPush.test.tsx �[2m(�[22m�[2m3 tests�[22m�[2m)�[22m�[33m 458�[2mms�[22m�[39m
 �[32m✓�[39m src/components/Goals/goalTimeline.test.ts �[2m(�[22m�[2m9 tests�[22m�[2m)�[22m�[32m 15�[2mms�[22m�[39m
 �[32m✓�[39m src/pages/AccessManagementPage.test.tsx �[2m(�[22m�[2m3 tests�[22m�[2m)�[22m�[33m 367�[2mms�[22m�[39m
 �[32m✓�[39m src/api/apiClient.accounts.test.ts �[2m(�[22m�[2m5 tests�[22m�[2m)�[22m�[32m 20�[2mms�[22m�[39m
 �[32m✓�[39m src/components/AgentChat/ModelSelector.test.tsx �[2m(�[22m�[2m4 tests�[22m�[2m)�[22m�[33m 577�[2mms�[22m�[39m
   �[32m✓�[39m ModelSelector keyboard navigation �[2m(4)�[22m
     �[33m�[2m✓�[22m�[39m scrolls to and selects an active option beyond the initial viewport�[33m 392�[2mms�[22m�[39m
 �[32m✓�[39m src/api/compatibility.test.ts �[2m(�[22m�[2m6 tests�[22m�[2m)�[22m�[32m 161�[2mms�[22m�[39m
 �[32m✓�[39m src/desktop/DesktopExperience.shortcut-readiness.test.tsx �[2m(�[22m�[2m2 tests�[22m�[2m)�[22m�[32m 299�[2mms�[22m�[39m
 �[32m✓�[39m src/components/TaskPlanner/PlanEditor.responsive.test.tsx �[2m(�[22m�[2m5 tests�[22m�[2m)�[22m�[32m 62�[2mms�[22m�[39m
 �[32m✓�[39m src/App.hostedCompletion.test.tsx �[2m(�[22m�[2m2 tests�[22m�[2m)�[22m�[32m 189�[2mms�[22m�[39m
 �[32m✓�[39m src/desktop/browserAdapters.test.ts �[2m(�[22m�[2m6 tests�[22m�[2m)�[22m�[32m 28�[2mms�[22m�[39m
 �[32m✓�[39m src/components/TaskDetails/PushFailureDetails.test.tsx �[2m(�[22m�[2m4 tests�[22m�[2m)�[22m�[32m 275�[2mms�[22m�[39m
 �[32m✓�[39m src/pages/SummaryBrowserPage.test.tsx �[2m(�[22m�[2m2 tests�[22m�[2m)�[22m�[32m 71�[2mms�[22m�[39m
 �[32m✓�[39m src/components/Analytics/activityAxis.test.ts �[2m(�[22m�[2m5 tests�[22m�[2m)�[22m�[32m 33�[2mms�[22m�[39m
 �[32m✓�[39m src/components/Dashboard/workTitle.test.ts �[2m(�[22m�[2m5 tests�[22m�[2m)�[22m�[32m 9�[2mms�[22m�[39m
 �[32m✓�[39m src/desktop/DesktopPresentationBoundary.test.tsx �[2m(�[22m�[2m1 test�[22m�[2m)�[22m�[32m 276�[2mms�[22m�[39m
 �[32m✓�[39m src/pages/SettingsPage/AgentTankSection.test.tsx �[2m(�[22m�[2m6 tests�[22m�[2m)�[22m�[32m 291�[2mms�[22m�[39m
 �[32m✓�[39m src/api/usageTipsApi.test.ts �[2m(�[22m�[2m4 tests�[22m�[2m)�[22m�[32m 14�[2mms�[22m�[39m
 �[32m✓�[39m src/components/GlobalSearch.scrollbar.test.ts �[2m(�[22m�[2m5 tests�[22m�[2m)�[22m�[32m 10�[2mms�[22m�[39m
�[90mstderr�[2m | src/pages/DesktopPairingPage.test.tsx�[2m > �[22m�[2mDesktopPairingPage�[2m > �[22m�[2mshows the server-provided client name and requires an explicit approval click
�[22m�[39mIn HTML, <div> cannot be a descendant of <p>.
This will cause a hydration error.

  <MemoryRouter initialEntries={[...]}>
    <Router basename={undefined} location={{pathname:"...", ...}} navigationType="POP" navigator={{index:0, ...}} ...>
      <AuthProvider user={{id:"101", ...}}>
        <DesktopPairingPage>
          <main className="flex min-h...">
            <section className="w-full max...">
              <img>
              <h1>
              <p>
>             <p className="mt-3 text-sm">
                <GitHubAccountIdentity account={{id:"101", ...}}>
                  <span className="inline-fle...">
                    <UserAvatar user={{id:"101", ...}} className="flex h-6 w..." fallbackClassName="bg-slate-1..." ...>
                      <AvatarFallback accessibleName="alice avatar" className="flex h-6 w..." ...>
>                       <div
>                         className="flex h-6 w-6 flex-none items-center justify-center rounded-full border border-sla..."
>                         aria-hidden={true}
>                       >
                    ...
              ...

<p> cannot contain a nested <div>.
See this log for the ancestor stack trace.

 �[32m✓�[39m src/pages/DesktopPairingPage.test.tsx �[2m(�[22m�[2m2 tests�[22m�[2m)�[22m�[32m 246�[2mms�[22m�[39m
 �[32m✓�[39m src/contexts/SystemStatusContext.push.test.tsx �[2m(�[22m�[2m1 test�[22m�[2m)�[22m�[32m 35�[2mms�[22m�[39m
 �[32m✓�[39m src/desktop/PackagedAcceptanceLocalSetup.test.tsx �[2m(�[22m�[2m3 tests�[22m�[2m)�[22m�[33m 335�[2mms�[22m�[39m
   �[32m✓�[39m packaged acceptance local-setup surfaces �[2m(3)�[22m
     �[33m�[2m✓�[22m�[39m drives the fixed prerequisites into the stable progress surface�[33m 304�[2mms�[22m�[39m
 �[32m✓�[39m src/hooks/useSystemReadiness.test.tsx �[2m(�[22m�[2m1 test�[22m�[2m)�[22m�[32m 47�[2mms�[22m�[39m
 �[32m✓�[39m src/components/TaskDetails/ThinkingLog.test.tsx �[2m(�[22m�[2m4 tests�[22m�[2m)�[22m�[32m 258�[2mms�[22m�[39m
 �[32m✓�[39m src/components/RepositoryListItem.test.tsx �[2m(�[22m�[2m2 tests�[22m�[2m)�[22m�[32m 223�[2mms�[22m�[39m
�[90mstderr�[2m | src/hooks/useDecoratedRepoOptions.test.tsx�[2m > �[22m�[2museDecoratedRepoOptions�[2m > �[22m�[2mpasses through undefined options
�[22m�[39mAn update to TestComponent inside a test was not wrapped in act(...).

When testing, code that causes React state updates should be wrapped into act(...):

act(() => {
  /* fire events that update state */
});
/* assert on the output */

This ensures that you're testing the behavior the user would see in the browser. Learn more at https://react.dev/link/wrap-tests-with-act

 �[32m✓�[39m src/hooks/useDecoratedRepoOptions.test.tsx �[2m(�[22m�[2m2 tests�[22m�[2m)�[22m�[32m 79�[2mms�[22m�[39m
 �[32m✓�[39m src/hooks/useAgentTankSuggestion.test.tsx �[2m(�[22m�[2m2 tests�[22m�[2m)�[22m�[32m 83�[2mms�[22m�[39m
�[90mstderr�[2m | src/components/TaskList/Filters.test.tsx�[2m > �[22m�[2mFilters�[2m > �[22m�[2mnames the selected repository without its owner
�[22m�[39mAn update to RepoFilter inside a test was not wrapped in act(...).

When testing, code that causes React state updates should be wrapped into act(...):

act(() => {
  /* fire events that update state */
});
/* assert on the output */

This ensures that you're testing the behavior the user would see in the browser. Learn more at https://react.dev/link/wrap-tests-with-act

�[90mstderr�[2m | src/components/TaskList/Filters.test.tsx�[2m > �[22m�[2mFilters�[2m > �[22m�[2mkeeps the owner when two owners share a repository name
�[22m�[39mAn update to RepoFilter inside a test was not wrapped in act(...).

When testing, code that causes React state updates should be wrapped into act(...):

act(() => {
  /* fire events that update state */
});
/* assert on the output */

This ensures that you're testing the behavior the user would see in the browser. Learn more at https://react.dev/link/wrap-tests-with-act

�[90mstderr�[2m | src/components/TaskList/Filters.test.tsx�[2m > �[22m�[2mFilters�[2m > �[22m�[2mleaves the filter dropdowns to do the filtering, with no separate filter icon
�[22m�[39mAn update to RepoFilter inside a test was not wrapped in act(...).

When testing, code that causes React state updates should be wrapped into act(...):

act(() => {
  /* fire events that update state */
});
/* assert on the output */

This ensures that you're testing the behavior the user would see in the browser. Learn more at https://react.dev/link/wrap-tests-with-act

 �[32m✓�[39m src/components/TaskList/Filters.test.tsx �[2m(�[22m�[2m3 tests�[22m�[2m)�[22m�[32m 256�[2mms�[22m�[39m
 �[32m✓�[39m src/components/TaskDetails/SectionLabelHeader.test.tsx �[2m(�[22m�[2m5 tests�[22m�[2m)�[22m�[32m 292�[2mms�[22m�[39m
 �[32m✓�[39m src/components/ActivitySparkline.test.tsx �[2m(�[22m�[2m3 tests�[22m�[2m)�[22m�[32m 191�[2mms�[22m�[39m
 �[32m✓�[39m src/pages/SettingsPage/UsageTipsSettingsSection.test.tsx �[2m(�[22m�[2m2 tests�[22m�[2m)�[22m�[32m 59�[2mms�[22m�[39m
 �[32m✓�[39m src/components/workflowSelectionInput.test.ts �[2m(�[22m�[2m3 tests�[22m�[2m)�[22m�[32m 10�[2mms�[22m�[39m
 �[32m✓�[39m src/utils/notificationIntents.test.ts �[2m(�[22m�[2m7 tests�[22m�[2m)�[22m�[32m 6�[2mms�[22m�[39m

�[2m Test Files �[22m �[1m�[32m57 passed�[39m�[22m�[90m (57)�[39m
�[2m      Tests �[22m �[1m�[32m442 passed�[39m�[22m�[90m (442)�[39m
�[2m   Start at �[22m 09:45:26
�[2m   Duration �[22m 54.54s�[2m (environment 45%, tests 30%, import 10%, setup 9%, transform 5%)�[22m

�[2mEnvironment �[22m �[33mjsdom was created 57 times�[39m�[2m · 45.69s total, 45% of tracked time�[22m
�[2m            �[22m �[2mcreate it once per worker with �[22m�[33mpool: 'vmThreads'�[39m�[2m (keeps per-file isolation) or �[22m�[33misolate: false�[39m�[2m (shares it across files)�[22m
�[2m            �[22m �[2mlearn more: https://vitest.dev/guide/improving-performance#test-environments�[22m


> [email protected] posttest
> npm run test:docker-context


> [email protected] test:docker-context
> node --test scripts/docker-context-inputs.test.mjs

TAP version 13
# Subtest: focused UI selectors are forwarded only to Vitest
ok 1 - focused UI selectors are forwarded only to Vitest
  ---
  duration_ms: 0.942842
  type: 'test'
  ...
# Subtest: the UI Docker context contains its complete non-type external source import closure
ok 2 - the UI Docker context contains its complete non-type external source import closure
  ---
  duration_ms: 55.071805
  type: 'test'
  ...
1..2
# tests 2
# suites 0
# pass 2
# fail 0
# cancelled 0
# skipped 0
# todo 0
# duration_ms 117.056502
[180/180] passed propr-ui#3/4 (workspace test script) in 55.4s

### Shard 2/4: 179/180 passed in 471.5s

Assigned 180 of 719 discovered units.

| Duration | Status | Unit |
| ---: | --- | --- |
| 55.4s | passed | `propr-ui#3/4` (workspace) |
| 20.9s | passed | `test/dockerExecutorWatchdog.test.ts` |
| 14.4s | passed | `test/connectCliIntegration.test.ts` |
| 13.9s | passed | `packages/api/test/mcpRecentActivity.test.ts` |
| 13.8s | passed | `packages/api/test/mcpDeletePlan.test.ts` |
| 13.4s | passed | `packages/api/test/mcpWorkflows.test.ts` |
| 11.4s | passed | `packages/cli/src/projectOptions.cli.test.ts` |
| 10.9s | passed | `test/antigravityAgent.test.ts` |
| 10.6s | passed | `packages/api/test/mcpActivity.test.ts` |
| 9.0s | passed | `packages/core/test/eventPublisherBounds.test.ts` |
| 8.9s | passed | `packages/api/test/mcpRepositoryRetrieval.test.ts` |
| 8.7s | passed | `packages/api/test/liveOutputStream.test.ts` |
| 7.8s | passed | `packages/api/test/webPushDispatcher.test.ts` |
| 7.6s | passed | `test/worktreeLifecycle.integration.test.ts` |
| 7.4s | passed | `packages/core/test/repositoryRetrievalService.test.ts` |


1/180 test runs failed in shard 2/4 after 471.5s:
- test/ultrafixContinuationEntryPoint.test.ts: exit 1

Details truncated; see the uploaded artifacts for complete failure rows and logs.

View Workflow
View uploaded artifacts

@propr-dev

propr-dev Bot commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ Applied the requested follow-up changes in commit 1957e28

Summary of Changes

I fixed both failing test files. Each crashed before any test ran, and neither failure came from this PR's repository search/read changes.

Cause: CI tests this branch merged with the current main. On main, two source files now import functions from @propr/core that the tests' stand-in version of @propr/core doesn't provide. In Node, a missing import like that is a hard error when the file loads:

  • src/jobs/prCommentPostExecution.ts now imports describeAgentTermination, which test/prPublicationRecoveryJob.test.ts was missing.
  • src/jobs/ultrafixCiWait.ts now imports recoverCiFailureFollowups, which test/ultrafixContinuationEntryPoint.test.ts was missing.

The CI logs confirm this. Both runs stopped with SyntaxError: The requested module '@propr/core' does not provide an export named …. The tests have the same gap on main, so main will probably hit the same failure.

Fix: I added the two missing functions to the test stand-ins:

  • test/prPublicationRecoveryJob.test.ts: describeAgentTermination: () => 'Agent execution timed out.'
  • test/ultrafixContinuationEntryPoint.test.ts: recoverCiFailureFollowups: async () => undefined

Verification:

  • With main's versions of the two source files swapped in temporarily (to imitate the CI merge), both files pass: 39/39 and 8/8. I put this branch's versions back afterwards.
  • On the branch as it is, both files also pass.

Only the two test files changed. There's nothing visual here, so I didn't make previews.


🤖 Implementation Details

  • Model: Claude Opus 5.5 (medium)
  • Requested By: @github-actions[bot]
  • Time: 4m 14s
  • Tokens: 998,351 (993,679 in / 4,672 out)
  • Cost: $0.65
  • Subscription usage: Session +2%, 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: 6035381972✓

…st ran, and neither failure came from this PR's repository search/read changes.

I fixed both failing test files. Each crashed before any test ran, and neither failure came from this PR's repository search/read changes.

**Cause:** CI tests this branch merged with the current `main`. On `main`, two source files now import functions from `@propr/core` that the tests' stand-in version of `@propr/core` doesn't provide. In Node, a missing import like that is a hard error when the file loads:
- `src/jobs/prCommentPostExecution.ts` now imports `describeAgentTermination`, which `test/prPublicationRecoveryJob.test.ts` was missing.
- `src/jobs/ultrafixCiWait.ts` now imports `recoverCiFailureFollowups`, which `test/ultrafixContinuationEntryPoint.test.ts` was missing.

The CI logs confirm this. Both runs stopped with `SyntaxError: The requested module '@propr/core' does not provide an export named …`. The tests have the same gap on `main`, so `main` will probably hit the same failure.

**Fix:** I added the two missing functions to the test stand-ins:
- `test/prPublicationRecoveryJob.test.ts`: `describeAgentTermination: () => 'Agent execution timed out.'`
- `test/ultrafixContinuationEntryPoint.test.ts`: `recoverCiFailureFollowups: async () => undefined`

**Verification:**
- With `main`'s versions of the two source files swapped in temporarily (to imitate the CI merge), both files pass: 39/39 and 8/8. I put this branch's versions back afterwards.
- On the branch as it is, both files also pass.

Only the two test files changed. There's nothing visual here, so I didn't make previews.

PR: #2832
Comment by: @github-actions[bot] (ID: 6035381972)
Model: Claude Opus 5.5
@integry
integry merged commit c6f5552 into main Oct 7, 2026
42 checks passed
@integry
integry deleted the 2797-epic-repository-search-sgj branch October 7, 2026 10:29
propr-dev Bot pushed a commit that referenced this pull request Oct 7, 2026
…ith `mcpEpicDispatch.test.ts` and all 5 passed.

All four failing test files pass now. I ran them together with `mcpEpicDispatch.test.ts` and all 5 passed.

**The one failure this PR caused: `test/planIssueHandlers.followup.test.ts`.** The test file crashed on load with `SyntaxError: The requested module '@propr/core' does not provide an export named 'getEpicExecutionQueue'`. This branch added `getEpicExecutionQueue` and `summarizeEpicQueue` to the imports from `@propr/core` in `packages/api/routes/planIssueHandlers.ts`, for the new execution-queue endpoints. The test replaces `@propr/core` with a stand-in that didn't have them. I added both, returning `null`, to the test's stand-in in `test/planIssueHandlers.followup.test.ts`.

**The other three failures were already fixed on `main`.** CI runs this branch merged with the current `main`, but the branch didn't have `main`'s fixes yet (from PR #2832). I copied each file from `main` as it is, so the next merge from `main` should have no conflicts in them:
- **`test/prPublicationRecoveryJob.test.ts`**: adds the missing `describeAgentTermination` stand-in.
- **`test/ultrafixContinuationEntryPoint.test.ts`**: adds the missing `recoverCiFailureFollowups` stand-in.
- **`packages/core/src/workflow/workflowExecution.ts`** (for `packages/core/test/repositoryWorkflow.test.ts`): fixes an intermittent failure where a command that quickly exits with code 124 was sometimes reported as a timeout.

Nothing in the UI changed, so there are no previews.

PR: #2828
Comment by: @github-actions[bot] (ID: 6036104280)
Model: Claude Opus 5.5
propr-dev Bot pushed a commit that referenced this pull request Oct 7, 2026
… (S11–S27). Typecheck and lint are clean with no warnings, all 2162 UI unit tests pass, and all 22 Playwright tests in the two planner specs pass, 7 of them new. I also ran the core epic-queue tests: all 26 pass, 3 of them new.

I've applied all 8 findings (F6–F13) and all 17 suggestions (S11–S27). Typecheck and lint are clean with no warnings, all 2162 UI unit tests pass, and all 22 Playwright tests in the two planner specs pass, 7 of them new. I also ran the core epic-queue tests: all 26 pass, 3 of them new.

**Findings**
- **F6 – Queue Remaining ignored the demo and saving guards:** the button is now disabled in demo mode and while a setting is saving, with a "Demo mode is read-only" tooltip. The click handler also refuses both cases, including the "queue behind running work" path.
- **F7 – A closed earlier issue blocked the epic:** the batch now starts with the earliest pending issue in creation order, the same rule the server uses. So a closed earlier issue no longer blocks the rest.
- **F8 / S11 – Edited Max Loops lost on dismiss:** closing the popover (outside click, Escape, resize) now commits the field you're typing in before it disappears. Tested both in jsdom and in the browser; the unit test fails if the fix is removed.
- **F9 – Issue links on the wrong tasks after reconnecting:** each received issue now records which task created it. The server creates issues one task at a time, so that's `createdCount + failedCount − 1` from the event. Issues created before you connected stay blank (`#…`) instead of taking a neighbour's link, and this also works when an earlier task failed.
- **F10 / F12 – Header overlap at tablet widths:** I removed the 320px title minimum, gave the title a 12rem floor, and let the header wrap, so the actions move to a second line when there isn't room. My first attempt passed its test but the 1024px screenshot showed the phase switcher clipped, because the sidebar narrows the content. The wrapping version fixes that. New tests at 768, 1024 and 1280px check that every action and the phase switcher are fully on screen and nothing overlaps. The header is still a single row at 1440px.
- **F11 – Default couldn't clear an explicit model:** choosing Default now compares against the saved model, so it clears an override even when the override is the default model.
- **F13 / S19 – Stray upload file:** I deleted `packages/api/temp_uploads/dd9afce3-…` and added `temp_uploads/` to `.gitignore`. `git rm` failed because the git index is read-only here, so the file is deleted from disk only. The commit needs to include that deletion.

**Suggestions**
- **S12:** the plans list decides whether to show repository owners from the full repository list, not just the current page.
- **S13:** checked; both use the 768px breakpoint. New tests confirm the phase switcher shows on the Review step at 768 and 1024px.
- **S14:** with neither Epic nor auto-merge on, the disabled button is replaced by one line of text: "Enable auto-merge or Epic PR to queue the remaining tasks."
- **S15:** popovers now ignore scrolling in containers that don't hold their trigger. When the trigger's container scrolls, the popover follows it and only closes once the trigger is off screen.
- **S16:** a single-issue epic shows "Implement Epic" again.
- **S17:** no change needed; only the planner uses `STATUS_CONFIG`.
- **S18 / S20:** the config and agent popovers take focus when they open and hand it back on Escape. The "…" menu now supports Escape, arrow keys and Home/End, and returns focus to its button.
- **S21:** new core tests cover a queue behind two running issues: the second isn't started again, either can finish first, and recovery doesn't treat a running issue as a lost start.
- **S22:** discovery telemetry is labelled as an estimate until the run reports real numbers, and files taken from the last preview read "Expected" instead of "Scanned". The scan-time hints have a "typical, not measured" tooltip.
- **S23:** no change needed. `workflowExecution.ts` is identical to `main` (it was copied over from #2832), so it disappears from the diff on the next merge from `main`. The new timeout check is also more precise than the old one.
- **S24:** the task list switches layout at 768px, the same as the editor.
- **S25:** no change needed; the only callers are the two planner headers, and both already show the branch.
- **S26:** the model selector skips the catalog request when the plan already has a default model.
- **S27:** a default with no agent named no longer hides any agent's version of that model.

One related issue I didn't fix: in the issue-creation list, the "Created / Creating / Queued" badges still assume no task has failed. Links now land on the right task, but after a failure the badges can be off by one row.

Previews show the Execution header at 768, 1024, 1280 and 1440px, plus the labelled discovery telemetry.

PR: #2828
Comment by: @integry (ID: 6041581324)
Model: Claude Opus 5.5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

1 participant