Skip to content

ci: per-app vanilla-vs-Pilot A/B report on publish PRs#33

Draft
Alexgodoroja wants to merge 1 commit into
feat/r2-artifacts-on-clifrom
ci/ab-report-workflow
Draft

ci: per-app vanilla-vs-Pilot A/B report on publish PRs#33
Alexgodoroja wants to merge 1 commit into
feat/r2-artifacts-on-clifrom
ci/ab-report-workflow

Conversation

@Alexgodoroja

Copy link
Copy Markdown
Collaborator

Runs the vanilla-vs-Pilot A/B report automatically when a publish PR touches submissions/<id>/, and posts an HTML report (artifact + PR comment).

What it does

  • Detects the app id from the changed submissions/<id>/ path (or workflow_dispatch input).
  • Extracts the committed bundle, runs the adapter in socket mode (no daemon) — it stages the app's binaries from the R2 registry on startup — and drives it via cmd/ipc-call.
  • Runs scripts/ab_report.py --mode socket with the per-app command set, uploads ab-report.html, and upserts a PR comment with the summary table.

scripts/ab_report.py gains --mode {pilotctl,socket} and loads the command set from submissions/<id>/ab-commands.json (else a version+help default). Pure stdlib.

⚠️ No KVM on GitHub runners — CI commands are non-VM only (version / help / subcommand --help), which still prove the adapter forwards the full CLI surface identically. microVM workloads run locally with --mode pilotctl. The submission must include a linux/amd64 artifact (or target a matching runner). See docs/CI-AB-REPORT.md.

Validated locally: socket mode against the running smolvm adapter → valid 6-pair report, all exit-matched, ~8-21ms overhead (no daemon hop). YAML/JSON/comment-regex checked.

Stacks on #32. Draft until #32 lands.

🤖 Generated with Claude Code

Adds .github/workflows/ab-report.yml: when a PR touches submissions/<id>/, it
extracts the app's bundle, runs the adapter in socket mode (no daemon — it
stages artifacts from the R2 registry on startup), runs the equivalent commands
vanilla vs Pilot via cmd/ipc-call, and posts an HTML A/B report (artifact +
upserted PR comment with a summary table).

- scripts/ab_report.py: add --mode {pilotctl,socket}; socket mode drives the
  adapter over cmd/ipc-call. Load the command set from
  submissions/<id>/ab-commands.json (else a version+help default). Pure stdlib.
- submissions/io.pilot.smolvm/ab-commands.json: CI-safe set (version + top-level
  and subcommand --help) — proves the adapter forwards the whole smolvm command
  tree (machine/pack/serve/config) without booting a VM.
- docs/CI-AB-REPORT.md: workflow, the no-KVM limitation, per-app command sets.

Validated locally: socket mode against the running smolvm adapter produced a
valid 6-pair report, all exit-matched, ~8-21ms adapter overhead; YAML + JSON +
PR-comment regex checked.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@TeoSlayer

Copy link
Copy Markdown

Red on ab-report and lint. Recommendation: get lint green first (usually quick), then check the ab-report job — if it depends on a deployed endpoint or a secret, confirm that's wired in CI rather than only locally.

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.

2 participants