Repository navigation
fix(ci): skip the live suite without a key, and say the run measured nothing (#794) - #30
Merged
Merged
Conversation
…nothing (ThinkFlowLab#794) `live-e2e.yml` reads DEEPSEEK_API_KEY, which this repository does not have, so every scheduled run failed in Preflight before a single check ran: five runs, no evidence bundle, and a red nobody could act on. The preflight now exits 0 with a warning, publishes `key=false`, and the six steps that need the key are gated on it; a keyless run does nothing and its summary says the run measured nothing. A failure inside the suite still fails the run.
Owner
Author
|
Verdict: PASS at b6cdfbd Ran:
What I checked:
Non-blocking:
|
Birfy
added a commit
that referenced
this pull request
Oct 23, 2026
…inkFlowLab#811) (#32) `live-e2e.yml` skips every step that needs `DEEPSEEK_API_KEY` when the preflight publishes `key=false`. Nothing tested that: on #30, deleting the `if:` from `Run the four checks` left every test green. This reads the workflow as text, per step block, and fails when a step that maps a secret loses its gate, when one of the seven key-consuming steps loses it, or when the preflight itself becomes conditional. `live-e2e.yml` is unchanged.
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.
Reproduce
live-e2e.ymlreads the repository secretDEEPSEEK_API_KEY, and this repository has none (GET /actions/secrets→total_count: 0). Every scheduled run therefore died in Preflight before one check ran — five runs, same step, no evidence bundle:The step ran
[ -n "$DEEPSEEK_API_KEY" ] || { echo "::error::..."; exit 1; }, and no step in the job carried a condition, so a keyless run could only be red. Reproduced locally by running the old step body with an empty environment: exit 1, and0gated steps in the file.What changed
Five files, and the decision moved into a script so it can be tested:
.github/scripts/live-e2e-preflight.mjs— readsDEEPSEEK_API_KEY, publisheskey=true|falseto$GITHUB_OUTPUT. With no key it prints one::warningand appends a summary saying the run measured nothing; it never fails the step..github/scripts/live-e2e-preflight.test.mjs— four cases (key present, empty, unset, and the script executed as the workflow runs it)..github/workflows/live-e2e.yml— the preflight step calls the script; the six steps that need the key (npm ci, install DSH, clone the harness, start the tap, start the bench, run the four checks) plus the cleanup are gated onsteps.preflight.outputs.key == 'true'; the header comment says why.docs/subsystems/live-e2e.md— the invariant now separates the runner (still fails closed on a mock key, a loopback endpoint or the user's own home) from the workflow (skips when the key is absent).changelog.d/794-live-e2e-skips-without-key.changed.md.Evidence gateandUpload evidenceneeded no edit: they key offsteps.run.outcome, which isskippedin a keyless run, so no artifact is published and no gate can pass on nothing.What I ran
node --test ".github/scripts/*.test.mjs"→ 246/246, including the four new cases::warning title=Live E2E skipped::, outputkey=false, five-line summary; key set → exit 0, no stdout,key=true, empty summaryDEEPSEEK_API_KEY, cron30 16 * * *andpermissions: contents: readunchangednode .github/scripts/testing-layers.mjs --check→ 319 test file(s) in 12 workflow(s), every one classifiednode .github/scripts/changelog.mjs check→ 7 fragment(s) well formedARCH_DOCS_BASE=main node core/scripts/check-arch-docs.mjs→ OK (5 changed files)Red without the source change
10e26bb6, the preflight body with an empty key exits 1 with::error::— that is the five failed runs in the issue — and the file has 0 gated steps.#794: the step exits 0 without a key…fails (3 pass, 1 fail).::warningchanged back to::error→ two cases fail (2 pass, 2 fail), including the one that forbids an::error::.if:from a key-dependent step would let it run keyless and fail atRun the four checks, which is exactly what the gates exist to prevent.Not run
actionlint— not installed on this machine; the workflow is checked by parsing it and by CI's ownLint the workflowsstep on this tip.if:s — only a run can show it. After this merges I will dispatch the workflow once onmainand report the run: it should be green, carry theLive E2E skippedwarning, produce no evidence artifact, and be reported as "measured nothing".Risk
A keyless run is green while proving nothing. Three things keep that honest: the
::warningannotation, the step summary that says so in words, and no evidence artifact. A red still means the suite failed. The remaining downside is that losing the secret later would quiet the suite rather than shout — that is visible in every run summary, and ThinkFlowLab#794 stays open until a keyed run exists. The issue's own acceptance was "preflight passes with a real key, or the schedule is turned off"; this is a third path that keeps the schedule and makes the absence visible, so it is the owner's call to accept it.Fixes ThinkFlowLab#794