Repository navigation
chore(loop): let workflow_dispatch fall back to the write switch - #47
Conversation
ce75321 to
0cb7063
Compare
Coverage
|
|
Loop triage — PR #47 edits the loop host's own machinery ( The bug and the fix both check out against live Actions logs:
Both fix-side probes logged One point for the reviewer: the commit/title type is Proposed action: label |
`LOOP_EXECUTE_WRITES: ${{ github.event.inputs.execute_writes || vars.LOOP_EXECUTE_WRITES || 'false' }}`
never reached the variable: the input declared `default: 'false'`, so GitHub filled
`github.event.inputs.execute_writes` with the non-empty string `'false'` on every
manual run and the `||` short-circuited there. Verified on run 35002295453 with the
repository variable already set to true — the engine still logged `writeLevel=report`
and the payload showed `"execute_writes": "false"`.
The effect was narrow but exactly wrong: schedule/issues/pull_request runs (where
`github.event.inputs` is null) followed the variable correctly, while the one entry
point a human uses to *test* the switch could never exercise it.
Dropping the default makes the input tri-state and the expression mean what it
reads: unset → fall back to the repository variable; `true`/`false` → override for
that run. The description says so now, since "empty follows the variable" is
otherwise invisible from the dispatch form.
Spotted by the loop's own triage of this PR (run 35003006260, its first `auto`
execution): the commit type was `fix(loop)`, which AGENTS.md reserves for changes a
package consumer can observe, and changelogen renders into the user-facing
CHANGELOG.
0cb7063 to
be8f0b7
Compare
A one-line bug with exactly the wrong blast radius: the entry point a human uses to test the write switch could never exercise it.
The bug
The input declared
default: 'false', so GitHub filledgithub.event.inputs.execute_writeswith the non-empty string'false'on every manual run and the||short-circuited there.vars.LOOP_EXECUTE_WRITESwas unreachable.Verified on run
35002295453with the repository variable already set totrue: the payload showed"execute_writes": "false"and the engine loggedwriteLevel=report.Schedule / issues / pull_request runs were unaffected —
github.event.inputsis null there, so the fallback worked. That made it worse rather than better: the loop would have started writing on real events while the switch appeared broken in the one place you would look to confirm it.The fix
Drop the
default:, making the input tri-state and the expression mean what it reads:vars.LOOP_EXECUTE_WRITES-f execute_writes=true-f execute_writes=falseBoth directions verified on Actions, dispatched against this branch (
--ref):smoke=truewas used for both probes: it skips the agent and never reachesapplyActions, so neither run wrote anything anywhere.scripts/loop/README.mdrecords the tri-state semantics and why the input must stay default-less — the failure mode is invisible from the workflow file alone, so the next person to add a "sensible default" needs to know it is not one.Not in this PR
Nothing else about the switch changed. First real
autoexecution is still pending (see #46): it needs a claimable task, and the state layer currently has none — all 14 tasks are terminal orwaiting-human.