Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
410 commits
Select commit Hold shift + click to select a range
d1ad6ba
refactor(recovery): keep transaction abort and withdrawal boundaries …
astrovm Nov 29, 2026
2b2215c
test(evm): verify bounded transports and receipt failure handling
astrovm Nov 29, 2026
f11304f
test(format): pin exponent padding and document equivalent fallback
astrovm Nov 29, 2026
3d5c57d
fix(games): keep live targets and discard expired player events
astrovm Nov 29, 2026
7c7f64d
test(games): cover live and persisted notification target precedence
astrovm Nov 29, 2026
afa5388
test(fees): pin the SOL reserve and disabled sweep boundaries
astrovm Nov 29, 2026
788c9a0
test(evm): pin transaction and provider boundary behavior
astrovm Nov 29, 2026
80699ac
test(evm): pin game card refresh and retry delays
astrovm Nov 29, 2026
1231728
test(finance): keep exact referral balances and account routing
astrovm Nov 29, 2026
299fe4c
fix(settings): bind join-rate input to the delivered prompt
astrovm Nov 29, 2026
e7565a9
test(games): check timeout button bounds and snap ties
astrovm Nov 29, 2026
1bb5e38
fix(games): avoid infinite stake suggestions from price rounding
astrovm Nov 29, 2026
e88428d
fix(wallet): avoid replacing transactions with unknown outcomes
astrovm Nov 29, 2026
ee4f783
fix(wallet): check transaction history when the final RPC times out
astrovm Nov 29, 2026
e206928
test(wallet): cover partial parsed mint responses and precision limits
astrovm Nov 29, 2026
6803583
fix(tokens): convert fiat with the full quoted price before rounding
astrovm Nov 29, 2026
ff5c6c8
fix(tokens): respect explicit tokens over the native SOL default
astrovm Nov 29, 2026
67285a8
test(wallet): bound fixtures for nonretryable RPC status errors
astrovm Nov 29, 2026
29eedb8
test(tokens): keep configured game mints distinct from chat defaults
astrovm Nov 29, 2026
d258798
refactor(tokens): recognize the exact ASCII native SOL ticker
astrovm Nov 29, 2026
d6b0c6c
test(tokens): document equivalent chat-mint branch mutations
astrovm Nov 29, 2026
3ab4331
test(wallet): keep the original signature through provider timeout re…
astrovm Nov 29, 2026
a981574
fix(format): preserve the invalid-scale diagnostic from main
astrovm Nov 29, 2026
c7299da
fix(wallet): preserve malformed provider errors during recovery
astrovm Nov 29, 2026
0d7e42e
test(wallet): preserve funded balances across partial ATA batches
astrovm Nov 29, 2026
9068795
test(tokens): pin the metadata address and fallback diagnostics
astrovm Nov 29, 2026
d8b7859
test(wallet): cover pending history after a plain timeout error
astrovm Nov 29, 2026
2db1ad5
test(rpc): pin fallback diagnostics and provider code prefixes
astrovm Nov 29, 2026
95a236c
refactor(rpc): detect non-slash endpoint path data directly
astrovm Nov 29, 2026
d493d58
test(rpc): stop fallback reads at the exact provider deadline
astrovm Nov 29, 2026
cd0a207
test(history): preserve exact optional amounts and page boundaries
astrovm Nov 29, 2026
2eb0d92
fix(rpc): preserve malformed provider failures without repeating writes
astrovm Nov 29, 2026
d4c55df
fix(finance): keep exact confirmed fees from the Solana client
astrovm Nov 29, 2026
6305700
test(telegram): verify rate-limit error shape and fallback delay
astrovm Nov 29, 2026
0e71397
refactor(telegram): test retry hints with one finite-number check
astrovm Nov 29, 2026
c58279e
test(alerts): pin the preview and failed delivery diagnostics
astrovm Nov 29, 2026
b04808f
test(bot): bound listener retries and invalid history traversal
astrovm Nov 29, 2026
2b0b7e3
test(game): distinguish confirmed completion events from other logs
astrovm Nov 29, 2026
ea1f2a0
test(game): skip winner announcements for cancelled results
astrovm Nov 29, 2026
0e51646
test(game): verify winner prize precedence and zero boundaries
astrovm Nov 29, 2026
48a35cb
test(bot): keep join and refresh callbacks in the game queue
astrovm Nov 29, 2026
40d7ec6
test(swap): verify SOL price aliases and exact referral fees
astrovm Nov 29, 2026
c169a85
test(game): verify orphan cleanup at the oracle and ticket boundaries
astrovm Nov 29, 2026
134657d
test(game): keep manager dependencies current across restarts
astrovm Nov 29, 2026
9ea6525
test(game): verify fallback card recovery after an unavailable account
astrovm Nov 29, 2026
3224623
test(game): preserve public cards with unknown expiry timing
astrovm Nov 29, 2026
4e8bdc0
test(evm): reject malformed invitation IDs at the command boundary
astrovm Nov 30, 2026
a9cb5d2
test(evm): preserve a single withdrawal unit without signing
astrovm Nov 30, 2026
9eab990
test(evm): pin exact game card amounts and explorer links
astrovm Nov 30, 2026
f816dc9
test(evm): route withdrawals to the correct configured network
astrovm Nov 30, 2026
be32b11
test(wallet): render callback media for matching bot authors
astrovm Nov 30, 2026
0cd80fb
test(wallet): bound game recovery after repeated confirmation errors
astrovm Nov 30, 2026
8a3c247
test(wallet): refresh each media shape in the original message
astrovm Nov 30, 2026
12d162d
test(wallet): ignore malformed refresh receipts without extra sends
astrovm Nov 30, 2026
7652468
refactor(tokens): use decoded metadata text directly
astrovm Nov 30, 2026
6e041c4
test(wallet): pin exact wrap controls and custom amount examples
astrovm Nov 30, 2026
86e3b15
test(finance): keep the highest fee and count unique swaps
astrovm Nov 30, 2026
588ee0f
test(format): keep the leading zero when rounding below one unit
astrovm Nov 30, 2026
39df08a
test(finance): pin signed report text and period buttons
astrovm Nov 30, 2026
4fcfba2
test(finance): check sponsor estimates and report access guards
astrovm Nov 30, 2026
47c4e1d
test(finance): cover missing balance sides and exact claimable units
astrovm Nov 30, 2026
9fee7c0
test(finance): pin empty backfill pages and zero-delay reads
astrovm Nov 30, 2026
d4360b0
test(db): verify exact and missing creation audit records
astrovm Nov 30, 2026
e4febd0
refactor(db): use the SQL default for missing leaderboard mints
astrovm Nov 30, 2026
0d475bd
test(db): enforce submission lease expiry and owner renewal
astrovm Nov 30, 2026
8b43f49
fix(db): type the stored player display name
astrovm Nov 30, 2026
dc51503
test(db): pin game delivery and expiration page boundaries
astrovm Nov 30, 2026
78ac91b
test(db): report cleanup counts only when rows change
astrovm Nov 30, 2026
cd1d26d
test(finance): record only outgoing referral claims at exact times
astrovm Nov 30, 2026
18bdc59
test(finance): cover default Oracle and legacy fee branches
astrovm Nov 30, 2026
d167f5c
test(finance): reject unusable SOL quotes before swaps
astrovm Nov 30, 2026
38d4612
fix(finance): validate referral quotes and mint precision
astrovm Nov 30, 2026
5e1b9d9
test(wallet): keep exact refresh amounts and error policy
astrovm Nov 30, 2026
5745ee2
test(wallet): report retries and invalid chain time exactly
astrovm Nov 30, 2026
38bea90
test(wallet): expire local mint metadata at the exact TTL
astrovm Nov 30, 2026
3be51c6
test(wallet): pin recovered status timing and retry count
astrovm Nov 30, 2026
abaa8f3
test(recovery): run production backoff on bounded timers
astrovm Nov 30, 2026
d3b65c8
test(tokens): pin positional numeric amount arguments
astrovm Nov 30, 2026
2538e20
test(tokens): keep exact wrapped SOL and precision fallback
astrovm Nov 30, 2026
f692a0c
test(wallet): retain safe wrap errors and operator detail
astrovm Nov 30, 2026
6efcb34
test(recovery): ignore pending creation rows cleared by another worker
astrovm Nov 30, 2026
031755a
test(game): restore old controls when rollback is already complete
astrovm Nov 30, 2026
8860997
test(game): scope inline username hints to the sender chat
astrovm Nov 30, 2026
d276c12
test(settings): verify token reset aliases and privacy defaults
astrovm Nov 30, 2026
867bde3
test(history): retain pending transactions until final status
astrovm Nov 30, 2026
68b87b2
test(commands): pin creation receipts and rate-limit notices
astrovm Nov 30, 2026
fad1dd2
test(commands): keep only durable recovery acknowledgements
astrovm Nov 30, 2026
01cb632
test(alerts): check pool discovery and queued replacement
astrovm Nov 30, 2026
639f456
test(alerts): isolate equivalent empty discovery mutations
astrovm Nov 30, 2026
15cb6b6
test(format): preserve compact scientific mantissa digits
astrovm Nov 30, 2026
575d460
test(evm): name each invalid withdrawal fixture
astrovm Nov 30, 2026
d3be920
test(evm): pin whole config fields and RPC order
astrovm Nov 30, 2026
7d0a1bc
test(evm): pin safe wallet identity boundaries
astrovm Nov 30, 2026
4438bf7
test(evm): accept complete multi-digit setup callbacks
astrovm Nov 30, 2026
c62e752
test(evm): keep a confirmed join finished with a stale close flag
astrovm Nov 30, 2026
ae73e63
test(evm): isolate setup buttons and update replays
astrovm Nov 30, 2026
174dd64
test(evm): isolate equivalent encoding and wallet path literals
astrovm Nov 30, 2026
a62d626
test(evm): pin exact stake presets and force reply
astrovm Nov 30, 2026
9b66052
test(evm): pin USD and game action boundaries
astrovm Nov 30, 2026
75cd2f4
test(wallet): bound exact retry and confirmation fixtures
astrovm Nov 30, 2026
2ca368a
fix(wallet): retain bigint confirmation counts in logs
astrovm Nov 30, 2026
6c42d9f
test(evm): verify refresh and notification boundaries
astrovm Nov 30, 2026
b0e2bbe
test(evm): check setup edit errors and inert controls
astrovm Nov 30, 2026
9cda1a4
test(keyboards): pin smallest stake tiers and amount rows
astrovm Nov 30, 2026
30c9079
refactor(keyboards): specialize stake rounding at six decimals
astrovm Nov 30, 2026
47474e8
test(faucet): check the exact collector display boundary
astrovm Nov 30, 2026
7d6fbc1
test(settings): verify token routes in the live default menu
astrovm Nov 30, 2026
05b5a2a
test(telegram): pin standalone diagnostics and friendly text
astrovm Nov 30, 2026
8da9f13
refactor(telegram): simplify equivalent diagnostic checks
astrovm Nov 30, 2026
85bfb59
fix(faucet): avoid duplicate in-flight payout notices
astrovm Nov 30, 2026
ed43eaf
test(faucet): keep unrelated payout notices deliverable
astrovm Nov 30, 2026
a7da970
refactor(wallet): preserve example section spacing
astrovm Nov 30, 2026
e155296
test(swap): require native mints for wrap quotes
astrovm Nov 30, 2026
503b772
test(swap): pin exact sponsored route requirements
astrovm Nov 30, 2026
127d5a3
test(evm): pin giveaway and coinflip player floors
astrovm Nov 30, 2026
5d10dad
test(evm): isolate four equivalent setup literals
astrovm Nov 30, 2026
1cdb9ba
test(wallet): pin history confirmation diagnostics
astrovm Nov 30, 2026
63512ec
fix(ci): read complete mutation diffs
astrovm Nov 30, 2026
35b4e5d
test(evm): cover setup balance retry and invalid giveaways
astrovm Nov 30, 2026
a61ddbc
test(swap): check which routes can retry without referral
astrovm Nov 30, 2026
4696b1c
test(database): check recovery lease and cleanup boundaries
astrovm Nov 30, 2026
c0d5067
test(wallet): cover transaction menu and prompt failures
astrovm Nov 30, 2026
c7752be
test(cache): bound timer cancellation to live handles
astrovm Nov 30, 2026
1a2f9ca
test(game): pin the production player poll interval
astrovm Nov 30, 2026
f9aa2fd
fix(ci): preserve mutation reports for both PR scopes
astrovm Nov 30, 2026
8220e9f
test(game): check definitive errors and the one-second boundary
astrovm Nov 30, 2026
bec1a24
test(game): isolate the production polling module from Stryker cache
astrovm Nov 30, 2026
d4afcfa
test(game): check orphaned giveaway expiry and grace limits
astrovm Nov 30, 2026
c497603
test(callbacks): reject partial settings and malformed amounts
astrovm Nov 30, 2026
e8a6d41
test(evm): keep unknown tokens out of the USD route
astrovm Nov 30, 2026
8eb2cf4
test(evm): verify restored setup controls and screen state
astrovm Nov 30, 2026
7c9c4c3
refactor(evm): remove unreachable direct amount fallbacks
astrovm Nov 30, 2026
8bc6d8e
test(database): check repeat message migration and diagnostics
astrovm Nov 30, 2026
ad6f90e
test(lightning): cover zero quotes and paid deposit cards
astrovm Nov 30, 2026
f61fc33
refactor(lightning): bound deposit prompt cleanup
astrovm Nov 30, 2026
ea92703
refactor(mentions): bound both directions of UTF-16 scans
astrovm Nov 30, 2026
dc77346
test(game): bound the cyclic diagnostics fixture
astrovm Nov 30, 2026
8055c75
refactor(wallet): record first status inside its poll branch
astrovm Nov 30, 2026
5d5fd87
test(wallet): distinguish late confirmation from unknown status
astrovm Nov 30, 2026
707499a
test(database): isolate two equivalent count variants
astrovm Nov 30, 2026
f22ee6a
test(database): pin the failing schema operation
astrovm Nov 30, 2026
dcf6949
test(media): bound deferred edits and retry checks
astrovm Nov 30, 2026
20b2c14
test(game): check card layout, stats fallbacks, and card recovery calls
astrovm Nov 30, 2026
30ff9d2
test(game): check creation timing fallbacks and pre-confirmation errors
astrovm Nov 30, 2026
3c31f9e
test(mutants): ignore mutants inside debug trace calls
astrovm Nov 30, 2026
0d0ee18
test(game): check unjoin key choice, fee checks, and creator fallback
astrovm Nov 30, 2026
1dd9aac
test(game): check completion state reads, recovery schedule, and user…
astrovm Nov 30, 2026
9234157
test(mutants): ignore text literals in console log arguments
astrovm Nov 30, 2026
e2b7cf8
test(game): check expired giveaway timing and coinflip creator lookup
astrovm Nov 30, 2026
82a7313
test(game): check each confirmed game setting before hydration
astrovm Nov 30, 2026
46b606a
test(game): check player key analysis and complete cleanup
astrovm Nov 30, 2026
db63458
test(game): check join attempts, resends, and the completion request
astrovm Nov 30, 2026
fe5924d
test(game): check batch account reads and active game list defaults
astrovm Nov 30, 2026
0233c4e
test(game): check Telegram name lookups and the creator name fallback
astrovm Nov 30, 2026
540fc34
test(game): check the game creation request lookup
astrovm Nov 30, 2026
729b073
test(game): check games header amounts, net sign, and win rate
astrovm Nov 30, 2026
96ed686
test(game): check private join attempts, history quotes, and zero sta…
astrovm Nov 30, 2026
17f754d
fix(media): surface a 429 whose delay is too large to represent
astrovm Nov 30, 2026
2a38b4f
fix(game): replace disables that hid killable mutants
astrovm Nov 30, 2026
92ac26c
fix(ci): check debug trace arguments and watch the ignorers in the mu…
astrovm Nov 30, 2026
344d5f0
fix(capital): reject an RPC account list whose length does not match …
astrovm Nov 30, 2026
83cd859
test: check non-finite alert sizes without a minimum and the 16-digit…
astrovm Nov 30, 2026
e6a9b58
test(lightning): check stale quote cancel per state and settlement ed…
astrovm Nov 30, 2026
7705c59
test(wallet): check the stale fallback cache and its generation guard
astrovm Nov 30, 2026
0768139
test(fees): check SOL value limits, missing quotes, and referral clai…
astrovm Nov 30, 2026
58c60a6
fix(positions): rebuild fills when a mint returns after a rebuild wit…
astrovm Nov 30, 2026
f5ba3f7
test(lightning): check custom amount reply locks and prompt sessions
astrovm Nov 30, 2026
704b4bd
refactor(amount): take token decimals from one trade parameter
astrovm Nov 30, 2026
3d79f30
test: report test guards that the code under test catches
astrovm Nov 30, 2026
c84c07c
refactor(game): read optional database and wallet methods without any…
astrovm Nov 30, 2026
09c94b0
refactor(jupiter): take the fallback token without a non-null assertion
astrovm Nov 30, 2026
2cf0139
test: build fakes with typed members instead of any casts
astrovm Nov 30, 2026
244d8b7
refactor(game-setup): share the setup balance and minimum lookup
astrovm Nov 30, 2026
81c7479
refactor(buy-alerts): drop the baseline pool maps from the trade poller
astrovm Nov 30, 2026
93e16fe
test(callback-data): check malformed deltas, amounts and long callbacks
astrovm Nov 30, 2026
83b8538
refactor(rpc): name failed methods with String and drop a repeated en…
astrovm Nov 30, 2026
e03ff37
test(wallet): check program hints, fee estimates and confirmation logs
astrovm Nov 30, 2026
140c95b
refactor(rate-limit): drop checks that retry parsing already makes
astrovm Nov 30, 2026
aa6cd33
test(prices): check the request method, API key, deadline cleanup and…
astrovm Nov 30, 2026
636d7d6
test(jupiter): check token search matching and a zero fee
astrovm Nov 30, 2026
0edeb39
style(tests): format two game message tests with Prettier
astrovm Nov 30, 2026
fb42acf
test(recovery): check the exact binary search probes and the slot lis…
astrovm Nov 30, 2026
22e9dfe
fix(jupiter): check the fee rate without a disable that hid killable …
astrovm Nov 30, 2026
babdd99
fix(game): keep a zero history quote out of the totals and name key r…
astrovm Nov 30, 2026
4392c15
fix(rate-limit): ignore a retry delay that is not a finite number again
astrovm Nov 30, 2026
38c67cc
test(lightning): check that a private click detaches the deposit card
astrovm Nov 30, 2026
82a4152
test(callback-data): refuse a negative count in an unsigned field
astrovm Nov 30, 2026
9b7aa37
fix(recovery): keep the slot list untyped so the build passes
astrovm Nov 30, 2026
5ea4ba7
test(game): give the new card tests typed Telegram fakes instead of any
astrovm Nov 30, 2026
0a005f0
test(swap): check the examples label in the custom token prompt
astrovm Nov 30, 2026
42351da
test(rate-limit): check that consume prunes expired buckets once per …
astrovm Nov 30, 2026
afecce9
refactor(game): keep the unjoin mint text conversion free of an equiv…
astrovm Nov 30, 2026
99c69cd
test(game): check the join recovery label and a quiet hydrate without…
astrovm Nov 30, 2026
ca9dcfb
test(game): exclude the equivalent empty-message default in the join …
astrovm Nov 30, 2026
2f29d22
refactor(telegram): drop equivalent parts of the outbound diagnostic …
astrovm Nov 30, 2026
8cdb6c2
test(fees): check that an unusable RPC fee scales the fallback base fee
astrovm Nov 30, 2026
1f89936
refactor(fees): drop the null check that the safe integer check alrea…
astrovm Nov 30, 2026
0968def
refactor(mentions): mark mention ranges without index loops
astrovm Nov 30, 2026
5f4fca9
test(game-db): check a first-ticket unjoin, a repeated completion and…
astrovm Nov 30, 2026
ed19213
refactor(game-db): drop the typeof check that Number.isFinite already…
astrovm Nov 30, 2026
f852ba5
test(challenges): check reply refusals for another picked user and ba…
astrovm Nov 30, 2026
6765cea
refactor(mentions): type that a name without a picked user has a user…
astrovm Nov 30, 2026
f2250ee
refactor(tokens): drop the dead chat default branch in the game token…
astrovm Nov 30, 2026
188bf1d
refactor(tokens): remove equivalent mutants in the native SOL and pri…
astrovm Nov 30, 2026
4401d6b
test(cache): check that fired and cleared timers are forgotten and th…
astrovm Nov 30, 2026
289d2b0
fix(errors): read each nested error field once when collecting logs
astrovm Nov 30, 2026
58f4920
test(errors): check that an Error's name does not pick the friendly r…
astrovm Nov 30, 2026
39ff932
test(context): check categorizeError with an empty message and a code…
astrovm Nov 30, 2026
40fab9f
refactor(prices): key the price cache by "" when a request has no mint
astrovm Nov 30, 2026
f155dce
refactor(telegram): drop two equivalent checks in getRetryAfterSeconds
astrovm Nov 30, 2026
fba0b08
test(retry): check which retry delays become safe deadlines
astrovm Nov 30, 2026
704fd03
test(tokens): rethrow a non-text RPC failure even when it prints as a…
astrovm Nov 30, 2026
effbcfb
refactor(tokens): narrow mint decimals with Number.isInteger alone
astrovm Nov 30, 2026
e5fd862
test(history): store a nonzero block height given at insert
astrovm Nov 30, 2026
a0d1ef9
test(concurrency): keep one result slot per item given
astrovm Nov 30, 2026
1b80244
test(menu): log why an explicit text edit failed
astrovm Nov 30, 2026
9ef71d3
refactor(wallet): drop dead row checks in the quick amount and keyboa…
astrovm Nov 30, 2026
dbbc222
test(user-state): check prompt order by write time and a late clear o…
astrovm Nov 30, 2026
acbc1e1
refactor(tokens): stop stripping null padding the metadata decoder al…
astrovm Nov 30, 2026
84bae4a
test: fix the types of the new timer and RPC failure fakes
astrovm Nov 30, 2026
de36f7a
refactor: keep failed key, mint and price reads in a variable instead…
astrovm Nov 30, 2026
0430a56
fix(swap): read the source balance by the resolved mint only
astrovm Nov 30, 2026
771b13b
refactor(bot): read metadata decimals without optional chaining
astrovm Nov 30, 2026
b89813c
test(bot): exclude the no-op lock release in the input finally blocks
astrovm Nov 30, 2026
732647d
test(bot): flush pending events for a game without a legacy record
astrovm Nov 30, 2026
dea6f28
test(bot): render after one timer when the debounce is the largest delay
astrovm Nov 30, 2026
87df8af
refactor(evm): build the player inference args with one filter
astrovm Nov 30, 2026
24eed28
refactor(evm): reject a non-integer player reply through the range check
astrovm Nov 30, 2026
581b19c
test(admin-status): cover probe error text, HTTP latency and a null body
astrovm Nov 30, 2026
1e00725
refactor(chat-defaults): let clampChatPlayers handle a null player count
astrovm Nov 30, 2026
0ed0f49
test(chat-defaults): check prompt sessions without a chat and input r…
astrovm Nov 30, 2026
13ffbd6
test(faucet): check the stored error of a claim with a bad balance
astrovm Nov 30, 2026
14cbdc7
test(game-callbacks): cover prompt targets, the cancel button and bac…
astrovm Nov 30, 2026
f263904
refactor(game-callbacks): store the setup snapshot again in the compa…
astrovm Nov 30, 2026
d883c18
test(game-callbacks): kill the typed player range mutants instead of …
astrovm Nov 30, 2026
1e371a0
test(game-callbacks): check the exact custom amount prompt payload
astrovm Nov 30, 2026
d84670f
test(wallet): cover token percentage sends and a repeated wrap prefix
astrovm Nov 30, 2026
d2a06d6
refactor(buy-alerts): return early for missing DexScreener pairs
astrovm Nov 30, 2026
de7646c
test(buy-alerts): kill the trade filter mutants instead of disabling …
astrovm Nov 30, 2026
5d14b2e
test(buy-alerts): cover poller backoff, unparsed trades and stop
astrovm Nov 30, 2026
9fb6edb
test(buy-alerts): exclude the null check on the minimum buy row
astrovm Nov 30, 2026
0ab700d
test(buy-alerts): cover a removed alert row and the exact lamport min…
astrovm Nov 30, 2026
b1d3d16
refactor(fee-sweeper): reject a missing price timestamp with one fini…
astrovm Nov 30, 2026
644aa71
test(fee-sweeper): check the claim log and kill the claimed-delta mutant
astrovm Nov 30, 2026
40576f2
refactor(finance-report): price a raw amount with one NaN-safe range …
astrovm Nov 30, 2026
ba557c5
test(lightning): exclude two equivalent FixedFloat mutants
astrovm Nov 30, 2026
aea0124
test(lightning): reject sats strings with trailing junk
astrovm Nov 30, 2026
dc8eb4d
refactor(positions): drop two null checks that no input can fail
astrovm Nov 30, 2026
296d372
test: check the positive integer clamp warning and build an unfresh p…
astrovm Nov 30, 2026
aeae002
refactor(tokens): drop the unused chat option of the game token check
astrovm Nov 30, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 3 additions & 1 deletion .github/workflows/mutants.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ on:
- src/**
- coverage-scope.json
- stryker.conf.mjs
- scripts/stryker-ignorers.mjs
- scripts/stryker-ignorers.test.ts
- scripts/mutants.ts
- scripts/mutants.test.ts
- scripts/mutants-post.sh
Expand Down Expand Up @@ -68,7 +70,7 @@ jobs:
run: bun run scripts/mutants.ts diff HEAD^1 --out build/mutants
- name: Try one part of everything
run: |
if git diff --quiet HEAD^1 -- stryker.conf.mjs scripts/mutants.ts .github/workflows/mutants.yml; then
if git diff --quiet HEAD^1 -- stryker.conf.mjs scripts/stryker-ignorers.mjs scripts/mutants.ts .github/workflows/mutants.yml; then
echo "The setup didn't change."
else
bun run scripts/mutants.ts part 0 64 --out build/mutants-part
Expand Down
78 changes: 77 additions & 1 deletion scripts/mutants.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
import { describe, expect, test } from "bun:test";
import { changedRanges, instrumentRanges, inScope, lived, partRanges } from "./mutants";
import { existsSync, mkdirSync, mkdtempSync, readFileSync, rmSync, writeFileSync } from "node:fs";
import { tmpdir } from "node:os";
import { join } from "node:path";
import {
changedRanges,
instrumentRanges,
inScope,
lived,
partRanges,
readGit,
writeMutationOutputs,
} from "./mutants";

const scope = {
roots: ["src"],
Expand All @@ -8,6 +19,33 @@ const scope = {
};

describe("mutants", () => {
test("keeps each complete report beside its own tally when a second scope is run", () => {
const dir = mkdtempSync(join(tmpdir(), "mutants-outputs-"));
try {
const changed = join(dir, "build", "mutants");
const trial = join(dir, "build", "mutants-part");
const changedReport = '{"files":{"src/changed.ts":{"mutants":[]}}}\n';
const trialReport = '{"files":{"src/trial.ts":{"mutants":[]}}}\n';

writeMutationOutputs(changed, ["changed fixture"], "3 of 4", changedReport);
writeMutationOutputs(trial, ["trial fixture"], "1 of 2", trialReport);

expect(readFileSync(join(changed, "mutation.json"), "utf8")).toBe(changedReport);
expect(readFileSync(join(changed, "lived.txt"), "utf8")).toBe("changed fixture\n");
expect(readFileSync(join(changed, "tally.txt"), "utf8")).toBe("3 of 4\n");
expect(readFileSync(join(trial, "mutation.json"), "utf8")).toBe(trialReport);
expect(readFileSync(join(trial, "lived.txt"), "utf8")).toBe("trial fixture\n");
expect(readFileSync(join(trial, "tally.txt"), "utf8")).toBe("1 of 2\n");

writeMutationOutputs(changed, [], "0 of 0", undefined);
expect(existsSync(join(changed, "mutation.json"))).toBe(false);
expect(readFileSync(join(changed, "tally.txt"), "utf8")).toBe("0 of 0\n");
expect(readFileSync(join(trial, "mutation.json"), "utf8")).toBe(trialReport);
} finally {
rmSync(dir, { recursive: true, force: true });
}
});

test("only source the coverage gate counts is mutated", () => {
expect(inScope("src/bot.ts", scope)).toBe(true);
expect(inScope("src/utils/amount.ts", scope)).toBe(true);
Expand Down Expand Up @@ -47,6 +85,44 @@ describe("mutants", () => {
]);
});

test("reads the last source hunk after more than one MiB of Git output", () => {
const repo = mkdtempSync(join(tmpdir(), "mutants-git-"));
const git = (...args: string[]) => readGit(args, repo);
const commit = (message: string) =>
git(
"-c",
"user.name=test",
"-c",
"user.email=test@example.invalid",
"commit",
"-qm",
message,
);
try {
git("init", "-q");
mkdirSync(join(repo, "src"));
const source = join(repo, "src", "last.ts");
writeFileSync(source, "export const value = 1;\n");
git("add", ".");
commit("baseline");

writeFileSync(join(repo, "bulk-fixture.txt"), `${"test fixture\n".repeat(160_000)}é\n`);
writeFileSync(source, "export const value = 2;\n");
git("add", ".");
commit("large diff");

const diff = git("diff", "-U0", "--no-color", "HEAD^", "HEAD");
expect(Buffer.byteLength(diff, "utf8")).toBeGreaterThan(1_048_576);
expect(diff).toContain("+é\n");
expect(changedRanges(diff).filter(({ file }) => inScope(file, scope))).toEqual([
{ file: "src/last.ts", from: 1, to: 1 },
]);
expect(() => git("rev-parse", "--verify", "missing-fixture-ref")).toThrow("fatal:");
} finally {
rmSync(repo, { recursive: true, force: true });
}
});

test("parts cover every line once, as equal as whole lines allow", () => {
const files = [
{ file: "src/a.ts", lines: 5 },
Expand Down
49 changes: 34 additions & 15 deletions scripts/mutants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
* bun run scripts/mutants.ts diff HEAD^1 --out build/mutants
*
* Only what coverage-scope.json counts as source is changed. Lists what lived by file and line;
* --out also writes it to lived.txt and the tally ("3 of 10") to tally.txt there. Exits 0 once
* it got to its tally, whatever lived; only a broken run fails. Stryker's full report is in
* reports/mutation/.
* --out also saves lived.txt, tally.txt ("3 of 10"), and the full mutation.json there. Exits 0
* once it got to its tally, whatever lived; only a broken run fails. The latest Stryker report
* is also in reports/mutation/.
*/
import { spawnSync } from "node:child_process";
import {
Expand Down Expand Up @@ -171,10 +171,16 @@ export function lived(
return { rows: left.map(([, , row]) => row), total };
}

function git(...args: string[]): string {
const result = spawnSync("git", args, { cwd: ROOT, encoding: "utf8" });
if (result.status !== 0) throw new Error(`git ${args.join(" ")}: ${result.stderr}`);
return result.stdout;
export function readGit(args: string[], cwd = ROOT): string {
// Git diffs can exceed the default buffer of node:child_process.spawnSync.
const result = Bun.spawnSync(["git", ...args], { cwd, stdout: "pipe", stderr: "pipe" });
const decode = new TextDecoder("utf-8", { ignoreBOM: true });
if (!result.success) {
throw new Error(
`git ${args.join(" ")} (exit ${result.exitCode}): ${decode.decode(result.stderr)}`,
);
}
return decode.decode(result.stdout);
}

function sourceFiles(scope: Scope): { file: string; lines: number }[] {
Expand All @@ -193,14 +199,29 @@ function sourceFiles(scope: Scope): { file: string; lines: number }[] {
}));
}

