Skip to content

fix(ci): drop runner.temp from the ClawHub job's env - #31

Merged
modusensus merged 1 commit into
mainfrom
fix/publish-workflow-job-env-context
Oct 9, 2026
Merged

modusensus merged 1 commit into
mainfrom
fix/publish-workflow-job-env-context

Conversation

@modusensus

@modusensus modusensus commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Found by the 0.7.0 release rehearsal, not by a release: publish.yml did not parse, so the release path has been dead since PR #23 landed.

could not create workflow dispatch event: HTTP 422: Invalid Argument -
failed to parse workflow: (Line: 183, Col: 28): Unrecognized named-value: 'runner'.
Located at position 1 within expression: runner.temp

A job-level env: may reference only the secrets and vars contexts, so ${{ runner.temp }} there invalidates the whole file. GitHub reports it on the dispatch call instead of as a job failure, which is why it stayed invisible: b795569 added the line while reworking the ClawHub steps, no tag has been pushed since, and every other workflow in the repo is unaffected.

The blast radius, from the run list — ten consecutive publish.yml failures, each about 0 seconds:

2026-10-09T21:40:38Z push main                                failure
2026-10-09T21:14:41Z push chore/release-0.7.0                 failure
2026-10-09T20:55:26Z push main                                failure
...  seven more, back to 18:01:12Z

The fix

One line deleted. CLAWHUB_CONFIG_PATH is read by no step anywhere in the repository (grep -rn CLAWHUB_CONFIG_PATH → the definition itself, nothing else), so removing it is the whole change. Had a step needed the path, RUNNER_TEMP is already exported inside steps.

Verified by running it

Re-dispatched the rehearsal on this branch — accepted, and green:

gh workflow run publish.yml --ref fix/publish-workflow-job-env-context -f publish=false   → RC=0
run 37995345883: preflight success | publish success | clawhub skipped   conclusion: success

clawhub skipping is correct for a rehearsal: its if requires a tag push or inputs.publish == true, as do the Publish and Create the GitHub release steps — I read each condition before dispatching anything. The publish job ran the suite, the already-on-npm gate, the notes render and npm publish --dry-run.

What this does not prove

That CLAWHUB_TOKEN holds a non-empty value. preflight only fails on an empty token when releasing=true, and in a rehearsal it just records absent; the runner logged Set output 'clawhub-token' without the value, and gh secret list showing the name (last updated 2026-09-23) is the exact signal that was already proven misleading. The publish job's needs: preflight means a real tag push with an empty token stops before anything ships, so the next release will answer it — at the cost of one failed run, not a half-published version.

Summary by Sourcery

Bug Fixes:

  • Restore the publish workflow by removing the invalid job-level runner.temp expression that prevented workflow parsing and dispatch.

The workflow failed to parse, so every event on it died in seconds and a release
could not be published at all:

  HTTP 422 failed to parse workflow: (Line: 183, Col: 28): Unrecognized
  named-value: 'runner'

A job-level `env:` may reference only the `secrets` and `vars` contexts, so
`${{ runner.temp }}` there invalidates the whole file, not just the step. GitHub
reported it on the dispatch call rather than as a job failure, and the last
release predates the line — introduced by b795569 while reworking the ClawHub
steps, with no tag pushed since — so nothing exercised it until the 0.7.0
rehearsal. The recent run list shows the blast radius: ten consecutive
publish.yml failures, each ~0 seconds.

The variable was dead: no step in the repository reads CLAWHUB_CONFIG_PATH, so
deleting the line is the whole fix. Had a step needed the path, the runner
already exports RUNNER_TEMP inside steps.
@sourcery-ai

sourcery-ai Bot commented Oct 9, 2026

Copy link
Copy Markdown

Sorry @modusensus, you've used your own review budget of 250,000 diff characters for the last 7 days.

You can request another review in 5 days and 1 hour by commenting @sourcery-ai review. Upgrade to get a review now.

@sourcery-ai

sourcery-ai Bot commented Oct 9, 2026

Copy link
Copy Markdown
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Removes the unused ${{ runner.temp }} reference from the ClawHub job’s job-level environment, where the runner context is invalid and caused the entire publish workflow to fail parsing. The one-line change was validated by successfully dispatching a rehearsal: preflight and publish completed, while the conditionally gated ClawHub job skipped as expected.

Flow diagram for the corrected publish workflow

flowchart TD
    Dispatch[Workflow dispatch] --> Parse[Parse publish.yml]
    Parse --> Preflight[Preflight job]
    Preflight --> Publish[Publish job]
    Publish --> Conditions{Tag push or publish input}
    Conditions -->|false| Skip[ClawHub skipped]
    Conditions -->|true| ClawHub[ClawHub job]
Loading

File-Level Changes

Change Details Files
Remove the invalid job-level runner context reference that prevented GitHub from parsing the workflow.
  • Delete the unused CLAWHUB_CONFIG_PATH environment variable.
  • Retain CLAWHUB_TOKEN as the only ClawHub job-level environment variable.
.github/workflows/publish.yml
Restore publish workflow dispatchability and validate the release rehearsal path.
  • Confirm workflow dispatch is accepted after the edit.
  • Verify preflight and publish succeed while ClawHub correctly skips when publish is false.
.github/workflows/publish.yml

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@modusensus
modusensus merged commit 26db136 into main Oct 9, 2026
13 checks passed
@modusensus
modusensus deleted the fix/publish-workflow-job-env-context branch October 9, 2026 22:39
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