Skip to content

Restore publish validation now that pub.dev 9576 is fixed - #63

Merged
leoafarias merged 1 commit into
mainfrom
chore/drop-skip-validation
Sep 12, 2026
Merged

Restore publish validation now that pub.dev 9576 is fixed#63
leoafarias merged 1 commit into
mainfrom
chore/drop-skip-validation

Conversation

@leoafarias

Copy link
Copy Markdown
Member

What this changes

Drops --skip-validation from the pub.dev publish step. --force stays.

Why now

The flag exists because of dart-lang/pub-dev#9576: pub.dev answered package metadata reads with HTTP 403 when the request carried a bearer token, so the OIDC-authenticated dependency resolution that dart pub publish performs during validation failed before the upload could start.

This workflow recorded its own exit condition:

Drop the flag once dart-lang/pub-dev#9576 is fixed.

That condition is met. Upstream confirmed the fix on 2026-09-11, and it reproduces today:

$ curl -so /dev/null -w '%{http_code}\n' -H 'Authorization: Bearer abc' \
    https://pub.dev/api/packages/okf/advisories
200

The same check returns 200 for mix and wayfinder as well, so this is a server-side fix rather than something specific to one package.

What this restores

Validation is the client-side pass that resolves dependencies, checks the pubspec, and inspects the archive before upload. The test job gating this one already runs dart pub publish --dry-run at the same commit, so the checks themselves are not new — but the dry run validates a tree, while validation at the upload validates the archive actually being published. Restoring it closes that gap.

--force is unrelated and stays: it answers the interactive confirmation prompt, which a workflow cannot.

Checks

test/ci/gate_test.dart asserts contains('dart pub publish --force') and the mandatory dry run; both still hold. Full CI gate passes locally (11/11 in gate_test.dart).

Not in this change

The same workaround is live in three other repositories — conceptadev/wayfinder (three publish workflows), conceptadev/dart-actions (publish.yml) and conceptadev/ack (publish-packages.yml). okf goes first because it carries the explicit removal condition and has no pending release; its next publish is the real-world evidence for the rest. dart-actions is shared infrastructure whose retirement of this flag is already planned in conceptadev/dart-actions#9, so it should follow that plan rather than be patched ad hoc.

The flag was added because pub.dev returned HTTP 403 for package
metadata read with a bearer token, so the OIDC-authenticated resolution
that validation performs failed before the upload could start. The
workflow comment recorded the exit condition: drop the flag once
dart-lang/pub-dev#9576 is fixed.

It is fixed. The endpoint now answers 200 with a bearer token, which
upstream confirmed on 2026-09-11 and which reproduces today against
this package's own advisories endpoint.

--force stays: it answers the interactive confirmation a workflow
cannot. Only the skipped validation comes back, so the client checks
the gating dry run already performs now also run at the upload itself,
where the published archive is the one being checked.
@leoafarias
leoafarias merged commit 945c192 into main Sep 12, 2026
4 checks passed
@leoafarias
leoafarias deleted the chore/drop-skip-validation branch September 12, 2026 21:41
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