Skip to content

fix(session): a sign-in goes on when the keyring does not answer; cli-core 0.714.0 - #984

Merged
leemour merged 4 commits into
mainfrom
fix/parity-core-0707
Nov 19, 2026
Merged

leemour merged 4 commits into
mainfrom
fix/parity-core-0707

Conversation

@leemour

@leemour leemour commented Nov 19, 2026 •

Copy link
Copy Markdown
Member

Task

max-cli fails cli-core's release parity at 0.707.0 (run 44463906253) and sits on cli-core's known-broken.json. Make it pass, so it can come off the list.

Why

Two tests failed:

  1. adopt.test.ts — falls back to the private file when the keyring fails. cli-base ci: run the full tests on each merge to main #605 (0.108.0) makes Credentials#read throw keyring.unreachable when the keyring does not answer and the file has no entry; before, it answered "no token". adoptToken reads the old token before the sign-in, so on a machine without a working keyring the sign-in failed before it could fall back to the file. A real regression for users once max moves to cli-base ≥ 0.108, not only a stale test. setup reads the token the same way before it signs in.
  2. commands.test.ts — the remote-write list. cli-core #3139 (0.706.0) adds messages scheduled cancel|edit|send. MAX has no adapter methods for them, so they refuse at run time; the list now names them.

What

  • SessionStore.tokenBeforeSignIn() reads keyring.unreachable as no token, as cli-core does for its own sign-ins (src/oauth/storage.ts, src/cli/profile-token.ts). adoptToken and setup use it. Every other read (session end, account remove, the server) still reports the unreachable keyring with its fix. A new test checks both sides.
  • A background run (max serve, a timer) that finds the keyring not answering still gets the retryable provider_unavailable / credentials.unreachable it got before; the newer cli-base would have turned it into a configuration_error. A command run reports cli-base's keyring.unreachable with its fix. Tested in src/client.test.ts.
  • After a sign-in, a keyring that stops answering no longer leaves the new token unsaved: adoptToken saves it when it cannot read one back.
  • Not changed: session end and account remove stop with keyring.unreachable when the keyring does not answer, since they cannot read the token to end the session.
  • cli-core 0.714.0 (was 0.681.0), cli-base 0.125.0 (was 0.106.0); generated files and contracts regenerated. 0.714.0 carries cli-core#3146's parity.json rows for the scheduled-message commands, so parity:check passes; 0.707.0 did not have them.
  • scripts/smoke.ts: with no keyring, session end now reports keyring.unreachable instead of "there was no session", because the keyring may still hold the sign-in. The smoke used session end as the command that succeeds offline; it now records doctor, and checks that session end names the keyring.
  • The test matrix gives the three scheduled-message commands a reason: MAX cannot carry them out, and cli-core's messages-scheduled.test.ts drives the shared command. They sit in a new scripts/test-matrix-shared-0706.ts because test-matrix-untested.ts is at biome's line limit.
  • Help contract snapshot lists amo, ydisk, wordpress and linear.
  • Changelog fragment (in Russian, as the changelog) under «Изменено — может сломать скрипты». No release: the next regular one carries it.

Testing

Locally on this branch: pnpm typecheck, pnpm generate, pnpm docs:check, pnpm lint, pnpm lint:commands, pnpm test (144 files, 1642 tests pass), pnpm smoke:node, pnpm smoke:bun, contracts:check, the upgrade and legacy-store contracts, parity:check, generate:check, the test matrix. The keyring tests use brokenKeyring() and memoryKeyring().

🤖 Generated with Claude Code

