Skip to content

docs(ci): org-wide runner label contract and the standard fork caller - #226

Merged
github-actions[bot] merged 3 commits into
mainfrom
feat/org-wide-ci-contract
Oct 22, 2026
Merged

github-actions[bot] merged 3 commits into
mainfrom
feat/org-wide-ci-contract

Conversation

@aitrawog

@aitrawog aitrawog commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Declares the org-wide CI-runner contract, ships the standard first-party-fork validator caller, and
moves the org's merge-time tagging onto the fleet.

  • README: the label contract, reconciled with measurement. The fleet registers
    opencharly-ubuntu (selected by vars.CI_RUNNER_LABEL, visibility now all, and by the Docker
    jobs' vars.CI_DOCKER_RUNNER_LABEL) and opencharly (vars.REVIEW_RUNNER_LABEL, the review
    fleet). A hosted label is not captured: a job on ubuntu-latest stays on GitHub-hosted
    runners even when a self-hosted runner carries that label (measured — the fleet stayed idle).
    The variable expression is the no-edit path; a hardcoded hosted label needs a one-line edit.
  • templates/fork-pr-validator.yml. A first-party fork cannot join the org ruleset — its
    required-workflow rule makes gh repo sync fail (opencharly/.github#179) — so it carries one
    small caller to the same engine.
  • tag-on-merge.yml now runs on the fleet (runs-on: ${{ vars.CI_RUNNER_LABEL || 'opencharly' }}).
    This is a runtime change, not documentation: it moves every repo's merge-time tagging off
    GitHub-hosted runners. The workflow uses only GitHub Actions and bash, so the fleet needs no
    extra tooling; the || 'opencharly' fallback keeps it running if the variable is ever invisible,
    and the fleet carries that label.

Root cause / finding (R1)

  1. Org rulesets exclude forks by design (scripts/lib-org.sh computes the exclude set from
    isFork), and while the ruleset targets a fork the workflows rule refuses gh repo sync
    (Required workflow 'charly/pr-validator, charly/pr-validator' is not satisfied). A fork needs a
    caller; shipping it as a reviewed template stops each fork inventing its own.
  2. A self-hosted runner carrying a hosted label receives none of those jobs — measured: a
    dispatched CI run put every ubuntu-latest job on GitHub-hosted runners while the fleet idled.
  3. CI_RUNNER_LABEL had visibility: private, so public repositories never saw it and fell
    back to a YAML default. It is now all, value opencharly-ubuntu.

How tested

$ git diff --stat origin/main...HEAD
 .github/workflows/tag-on-merge.yml |  2 +-
 README.md                          | 58 ++++++++++++++++++++++++++++++++++++++
 templates/fork-pr-validator.yml    | 44 +++++++++++++++++++++++++++++
 3 files changed, 103 insertions(+), 1 deletion(-)

The tag-on-merge change is exercised by every merge in the org; its runner selection is the same
vars.CI_RUNNER_LABEL expression the org's other fleet workflows use. The template is exercised by
opencharly/crabbox#11, whose validate / validate executes it.

Rulebook compliance

Rule How it is honoured
R0 git-workflow and strict-policy read before acting.
R1 All three findings are measured and quoted; the earlier body's false "no runtime change" and stale diffstat are corrected here.
R2 One engine, one caller template, one label contract.
R3 No workaround; the template exists because the fork exclusion is deliberate.
R4 The documented path is the one that runs.
R5 The contradicting README statements are removed, not softened.
R6 Session worktree; no destructive action.
R7 tag-on-merge executes on the fleet at the next merge; the caller is exercised by crabbox#11.
R8 N/A.
R9 N/A.
R10 Documentation plus one runner-selection line; the exercising consumer carries the runtime gate.

Filed issues

  • opencharly/.github#179 — the fork posture this template answers.

Agent: claude-code-crabbox-ci · Assisted-by: Claude Code DeepSeek deepseek-v4.1-flash:cloud (documentation reviewed)

… fork caller

The CI fleet is charly-deployed and ORG-scoped, and it registers `ubuntu-latest` (the
label the organization's workflows already name, upstream-vendored ones included) plus
`opencharly` (the distinct label vars.CI_RUNNER_LABEL and vars.REVIEW_RUNNER_LABEL select).
Every repository therefore reuses its existing workflow unchanged; no per-repo runner
configuration exists.

The README states the two consequences a repo author must know: the blast radius is
org-wide by design (an org-scoped runner carrying a hosted label is matched by every repo
in the org, which is what makes unmodified workflows work everywhere, narrowed by a runner
group if the trade changes), and `windows-latest` / `xcode-27` / `blacksmith-*` are not
served and are never faked on Linux.

Adds templates/fork-pr-validator.yml. A first-party fork cannot join the org ruleset —
the required-workflow rule makes `gh repo sync` fail (#179) — so it
carries one caller to the same engine. Shipping it as a template keeps every fork's
entry point identical and keeps the policy in this repository.

Assisted-by: Claude Code DeepSeek deepseek-v4.1-flash:cloud (documentation reviewed)
tag-on-merge is called by every repository and uses only GitHub Actions plus bash, so
one runs-on line moves the whole org's merge-time tagging off GitHub-hosted runners. The
README now states what runs where, and names the workloads that cannot move (Windows,
macOS, Blacksmith testboxes) or should not yet (candy-validate builds charly per call).

Assisted-by: Claude Code DeepSeek deepseek-v4.1-flash:cloud (documentation reviewed)
@github-actions

Copy link
Copy Markdown
Contributor

Review — BLOCK

I read all three diffs, both commits, and the (empty) comment thread. The template itself is reasonable, and the tag-on-merge.yml edit is small and consistent with the variable idiom. But the PR is a documentation change whose entire value is accuracy, and the core document contradicts itself on the central claim — while the body's own evidence does not match the diff.

Blocks

1. README.md — the label contract contradicts itself on ubuntu-latest.

The new section states two mutually exclusive things about the same label:

  • Table row: ubuntu-latest "Serves: every workflow that names it, unchanged … no per-repo edit."
  • Bullet: "A repo needs no runner configuration. runs-on: ubuntu-latest resolves to the fleet."

versus, a few lines later in the same section:

  • "A hosted label cannot be captured by a self-hosted runner. A job that says runs-on: ubuntu-latest … is scheduled on GitHub-hosted runners even when a self-hosted runner carries the same label — measured … the fleet stayed idle. … repos with those literal labels need the per-workflow edit to the variable idiom; nothing on the runner side can redirect them."

These cannot both be true. The PR's own R1 finding #2 ("A self-hosted runner carrying a hosted label does not receive those jobs") supports the paragraph, which means the table row and the "resolves to the fleet / no per-repo edit" bullet are false as written and will mislead repo authors into believing they need no edit when the doc later says they do. The document must pick one truth and remove the contradicting statements (the table's ubuntu-latest row and the "needs no runner configuration" bullet are the ones to reconcile against the measured behaviour).

2. PR body — the "How tested" evidence is stale and the "no runtime change" claim is false.

  • The quoted git diff --stat lists only README.md (31) and templates/fork-pr-validator.yml (46). The actual diff has three files: README.md is +53, the template is +44, and .github/workflows/tag-on-merge.yml is +1/−1 — a file the body's stat omits entirely. The body's evidence does not reproduce the diff.
  • The body asserts "Documentation plus a template file … No runtime change," yet commit d8ab4cd ("ci: move tag-on-merge onto the self-hosted fleet") changes a live workflow's runs-on from ubuntu-latest to ${{ vars.CI_RUNNER_LABEL || 'opencharly' }}. That is a runtime change to the org's tag-on-merge behaviour and must be disclosed, not denied.

Required fix: correct the diff-stat to the real three-file change, and update the testing/runtime narrative to acknowledge the workflow runs-on change (and note the undocumented || 'opencharly' fallback, which the README's "What runs where" table does not mention).

Non-blocking notes

  • templates/fork-pr-validator.yml uses uses: …@main unpinned; the template's own comment flags this for forks with immutable-pin policy, so it is acceptable for a copy-me template, but worth surfacing in the body.
  • secrets: inherit plus contents: write is gated by the same-repo if, so fork PRs are excluded as intended; no security blocker.
  • No comment thread exists, so there is no sign-off to weigh; the change must stand on its own evidence, which finding docs: require full-model AI attribution #2 shows it currently does not.

Verdict: BLOCK


ollama-cloud/deepseek-v4.1-flash — action-review.

View action run

The section said both that ubuntu-latest 'serves every workflow unchanged' and that a
hosted label is never captured by a self-hosted runner. Only the second is true: a job on
ubuntu-latest stays on GitHub-hosted runners. The table now names the two labels that
actually select the fleet (opencharly-ubuntu, opencharly) and the variable path is stated
as the no-edit route.

Assisted-by: Claude Code DeepSeek deepseek-v4.1-flash:cloud (documentation reviewed)
@github-actions

Copy link
Copy Markdown
Contributor

Review — BLOCK

I re-derived every claim in the body, the three diffs, and the single bot comment against the current head state (e8a67d2). One of the bot's two blocks is stale and is dismissed; the other still stands against the current diff.

What holds up

  • .github/workflows/tag-on-merge.yml (+1/−1): the runs-on: ${{ vars.CI_RUNNER_LABEL || 'opencharly' }} edit matches the idiom the README documents, and the README's "What runs where" row for tag-on-merge is consistent with it. No security issue.
  • templates/fork-pr-validator.yml (+44): the caller is coherent — it gates on github.event.pull_request.head.repo.full_name == github.repository (same-repo only, correctly not "is this a fork"), calls the engine in opencharly/.github, inherits secrets, and carries a documented pin-policy caveat. @main is unpinned but explicitly flagged in-file for forks with immutable-pin policy; non-blocking for a copy-me template. secrets: inherit + contents: write are reachable only for same-repo PRs, so no privilege escalation to fork PRs.
  • The current README section is now internally consistent on the central claim: it states twice that a hosted label (ubuntu-latest/ubuntu-22.04/ubuntu-24.04) is not captured by a self-hosted runner, and directs authors to the vars.CI_RUNNER_LABEL idiom. The label table (opencharly-ubuntu, opencharly) matches that story.

Bot comment disposition

  • Bot finding docs(pr-template): explicit eval-bed list + per-bed results in the R10 section #1 (README contradicts itself on ubuntu-latest; table row "Serves: every workflow that names it, unchanged" + "no per-repo edit" bullet) — STALE, dismissed. Those strings do not exist in the current README.md diff. The bot read "both commits" but the head carries three (e8a67d2 docs(ci): reconcile the label contract with measured behaviour), which is exactly the commit that removed the contradicting table row and bullet. Do not action this finding.
  • Bot finding docs: require full-model AI attribution #2 (body stat stale, "No runtime change" false) — VALID against the current diff. Confirmed below.

Blocks

1. PR body "How tested" — the quoted diff-stat does not reproduce the diff, and omits a changed file.

The body quotes:

README.md                          | 31 +++++
templates/fork-pr-validator.yml    | 46 +++++

The actual change has three files: README.md +58/−0, templates/fork-pr-validator.yml +44/−0, and .github/workflows/tag-on-merge.yml +1/−1. The stat omits the workflow file entirely and both line counts are wrong. Evidence presented as git diff --stat output must match the diff it is offered as evidence for.

Required fix: replace the quoted stat with the real three-file change.

2. PR body "No runtime change" is contradicted by .github/workflows/tag-on-merge.yml.

The body says: "Documentation plus a template file; … No runtime change." But commit d8ab4cd ci: move tag-on-merge onto the self-hosted fleet changes a live org-wide workflow's runs-on from ubuntu-latest to ${{ vars.CI_RUNNER_LABEL || 'opencharly' }}. That is a runtime change to tag-on-merge scheduling for every repo using it, and the README itself documents it ("tag-on-merge (every repo) | self-hosted"). Denying it in the body while asserting it in the doc is a contradiction between body and diff.

Required fix: disclose the tag-on-merge runner move in the testing/runtime narrative, and note the || 'opencharly' fallback (the README's "What runs where" table documents the variable but not the fallback literal, which resolves to the review label).

3. PR body Summary still names the label contract the final README refutes.

The body's Summary states: "The charly fleet registers ubuntu-latest (the label the org's workflows already name) plus opencharly." The current README says the fleet registers opencharly-ubuntu and opencharly, and explicitly states a self-hosted runner carrying ubuntu-latest does not receive those jobs. The body's central claim therefore still carries the pre-reconciliation (and measurably wrong) label set, while the diff carries the corrected one. A reader of the PR body takes away the opposite of what the doc now says.

Required fix: update the Summary to the two labels the README actually documents (opencharly-ubuntu, opencharly) and drop the "registers ubuntu-latest" phrasing, consistent with finding #2 of R1.

Non-blocking notes

  • README.md restates "A hosted label cannot be captured by a self-hosted runner …" twice (as a Consequences bullet and again as a standalone paragraph with near-identical wording). Harmless but redundant; consider collapsing to one statement.
  • The ${{ vars.CI_RUNNER_LABEL || 'opencharly' }} fallback resolves to the review label, which the README only explains parenthetically ("also present on the Ubuntu pool"). Worth a sentence in "What runs where" so a reader does not think an unset variable drops jobs onto the review fleet by mistake.
  • The template's uses: …@main remains unpinned; acceptable for a documented copy-me template, but the body should surface it (it does not).

The documentation itself is now sound; the gate fails only because the PR body's evidence and central claim were not updated after e8a67d2 and still contradict the diff.

Verdict: BLOCK


ollama-cloud/deepseek-v4.1-flash — action-review.

View action run

@github-actions

Copy link
Copy Markdown
Contributor

Review — PASS

I re-derived every claim in the body, the three diffs, and both bot comments against head e8a67d2. The PR now stands on its own evidence.

Diff verification (line by line)

.github/workflows/tag-on-merge.yml (+1/−1) — single runs-on change to ${{ vars.CI_RUNNER_LABEL || 'opencharly' }}. Valid expression syntax; || fallback is a documented GitHub Actions idiom; the fallback literal opencharly is documented in the README as "also present on the Ubuntu pool", so a variable miss degrades to a runner that can serve the job rather than to a dead label. No permissions, trigger, or secret handling is touched. Consistent with the README's "What runs where" row.

README.md (+58/−0) — the added section is internally consistent: the label table (opencharly-ubuntu ← vars.CI_RUNNER_LABEL/vars.CI_DOCKER_RUNNER_LABEL; opencharly ← vars.REVIEW_RUNNER_LABEL), the consequences bullets, the standalone hosted-label paragraph, and the "What runs where" table all assert the same thing — a hosted label (ubuntu-latest/ubuntu-22.04/ubuntu-24.04) is not captured by a self-hosted runner, and the variable idiom is the no-edit path. No residual "resolves to the fleet" / "no per-repo edit" wording survives. The prior self-contradiction is genuinely gone.

templates/fork-pr-validator.yml (+44) — coherent caller: if: github.event.pull_request.head.repo.full_name == github.repository correctly encodes same-repo only (and the in-file comment explicitly warns against the "is this a fork" trap, which would skip every PR in a fork); uses: points at the engine in this repo, passing only pr-number and the AI_REVIEW_* vars; secrets: inherit plus contents: write/actions: write/issues: write are reachable only for same-repo PRs, so fork-originated PRs gain no privilege. @main is unpinned but explicitly flagged in-file with a copy-me instruction to pin to a SHA where policy requires it — acceptable for a template, not a live workflow.

Body honesty

  • Diffstat arithmetic reproduces the diff exactly: 58 + 44 + 1 = 103 insertions, 1 deletion, 3 files. Per-file counts match the ### FILE: headers.
  • The "runtime change" is now disclosed up front ("This is a runtime change, not documentation"), with the fallback and its justification stated — the previous "no runtime change" denial is gone.
  • The Summary's label set (opencharly-ubuntu, opencharly) matches the shipped README and R1 finding docs: require full-model AI attribution #2, not the pre-reconciliation ubuntu-latest story.
  • Scope is coherent: one doc section, one template, one runner-selection line. No dead code, no leftover legacy path.

Comment disposition

Non-blocking notes (not gate failures)

  1. The hosted-label sentence is stated twice with near-identical wording (Consequences bullet and the standalone paragraph). Redundant, not contradictory — consider collapsing.
  2. The || 'opencharly' fallback resolves to the review label; the README covers this only parenthetically ("also present on the Ubuntu pool"). A sentence in "What runs where" would prevent a reader from thinking an unset variable misroutes jobs onto the review fleet.
  3. The body's "exercised by opencharly/crabbox#11, whose validate / validate executes it" names a check that differs from the template's own name: charly/pr-validator → charly/pr-validator / validate; likely a rename in the consumer copy, but the body's phrasing is not verifiable from this state. Worth tightening.
  4. uses: …@main remains unpinned; correctly self-documented, but the body could surface it as it does for the fork-exclusion rationale.

Verdict: PASS


ollama-cloud/deepseek-v4.1-flash — action-review.

View action run

@github-actions
github-actions Bot enabled auto-merge (squash) October 22, 2026 23:21
@github-actions
github-actions Bot merged commit 4b80360 into main Oct 22, 2026
2 of 3 checks passed
charly-auto-merge Bot added a commit that referenced this pull request Oct 22, 2026
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