← Back to Pull requests

ci(i18n): diff against the merge base and stop failing on a read-only token #2632

Merged
lin-bot23 merged 4 files (328 lines) on Dec 03, 2026 04:12 UTC
View on GitHub
lin-bot23 lin-bot23 commented on Dec 02, 2026 16:59 UTC
Author

#2588 merged with check-i18n-translations red. The check itself had passed: the failing step was Comment i18n sync status on PR, which died on GraphQL: Resource not accessible by integration (addComment) because PRs opened from forks get a read-only GITHUB_TOKEN.

Two defects in this workflow:

1. The diff base was the base branch tip, not the merge base. While a PR branch has not merged main, git diff <base tip> <head> also contains main-side commits in reverse, so they are reported as "changed in this PR". On #2588 the run listed 52 localized files as missing while all 46 files the PR touches were in sync:

  • git diff 0567cb2 4df88de → 196 files, 52 ❌ in the check output

  • git diff 6e4449e 4df88de (merge-base) → 46 files, 0 ❌, All checks passed!
  • The 52 entries were development/comfy-router/models/kling//code.mdx, none of which the PR touched. The comment it tried to post described those pages too.

    2. A failed comment must not fail the job. Posting the status is informational; a token that cannot write should not turn the check red.

    Changes:

  • compare merge-base(base, head) with head, keeping the base tip as a fallback when the two commits share no ancestor

  • continue-on-error: true on the comment step, and the delete/update/create calls each degrade to a ::warning:: (with a matching log line instead of claiming success)

  • the same report is appended to the job summary, so it stays readable when the token cannot post

  • genuine failures still fail the job: a non-zero check-i18n-sync.mjs still trips Fail on redirect errors
  • No content or script changes; only this workflow file.

    Verification from this branch:

  • check-i18n-sync.mjs at #2588's shas with the merge base: 46 files, All checks passed!, exit 0

  • the comment step run against a stub gh that returns the fork 403: exit 0, ::warning::Could not post the i18n reminder comment (read-only token on fork PRs); the report is in the job summary., summary written

  • same step against a writable stub: Updated existing i18n reminder comment.

  • yaml.safe_load parses the workflow; four steps unchanged in order
  • Separate finding, not fixed here: the 13 comfy-router/models/kling//code.mdx pages are genuinely stale on main since #2630 removed lines from them without touching the localized copies (bun .github/scripts/i18n/sync-hash-i18n.ts -- --dry-run says "would sync hash" for ja/zh/ko/es on all 13). That is a translation-sync job, and with this change it is reported by the PR that actually edits those pages instead of by every unrelated PR that happens to sit behind main.

    Diff: 328 lines (+246 / -82) across 4 files Reviewer: robinjhuang Review duration: 672m
    All Vouch review confidence checks passed
    Residual risk 0.37 = Change Risk (0.65) × (1 − Review Confidence (0.43)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.65 · 328 lines diff across 4 files
    0.65
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.02 · 1 substantive comment(s)
    0.02
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    42%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.347
    Shallow Review Depth shallow_review_depth
    0.344
    Sensitive Paths sensitive_paths
    0.065
    Real PR Conversation Timeline
    1 comments
    "Review active on #2632"
    general weight: 0.35
    Reviewers
    Assignees
    lin-bot23 lin-bot23
    Labels
    risk: medium confidence: 43.0% reviewed sensitive_module
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 65.2% (HIGH) · Higher = larger blast radius
    65.2%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 43.0% · Lower = rushed or shallow review
    43.0%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 37.2% · Moderate risk
    37.2%
    Repository