Repository navigation
ci: self-hosted runner for integration tests - #19
Merged
Merged
Conversation
The end-to-end integration test in `crates/scribe/tests/transcribe.rs` self-skips on `ubuntu-latest` because ffmpeg + whisper-cli + a Whisper model aren't available there. Add a separate workflow that runs the test on a self-hosted runner (the DGX Spark, where the toolchain already exists) so the pipeline is actually exercised in CI post-merge. Security model: triggers only on `push` to `main` and `workflow_dispatch` — never `pull_request` — because raibid-labs/scribe is a public repo and fork PRs on a self-hosted runner would let attackers run arbitrary code on the runner host. Workflow uses `permissions: contents: read`, `persist-credentials: false`, and never interpolates caller-controlled inputs into shell strings. Existing `ci.yml` (fmt/clippy/test on `ubuntu-latest`) is unchanged and continues to handle PR validation; the integration test stays in skip mode there. Adds `docs/07-self-hosted-ci.md` documenting the security model, runner registration (UI flow + `gh api` flow), required labels (`self-hosted, Linux, ARM64, scribe-integration`), required host packages, hardening (dedicated `gh-runner` user, isolated work dir, no sudo, systemd auto-restart, deny-incoming firewall), and removal procedure. Updates `docs/00-index.md` and the README's Documentation section to reference the new doc. No source under `crates/scribe/src/` is touched. The runner itself is not registered as part of this change — that's a manual operational step performed after merge. Closes #18 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
.github/workflows/integration.yml— a self-hosted-runner workflow that runs the end-to-end integration test (crates/scribe/tests/transcribe.rs) against the real ffmpeg + whisper.cpp pipeline. Triggers ONLY onpushtomainandworkflow_dispatch; neverpull_request, because raibid-labs/scribe is a public repo and fork PRs on a self-hosted runner would let attackers run arbitrary code on the runner host.docs/07-self-hosted-ci.md— security model, runner registration (UI +gh apiflows), required labels, host package requirements, hardening guidance (dedicatedgh-runneruser, isolated work dir, systemd unit, deny-incoming firewall), and a clean removal procedure.docs/00-index.mdand the README "Documentation" section to reference the new doc.No source under
crates/scribe/src/is touched. The runner itself is not registered as part of this PR — that's a manual operational step the maintainer performs after merge.Security model (recap)
pushtomain(post-merge, code already reviewed) andworkflow_dispatch(manual, requires repo write access).pull_requesttrigger. Adding one would expose the runner host to arbitrary code execution via fork PRs.permissions: contents: read,persist-credentials: false, no caller-controlled inputs interpolated into shell strings.ci.yml(fmt / clippy / test onubuntu-latest) is unchanged and continues to handle PR validation; the integration test stays in skip mode there.Validation performed
python3 -c "import yaml; yaml.safe_load(open('.github/workflows/integration.yml'))"— parses, triggers are exactly[push, workflow_dispatch],runs-onis[self-hosted, Linux, ARM64, scribe-integration].cargo fmt --all -- --check— clean.cargo clippy --all-targets --all-features -- -D warnings— clean.cargo test --all— 6 integration tests + unit tests pass locally (the integration test runs for real on this host, which has the toolchain installed; on a stockubuntu-latestit would still skip cleanly).Test plan
.github/workflows/integration.ymland confirms there is nopull_requesttrigger.permissions:iscontents: readonly.actions/checkout@v4runs without a caller-controlledref:.docs/07-self-hosted-ci.mdwith labelsself-hosted, Linux, ARM64, scribe-integration.pushtomainlands on the runner; the "Run end-to-end integration test" step exercises the real pipeline and passes (noSKIP transcribe_jfk_end_to_end:line in the log).workflow_dispatchis used to re-run after fixing the runner host.Closes #18
Co-Authored-By: Claude Opus 4.7 (1M context) noreply@anthropic.com