Skip to content

Run native CI for fork PRs after workflow approval - #213

Merged
michaelneale merged 1 commit into
mainfrom
micn/approved-fork-ci
Nov 25, 2026
Merged

michaelneale merged 1 commit into
mainfrom
micn/approved-fork-ci

Conversation

@michaelneale

Copy link
Copy Markdown
Contributor

Original problem

Maintainers can approve a fork's Actions run, but Skippy still rejects that fork at native CI and inference admission. Contributors cannot get the full applicable PR checks green on their original PR without an internal shadow branch.

This change keeps Approve workflows to run as the only approval button. Successful approved fork CI starts a protected controller that runs the existing applicable package/device and inference checks against the same commit. No environment approval or label is added.

Diagnostics

Fix

  • New protected-main fork-native.yml reacts to successful CI/CI PR completion, verifies producer path, event, repository, attempt, fork identity and current head, and derives routes from protected path filters.
  • It calls the existing reusable CI and inference workflows. Selected automation/source checks, CUDA/Metal package/device smoke and all seven Spark PR configurations remain required where applicable. Fork-supplied artifacts, outputs and test claims are not consumed by the controller.
  • Ordinary fork CI no longer deliberately fails solely because native qualification is separate. The protected aggregate requires the new controller's admission, CI gate and complete selected inference roster; missing or skipped work cannot green a fork.
  • workflow_run records main as its SHA. The protected run title binds the candidate SHA for aggregate lookup, wakes and concurrency. Fresh-head checks and rerun tests prevent old evidence from satisfying a new head.
  • Branch PRs, path selection, nightly/release profiles and existing native execution machinery are retained.

Architecture

GitHub's fork approval gates pull_request, not the privileged pull_request_target controller. A protected workflow_run continuation connects the existing approval to native execution without placing dispatch credentials in fork-controlled jobs.

The CI caller has read-only repository permissions and no forwarded secrets. Only the protected inference controller receives the existing dispatch SSH key. Its declared permission ceiling includes PR-comment write because the reused workflow declares a target-PR reporting job; that job remains skipped for fork continuations. No publisher/HF credentials are forwarded. Fork qualification results remain visible in the Approved fork CI run and aggregate; this change does not add the target-only lab comment to fork runs.

Compatibility and trust

Approval admits the reviewed snapshot to the same native execution trust boundary as trusted branch code, including persistent lab hardware and shared caches. It is not a hostile-code sandbox or a grant of repository write access. Review the entire diff, especially workflow/local Actions changes, build scripts, Justfile and build.rs, before approving.

Keep the existing Require approval for all external contributors setting. Admission depends on that repository policy; it does not infer independent approval provenance from a successful run under a weaker policy. Repository collaborators retain GitHub's usual trusted-contributor behavior. No live repository settings or lab configuration were changed.

The controller must reach the default branch before GitHub can exercise the new route. Existing fork branches carrying the old hosted failure gate need to update from main and re-run their CI. A runner-provider setting change during an in-flight run fails closed; re-run the currently expected producer.

No runtime/API/ABI/wire changes, dependency additions, publication changes or model-performance claims.

Workflow diagrams

CI — Before

flowchart LR
  F[Fork pull_request after approval] --> H[Hosted quality and automation]
  H --> X[CI fails if native work required]
  B[Trusted branch pull_request_target] --> A[Collaborator admission]
  A --> Q[Selected quality and automation]
  Q --> P[CUDA and Metal package/device smoke]
  P --> G[Native CI gate]
Loading

CI — After

flowchart LR
  F[Fork pull_request after approval] --> H[Hosted quality and automation]
  H --> S[Hosted CI succeeds]
  W[Protected approved-fork caller] --> V[Verify caller and current source]
  B[Trusted branch pull_request_target] --> A[Existing collaborator admission]
  V --> Q[Same selected quality and automation]
  A --> Q
  Q --> P[Same CUDA and Metal package/device smoke]
  P --> G[CI gate and existing package artifacts]
Loading

Approved fork CI — Before

flowchart LR
  F[Approved hosted fork CI] --> X[No protected native continuation]
Loading

Approved fork CI — After

flowchart TD
  E[Successful CI or CI PR workflow_run] --> A[Protected admission: producer, attempt, fork, current SHA]
  A --> R[Protected path decisions]
  R --> C[Reuse CI at admitted SHA]
  R --> I[Reuse inference at admitted SHA]
  C --> P[Existing package and smoke artifacts]
  I --> L[Existing lab receipts]
  P --> G[Protected PR aggregate]
  L --> G
Loading

Inference qualification — Before

