Skip to content

chore(spike): how gate judges a called workflow (stage 0.2, DO NOT MERGE) - #232

Closed
aRustyDev wants to merge 2 commits into
mainfrom
chore/spike-gate-judging
Closed

aRustyDev wants to merge 2 commits into
mainfrom
chore/spike-gate-judging

Conversation

@aRustyDev

Copy link
Copy Markdown
Owner

DO NOT MERGE: a spike, to be closed once its runs are read

Stage 0.2 of Phase 0 of the CI split (phases/0001-foundation.md):
how should the one required gate judge a job that lives inside a called workflow? Today a calling job reports success when
every job inside it was skipped, so gate cannot see a planned job that never ran.

This pull request exists to start the spike's workflows: workflow_dispatch needs a workflow on the default branch, so a
spike that exists only on a branch is started by a pull request that edits one of its files (as e2e-schedule.yml does).
Its runs are read through the API; the results go into research/0018-* in a separate documentation pull request, and this
one is closed unmerged, like probes #196 to #199.

What runs

  • spike-gate.yml: five designs against six scenarios (30 legs). Each leg calls spike-callee.yml, then a top job that
    stands for gate and asserts that its decision is the one it should be.
  • spike-malformed.yml: the plan that is not JSON, apart (it may stop a whole run).
  • spike-facts.yml, spike-f3.yml, spike-f8.yml: eight facts the plan assumes, each in its own run.
Design What gate reads of a callee
naive the calling job's result only (what it sees today)
a the same; the callee has a verdict job that fails it when the jobs were wrong
aplus the calling job's result and the callee's verdict output being pass
b the callee reports toJSON(needs); gate judges it
allsgreen design a with re-actors/alls-green (v1.3.0, pinned) as the verdict

Checked before pushing

  • lint-all-workflows.sh: all 10 spike workflows are clean under the repository's own rules, with no entry added for them.
  • actionlint: no error on the spike. On a copy that breaks the callee's contract it refuses an undeclared input, a missing
    required input and a read of an undeclared output (only inside a git repository; outside one it checked nothing).
  • The two scripts, on synthetic inputs under dash: 14 cases.

🤖 Generated with Claude Code

aRustyDev and others added 2 commits November 16, 2026 16:43
…ht facts

Stage 0.2 of Phase 0 of the CI split. Not for merging: a draft pull request that is
closed once its runs are read, because workflow_dispatch needs a workflow on the
default branch, so a spike that exists only on a branch is started by a pull request
that edits one of its files.

spike-gate.yml runs every design (naive, a, aplus, b, allsgreen) against every
scenario (green, skip-planned, fail-planned, unplanned-ran, callee-skipped,
no-verdict) through spike-leg.yml, which calls spike-callee.yml and then asserts
that what the top-level gate would decide is what it should. spike-malformed.yml
keeps the plan that is not JSON apart, since it may stop a whole run. The facts
(event_name, workflow, concurrency, permissions, outputs, artifacts) are in
spike-facts.yml, spike-f3.yml and spike-f8.yml, each in its own run.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…is skipped

The first runs showed a calling job as `skipped`, not `success`, when a malformed plan
skipped every job inside it, which the plan had stated the other way. A valid empty
plan isolates the case.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@aRustyDev

Copy link
Copy Markdown
Owner Author

Closed unmerged, as planned: its runs have been read.

The results are in #236 (research/0018-gate-spike.md): five designs against seven scenarios and eleven facts, in two
identical samples (commits 6577e0b and ba54b53). The choice is design A+: a verdict job per called workflow, and gate
requires its result and its verdict output.

The branch chore/spike-gate-judging stays, because the results refer to its commits; they are also reachable at
refs/pull/232/head.

@aRustyDev aRustyDev closed this Nov 16, 2026
aRustyDev added a commit that referenced this pull request Nov 16, 2026
… (stage 0.2) (#236)

research/0018-gate-spike.md records what the spike (draft #232, closed) measured: five
designs against seven scenarios, and eleven facts, in two identical samples. The choice
is A+: every called workflow ends with a `verdict` job, and gate requires the callee's
result to be success and its `verdict` output to be pass. It was right on all seven
scenarios; the control (the calling job's result only) was wrong on three, the same
without the output on one, and re-actors/alls-green on two.

The measurements corrected the plan, and PLAN.md and phases/0001-foundation.md say so:

- A calling job is success when at least one job inside it succeeded, even if a planned
  sibling was skipped; with nothing inside run it is skipped. The plan had said success
  when every job inside was skipped.
- A callee's workflow-level concurrency deadlocks the run and starts no job (the group is
  built from the caller's name), and a permission its caller did not grant stops the run
  from starting, so no gate would report.
- An if that cannot be evaluated skips the job without failing it.
- actionlint refuses a broken call contract, but only inside a git repository.

Also recorded: flagship.yml (#229) on the inventory, and the test-suites plan (#234),
whose pull requests edit commands inside jobs that Phase 1 moves.

Docs only: plan-ci.py plans no job for this diff.

Co-authored-by: Claude Sonnet 5.5 <[email protected]>
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