Skip to content

Recover failed-job log retrieval onto main - #29180

Merged
AmethystLiang merged 8 commits into
mainfrom
ci-merge-repair
Oct 15, 2026
Merged

AmethystLiang merged 8 commits into
mainfrom
ci-merge-repair

Conversation

@AmethystLiang

@AmethystLiang AmethystLiang commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

ELI5

Failed GitHub checks can show only an exit code because the GitHub CLI refuses logs containing terminal controls. This restores the missing retrieval fix to main, so Orca can download a bounded failure excerpt and retry failed downloads.

What Changed

Job-log commands allow escape sequences before the shared extractor sanitizes and bounds the excerpt. Older CLIs retry without the option only for the captured unsupported-option diagnostic. Failed downloads preserve job metadata and an optional outcome, and do not enter the successful-result cache. Compatible callers share downloads while cancellation, deadlines, and process lifetimes retain their owners.

This is only the original retrieval scope from #28687, with its removed test fixture updated to the generated replacement. Renderer normalization remains in #28694 and presentation/retry guidance remains in #28702.

Why

#28671 merged into main first. #28687 later merged into the already-merged ci-log-text branch, leaving retrieval outside main. This PR targets main directly. The next PR will be retargeted to main after this merges; no dependency will be merged into an already-landed branch.

Linked Issue

Reported job: https://github.com/stablyai/orca/actions/runs/38645946865/job/116134352883

Recovers #28687. Followed by #28694, then #28702.

Visual Proof

N/A — host download/cache behavior only. The original UI PR contains rendered proof. A hidden recovery app also fetched the exact reported job through real IPC and received an available 13,865-character excerpt containing its test-timeout diagnostic.

Testing

  • Reproduced the exact job's escape refusal and successful flagged download.
  • Before splitting, integrated recovery passed 622 affected tests in 40 files, full typecheck, and changed-code quality; earlier base passed 624 tests.
  • Retrieval-only package runner: 220 tests passed in 22 files.
  • Final full PR workflow passed on fe63e92c76b083c556af72a3fa393ca3d4d7a1b6; all selected jobs succeeded and verify took its documented success fast path.

Local platform: macOS arm64. Existing deterministic tests cover account isolation, folder workspaces, SSH/paired execution ownership, optional-field compatibility, old CLI fallback, cancellation, and cache limits. No physical Windows/Linux/SSH validation is claimed.

Review

The original independent retrieval reviews are recorded in #28687. This recovery retains those patches and fixes their dependency on a deleted test fixture.

Agent skill upstream boundary

  • This copies no upstream skill-installer material.

Notes

Existing limits remain: five sequential failed jobs, 64 MiB captures, 16 KiB excerpts, 128 successful cache entries, and existing deadlines. Shared sanitizer performance limitations are recorded in #28671. Uncommitted work in the original worktrees is excluded and preserved.

Checklist

  • Original retrieval PR scope preserved.
  • User-visible behavior, mechanism, and recovery approach explained.
  • Cross-platform, provider, remote, folder-workspace, and mixed-version behavior considered.
  • Final local and full PR checks pass.

Review correction

The injected cleanup-stall test now finishes the real paired-server shutdown before starting its 100 ms stall deadline. This keeps a slow real shutdown from masquerading as the intended timeout or racing temporary-directory removal. The 11 affected cleanup/integration tests pass; fresh CI is required for the new commit.

Merged into main as 0d4eb242d7864221296b426552abbb08c9d4f9a4. Ingestion #28694 now targets main; UI #28702 remains a separate dependent PR.

@coderabbitai

coderabbitai Bot commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 2cf8b244-6c87-40aa-8eca-f516586deef9
📥 Commits

Reviewing files that changed from the base of the PR and between d6674af and fe63e92.

📒 Files selected for processing: 2
  • src/main/runtime/github-check-details-paired-cleanup.test-fixture.ts
  • src/main/runtime/github-check-details-paired.integration.test.ts
🚧 Files skipped from review as they are similar to previous changes: 1
  • src/main/runtime/github-check-details-paired.integration.test.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.

📝 Walkthrough

