Skip to content

fix(ci): backport pinned gh bootstrap to package stack - #2649

Open
seonghobae wants to merge 1 commit into
fix/strix-sandbox-state-diagnostics-aa11d478from
fix/stack-gh-first-use-20261014
Open

seonghobae wants to merge 1 commit into
fix/strix-sandbox-state-diagnostics-aa11d478from
fix/stack-gh-first-use-20261014

Conversation

@seonghobae

Copy link
Copy Markdown
Contributor

범위

#2573 stack에 main의 병합 수리 #2645만 가져옵니다. 이 PR은 #2573 branch를 직접 수정하지 않는 별도 후속 PR입니다.

  • 원인: isolated self-hosted runner에서 CodeQL과 Strix가 gh: command not found, exit 127로 실패했습니다.
  • 수리: CodeQL analyze-head, dispatch-current-head, Strix strix job이 처음 gh를 쓰기 전에 고정 version·SHA-256·Linux x64 검증을 거쳐 job-local gh를 준비합니다.
  • 새 installer를 만들지 않았습니다. Runner, ACL, VM, Secret, token 범위는 바꾸지 않았습니다.

검증

Head: 3ef6ff147b25fce23343400600bb8cadad0a4672
Base: 44eba247e76ae5be5c32927a1374c70aca328557

  • CI mode 전체 suite: 5380 passed / 4 skipped / 40 subtests, pytest exit 0.
  • 관련 다섯 테스트 파일: 83 passed.
  • CodeQL/Strix actionlint와 staged diff whitespace 검사: exit 0.
  • Staged 4파일 독립 composition review: APPROVE, 최종 blob SHA-256 4/4 일치. Formal App approval은 아닙니다.

미완료

이 stack의 기존 Strix workflow는 아직 main과 같은 isolated selector로 완전히 전환되지 않았습니다. 이 PR은 gh 준비만 고칩니다. 실제 runner 다운로드·scanner 성공, OpenCode current-head App 승인, literal auto LiteLLM inference, main 배포는 별도 증거가 필요합니다.

Carry main's merged #2645 four-file delta onto #2573 without modifying its branch. Preserve digest/version-verified job-local gh admission before CodeQL and Strix first use. CI-mode suite: 5380 passed, 4 skipped, 40 subtests; focused: 83 passed. Staged delta independently reviewed.
@coderabbitai

coderabbitai Bot commented Oct 14, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

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
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 018a6610-3c7e-4571-b751-d712aeb14b5b

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.

@seonghobae seonghobae moved this from Todo to In Progress in naruon Platform Roadmap Oct 14, 2026

@cwl-noema-review cwl-noema-review 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.

Noema LLM review

The pinned GitHub CLI bootstrap is correctly placed before every affected host call, verifies both provenance and PATH selection, preserves the docs-only shard admission behavior, and performs ownership-checked cleanup. No confirmed correctness, security, maintainability, or behavioral regression remains in the reviewed changes.

Reviewed changed lines

  • .github/workflows/codeql-pr.yml:184 (RIGHT): The analyze-head shard provisions the pinned CLI before its first host-side GitHub CLI consumer.
  • .github/workflows/codeql-pr.yml:185 (RIGHT): The provisioning guard matches the CodeQL language-detection condition, so docs-only shards do not perform network provisioning.
  • .github/workflows/codeql-pr.yml:251 (RIGHT): The installer publishes only the checksum-verified executable directory through GITHUB_PATH and records ownership identity for later cleanup.
  • .github/workflows/codeql-pr.yml:298 (RIGHT): The cleanup step is constrained to the original RUNNER_TEMP child and validates directory type, owner, device, and inode before deletion.
  • .github/workflows/codeql-pr.yml:535 (RIGHT): The dispatch-current-head job independently provisions the same pinned CLI before dispatching through gh.
  • .github/workflows/strix.yml:489 (RIGHT): The Strix job adds the pinned bootstrap after Python setup and before its existing GitHub CLI consumers.
  • .github/workflows/strix.yml:595 (RIGHT): The Strix verifier requires the expected job-local executable, checksum, and exact CLI version rather than trusting ambient runner state.
  • tests/test_central_gh_first_use_contract.py:20 (RIGHT): The contract test verifies provisioning and selection precede every literal gh API/auth/pr/run invocation and reject optional or late setup.

