Skip to content

fix(ci): reconcile Validation gates with sparse job metadata - #3298

Merged
benhook1013 merged 2 commits into
developfrom
codex/gameplay-deferred-gate-replay-fix-20261024
Oct 24, 2026
Merged

benhook1013 merged 2 commits into
developfrom
codex/gameplay-deferred-gate-replay-fix-20261024

Conversation

@benhook1013

@benhook1013 benhook1013 commented Oct 24, 2026 •

Copy link
Copy Markdown
Owner

GitHub returned no steps for a successful Validation gate after a retry, although its complete exact-attempt jobs response retained the skipped preservation step. Both the assessor and trusted reconciliation path need those native step facts to clear the supplementary status.

Recover absent direct metadata only for canonical Validation. The action-local verifier binds the complete one-page snapshot to the run, attempt, workflow, PR tuple, job, check, timestamps and Actions App. The resolver independently verifies that evidence again before publication. Ordinary direct evidence, other gate families, metadata-only preservation, cancellation and newer substantive-failure precedence retain their existing behavior. Historical sparse-candidate recovery is capped at three snapshots and fails closed on exhaustion; API failures and unbound evidence have distinct nonsecret diagnostics.

Validation: ShellCheck and the full required-gate context/status-producer contract pass, including attempt 2, sparse and null direct steps, final source changes, recovery exhaustion, and ordinary replay. An independent Luna xhigh review covered the complete four-file patch against develop and reported zero findings. No product queue entry or review allocation is added.

Original #3295 proof recovery remains to be verified after this maintenance fix is merged into the trusted resolver source.

FireMUD LOC impact

Compared 0efaa677b46a → 7ca7b864eedd (PR merge-base → head).
PR scope: 4 changed files · 595 added textual lines / 26 deleted textual lines.

Section Base LOC Head LOC Δ LOC Change
Overall 1,257,359 1,257,919 +560 +<0.1%
 Source 1,164,894 1,165,199 +305 +<0.1%
  ↳ Code 521,242 521,242 0 0.0%
  ↳ Tests 643,652 643,957 +305 +<0.1%
 Markdown 61,340 61,340 0 0.0%
 Design 64,295 64,295 0 0.0%
  ↳ Architecture 45,686 45,686 0 0.0%
  ↳ Project management 5,974 5,974 0 0.0%
  ↳ Observability 2,147 2,147 0 0.0%
  ↳ Operator runbooks 579 579 0 0.0%
  ↳ gRPC API documentation 8,433 8,433 0 0.0%
  ↳ Product requirements and user journeys 926 926 0 0.0%
  ↳ Developer workflows 471 471 0 0.0%
  ↳ Other design 79 79 0 0.0%

Rows are hierarchical and overlapping views; do not add them together.
LOC means cloc code lines; blank and comment-only lines are excluded.

@coderabbitai

coderabbitai Bot commented Oct 24, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • 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.

@github-actions

github-actions Bot commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

Smoke Summary

⏭️ Runtime smoke is not required

  • ✅ Changes detection: success
  • ✅ Smoke Gate: success
  • ⏭️ PR Full-Stack Smoke: skipped (run_smoke_full=false)

@github-actions

github-actions Bot commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

Static Analysis Summary

✅ Static analysis checks passed

  • ✅ CodeQL gate: success
  • ✅ License gate: success

CodeQL breakdown

  • ⏭️ CodeQL analysis (java): skipped
  • ⏭️ CodeQL analysis (javascript-typescript): skipped

@greptile-apps

greptile-apps Bot commented Oct 24, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 4/5

[High impact] Changes CI validation gate recovery logic in build automation.

The PR appears safe to merge, with a non-blocking gap in retry coverage.

Findings

  1. P2 Retry recovery lacks coverage ▶

Reviews (1) · Last reviewed commit: "Recover sparse Validation gate steps fro..." · Reviewed by Greptile

@github-actions

Copy link
Copy Markdown
Contributor

Security Summary

✅ Security checks passed or were intentionally skipped

  • ✅ Security gate: success
  • ✅ Trivy filesystem scan: success
  • ✅ Secret compliance validation: success

@codecov

codecov Bot commented Oct 24, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Hey - I've found 3 issues

