Repository navigation
fix: live smoke suite, dependency update and the bugs it found - #14
Merged
Merged
Conversation
Biome 2.6.0 and 2.6.1 shipped without platform binaries, so the lint script can't start with them. Pin 2.5.15 until a fixed 2.6 release is out, migrate the config and apply the new useOptionalChain and organizeImports fixes. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
citty 0.2 treats positionals as required by default, so every 'tg sql --query' call failed with 'Missing required positional argument: COMMAND'. Mark the subcommand positional optional and add e2e tests that go through the real argument parser. Drop the -q alias: the root command always read it as --quiet, so 'tg sql -q ...' printed nothing. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The cached path read the first 1000 users by name and only then kept the contacts, so accounts with more cached users lost contacts and reported a wrong total. Query contacts directly. Co-Authored-By: Claude Opus 5.5 <[email protected]>
'tg send --to me' was resolved as a username and failed with USERNAME_INVALID. Co-Authored-By: Claude Opus 5.5 <[email protected]>
'tg daemon stop' wrote 'Stopping daemon (PID ...)' to stdout before the JSON result, so agents couldn't parse it. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The live update handler never passed the raw message, so every message
the daemon received in real time was cached with raw_json '{}'. Pass
msg.raw and serialize it with the same BigInt-safe replacer as the
sync worker.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Daemon clients had no flood-waiter middleware beyond mtcute's 10s default, so the dialog bootstrap stopped at the first FLOOD_WAIT on messages.getDialogs and large accounts got a partial chat list. Give connect and reconnect one client factory that waits up to 5 minutes and logs each wait, keeping mtcute's internal-errors handler. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Four tests run the CLI against the real API: auth and profile cache, chats and contacts cache, send to Saved Messages read back through tg api, and the daemon from start through bootstrap and history sync to a clean stop. Messages go only to Saved Messages and are deleted. The old suite called 'tg user me', which never existed, and sent to an optional external recipient. AGENTS.md also had the data dir layout wrong. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
This was referenced Oct 21, 2026
Co-Authored-By: Claude Opus 5.5 <[email protected]>
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.
A health check of
tgagainst a real account. Offline tests were green, but the live run found several bugs in core commands. This PR fixes the small ones and turns the integration suite into a live smoke suite.Dependencies
lintcan't start with them. The config is migrated, and the newuseOptionalChainandorganizeImportsfixes are applied.Fixes
tg sql --query "…"failed with "Missing required positional argument" (citty 0.2 makes positionals required by default). The-qalias is removed, because the root command always read it as--quiet.FLOOD_WAITonmessages.getDialogs, so large accounts got a partial chat list. Daemon clients now wait out flood waits of up to 5 minutes and log each wait. On a test account with about 2,900 dialogs, the bootstrap now completes in 36 s, including one 17 s wait.tg contacts listfrom the cache read only the first 1000 users. On a real account it showed 436 contacts out of 1060.raw_json = '{}'.tg daemon stopprinted a progress line to stdout before the JSON.tg send --to me(orself) now sends to Saved Messages. Before, it failed withUSERNAME_INVALID.Live smoke suite (
bun run test:integration)Four tests run the CLI the way a user would:
tg api messages.getMessagestg statusand a cleantg daemon stopMessages go only to Saved Messages and are deleted after each test. The suite stays opt-in and never runs in CI. The old suite called
tg user me, which doesn't exist, so it could never pass.Testing
bun run check,bun run test(1119),bun run test:e2e(100) andbun run buildpass. New regression tests covertg sql, contacts behind 1000 cached users,--to me,raw_jsonand the daemon flood waiter.bun run test:integrationpassed 4/4 in 56 s against a real account.The larger problems found during the check go to separate issues.
🤖 Generated with Claude Code