export function writeMutationOutputs(
out: string,
rows: string[],
tally: string,
report: string | undefined,
): void {
mkdirSync(out, { recursive: true });
writeFileSync(join(out, "lived.txt"), rows.map((row) => `${row}\n`).join(""));
writeFileSync(join(out, "tally.txt"), `${tally}\n`);
// The setup trial reuses Stryker's default path. Keep each run beside its own tally.
const outputReport = join(out, "mutation.json");
if (report === undefined) rmSync(outputReport, { force: true });
else writeFileSync(outputReport, report);
}

function main(argv: string[]): number {
const usage = "Usage: bun run scripts/mutants.ts diff BASE | part K N [--out DIR]";
const out = argv.includes("--out") ? argv[argv.indexOf("--out") + 1] : undefined;
const scope: Scope = JSON.parse(readFileSync(join(ROOT, "coverage-scope.json"), "utf8"));
let ranges: Range[];
if (argv[0] === "diff" && argv[1]) {
const since = git("merge-base", argv[1], "HEAD").trim();
ranges = changedRanges(git("diff", "-U0", "--no-color", since, "HEAD")).filter((range) =>
const since = readGit(["merge-base", argv[1], "HEAD"]).trim();
ranges = changedRanges(readGit(["diff", "-U0", "--no-color", since, "HEAD"])).filter((range) =>
inScope(range.file, scope),
);
} else if (argv[0] === "part" && argv[1] && argv[2]) {
Expand All @@ -211,6 +232,7 @@ function main(argv: string[]): number {
}
let rows: string[] = [];
let total = 0;
let report: string | undefined;
if (ranges.length === 0) {
console.log("No source lines to mutate.");
} else {
Expand All @@ -229,16 +251,13 @@ function main(argv: string[]): number {
console.error(`Stryker stopped (exit ${run.status ?? run.signal}) before its report.`);
return 1;
}
({ rows, total } = lived(JSON.parse(readFileSync(REPORT, "utf8")), ranges));
report = readFileSync(REPORT, "utf8");
({ rows, total } = lived(JSON.parse(report), ranges));
}
rows.forEach((row) => console.log(row));
const tally = `${total - rows.length} of ${total}`;
console.log(`${tally} changes caught by a test.`);
if (out) {
mkdirSync(out, { recursive: true });
writeFileSync(join(out, "lived.txt"), rows.map((row) => `${row}\n`).join(""));
writeFileSync(join(out, "tally.txt"), `${tally}\n`);
}
if (out) writeMutationOutputs(out, rows, tally, report);
return 0;
}

Expand Down
134 changes: 134 additions & 0 deletions scripts/stryker-ignorers.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
// @ts-check
// Stryker ignorers: mutants inside these nodes cannot change what the bot does.

/** Names of trace helpers that print only when debug logging is turned on. */
export const DEBUG_TRACE_FUNCTIONS = new Set(["debugLog"]);

/** Console methods whose text goes only to the operator log. */
export const CONSOLE_LOG_METHODS = new Set(["log", "info", "warn", "error", "debug"]);

/** Methods that no Stryker mutator changes. They only convert a key or value to text. */
const PLAIN_TEXT_METHODS = new Set(["toBase58", "toString"]);

/**
* True for a plain, non-optional `a.b` read of a plain value.
* @param {any} node
* @returns {boolean}
*/
const isPlainMember = (node) =>
node?.type === "MemberExpression" &&
!node.computed &&
!node.optional &&
node.property?.type === "Identifier" &&
isPlainValue(node.object);

/**
* True for a value that has no mutants of its own: a name, `this`, a plain `a.b`
* read, or `a.toBase58()` / `a.toString()` without arguments. A template literal
* made only of these can be ignored as a whole.
* @param {any} node
* @returns {boolean}
*/
const isPlainValue = (node) =>
node?.type === "Identifier" ||
node?.type === "ThisExpression" ||
isPlainMember(node) ||
(node?.type === "CallExpression" &&
!node.optional &&
node.arguments.length === 0 &&
isPlainMember(node.callee) &&
PLAIN_TEXT_METHODS.has(node.callee.property.name));

/**
* @param {any} node
* @returns {boolean}
*/
const isConsoleLogCall = (node) =>
node?.type === "CallExpression" &&
node.callee?.type === "MemberExpression" &&
!node.callee.computed &&
node.callee.object?.type === "Identifier" &&
node.callee.object.name === "console" &&
node.callee.property?.type === "Identifier" &&
CONSOLE_LOG_METHODS.has(node.callee.property.name);

/**
* True for a debug trace call: `debugLog(...)`.
* @param {any} node
* @returns {boolean}
*/
const isDebugTraceCall = (node) =>
node?.type === "CallExpression" &&
node.callee?.type === "Identifier" &&
DEBUG_TRACE_FUNCTIONS.has(node.callee.name);

/**
* True for an argument that is only text: a string, a number, a plain value, a
* template literal of plain values, or a `+` join of these.
* @param {any} node
* @returns {boolean}
*/
const isPlainText = (node) =>
node?.type === "StringLiteral" ||
node?.type === "NumericLiteral" ||
(node?.type === "TemplateLiteral" && node.expressions.every(isPlainValue)) ||
(node?.type === "BinaryExpression" &&
node.operator === "+" &&
isPlainText(node.left) &&
isPlainText(node.right)) ||
isPlainValue(node);

/**
* Ignores a whole debug trace call only when every argument is text or a plain
* value, so the call has no side effects. Text in other trace calls is still
* ignored by the log text ignorer, and their other mutants are tested.
* @type {import("@stryker-mutator/api/ignore").Ignorer}
*/
export const debugTraceIgnorer = {
shouldIgnore(path) {
/** @type {any} */
const node = /** @type {any} */ (path).node;
if (isDebugTraceCall(node) && node.arguments.every(isPlainText)) {
return "Debug trace text. It prints only with TIMBA_DEBUG=true, and every argument is text or a plain value.";
}
return undefined;
},
};

/**
* Ignores only text literals in console and debug trace arguments. Other mutants in the same call,
* such as a changed condition or a missing optional read, are still tested.
* @type {import("@stryker-mutator/api/ignore").Ignorer}
*/
export const consoleTextIgnorer = {
shouldIgnore(path) {
/** @type {any} */
let current = path;
const node = current?.node;
const isText =
node?.type === "StringLiteral" ||
(node?.type === "TemplateLiteral" && node.expressions.every(isPlainValue));
if (!isText) {
return undefined;
}
// Walk up through string joins and template parts to the call argument.
while (
current.parentPath?.node?.type === "TemplateLiteral" ||
(current.parentPath?.node?.type === "BinaryExpression" &&
current.parentPath.node.operator === "+")
) {
current = current.parentPath;
}
const call = current.parentPath?.node;
if (current.listKey === "arguments" && (isConsoleLogCall(call) || isDebugTraceCall(call))) {
return "Operator log text. Log output does not change what the bot does or shows to players.";
}
return undefined;
},
};

// The same objects that declareValuePlugin(PluginKind.Ignore, ...) from @stryker-mutator/api builds.
export const strykerPlugins = [
{ kind: "Ignore", name: "debug-trace", value: debugTraceIgnorer },
{ kind: "Ignore", name: "console-text", value: consoleTextIgnorer },
];
Loading
Loading