Prompt for AI Agents
Please address the comments from this code review:

## Individual Comments

### Comment 1
<location path=".github/actions/preserve-required-gate/assess-required-gate.sh" line_range="514" />
<code_context>
+          continue
+        fi
+        if [[ "${preserve_step_state}" == "absent" ]]; then
+          if recovered_job_json="$(recover_validation_job_from_attempt 2>>"${api_error_file}")"; then
+            job_json="${recovered_job_json}"
+            job_cache["${job_id}"]="${job_json}"
</code_context>
<issue_to_address>
**Recovery requests scale with history**

When a PR head has many historical Validation checks with absent direct step metadata while the token has limited API quota, the paginated check-run list is processed candidate by candidate, and each candidate with absent step metadata triggers three additional API requests. A PR with many such historical checks consumes the token’s API quota and the assessment fails closed before preserving the gate.

Bound recovery requests across the full candidate set or otherwise avoid making three recovery API calls for every sparse candidate.
</issue_to_address>

### Comment 2
<location path=".github/actions/preserve-required-gate/assess-required-gate.sh" line_range="514" />
<code_context>
+          continue
+        fi
+        if [[ "${preserve_step_state}" == "absent" ]]; then
+          if recovered_job_json="$(recover_validation_job_from_attempt 2>>"${api_error_file}")"; then
+            job_json="${recovered_job_json}"
+            job_cache["${job_id}"]="${job_json}"
</code_context>
<issue_to_address>
**Supplementary status remains unresolved**

When the metadata-barrier resolver consumes a source whose direct job response omits steps but whose exact-attempt response contains the skipped preservation step, `selected_source_native` in `resolve-deferred-gate.sh` refetches the job through `/actions/jobs/{id}` and requires the skipped preservation step there; it returns failure when that response is sparse, so the resolver leaves the supplementary status unresolved despite the assessor accepting the exact-attempt evidence.

Make the resolver independently verify the exact-attempt job snapshot too, or pass and validate the recovered evidence instead of relying on the sparse direct job response.
</issue_to_address>

### Comment 3
<location path=".github/actions/preserve-required-gate/assess-required-gate.sh" line_range="514" />
<code_context>
+          continue
+        fi
+        if [[ "${preserve_step_state}" == "absent" ]]; then
+          if recovered_job_json="$(recover_validation_job_from_attempt 2>>"${api_error_file}")"; then
+            job_json="${recovered_job_json}"
+            job_cache["${job_id}"]="${job_json}"
</code_context>
<issue_to_address>
**Recovery API errors are hidden**

When an attempt-evidence API request fails, `recover_validation_job_from_attempt` returns failure for both invalid evidence and failed GitHub API calls, but the caller redirects its stderr to `api_error_file` and later reports only generic ambiguous metadata. The assessment fails without operators being able to distinguish malformed evidence from transient or permission-related API failures.

Report the captured API error when recovery fails because of an API request, while keeping invalid-evidence failures distinct.
</issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨

@github-actions

github-actions Bot commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

Validation Summary

✅ All validation checks passed

  • ✅ Validation gate: success
  • ✅ Buf generation: success
  • ✅ Dockerfile lint: success
  • ✅ ShellCheck: success
  • ✅ Python script validation: success
  • ✅ Dev tool contract checks: success
  • ⏭️ Dev Tools README contract: skipped
  • ✅ YAML lint: success
  • ✅ Metrics cardinality policy check: success
  • ✅ Flyway migration sanity checks: success
  • ✅ gRPC transport configuration sanity checks: success
  • ✅ GitHub workflow lint: success
  • ✅ Helm chart lint: success
  • ✅ Helm render validation: success
  • ✅ Helm transaction proof: success
  • ✅ Validate Documentation: success
  • ✅ Frontend checks: success
  • ✅ Service build/test matrix: success

Coverage reports and failure logs are available in the workflow artifacts.

@benhook1013 benhook1013 changed the title Recover Validation gate steps from exact-attempt evidence fix(ci): reconcile Validation gates with sparse job metadata Oct 24, 2026
@benhook1013
benhook1013 merged commit 5b62292 into develop Oct 24, 2026
104 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