Adversarial validation

  • .github/workflows/codeql-pr.yml:184 (RIGHT) falsified: A CodeQL shard could invoke the ambient gh binary before the pinned bootstrap runs. — The bootstrap and verifier are inserted before the first consumer in both jobs; the new ordering contract also exercises all three affected jobs.
  • .github/workflows/codeql-pr.yml:251 (RIGHT) falsified: A changed or structurally malicious downloaded archive could reach execution or PATH publication. — The installer checks the archive digest, requires exactly one regular expected member, checks the extracted binary digest, and publishes only the copied regular executable; the added fixture tests cover these cases.
  • .github/workflows/strix.yml:489 (RIGHT) falsified: The Strix bootstrap could impose a new fixed network timeout and regress its existing DNS/TLS readiness behavior. — Strix uses urlopen(url), while the CodeQL variants use the bounded timeout; the dedicated contract test explicitly checks this distinction.
  • tests/test_central_gh_first_use_contract.py:20 (RIGHT) falsified: Docs-only CodeQL shards could still admit the runner and download the CLI unnecessarily. — All three prerequisite steps use the code=true guard, and the consumer retains the same guard; the docs-only admission test asserts this exact relationship.
  • Residual risk: The implementation duplicates the installer and verifier across three jobs, so future divergence remains a maintenance risk, but the added equivalence and behavioral contract tests cover the current duplication.

Findings

  • No blocking findings.
  • Result: APPROVE
  • Head SHA: 3ef6ff147b25fce23343400600bb8cadad0a4672
  • Reviewer credential: noema-review-github-app-refresh
  • Actor: cwl-noema-review[bot]

@opencode-agent opencode-agent 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.

Pull request overview

OpenCode reviewed the current-head product diff. Coverage is a separate gate.

Changed files

  • .github/workflows/codeql-pr.yml — GitHub Actions review job
  • .github/workflows/strix.yml — GitHub Actions review job
  • tests/test_central_gh_first_use_contract.py — regression suite
  • tests/test_docs_only_pr_runner_admission.py — regression suite

Changed behavior

flowchart LR
  PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
  Evidence --> S1["Workflow: codeql-pr.yml"]
  S1 --> I1["GitHub Actions review job"]
  I1 --> R1["Review risk: Workflow: codeql-pr.yml"]
  R1 --> V1["actionlint plus required checks"]
  Evidence --> S2["Workflow: strix.yml"]
  S2 --> I2["GitHub Actions review job"]
  I2 --> R2["Review risk: Workflow: strix.yml"]
  R2 --> V2["actionlint plus required checks"]
  Evidence --> S3["Test: test_central_gh_first_use_contract.py (2 files)"]
  S3 --> I3["regression suite"]
  I3 --> R3["Review risk: Test: test_central_gh_first_use_contract.py (2 files)"]
  R3 --> V3["targeted test run"]
Loading

Findings

No source-backed product finding is synthesized from the coverage gate. A coverage miss belongs in the status comment.

  • Head SHA: 3ef6ff147b25fce23343400600bb8cadad0a4672
  • Workflow run: 38508656664
  • Workflow attempt: 1
  • Coverage gate: failure

Review outcome

Coverage is a gate, not the review. This body reviews the changed product files.

Changed-File Evidence Map

flowchart LR
  PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
  Evidence --> S1["Workflow: codeql-pr.yml"]
  S1 --> I1["GitHub Actions review job"]
  I1 --> R1["Review risk: Workflow: codeql-pr.yml"]
  R1 --> V1["actionlint plus required checks"]
  Evidence --> S2["Workflow: strix.yml"]
  S2 --> I2["GitHub Actions review job"]
  I2 --> R2["Review risk: Workflow: strix.yml"]
  R2 --> V2["actionlint plus required checks"]
  Evidence --> S3["Test: test_central_gh_first_use_contract.py (2 files)"]
  S3 --> I3["regression suite"]
  I3 --> R3["Review risk: Test: test_central_gh_first_use_contract.py (2 files)"]
  R3 --> V3["targeted test run"]
Loading

@opencode-agent

opencode-agent Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

OpenCode Review Overview

Coverage evidence did not pass, so approval is blocked. The formal pull-request review is the source-backed diff review, not this status comment.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

1 participant