Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): Forgejo skipped jobs no longer keep a pull request watch pending #16668

MergedMnigos(GitHub profile, opens in a new tab)merged 6 commits intomain fromrefs/pull/16668/headmerged by juliusmarminge View on GitHub

Forgejo reports a CI job that did not run as skipped. The adapter previously treated that state as pending, so a pull request watch could remain open after all jobs finished.

The adapter now maps skipped to skipped and warning to neutral, retaining existing success/failure handling and the pending fallback for unknown states. The watcher already supports these terminal states, so no watcher or contract changes are needed.

Two added tests were replaced with one regression through the existing provider API; the one-off mapping test file and an assertion for unchanged watcher behavior were removed. All 24 Forgejo provider tests and 15 watcher tests passed, with a failing-before check against the base mapping. Scoped lint, formatting and the Forgejo package typecheck passed.

Forgejo’s status definitions and Actions mapping confirm these values and that cancelled Actions jobs are reported as failure. No real Forgejo instance was used; the behavior is covered by the provider fixture and upstream contract rather than claimed live evidence.

Fixes #16575. Original work by @Mnigos in #16668. Maintainer takeover used Claude Opus 5.5 for tests, Claude Fable 5.1 for implementation, and independent Claude Opus 5.5 / GPT-6.1 Sol reviews in T3 Code, coordinated by Codex.

    1. github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:unvouched

    2. macroscopeapp[bot](GitHub profile, opens in a new tab)commented

      Approvability

      Verdict: Approved at 3648557

      Macroscope's review found this PR approvable — This is a narrowly scoped Forgejo adapter bug fix with preserved existing mappings, explicit handling for terminal statuses, and regression coverage through the provider API. Its only production effect is allowing completed skipped or warning checks to settle normally instead of keeping pull-request watches pending.

      You can add or adjust custom eligibility rules. [Learn more](https://docs.macroscope.com/approvability#example-custom-eligibility-rules).
    3. coderabbitai[bot](GitHub profile, opens in a new tab)commented
      Review in Change Stack →

      No actionable comments were generated in the recent review. 🎉

      ℹ️ Recent review info
      ⚙️ Run configuration
      • Configuration used: Path: .coderabbit.config.ts
      • Review profile: CHILL
      • Plan: Advanced
      • Run ID: 70d8db42-5bcd-4bf8-a1fc-3e3581d937d3
      📥 Commits

      Reviewing files that changed from the base of the PR and between 3fba6e88f0f5c73fa9c50b095ef38a5be6216b12 and e0a5e0b19fa1cde0664947000e83058120590330.

      📒 Files selected for processing: 3
      • apps/server/src/orchestration-v2/pullRequestWatch.test.ts
      • packages/source-control-forgejo/src/server/forgejoPullRequestJson.test.ts
      • packages/source-control-forgejo/src/server/forgejoPullRequestJson.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

      Forgejo check status conversion now maps skipped and warning states to existing check statuses. Tests cover Forgejo status mappings and a watch result with one successful check combined with one skipped check.

      Changes: Forgejo check status handling

      Layer / File(s)Summary
      Map Forgejo statuses and verify watch results
      packages/source-control-forgejo/src/server/forgejoPullRequestJson.ts, packages/source-control-forgejo/src/server/forgejoPullRequestJson.test.ts, apps/server/src/orchestration-v2/pullRequestWatch.test.ts
      forgejoChecks maps success, failure, error, skipped, and warning to their corresponding check statuses. Unknown states map to pending. Tests cover these mappings and a watch result with one successful check and one skipped check.

      Priority: ➖ Normal

      Estimated code review effort: 2 (Simple) | ~10 minutes

      Change: Bug fix · Severity of issue fixed: Medium

      Suggested reviewers: maria-rcks

      Merge Risk: ⚪ Minimal · up to e0a5e

      Skipped Forgejo checks now map to a nonblocking status, and no actionable merge-blocking issue remains after normal checks.

      Security architecture risk: ⚪ Minimal · up to e0a5e

      Skipped and warning checks are now recognized as completed outcomes. Failed checks remain failures and unknown states remain pending. No material security risk was identified in the changed behavior.

      Retained concerns No architecture-level concerns identified.

      Security review details

      Security Blast Radius

      • inferred — The demonstrated behavioral exposure is Forgejo-derived check outcomes and their downstream watch reports. The changed mapper is a pure conversion and adds neither a production entrypoint nor an authority-bearing operation.

      Trust Boundaries and Controls

      • observed — Externally supplied status strings are normalized to the existing internal status set. Failure and error still map to failure, and unrecognized strings still map to pending; the new completed outcomes are explicit cases rather than a permissive fallback.

      Resilience and Maintainability Implications

      • observed — The affected watch calculation resets check state on a head change, preserves prior state on an empty check response, and suppresses repeated passed reports unless its existing gate-growth condition applies. The PR changes the input classification, not these transition rules.
      Pre-merge checks: Passed 4
      Check nameStatusExplanation
      Linked Issues checkPassedIssue #16575 requires Forgejo skipped checks to stop blocking watch_pull_request. forgejoCheckStatus maps skipped to skipped, warning to neutral, failures to failure, success to `success…
      Out of Scope Changes checkPassedThe changes update Forgejo status mapping and add focused tests for issue #16575. No unrelated changes are identified.
      Title checkPassedThe title clearly and concisely describes the main change: Forgejo skipped jobs no longer keep a pull request watch pending.
      Description checkPassedThe description explains the problem, the implementation, the affected behavior, linked issue and prior work, verification results, and testing limitations. It does not use the template headings or in…
      Full details: Linked Issues check

      Explanation

      Issue #16575 requires Forgejo skipped checks to stop blocking watch_pull_request. forgejoCheckStatus maps skipped to skipped, warning to neutral, failures to failure, success to success, and unknown states to pending. Tests cover the mapping and a watch with one success and one skipped check that reports checks-passed.

      Full details: Description check

      Explanation

      The description explains the problem, the implementation, the affected behavior, linked issue and prior work, verification results, and testing limitations. It does not use the template headings or include an explicit maintainer approval comment, but it is substantially complete and on topic.

      ✨ Finishing Touches: 💡 1
      🛠️ Fix failing CI checks: 💡
      • Commit to this branch
      • Create a new PR
      🧪 Generate unit tests (beta)
      • Create a new PR
      • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
      Comment `@coderabbitai help` to get the list of available commands.
    4. juliusmarminge added labelsmacroscope-review

    5. juliusmarminge assignedjuliusmarminge

    6. Taking over this one. I’ll reduce the tests to the useful coverage, update the implementation against current main, and verify it before publishing the changes.

    7. juliusmarminge merged this71a283a

    8. juliusmarminge closed this

Sign in to join this conversation.