flowchart LR
  T[pull_request_target] --> A[Same-repository collaborator admission]
  A --> Q[Seven selected Spark PR configurations]
  Q --> S[Source-bound status and artifacts]
  F[Fork target event] --> X[Admission failure]
Loading

Inference qualification — After

flowchart LR
  T[Branch pull_request_target] --> A[Existing collaborator admission]
  F[Fork target event] --> K[Skip ungated execution and status]
  W[Protected approved-fork caller] --> V[Validate PR number and current head]
  A --> Q[Same seven selected Spark PR configurations]
  V --> Q
  Q --> S[Candidate-bound status and artifacts]
Loading

PR checks — Before

flowchart LR
  E[PR events and producer completion] --> H[Find exact-head automatic PR runs]
  H --> R[Require CI and separate inference roster]
  R --> S[Required PR checks status]
Loading

PR checks — After

flowchart LR
  E[PR events and producer completion] --> H[Find current PR head]
  W[Approved fork CI completion] --> T[Read candidate SHA from protected run title]
  T --> H
  H --> B[Branch: existing CI and inference requirements]
  H --> F[Fork: hosted CI plus protected continuation]
  F --> J[Require admission, CI gate and selected prefixed inference roster]
  B --> S[Required PR checks status]
  J --> S
Loading

Validation

Completed locally against this change:

  • SKIPPY_PYTHON=/opt/homebrew/opt/python@3.12/bin/python3.12 just ci-automation-setup /Users/michaelneale/.buzz/.scratch/skippy-approved-fork-tests
  • SKIPPY_PYTHON=/Users/michaelneale/.buzz/.scratch/skippy-approved-fork-tests/bin/python just ci-automation — passed the full Python/shell automation and publication suites, plus 85 Node tests.
  • actionlint -ignore 'unexpected key "queue" for "concurrency" section' -ignore 'unexpected key "cache-mode" for "job" section' .github/workflows/{ci,inference,pr-checks,fork-native}.yml — passed. The local parser does not recognize the repository's existing queue/cache-mode workflow features; only those two syntax diagnostics were excluded.
  • git diff --check — passed.
  • Independent read-only review covered admission, cache trust, caller permissions, aggregate provenance and stale/rerun behavior. Live read-only API checks verified fork owner/branch lookup and candidate commit visibility.

Tests cover wrong producer/repository/event/attempt, unapproved/failed runs, stale or closed PRs, missing fork associations, truncated file lists, protected path routing, forged run titles, missing/skipped native jobs, partial reruns, caller spoofing, source-bound failure statuses and per-PR concurrency.

Not executed: an end-to-end approved external fork workflow or hardware/model qualification. The new workflow_run controller is a default-branch-only GitHub integration and cannot be activated by this PR alone. No fork code was dispatched to the lab during development. This is CI automation, so no Rust product code/build was changed or qualified.

Acceptance criteria

  • I ran the relevant local checks, or explained why they do not apply.
  • I agree to license my contributions under the Apache License, Version 2.0.

Reuse the existing protected CI and inference pipelines after an approved fork run succeeds. Bind admission and aggregate evidence to the current fork head without introducing another approval button.

Co-authored-by: Melkor <b36010fa5b9ec1747270cff036f6b47ff5dce56f179564e169fcb6cdc64c836b@buzz.gdk.so>
@coderabbitai

coderabbitai Bot commented Nov 25, 2026

Copy link
Copy Markdown
Contributor

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 7c2e50b8-6bee-44c7-a9ab-971c8880bf46
  • 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

@github-actions

github-actions Bot commented Nov 25, 2026 •

Copy link
Copy Markdown

Skippy Lab Qualification: Passed

Commit: 6461ef9b7c872550d48ffdfe060c47a5ad64302e · PR smoke · Workflow and timings · Saved evidence

Native Spark lab qualification.

Latest successful main: run 45030840757, attempt 1, commit a1f80b28222a47fdbe3befaa5aba628afdec2363. Comparison unavailable: workload inputs changed or could not be verified.

Configuration Outcome Prefill tok/s Prefill vs main Decode tok/s Decode vs main Actions Lab record
qwen35-4b-standalone Passed Unavailable Unavailable Unavailable Unavailable Logs Unavailable
qwen3-coder-30b-a3b-standalone Passed Unavailable Unavailable Unavailable Unavailable Logs Unavailable
qwen3-coder-30b-a3b-split Passed Unavailable Unavailable Unavailable Unavailable Logs Unavailable
qwen36-35b-a3b-standalone Passed Unavailable Unavailable Unavailable Unavailable Logs Unavailable
qwen36-35b-a3b-split Passed 150.3 Unavailable 23.9 Unavailable Logs job_n99j9fqbjz3eaz0
qwen38-flash-next-standalone Passed Unavailable Unavailable Unavailable Unavailable Logs Unavailable
qwen38-flash-next-split Passed Unavailable Unavailable Unavailable Unavailable Logs Unavailable