leemour added a commit to WireCatLabs/cli-core that referenced this pull request Nov 19, 2026
…scheduled cancel|edit|send (#3146)

## Task

`scripts/parity/known-broken.json` should list only CLIs that are really
broken, each with a reason. The 0.707.0 release run
([44463906253](https://github.com/WireCatLabs/cli-core/actions/runs/44463906253))
shows most of the list passes.

## What changes

| CLI | Before | Now | Evidence |
| --- | --- | --- | --- |
| mail-cli, cli-memo, tg-cli, gcal-cli (both entries), bitrix24-cli |
listed (#2896, #2903) | removed | the run's "passes; remove it" warnings
|
| cli-template | listed (#2896) | removed | its tests pass in the run's
`template` job |
| max-cli | listed (#2896) | **stays until 2026-11-21**, re-pointed to
this PR | fixed in WireCatLabs/max-cli#984, but max's own CI runs the
parity manifest check against cli-core on npm, so #984 merges only after
a release carries the rows below. Until then a release builds max's
main, which still fails |
| drive-cli | listed (#2896) | removed | fixed in
WireCatLabs/drive-cli#384 |
| zoom-cli | listed (#2896) | removed | fixed in
WireCatLabs/zoom-cli#389 |
| whatsapp-cli | listed (#2896) | **stays**, re-pointed to #3139 with a
reason | its `messenger.test.ts` fails: #3139 added `cancelScheduled`,
`editScheduled`, `sendScheduled` to `COMMAND_NEEDS`, and
`WHATSAPP.lacks` does not name them yet |

An entry now has a `reason` field; the scripts read only `repo` and
`until`, so nothing else changes. The error message asks for the reason
too.

## A gap this uncovered: `parity.json` rows

#3139 added `messages scheduled cancel|edit|send` without `parity.json`
rows. The manifest check (`main (max)`, `main (tg)`) failed in the
release run, but `continue-on-error` hid it because both CLIs were
listed. Removing them without the rows would make the release gate fail.
The rows say: in max and tg, not in wa ("WhatsApp has no scheduled
messages"); `--html` on edit in tg only, as on `messages edit`.
`docs/dev/STANDARD.md` re-rendered.

## Testing

- The parity check against the release run's own `commands.json`
artifacts: `tg`, `max`, `wa` and `wording` pass with the new rows; `tg`
and `max` failed before them.
- `pnpm vitest run src/parity` (53 tests), `pnpm docs:check`.
- This branch is named like the CLI pull requests, so this PR's parity
builds max-cli, drive-cli and zoom-cli from their fix branches
(`app-ref.sh`). A PR's parity runs no CLI tests; those ran locally in
each CLI and run at the next release.

Merge freely: max-cli stays listed, and zoom-cli and drive-cli merge on
their own green CI. The release after this one should run with
`--app-ref fix/parity-core-0707` so parity builds max-cli from its fix
branch.

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

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
leemour and others added 4 commits November 19, 2026 22:45
…-core 0.707.0

cli-base 0.108.0 (#605) throws keyring.unreachable from Credentials#read instead of answering
"no token". adoptToken and setup read the old token before a sign-in, so on a machine without a
working keyring the sign-in now failed before it could fall back to the private file.
SessionStore.tokenBeforeSignIn reads that case as no token, as cli-core does for its own
sign-ins; every other read still reports the unreachable keyring.

cli-core 0.706.0 (#3139) adds messages scheduled cancel|edit|send, which MAX refuses for now;
the remote-write list in commands.test.ts names them.

cli-core 0.707.0 (was 0.681.0) and cli-base 0.124.0 (was 0.106.0); generated files regenerated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…does not answer

With cli-base 0.124.0, `session end` on a machine with no keyring reports keyring.unreachable
instead of "there was no session": the keyring may still hold the sign-in. The smoke used it as
the command that succeeds offline, so it now records `doctor`, and checks that session end names
the keyring. The help contract snapshot lists amo and ydisk from cli-core 0.707.0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…h cli-core's test as the reason

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ows for messages scheduled

cli-core 0.714.0 carries cli-core#3146's parity.json rows for messages scheduled cancel|edit|send,
so parity:check passes. The help contract snapshot lists wordpress and linear.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@leemour
leemour force-pushed the fix/parity-core-0707 branch from 78cfff5 to 9603850 Compare November 19, 2026 21:45
@leemour leemour changed the title fix(session): a sign-in goes on when the keyring does not answer; cli-core 0.707.0 fix(session): a sign-in goes on when the keyring does not answer; cli-core 0.714.0 Nov 19, 2026
@leemour
leemour merged commit f312fb2 into main Nov 19, 2026
14 checks passed
@leemour
leemour deleted the fix/parity-core-0707 branch November 19, 2026 22:06
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