Skip to content

ci(vale): name a missing trusted publisher when a Vale publish 404s - #730

Merged
aibex-agent[bot] merged 1 commit into
mainfrom
aibex/t_gdgxyDjiw09SQqcFddG3f5kC
Nov 30, 2026
Merged

aibex-agent[bot] merged 1 commit into
mainfrom
aibex/t_gdgxyDjiw09SQqcFddG3f5kC

Conversation

@aibex-agent

@aibex-agent aibex-agent Bot commented Nov 30, 2026

Copy link
Copy Markdown

The scheduled Upgrade the pinned Vale run on main at dfa347a (run) refused because the published @taskless/vale-* packages were at two versions. The six platform packages were at 3.28.1-20261130004639 and @taskless/vale-grammars was still at 3.27.0-20261117230017.

Cause. The 3.28.1 release (46330880954) did try to publish grammars, and got E404 Not Found - PUT .../@taskless%2fvale-grammars. Grammars had only ever been published by hand (bootstrapped 2026-11-20, no provenance). Its trusted publisher had not been registered, so the OIDC-only publish job had no credential for it. The detector's same-version rule was correct and is unchanged: grammars is packed and published with every release.

Fixed out of band. The trusted publisher was registered on npm, and the failed job was re-run. Grammars is now at 3.28.1-20261130004639, so the set is back at one version.

This PR makes the same failure easier to avoid and quicker to read:

  • Bootstrap notes: registering the trusted publisher is now an explicit, required step, with the exact fields (taskless / cli / release-vale.yml / npm-autopublish) and a record of this incident.
  • Publish loop: npm's output is now captured. When npm returns E404 for a package name that already exists on the registry, the step adds an ::error:: naming the missing trusted publisher as the likely cause.

Tested locally: the publish script was run under bash -eo pipefail with a fake npm, covering both the 404 path and the success path. pnpm lint passes. CI-only, so no changeset.

@taskless/vale-grammars was bootstrapped by hand without registering
release-vale.yml as its trusted publisher, so the 3.28.1 release published
the six platform packages and got an anonymous-PUT 404 on grammars. The
split set then stopped vale-upgrade-detect, correctly, without naming the cause.

Make trusted-publisher registration an explicit bootstrap step with its
exact fields, and have the publish loop say what an E404 on an existing
package most likely means.
@aibex-agent aibex-agent Bot added the skip-changeset PR intentionally ships no release note (bypasses the changeset requirement) label Nov 30, 2026
@aibex-agent

aibex-agent Bot commented Nov 30, 2026

Copy link
Copy Markdown
Author

@claude /review

@github-actions

github-actions Bot commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @aibex-agent[bot]'s task in 1m 12s —— View job


Review complete

Review mode: incremental — read 0 prior review thread(s) before reviewing. .prior-review.json contains no prior review threads, no prior review summaries, and no top-level comments other than the trigger comment itself (@claude /review). This is the first review of this PR, so the whole diff was assessed as new.

  • Read .prior-review.json (empty — first review)
  • Fetch PR diff (gh pr diff) and read full context of the modified step in .github/workflows/release-vale.yml
  • Review for correctness, security, performance, clarity
  • Post findings

Findings

No issues found. The change to .github/workflows/release-vale.yml (lines ~114-134 bootstrap comment, and the publish loop at ~465-479) is sound:

  • Control flow correctness: the elif npm publish ... >publish.log 2>&1; then ... else ...; fi restructuring correctly preserves the original success/failure branches while adding log capture. Because the npm publish invocation sits inside an if/elif condition, it remains exempt from the job's default bash -eo pipefail -e behavior, consistent with the existing comment that the loop deliberately keeps going after a single package's failure.
  • 404 disambiguation logic: grep -q 'E404' publish.log && npm view "${name}" name >/dev/null 2>&1 correctly narrows the new error message to the case that matters — npm returned E404 and the package name is already known to the registry (i.e., it's an existing package being rejected, not a genuinely new/typo'd name). This avoids misfiring the "register a trusted publisher" hint for unrelated 404s.
  • Idempotency preserved: the extra npm view call and log handling don't interfere with the pre-existing npm view "${name}@${STAMPED_VERSION}" skip-if-already-published guard or the re-run story described in the surrounding comments.
  • Cleanup: rm -f publish.log runs every iteration regardless of branch taken, so no stale log leaks into the next tarball's iteration.
  • Documentation: the new top-of-file comment block accurately reflects the actual incident (grammars bootstrapped by hand on 2026-11-20, no trusted publisher registered, 3.28.1 run 46330880954 404'd on the seventh package) and points to the exact fields needed to register the trusted publisher, matching the npm Trusted Publisher UI fields referenced in the PR description.

No security, performance, or clarity concerns. This is a CI-only workflow change with no behavioral change to the happy path (success path now also cats the publish log, which is a minor, intentional, harmless addition), consistent with the skip-changeset label.

@aibex-agent
aibex-agent Bot merged commit e54210e into main Nov 30, 2026
11 checks passed
@aibex-agent
aibex-agent Bot deleted the aibex/t_gdgxyDjiw09SQqcFddG3f5kC branch November 30, 2026 08:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip-changeset PR intentionally ships no release note (bypasses the changeset requirement)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant