Skip to content

opencode action: unauthenticated version curl fast-fails and is indistinguishable from agent failure #982

Closed

Description

@LSantha

Follow-up from PR #981 / issue #870.

The pinned anomalyco/opencode/github@v1.19.6 still runs an unauthenticated curl -sf https://api.github.com/repos/anomalyco/opencode/releases/latest (no --max-time) in its Get opencode version composite step. Under rate limiting that curl fails in 81-138 ms; because the step is the last command under set -e, the whole composite action fails and steps.run_agent.outcome becomes failure, so .github/scripts/opencode-post-step.js applies agent/failed even though no agent ran.

This is indistinguishable from a genuine agent failure. Fix options: make the version step non-fatal with an authenticated/retried fetch, or expose a run_agent.version signal so the post-step can tell the two apart.

Refs #870

Triage Addendum (auto, 2026-11-21)

  • Area / Kind: area/build + kind/bug
  • Blast radius: L2 (CI tooling: post-step script + three workflow call sites + tests; no JNode source, boot path, or public API)
  • Expected scope: Make a run_agent.version failure distinguishable from an agent failure: either preflight/retry the release fetch with auth in the three workflows, or vendor/patch the pinned action version step so it is non-fatal; teach opencode-post-step.js to avoid agent/failed when the agent step never ran, with opencode-post-step.test.js cases for both paths. Keep opencode.yml, triage.yml, wiki-update.yml consistent. No-go: JNode sources/ASM/public API, model-config changes, short agent-step timeout (5m killed legitimate runs), unrelated workflow reformatting.
  • Test path: node --test .github/scripts/tests/*.test.js (.github/AGENTS.md:308), then one live /oc run proving the agent step still executes and genuine failures still label agent/failed.
  • Merge signal: human-review (bug; CI label/closure behavior and a choice between vendoring vs preflight/post-step, even though scope is small)
  • Gaps: non-blocking: choose the fix shape (preflight/auth fetch vs vendored patch vs post-step signal); confirm whether the composite inner run_agent.version step is visible to the post-step or needs a workflow-level signal; decide the infrastructure-failure label (agent/blocked vs no label plus comment) - it must not be agent/failed. Acceptance criteria are absent from the body; the expected scope above supplies them.
  • Full report: ## Triage comment below.

✅ Ticket Runner Status

Field Value
Phase DONE
Turn 1/7
Retries 0/3
PR #983
Review in progress no
Started 2026-11-21T09:39:08.108Z

Activity

  1. added
    kind/bug
    on Nov 21, 2026
  2. LSantha commented on Nov 21, 2026

    @LSantha
    OwnerAuthor

    /oc triage issue #982

    Triage run ONLY. Load the jnode-triage-issue skill and obey it. Output is exactly one ## Triage comment plus kind/area label edits. FORBIDDEN in this run: git checkout -b, git push, gh pr create, any branch, any PR.

  3. added
    area/build
    on Nov 21, 2026
  4. LSantha commented on Nov 21, 2026

    @LSantha
    OwnerAuthor

    Triage

    • Area: area/build (CI tooling: .github/workflows/*.yml + .github/scripts/opencode-post-step.js); area/build added
    • Kind: kind/bug (retained)
    • Repro: anomalyco/opencode/github@v1.19.6 runs an unauthenticated curl -sf https://api.github.com/repos/anomalyco/opencode/releases/latest (no --max-time) in run_agent.version; rate limiting makes it exit 1 in 81-138 ms under set -e, run_agent becomes failure, and opencode-post-step.js applies agent/failed with no agent run. Evidence in factory: the vendored opencode action's version step uses an unauthenticated curl, which fails or hangs and takes down every agent run #870 / PR #870 - Pinned opencode action; added timeouts/tests #981. Not a duplicate: factory: the vendored opencode action's version step uses an unauthenticated curl, which fails or hangs and takes down every agent run #870/PR #870 - Pinned opencode action; added timeouts/tests #981 pin the ref; this is the residual internal curl.
    • Blast radius: L2 CI tooling (post-step + three workflow call sites + tests; no JNode source, boot path, or public API)
    • Expected scope: Repo-side, ~3-5 files: when PREV_CONCLUSION=failure, distinguish a failed/skipped run_agent.version from a failed run_agent.run_opencode in opencode-post-step.js and avoid agent/failed for the former; if inner composite steps are not exposed to the post-step, add a workflow-level preflight/signal in opencode.yml, triage.yml, and wiki-update.yml (authenticated, retried release fetch, or vendored action patch making the version step non-fatal). Extend opencode-post-step.test.js for both paths. No-go: JNode sources/ASM/public API, model-config changes, short agent-step timeout (5m killed legitimate runs), unrelated workflow reformatting.
    • Test path: node --test .github/scripts/tests/*.test.js (.github/AGENTS.md:308), then one live /oc run proving the agent step still executes and genuine agent failures still label agent/failed.
    • Merge signal: human-review (bug; CI label/closure behavior, and vendoring vs preflight/post-step signal is a design choice)
    • Gaps: non-blocking: fix shape (preflight/auth fetch vs vendored patch vs post-step signal) is a DEV/maintainer call; confirm whether the composite inner run_agent.version step is visible to the post-step via the Actions API; choose the infrastructure-failure label (agent/blocked vs no label plus comment) - it must not be agent/failed; body has no acceptance criteria, the expected scope supplies them.
    • Suggested next: fix
    • Split proposal: none - focused
    • Labels applied: kind/bug retained; area/build added; no removals

    github run

  5. LSantha commented on Nov 21, 2026

    @LSantha
    OwnerAuthor

    /oc Please proceed with this task.

  6. added a commit that references this issue on Nov 21, 2026
  7. LSantha commented on Nov 21, 2026

    @LSantha
    OwnerAuthor

    Fix direction for this ticket (from the maintainer, based on the PR #981 review round):

    Goal: a version-step fast-fail must be distinguishable from an agent failure, and must fail in minutes rather than at the job timeout.

    Smallest change that meets it:

    1. Add a step BEFORE the run_agent step in .github/workflows/opencode.yml, triage.yml and wiki-update.yml that hits the same endpoint authenticated (gh api repos/anomalyco/opencode/releases/latest --jq .tag_name) with timeout-minutes: 2. Name it so the failure is self-describing, e.g. Preflight: action release endpoint. If it fails, every later step skips with steps.preflight.outcome == 'failure' as the cause.
    2. Teach .github/scripts/opencode-post-step.js to read that step's outcome: when the preflight failed (or when the agent step failed before producing any work), label/comment naming the version-step cause instead of agent/failed. Keep the existing behavior for genuine agent failures.
    3. Cover both halves with node:test tests in .github/scripts/tests/ following the existing wiring-test pattern (assert the step exists in all three workflows, its timeout, and that the post-step reasons correctly for each combination of outcomes).

    Out of scope: pinning the action (done in PR #981) and the hardcoded model in wiki-update.yml (separate defect, not this ticket).

  8. LSantha commented on Nov 21, 2026

    @LSantha
    OwnerAuthor

    /run

  9. LSantha commented on Nov 21, 2026

    @LSantha
    OwnerAuthor

    /oc Please proceed with this task.

  10. LSantha commented on Nov 21, 2026

    @LSantha
    OwnerAuthor

    /oc Please proceed with this task.

  11. LSantha commented on Nov 21, 2026

    @LSantha
    OwnerAuthor

    Created PR #983

    github run

  12. added
    agent/done
    on Nov 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent/donearea/buildkind/bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions