Repository navigation
Bound E2E package setup and retain cancellation traces - #24617
Merged
Merged
Conversation
Contributor
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 10 minutes. View limit detailsLimit details: You’ve used all 10 included reviews currently available. Review configuration: ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (3)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
5 tasks done
nplez1
added a commit
to nplez1/orca
that referenced
this pull request
Oct 7, 2026
The feed and the agent-state-rules URL are derived from `MAIN_RELEASE_REPO`, so a test hardcoding `github.com/stablyai/orca/releases/...` no longer matches the product on this fork. In `updater-agent-state-rules-release.test.ts` the mock feed never matched at all, so the tag-href regex extracted nothing and the version assertions saw null — the failure looked like a version problem, not an identity one. Each site now derives from the product's own constant. Two mobile tests mark deliberate upstream references: the mobile APK source queries upstream's releases on purpose. Also retargets one stale expectation that was not identity: the e2e trace-upload condition is now `steps.run-e2e.outcome == 'failure' || cancelled()` upstream (`.github/workflows/e2e.yml:282`), and the test still expected the pre-stablyai#24617 string.
nplez1
added a commit
to nplez1/orca
that referenced
this pull request
Oct 7, 2026
* feat(jira): link a workspace's Jira issue from the details dialog
The workspace details dialog offered only GitHub and Linear, so a Jira issue
could not be linked outside the Tasks view, and a workspace that already had a
Jira link showed an empty GitHub field — the link was invisible, not editable.
- `issue-link-input`: add Jira to the provider union, parse a bare `ABC-123`
key or a `/browse/KEY` URL, and let a Jira issue URL steer the provider chip.
- The dialog resolves a typed key through the existing `lookupJiraIssueSummary`
and writes the pair a Jira link is actually made of (`linkedWorkItem` plus the
`linkedTaskSourceContext` that routes its reads). It refuses to persist when
the lookup fails, and refuses to replace a work item this row does not own (a
change request, or a GitLab issue) instead of dropping metadata nothing else
can restore.
- The provider menu offers Linear and Jira only while they are connected, and
always keeps the provider that holds the current link.
- The right-sidebar Issue pane hydrates against the workspace's own persisted
site id rather than letting the host pick its selected site, which returned
nothing for a valid key held by any other site.
Still open: the create path can drop a Jira link silently
(`source-context-state.ts` nulls a Jira seed whose source context fails the
identity check), and that mismatch did not reproduce from the four site shapes
tried. Linking by hand and the pane's read are fixed; the exact trigger is not.
Verified: `pnpm tc` clean, 5390 tests across the sidebar, right-sidebar and
shared suites, `pnpm run check:code-quality:changed` and the localization
verifiers pass.
* fix(lint): split the six files the upstream merge pushed past max-lines
`pnpm exec oxlint` fails on this base with six `max-lines` errors and one
anti-slop naming error, none of them in the Jira change. The files are over
their caps in this fork but under them upstream: the np.18 merge resolutions
landed both sides' additions on top of each other, which is the same failure
the merge notes already fixed for three other files. The fork's changed-lines
gate does not run the repo-wide rule, so the full lint is the only place it
shows — and it fails every fork PR.
Split by extraction, never by suppression, per the repo rule:
- `git-exec-file` → `captured-output` (the fenced-payload readers).
- `file-explorer-name-filter-projection` → `…-chunked` (the chunked walk,
re-exported so every existing import keeps working).
- `AiVaultPanel` → `use-ai-vault-session-copy-actions` (the clipboard and
open/reveal callbacks).
- `AccountsPane` → `accounts-pane-usage-gating` (the usage-provider
master-switch gating).
- `tooltip.test` → `provider-panel-rendering.test` (every ProviderPanel markup
suite; the original keeps the pure formatters).
- `service-full-cycle-preparation` → `service-cycle-fetch-state` (the
per-provider fetch-generation syncs and the fetching-state builder, as
another link in the service's existing class chain).
Also renames `useRecentRequestShape` to `useRecentValidationRequest`: "shape"
describes structure, and the anti-slop rule wants the domain role.
No behaviour change in any of them; each extraction moves code verbatim and
the two non-mechanical spots (an inlined empty-projection fallback, and the
generation syncs) are covered by the existing suites.
Verified: `pnpm exec oxlint` over the whole repo now reports 0 errors, as does
`pnpm run audit:anti-slop`; `pnpm tc` clean; 2216 tests pass across
status-bar, settings, right-sidebar, command-runner and rate-limits. The 12
rate-limit harness failures in `service-opencode-go-credentials.test.ts` and
`service-zcode-usage.test.ts` are pre-existing: they reproduce with these
files restored to the base content.
* fix(sidebar): stop writing refs while the workspace dialog renders
React Doctor's changed-lines gate fails on
`no-ref-current-in-render` at `WorktreeMetaDialog.tsx`: the dialog tracked its
previous open value in a ref and called `beginSession()`, which bumped a
request ref — both written during render, where React may discard the render
and lose the write. The line was pre-existing; the Jira work moved it onto a
changed line, which is what surfaced it.
Track the previous open value in state instead — React's documented "store
information from previous renders" pattern — and let the save hook invert its
invalidation: `beginSession` now only clears the error, and an effect bumps the
request generation when the dialog closes. Closing is the moment a save stops
belonging to a dialog session, so invalidation happens strictly earlier than
before, and a save that outlives its session still cannot close or apply to the
next one.
Verified: `pnpm run check:react-doctor:changed` exits 0 (the remaining seven
findings are warnings, and the gate blocks on errors only); `pnpm exec oxlint`
over the repo reports 0 errors; `pnpm tc` clean; the 72 dialog tests pass.
* feat(cli): link a Jira issue to a workspace with worktree set --jira-issue
An agent asked to fix a specific ticket needs to record which ticket a
workspace is for, and only the workspace details dialog could do it. This adds
`orca worktree set --worktree <selector> --jira-issue <key|url|null>`, so
`--jira-issue ABC-123` links the issue and `--jira-issue null` clears it. No
wire change: `worktree.set` already carries `linkedWorkItem` and
`linkedTaskSourceContext`, which is what a Jira link is made of.
The resolution runs through the host that owns the workspace, using the
existing `jira.status` and `jira.lookupIssueSummary` reads, because the stored
link carries the site its reads route to. The site rules the dialog used are
now shared (`jira-link-site-selection`), so the dialog and the CLI cannot drift:
a URL is decisive, a bare key may only use a site the user already chose, and
neither will silently move a live link to another site.
Also:
- `worktree ps --json` reports `linkedWorkItem`, so an agent can find a
workspace with no link and confirm one landed. `worktree show --json` already
printed it.
- `ACCOUNT_BACKED_TASK_SOURCE_PROJECT_ID` is exported from
`task-source-context` and used by the task view, the dialog and the CLI
instead of three copies of the same literal.
- `skill-guides/orca-cli.md` documents the flag and its site rules, with the
bundled guide regenerated.
Not included: `worktree create --jira-issue`. A link's source context has to
name the new workspace's host, and no RPC reports a runtime's own host id, so a
context built there would misroute reads on a remote runtime. Creating from the
Tasks view already links Jira through the composer, which runs where the host
is known.
Verified: 110 tests across the CLI, shared site selection, ps summaries and the
dialog hook; `pnpm tc` clean; repo-wide `oxlint` 0 errors; the changed-lines
gate and both skill-guide verifiers pass.
* fix(runtime): report a ps summary's linked item only when there is one
Adding `linkedWorkItem` to the worktree ps summary changed the shape of every
row, including the unlinked ones, and `orca-runtime.test.ts` asserts that shape
whole: 33 keys became 34 and the contract test failed. Emitting the field only
when the workspace actually holds a linked item keeps every existing row
byte-identical, and a row with a Jira link is the only row that reports one.
The skill guide says the same thing now: a row with no link omits the field.
Verified: 1368 tests pass across orca-runtime, runtime-worktree-ps-summaries and
worktree-ps-host-scope; bundled skill guides and the changed-lines gate pass.
* fix(credentials): stop doubling the provider name in store errors
Both stores were ported onto upstream's `createEncryptedApiKeyFileStore`, which
composes "<label> API key ..." from `providerLabel` — but the labels were set to
"DeepSeek API key" and "Fireworks credentials", so the messages read "DeepSeek API
key API key is required".
The labels are now provider names, and the Fireworks store reports a factory-level
decrypt failure as the credentials it owns (its file holds a key *and* an account
override), which is what its own tests and its catch block already promised.
Two test expectations also encoded the pre-port store: upstream's factory writes
with a third `{ durable: true }` argument by design (the recorded convergence
decision on that factory).
* test(rate-limits): mock every provider the shared harness stubs
`resetRateLimitProviderMocks` stubs all seventeen provider and credential modules,
which assumes every suite using the harness mocked them. Two suites predate the
DeepSeek/Fireworks/Copilot providers and mocked only the ones that existed then, so
`vi.mocked(...).mockResolvedValue` ran against a real function and reported
"mockResolvedValue is not a function" at whichever line came first — naming neither
the module nor the suite's obligation.
They now mock the same set as the ten suites that already passed, and the harness
names the missing modules itself. A guard that skipped unmocked functions instead
would let the real fetchers run: real credential reads and subprocesses.
* test(hooks): derive the fork's home directory and command names
Production was already correct; these tests hardcoded upstream's identity. The hook
services write under `HOME_DIRECTORY_NAME` (`.orca-np`) while the tests read
`.orca`, so every write and unlink threw ENOENT; the daemon test looked for
`orca-dev` while the fork installs `DEV_COMMAND_NAME` (`orca-np-dev`), so it
resolved a decoy launcher and failed.
Each test now reads the path and the name from the constant the product uses.
* test(identity): assert this fork's release feed, not upstream's
The feed and the agent-state-rules URL are derived from `MAIN_RELEASE_REPO`, so a
test hardcoding `github.com/stablyai/orca/releases/...` no longer matches the product
on this fork. In `updater-agent-state-rules-release.test.ts` the mock feed never
matched at all, so the tag-href regex extracted nothing and the version assertions
saw null — the failure looked like a version problem, not an identity one.
Each site now derives from the product's own constant. Two mobile tests mark
deliberate upstream references: the mobile APK source queries upstream's releases on
purpose.
Also retargets one stale expectation that was not identity: the e2e trace-upload
condition is now `steps.run-e2e.outcome == 'failure' || cancelled()` upstream
(`.github/workflows/e2e.yml:282`), and the test still expected the pre-stablyai#24617 string.
* ci(fork): mirror upstream tags, gate the release line, ratchet identity
Three failures kept recurring on this fork, none of them about the change under test.
1. `tests/e2e/cross-version-wire/` materializes released versions by tag and pins tags
only upstream has, so the job failed on every branch with "could not resolve ref
vX.Y.Z". `fork-upstream-tags.yml` mirrors upstream's desktop `v*` tags daily. It
deliberately skips `mobile-*-v*`: those trigger the App Store and Play release
workflows, while no desktop workflow triggers on a tag push.
2. The release line ran no gates, so repo-wide debt accumulated there and was inherited
by whichever PR next touched one of those files — six over-cap files and a stale
naming error, this time. `fork-main-gates.yml` runs those rules on `nplez1/main`, and
`fork-main-tests.yml` runs the same shard plan as PR CI nightly, because main ran no
tests at all.
3. A merge resolution can push a file past `max-lines` without any conflict marker, and
the changed-lines gate never sees it. `post-sync.mjs` now runs the repo-wide lint at
sync time, and `check-upstream-identity-literals.mjs` (wired into `pnpm lint`) fails
when a product test points the release feed at upstream.
The identity check is scoped to product tests on purpose: the release pipeline reads
upstream's latest stable release and the mobile APK source queries upstream's releases,
so policing those would trade one class of false failure for another.
* fix(files|ai-vault): drop a second cache walk and a spurious scan argument
Two product bugs, and one stale test double.
`file-explorer-watch-reconcile` walked the whole directory cache twice per payload: the
linked-alias check forced `createCachedDirPathIndex` (one `Object.keys(cache)`) and the
subtree purge then enumerated again — 4002 visits for 2001 entries, which the test exists
to catch ("one bounded cache scan"). One memoized enumeration now serves the alias check,
the casing-fallback index and the purge. The purge reuses it only while `prev` is the same
object the enumeration was taken from, so a diverged state still scans fresh. The test's
budgets are unchanged; only its mechanism comment was reworded.
`scanAiVaultSessionsInBackground` forwarded `request` unconditionally, so a plain listing
called the service with `{}, options, signal` instead of the two arguments the service's own
contract describes. The service defaults `request` to `{}`, so forwarding it only when it
carries `refresh` or `query` is identical — and restores the call shape its callers assert.
That third argument had been pinned by two mutually exclusive expectations on the same code
path; `cached-session-list-wsl-probe.test.ts` is returned to its pre-pin form (its substance
— WSL spawn counts and options — is unchanged).
`DiffViewer.word-wrap-lifecycle`'s fake editor was missing three methods the gutter-marks
hook drives (`onMouseDown`, `updateOptions`, `createDecorationsCollection`), so the hook's
own effect threw. The double now models the API it stands in for.
* fix(cross-version): drop the dependency that made a missing-package test vacuous
`release-checkout.unit.test.ts` asserts that loading a released source which imports a
package the current tree dropped reports "imports '@streamparser/json', which the current
tree does not install". The assertion never reached that path on this fork: `package.json`
still pinned `@streamparser/json`, so extraction skipped the stand-in for a declared
package and the released module imported it for real.
Nothing in the repository imports that package any more — only package.json, the lockfile,
the harness comment and the test mentioned it — so it is removed rather than the test
rewritten. Released sources that need a dropped package now get extraction's stand-in,
which throws only when used, which is what the test was written to check.
The harness comment claiming it must be retained is replaced with what actually keeps the
sibling test passing, and `CHECKOUT_FORMAT` moves 5 to 6 because the stand-in set is baked
into a cached checkout from the current manifest — without the bump, an existing v1.4.221
cache would keep the old, stand-in-less tree.
Verified: the whole `tests/e2e/cross-version-wire/` directory passes (22 files, 121 tests),
not just the two files involved.
* test(shell): name the dev launcher the fork installs
The `shell contracts` job failed on every one of the fifteen `zsh deferred startup` cases
and two `shell-startup-feature-channel` ones: the fixtures stub a launcher called `orca-dev`
and then look it up with `command -v orca-dev`, while the product installs
`DEV_COMMAND_NAME` (`orca-np-dev`).
The test is the stale side, and two passing siblings prove it: `cli-installer.test.ts`
asserts the launcher path as `cli/bin/orca-np-dev`, and `shell-ready-bash-wrapper.test.ts`
builds its fixture and its lookup from `DEV_COMMAND_NAME`. Upstream added these cases
(`d9173ffbdb`, Oct 4) after this fork renamed the command (`local(identity)`, Sep 16), so
this is fork-identity fallout that the path-gated job had simply never run to expose.
Fixtures and lookups now use `DEV_COMMAND_NAME`; assertions unchanged. Since that gate
covers `src/main/zsh-*` and `src/main/shell-startup-*`, every shell-adjacent PR would have
kept failing on it.
Deliberately NOT ratcheted: `orca-dev` in `src/**` tests is mostly a *parsed input* — the
CLI must handle whatever name a user typed, and `bundled-guide-flags.test.ts` matches
`orca|orca-dev|orca-ide|ORCA` on purpose — so a grep rule would flag legitimate cases and
become the next source of false failures.
* fix(ai-vault): keep the third scanner argument the fork's callers pass
I had the direction of this backwards. `f0a14d80f8` ("serve Agent Session History
and search from the session index") deliberately made the background scanner forward
`request` as a third argument, and three tests document that as the fork's contract —
`src/main/ipc/ai-vault.test.ts:128` even carries the comment "The fork's third
argument: no refresh or query for a plain listing".
One expectation was left behind by that change
(`src/main/runtime/rpc/methods/ai-vault.test.ts:412`), and satisfying *it* meant
changing the product to omit the argument and reverting two counter-pins in
`cached-session-list-wsl-probe.test.ts`. That is the smaller, newer-intent-violating
side: it trades three tests for one and undoes a deliberate decision.
So: the product behaviour is restored, the two pins are restored, and the single stale
expectation now expects the third argument. Its subject — that `unlimited` is forwarded
— is unchanged.
Verified: the four ai-vault suites pass (79 tests).
* test(editor): install the Monaco guard in the module the test stubs
`test / tests node 24 4/5` failed with 22,871 tests passing: Vitest caught two
unhandled `Canceled: Canceled` rejections and the shard runner fails on those, by
design, so they cannot silently cause false passes.
They come from Monaco, not from this repository's worktree code: disposing an editor
while a `WordHighlighter` delayer is still pending rejects the promise upstream
ignores (`wordHighlighter.js` → `Delayer.cancel` → `CancellationError`). The product
already guards exactly this — `installMonacoDelayerCancellationGuard`
(`src/renderer/src/lib/monaco-delayer-cancellation-guard.ts`), installed by
`monaco-setup.ts` — but this test stubs `@/lib/monaco-setup`, so the stub ran
`loader.config` and nothing else and the guard was never installed in that worker.
The stub now installs the same guard the real module does. Test-only change; the CI
tolerance list is untouched, since tolerating an unhandled rejection is the false pass
that list exists to distinguish from a known tooling bug.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ELI5
A slow Ubuntu download used 20 minutes of a 30-minute test job, then cancellation hid the failed test’s traces. Setup now has a seven-minute bound and cancellation preserves diagnostic files.
What Changed
The three Electron UI lanes share one package-install block. It redirects the slow Azure Ubuntu archive to the official HTTPS archive, preserves the signing configuration, and bounds index refresh and installation to two and five minutes. Trace uploads run after failure or cancellation in all five existing upload steps.
Why
One CJK font package took 947 seconds in run 36973985851. A bounded install leaves a clear setup failure instead of consuming the tests’ entire budget; changing the mirror addresses the measured bottleneck without increasing test timeouts or dropping font coverage. The inline YAML anchor also works when the workflow checks out an older app revision.
Linked Issue
Internal audit; no new issue.
Visual Proof
N/A — CI setup and diagnostic uploads only.
Testing
Review
Checklist