The changes add termination tracking to GitHub CLI execution and check-details admission. Check-job log retrieval now supports escape-flag fallback, shared requests, scoped caching, bounded excerpts, and explicit log states. Check-details requests serialize metadata calls and return standardized errors. The changes also add paired-runtime cleanup tests and tools that measure check-log cache retention and execution costs.

Priority: ➖ Normal

Merge Risk: ⚪ Minimal · up to fe63e

No merge-blocking issue is established for these changes; merge after normal checks.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 7.04% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 71 functions across 42 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Title check Passed The title clearly identifies the main change: restoring failed-job log retrieval onto main.
Description check Passed The description follows the repository template and explains the user impact, implementation, rationale, linked issue context, testing, platform coverage, and known limitations. It also clearly states…
  • Fix all pre-merge checks with AI
✨ Finishing Touches: 💡 1
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@AmethystLiang
AmethystLiang marked this pull request as draft October 15, 2026 16:52
@AmethystLiang AmethystLiang changed the title Recover the missing CI failure-details stack onto main Recover failed-job log retrieval onto main Oct 15, 2026
@AmethystLiang
AmethystLiang marked this pull request as ready for review October 15, 2026 16:54

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 71cded14-d426-4686-adbb-edbaf5815149
📥 Commits

Reviewing files that changed from the base of the PR and between f4abedd and d6674af.

📒 Files selected for processing: 43
  • mobile/src/session/github-pr-check-reply-schema.test.ts
  • mobile/src/session/github-pr-check-reply-schema.ts
  • src/main/git/command-runner/exec-file-capture.test.ts
  • src/main/git/command-runner/exec-file-capture.ts
  • src/main/git/command-runner/gh-bound-account-env.ts
  • src/main/git/command-runner/gh-capture-lifetime.ts
  • src/main/git/command-runner/gh-exec-file-lifetime.test.ts
  • src/main/git/command-runner/gh-exec-file.ts
  • src/main/github/client-pr-check-details.test.ts
  • src/main/github/client/check/__fixtures__/gh-api-unknown-escape-flag.json
  • src/main/github/client/check/check-details-abort.ts
  • src/main/github/client/check/check-details-admission-lifetime.test.ts
  • src/main/github/client/check/check-details-admission-lifetime.ts
  • src/main/github/client/check/check-details-admission-snapshot.test.ts
  • src/main/github/client/check/check-details-capture-diagnostics.test.ts
  • src/main/github/client/check/check-details-safe-diagnostics.test.ts
  • src/main/github/client/check/check-job-log-auth-lifetime.test.ts
  • src/main/github/client/check/check-job-log-cache-retention-child.mjs
  • src/main/github/client/check/check-job-log-capture.test.ts
  • src/main/github/client/check/check-job-log-download.test.ts
  • src/main/github/client/check/check-job-log-download.ts
  • src/main/github/client/check/check-job-log-execution.test.ts
  • src/main/github/client/check/check-job-log-execution.ts
  • src/main/github/client/check/check-job-log-host-measurement.mjs
  • src/main/github/client/check/check-job-log-host-measurement.test.ts
  • src/main/github/client/check/check-job-log-inflight.ts
  • src/main/github/client/check/check-job-log-routing.test.ts
  • src/main/github/client/check/check-job-log-shared-pipeline.test.ts
  • src/main/github/client/check/check-job-log-snapshot.test.ts
  • src/main/github/client/check/check-job-log-subscribers.test.ts
  • src/main/github/client/check/check-job-log-tails.test.ts
  • src/main/github/client/check/check-job-log-tails.ts
  • src/main/github/client/check/check-job-log-test-fixture.ts
  • src/main/github/client/check/get-pr-check-details.ts
  • src/main/github/gh-account-token.test.ts
  • src/main/github/gh-account-token.ts
  • src/main/github/gh-capability-state.test.ts
  • src/main/github/gh-capability-state.ts
  • src/main/runtime/github-check-details-paired-cleanup.test-fixture.ts
  • src/main/runtime/github-check-details-paired-cleanup.test.ts
  • src/main/runtime/github-check-details-paired.integration.test.ts
  • src/main/runtime/runtime-github-review-query-commands.test.ts
  • src/shared/github/check-types.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

@AmethystLiang
AmethystLiang merged commit 0d4eb24 into main Oct 15, 2026
32 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant