fix: stop referencing secrets directly in a step if: condition - #103
Merged
Conversation
PR #101 changed the "Install Cursor CLI" step's `if:` to `secrets.CURSOR_API_KEY != ''`. GitHub rejects that at workflow_dispatch validation time with "Unrecognized named-value: 'secrets'" (HTTP 422), hit for real trying to re-dispatch issue #85 after merging the run-engine.sh timeout fix. This silently broke every future trigger of agent-loop.yml, including the 06/13/20 UTC cron. pick-issue.sh already computes CURSOR_AVAILABLE from the secret inside its own env (the allowed pattern — secrets flow through env:, never directly in if:). Expose it as a step output (cursor_available) and gate the Cursor CLI install on that instead.
Santisoutoo
enabled auto-merge
August 24, 2026 18:32
This was referenced Aug 24, 2026
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.
Descripción
PR #101 cambió el
if:del paso "Install Cursor CLI" a:Al intentar re-lanzar el agent-loop sobre el issue #85 (para probar el fix de timeout de #102),
gh workflow rundevolvió:GitHub rechaza referenciar
secretsdirectamente en elif:de un step. Esto no es solo un problema deworkflow_dispatchmanual — rompe el fichero de workflow entero, así que también habría bloqueado el próximo cron (06/13/20 UTC).En el resto del fichero, cada acceso a un secret pasa por
env:(el patrón permitido); esta era la única línea que lo hacía directamente en unif:.Cambio
pick-issue.shya calculaCURSOR_AVAILABLEa partir del secret dentro de su propioenv:(patrón seguro). Lo expone ahora como outputcursor_available=true|false.agent-loop.ymlgatea "Install Cursor CLI" consteps.pick.outputs.cursor_available == 'true'en vez desecrets.CURSOR_API_KEY != ''.Mismo comportamiento pretendido (instalar el CLI de Cursor siempre que el secret esté configurado, no solo cuando el worker enruta a Cursor), sin tocar
secretsdesde unif:.Checklist
bash -nen ambos scripts modificadossecrets\.dentro de unif:en.github/workflows/*.ymlcloses ninguno — bug de infra descubierto durante el testing manual de #102, no ligado a un issue de producto.