Record why the first SDK publish failed, and check the token authenticates - #55
Merged
Merged
Conversation
…uthenticates The first real run got as far as "Publishing to registry.npmjs.org" and then failed with `EOTP: This operation requires a one-time password`. So the token authenticated fine; what it is not is exempt from the two-factor requirement npm enforces on publish. Only a classic AUTOMATION token or a granular access token with write on the scope is -- a classic "Publish" token still prompts. There is no workflow-side fix, which is the point of the exemption: CI cannot supply an interactive one-time password. Recorded at the top of the workflow so the next person does not spend a run discovering it. The pre-flight check now runs `npm whoami` rather than testing for a non-empty string. The old check passed and was followed by a publish that failed on auth -- worse than no check, because a green step implied the credential was good. `whoami` still cannot prove 2FA exemption, so the message says so instead of claiming the credential is fine.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The publish path from #53 / #54 works. The real run got all the way to
Publishing to https://registry.npmjs.org/ with tag latest and public accessand then:The token authenticated. What it is not is exempt from the two-factor requirement npm enforces on publish. Only two credentials are:
There is no workflow-side fix, and that is the point of the exemption: CI cannot supply an interactive one-time password. Recorded at the top of the workflow so nobody spends another run discovering it.
The pre-flight check was worse than nothing
It tested for a non-empty string, passed, and was followed by a publish that failed on auth policy — a green step implying the credential was good. It now runs
npm whoami, and says plainly that 2FA exemption is only provable by the publish itself rather than claiming the credential is fine.Still blocked downstream
The desktop-app migration off
@opencode-ai/sdkcannot land until@redrob-code/sdkexists on the registry — pointing 31 references at a package that 404s breaks its install.