yuqi1129 commented on code in PR #14990:
URL: https://github.com/apache/gravitino/pull/14990#discussion_r4596152730


##########
.github/scripts/fork-ci-status.cjs:
##########
@@ -236,7 +306,15 @@ function createService(github, { readWorkflow = sha => 
github.rest.repos.getCont
     const { owner, repo, run } = selected;
     // A manual upstream run uses the workflow definitions at run.head_sha, 
not the PR definitions.
     const jobs = selected.trusted ? trustedJobs : await jobsFor(owner, repo, 
run);
-    const base = selected.trusted ? run.head_sha : !sameDefinitions ? 
pr.base.sha : await testedBase(pr, jobs);
+    const incomplete = incompleteAttempt(run, jobs);
+    if (incomplete) return { ...selected, fork: ordinary?.run, result: 
incomplete };
+    if (selected.trusted && !trustedExact && run.status === 'completed') {
+      return { ...selected, fork: ordinary?.run, result: requiredAction(
+        'Trusted CI has not identified this PR head and base. The publisher 
will check again; ' +
+        'if the gate remains missing, dispatch a new trusted run for the 
current PR.') };
+    }
+    // CI edits change who may attest success, not which base the run actually 
tested.
+    const base = selected.trusted ? run.head_sha : await testedBase(pr, jobs);

Review Comment:
   Fixed in e693b98c695e6f55c39865b340e2a0880ceaf89f. A tested-base comparison 
returning HTTP 404 now falls back to the unaccepted context, so authoritative 
current job failures remain visible while an invalid-base success still cannot 
become green. Non-404 errors propagate unchanged for retry.
   
   Added four regressions covering fork/trusted comparisons, changed/unchanged 
definitions, failure/timeout/success, transient-error recovery, and publication 
over stale success. Fork CI: 134 passed; all scripts: 166 passed, 18 unrelated 
yq-dependent skips. Reverting the fix makes all three targeted regression tests 
fail. Fresh-context review of the cumulative diff found no remaining 
Blocker/Important findings.
   
   Verified real HTTP 404s and commit-status writes in both repositories:
   - yuqi1129: failure 
https://github.com/yuqi1129/gravitino/actions/runs/44031409572 ; invalid-base 
all-success https://github.com/yuqi1129/gravitino/actions/runs/44031546687 ; 
recovery https://github.com/yuqi1129/gravitino/actions/runs/44031594609
   - timelyflow: failure 
https://github.com/timelyflow/gravitino/actions/runs/44031414743 ; invalid-base 
all-success https://github.com/timelyflow/gravitino/actions/runs/44031551288 ; 
recovery https://github.com/timelyflow/gravitino/actions/runs/44031599542
   
   Both replace deliberately seeded stale successes with current failures, keep 
invalid-base successes non-green, preserve status/report failure for injected 
503, recover on retry, and deduplicate unchanged writes. Final sandbox statuses 
are success. PR metadata/upstream routing use an adapter; job names/outcomes 
and 404 responses are real. The recovery scenario uses the new sandbox commit 
as PR base. No Apache commit statuses were modified. Full scope and formatter 
limitation are recorded in the PR description.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to