Skip to content

fix(cli): the api group tells Basic by its scheme, so a newer cli-base cannot change who signs - #3104

Merged
leemour merged 1 commit into
mainfrom
fix/basic-auth-of
Nov 17, 2026
Merged

leemour merged 1 commit into
mainfrom
fix/basic-auth-of

Conversation

@leemour

@leemour leemour commented Nov 17, 2026

Copy link
Copy Markdown
Member

Why

cli-base #643 (merged; it goes out in the next cli-base releases) makes signInPlace sign HTTP Basic. cli-core's authOf told Basic apart by signInPlace answering undefined. So a CLI that bumps cli-base while it stays on today's cli-core would:

  • sign a call that offers Basic and a token with Basic, not with the token;
  • send a token without a user name in base64, instead of refusing it with "run session start --login ".

The next cli-core release must carry this fix before any CLI pins the new cli-base.

What

  • authOf decides "Basic" by the scheme's type, not by what signInPlace returns. It keeps its own Basic place with the colon check. Both rules now hold with the old and the new cli-base, and the code compiles against both.
  • A fragment in changes/fix-basic-auth-of.md.

Testing

  • New src/cli/service-api-basic.test.ts mocks a cli-base that signs Basic. It checks that the token scheme still goes first, that a token without : is refused, and that user:password is signed as Basic. On main it fails: Basic is sent instead of Bearer.
  • The existing Basic tests in profile-site.test.ts pass.
  • Locally: typecheck, lint and docs:check pass. The full suite is running locally and will be confirmed before the merge.

🤖 Generated with Claude Code

…e cannot change who signs

cli-base #643 makes signInPlace sign Basic. authOf told Basic apart by signInPlace answering undefined, so with that
cli-base a call offering Basic and a token was signed with Basic, and a token without a user name went out in base64
instead of being refused with "run session start --login <name>".

authOf now decides by the scheme's type and keeps its own Basic place with the colon check, so both rules hold with
either cli-base. A test mocks a cli-base that signs Basic; it fails on main (Basic instead of Bearer) and passes here.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@leemour
leemour merged commit 06ecf87 into main Nov 17, 2026
43 checks passed
@leemour
leemour deleted the fix/basic-auth-of branch November 17, 2026 23:38
leemour added a commit that referenced this pull request Nov 18, 2026
…in (#3106)

## Task

The single cli-core release (carrying #3102, #3103, #3104) pins cli-base
0.117.0, which has #642, #643 (Basic sign-in, which #3104 handles) and
#644 (the tracker nouns that let a tracker CLI pass `cli-dev lint`).

## What

cli-base 0.117.0, the peer floor raised to it, STANDARD.md regenerated.

## Testing

typecheck, docs:check, `src/tracker src/cli/service-api src/manifest`
locally; the rest in CI (the disk is nearly full).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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