Repository navigation
Skip proven other-forge projects in Tasks requests - #34219
Conversation
Revalidate GitLab project identity after remote configuration changes and pin resolved list calls to their host. Preserve unresolved local MR inference and settled partial results; carry additive eligibility metadata for GitHub notices. Co-authored-by: yasuhiro nishioka <yasu00000@gmail.com>
|
Thanks for the credit, and for taking this on from the main side. The request-boundary check is a much smaller surface than what #30151 carries, and I'd rather rescope mine around it than keep two implementations alive. Two things from the #30151 work that this version leaves open, in case they help the review loop:
Either way, tell me which pieces you'd like over here vs. in a follow-up and I'll shape #30151 accordingly. |
|
No actionable comments were generated in the recent review.
|
|
Tasks shares one project selection between GitHub and GitLab. A project on the other forge could produce a list error or unresolved-source notice; GitLab could also keep querying an old project after its remote changed. This keeps matching and mixed-forge projects working, silently skips only projects proven to belong to the other forge, and revalidates GitLab identity after remote changes. Unknown/offline projects keep the existing behavior, including local/WSL MR inference. Older paired hosts and clients keep their existing notices when the optional result marker is absent or ignored. The review fixed host-twin notice identity, restored shipped list/detail routing, and removed repeated config reads per remote. Two source-review rounds and independent performance/readiness checks found low merge risk. Conflict repair preserves incoming partial-host auth recovery and pagination alongside signature-based identity revalidation. The three failing partial-auth cases were unsigned-fixture assumptions: their cache-hit tests now explicitly supply a stable signature and realistic command-specific Git responses, while an added unsigned case guards current-remote recovery. Original miss/TTL/eviction and 100/1000 bounds remain. Independent narrow merge review found no lost fixes or negative user-facing trade-offs. A second main merge, Merge The real-Git/filesystem benchmark passed three tests and seven measurement records. At 3/30 remotes it made 3/3 cold config reads and 2/2 warm reads; measured warm times were 10.985/11.061ms. Auth/API replies in this benchmark are labelled fixtures. The branch-only notice capture uses the shipping Tasks list and production cache/projection: the unknown source keeps one enabled Retry and the proven-other host twin is silent. This is presentation evidence; no pairing or live-provider success is claimed. Existing limitations remain: custom GitLab hosts need affirmative identity evidence; broader host propagation and the other providers’ shared positive-cache freshness are outside this change. Conditional includes selected by HEAD can retain an identity until the five-minute expiry, improving on main’s unbounded cache without claiming complete dependency tracking. For Brennan’s review The main and branch screenshots both show empty lists; the stale-call difference is established by the command trace. The branch’s existing auth banner and unrelated updater toast are retained.
Branch-only shipping-list notice capture (presentation fixture): |
Preserve partial GitLab host recovery and pagination alongside signature-based project identity revalidation.
[Medium impact] The PR appears safe to merge; no actionable defects were found. SummaryTasks now silently skips selected repositories proven to belong to the other forge.
|





Tasks keeps one project selection when users switch between GitHub and GitLab. A GitHub-only project could reach GitLab’s local MR fallback and turn an otherwise valid empty list into an error. GitLab-only projects could show GitHub’s unresolved-source notice. A cached GitLab project identity could also survive a remote migration and keep querying the old project.
This checks each unresolved selected repository’s current remotes at the provider request boundary. Projects proven to belong to the other forge contribute an empty result silently. Matching sources keep working, including mixed-forge remotes, and unknown identities retain the existing local/WSL MR fallback with search, state and paging. The GitLab identity cache revalidates one initial native Git config observation per repository lookup, expires external dependencies, and reads current remotes when no signature is available. List, detail and action routing retain the shipped behavior. The shared picker and settled partial-results behavior stay unchanged.
Seven regression cases failed on the original production code. Before the main merge, 147 tests passed across six named GitLab suites, including real config-reader operation counts at 3 and 30 remotes, warm native/WSL migration, edit races and late probe completion, mixed/extra remotes, unknown fallback, partial results, and cache bounds. Renderer tests cover host twins and runtime RPC → cache → notice replacement when a fresh legacy response omits the optional marker. The normal commit hook passed. Production delta: 194 changed lines; test delta: 479. Independent final source, performance and readiness reviews finished with low source merge risk and no identified negative user-facing trade-offs. All active merged-head CI checks passed. Targeted Windows/WSL QA on this head reproduced four stale GitLab list calls on pinned main after a genuine GitLab-to-GitHub origin migration; the branch made zero stale project-list or bare-MR calls and showed clean empty MR and Issues lists. Both normal Refreshes completed within five minutes of a genuine project-specific API warm attempt (main 91.518s; branch 46.856s). Existing provider-auth availability chrome remained. The warm attempt may fail authentication/rate limits; no successful live GitLab response is claimed. A real-Git/filesystem corpus passed three tests with seven measurements, including 3/30 remotes (cold config reads 3/3; warm 2/2). Provider auth/API responses in that benchmark are explicit fixtures. The branch screenshot uses the shipping Tasks list and production cache/projection: the unknown source retains one enabled Retry while the proven-other source is silent. Both copies stopped gracefully; real config hashes were unchanged.
The conflict-blocking main merge preserves the incoming partial-host recovery and pagination fixes. The partial-auth tests now explicitly supply a stable config signature for cache-hit assertions and use command-specific Git outputs; an added unsigned case verifies that late facts apply only to the current remote. All 201 tests across 12 affected named suites pass. The required merge hook passed. Independent narrow merge-interaction review agrees that both PRs’ guarantees are preserved, with LOW merge risk and no identified negative user-facing trade-offs. QA carries from
ef84b3eacross merge8968760; all 26 active merged-head CI checks passed (17 skipped; none failed or incomplete).Full path: provider failure handling, identity-cache freshness, and additive source-result metadata.
Intended differences from the common pattern: Orca retains its supported local/WSL MR inference for unresolved identities; only affirmative provider mismatch is skipped. When freshness evidence is lost and the current read fails, the old GitLab identity is not served; issues retain their existing unresolved behavior. Custom GitLab hosts without reliable affirmative evidence remain unresolved on the GitHub tab, preserving today’s notice pending the auth-inventory follow-up. GitLab issue-side not_found errors were already suppressed in the UI. The optional result marker is additive: old hosts/clients retain legacy notices when it is absent or ignored, with no new request or minimum server version.
Builds on #30151 by @yasu00000 — thank you! Reuses the provider-eligibility idea with a smaller boundary implementation; no community commit was adopted as a base.
Tracked in #13817
Tracked in STA-3902
Tracked in #15784
Tracked in STA-5041