TPS describes the first response of each of three short scored smoke cases at concurrency 1; deterministic repeats are excluded. Each rate is total tokens / total server-reported phase time, not an average of request rates. Prefill excludes cached prompt tokens. These short samples include startup/warmup effects and are not sustained benchmarks or controlled speedup comparisons. Missing or invalid timings show as Unavailable.

Deltas use unrounded rates from matching PR-profile smoke receipts on the latest successful main run, including the nightly smoke evidence. Positive means faster. Changed workload inputs, different serving host classes, unequal phase token counts or missing evidence show Unavailable. Physical Spark placement and runtime conditions can differ; deltas are descriptive, not controlled speedup claims.

Smoke checks cover GPU startup, deterministic endpoint repeats and bounded streaming. They do not establish an AgentX performance score. Nightly history and saved performance baselines are published separately; a saved baseline can be older than the latest successful main run used here. The lab retains native results and logs. GitHub evidence copies expire after 30 days.

@michaelneale

Copy link
Copy Markdown
Contributor Author

🤖 Final scope remains approval first, using GitHub's existing Approve workflows to run button and the unchanged all_external_contributors policy. No environment approval gate or runner/cache configuration changes are included. Same-repository branch behavior is unchanged.

How to verify the real fork flow

The new workflow_run controller must first exist on Skippy's default branch. Green checks on this implementation PR alone cannot prove that route; this is a rollout verification requirement, not a claim of completed testing.

  1. From micspiral, fork current Skippy main after this controller lands. Open a test PR with a harmless comment change in an existing crates/**/*.rs file (not README-only: Rust source paths select code, package and inference checks).
  2. Record the fork SHA and the approval-required upstream workflow before approving. No native execution of that candidate should start. Protected metadata-only workflows may run/skip normally.
  3. As michaelneale, review the complete diff and press Approve workflows to run. Verify upstream CI succeeds, then Approved fork CI admits the exact current fork SHA and runs all applicable reused CI/package/device and seven inference configurations. Require the protected aggregate to turn green, not just fork-controlled CI.
  4. Push another harmless commit. Capture its approval-required state; verify it cannot inherit the previous SHA's qualification. If it unexpectedly runs unapproved, investigate policy/actor trust before proceeding.
  5. Use an equivalent same-repository branch as the control: applicable checks should start automatically, without any new gate. Close test PRs without merging and remove owned fixture branches after evidence capture.

The disposable staged experiment used micspiral successfully, but tested a different, now-deferred ordering. Its hosted basics, protected reviewer gate, new-head rejection and automatic branch control passed. That is not Skippy native qualification or completed testing of this final permission-first controller. Both fixture repositories are archived; staged changes are not in this PR.

Current CI blocker

At 6461ef9b7c872550d48ffdfe060c47a5ad64302e, six inference configurations passed. Qwen36 split failed before model testing, while linking skippy-correctness on spark-000945: common_peg_arena::add_parser was undefined, referenced from kimi-k2.cpp in libskippy_ffi. Placement did succeed; the earlier capacity waits are not the failure cause.

One failed-jobs-only rerun has been requested to check reproducibility. Node/cache inconsistency is a hypothesis, not a proven root cause. No tests or gates were weakened.

@michaelneale

Copy link
Copy Markdown
Contributor Author

🤖 CI update: the failed-jobs retry passed at unchanged 6461ef9b7c872550d48ffdfe060c47a5ad64302e. Qwen36 split and qualification summary are now successful, and required PR checks is green. No source changes or gate relaxation. The initial linker failure’s root cause remains unproven. Review and the documented post-merge external-fork verification remain outstanding.

@michaelneale
michaelneale merged commit 7f69528 into main Nov 25, 2026
71 of 73 checks passed
@michaelneale
michaelneale deleted the micn/approved-fork-ci branch November 25, 2026 15:53
michaelneale added a commit to kleinbem/skippy that referenced this pull request Nov 26, 2026
Revert merge 7f69528 (PR Mesh-LLM#213). The real fork trial selected ordinary CI because base repository variables are unavailable in fork pull_request context, while protected admission expected CI PR. Restore the prior policy pending a separately proven replacement.

Co-authored-by: Melkor <b36010fa5b9ec1747270cff036f6b47ff5dce56f179564e169fcb6cdc64c836b@buzz.gdk.so>
kleinbem added a commit to kleinbem/skills that referenced this pull request Dec 1, 2026
Monthly refresh, sources reread 2026-12-01 from upstream clones. PR
metadata and review comments were not remeasured: api.github.com
returned 403 from this environment, so history numbers come from `git
log` only.

- upstream-contributing: switches table updated for llama.cpp, hyprwm,
quickshell, alsa-ucm-conf, nothing-but-nix, Mesh-LLM, buzz-app, omarchy,
comin (rows below); llama.cpp examples replaced
- contribution-skill-authoring: policy examples updated (Mesh-LLM
trailer ban gone, llama.cpp no longer bans AI texts)
- ggml-org, llama-cpp-contributing: new AGENTS.md
(ggml-org/llama.cpp#33157): agent may write texts ending `_Written with
…_`, Martin confirms each public action, no PR batches; whisper.cpp
unchanged; `build_rope` (#31683)
- hyprwm-org: `AGENTS.md` bans agent GitHub actions; kleinbem vouched
(hyprwm/.github 655fc17); issues limited to `VOUCHED_ISSUE.td`;
discussion strikes
- hyprland-contributing: rebase merges, commit-title bot
(hyprwm/Hyprland#17006, #17081)
- aquamarine-contributing: `AGENTS.md` added 2026-11-18, rebase merges
- hyprbars-contributing: our hyprwm/hyprland-plugins#722 merged
- alsa-project-org, alsa-ucm-conf-contributing: sign-off checked by
`pr-validation.yml`; `Comment "HiFi (default)"` convention (f3f6d45)
- quickshell-contributing: corrected AI rule from CONTRIBUTING.md (no
AI-written change descriptions, agent submissions bannable); PR
template, HACKING.md commit format
- mesh-llm-org, mesh-llm-contributing: attribution check removed
(Mesh-LLM/mesh-llm#3109); Skippy, xtask and ci/ moved out (#3193);
`Skippy-Ref:` (#3224); SDK in-tree; docs moved (#3238)
- skippy-contributing: native fork CI (Mesh-LLM/skippy#213), Mermaid
diagrams for Actions changes, InferenceKit (#231)
- capsules-plugin-contributing: `scripts/check.sh`, e2e triggers (#307,
#401), grouped Dependabot (#439); mesh-llm-plugin version corrected
- openai-endpoint-plugin-contributing: settings move and manifest (#8)
- mesh-llm-python-sdk-contributing: dormant, SDK work in mesh-llm
- mesh-packaging-contributing: release handoff off; runtime packaging in
skippy
- nixpkgs-contributing: subject wording (be9ad5588), quoted throw
aliases (927ea0853)
- nix-contributing: 2.36.0 released, master 2.37 (NixOS/nix#16853,
#16920); merger and `Assisted-by` counts from git
- nixos-hardware-contributing: gate removed in NixOS/nixos-hardware#2137
- block-org, buzz-app-contributing: docs rewrite (block/buzz-app#4213)
removed the scope checkpoint, ready checklist and
`buzz-review-completed`
- buzz-contributing: migration trigger/FK check (block/buzz#9812),
schema CODEOWNERS (#9708, #9728), `mobile/REVIEWING.md` (#9298)
- berd-contributing: v0.6.5 (block/berd#467), provider removal (#475)
- goose-contributing: self-test removed (aaif-goose/goose#13337), GDK
renamed oi-kit (#13447)
- omacom-org, omarchy-contributing: qmllint (omacom/omarchy#20549),
Greptile config (#21048), mostly squash
- omarchy-pkgs-contributing: AGENTS.md rules, `build-approved` cleared
on push (omacom/omarchy-pkgs#3943), `check-shadowed` required
- gum-contributing: outside feature charmbracelet/gum#1151 merged
- jetpack-nixos-contributing: merge counts since 2026-11-07, outside
authors (#588, #601-#604, #608)
- comin-contributing: our nlewo/comin#241 merged; mostly merge commits
- noooste-org, garage-ui-contributing: new AGENTS.md (0779b3a) and Nix
flake + `nix.yml` (2c47df2); our #156 merged
- amp-acp-contributing: history (tao12345666333/amp-acp#105, #106)
- nix-app-center-contributing: our SPTApyo/Nix-App-Center#37, #38 merged
- wimpysworld-org, nothing-but-nix-contributing: org-wide CONTRIBUTING
issue/PR rules (78c66ff): template, feature issue first, one change,
closed unread

Not checked: PR merge times, closures and review comments (API 403);
Arch Linux sources (wiki.archlinux.org unreachable).

---
_Generated by [Claude Code](https://claude.ai/code)_

Co-authored-by: Claude <noreply@anthropic.com>
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