Skip to content

tests: six past fixes hold for any input, as fast-check properties - #478

Merged
SiddDevZ merged 7 commits into
DuskBotAI:devfrom
Yabuku-xD:property-tests-for-fixes
Dec 3, 2026
Merged

SiddDevZ merged 7 commits into
DuskBotAI:devfrom
Yabuku-xD:property-tests-for-fixes

Conversation

@Yabuku-xD

@Yabuku-xD Yabuku-xD commented Dec 1, 2026 •

Copy link
Copy Markdown
Contributor

What and why

Six bugs that were fixed with one or two example tests now have a property test each. fast-check runs the fixed function on hundreds of generated inputs, so a later change that brings back the same class of bug fails the test, not only the original example.

Fix Property (for any input)
a9f443916 telegram watch every note is at most limit long, keeps each character whole, sends every message whole and in order, and saves no offset past text it has not sent
c5bf19450 context budget the default fold point is at most 80% of the window, at most 200k tokens, and at least 1
3fa95b4bf delete from here down the first message is never cut, and exactly the messages before the cut stay
22115bba4 engine exits on Windows an exception's NTSTATUS (0xC0000000-0xC0FFFFFF, Ctrl+C aside) is booked crashed and worded the same whether Node gives it signed or unsigned
4171bfa52 browser batch any way a model names opening a page (navigate, goto, go, visit, go_to, with agent_browser_/browser_ prefix, any case, padded), under any step key, becomes open

fast-check is a new dev dependency only: it generates and shrinks the inputs. Nothing ships with it.

How it was checked

Each property passes on dev and fails when its fix is taken back out:

  • a9f443916, c5bf19450: the fix commit's diff reverse-applied to the source; the property fails (lone surrogate in a note; a 250,002-token window folds at 200,001).
  • 22115bba4: windowsCrash made to return false fails the first property (3221225472); NTSTATUS_WORDS[code] without >>> 0 fails the second (3221225477).
  • 3fa95b4bf: truncateLeaf given back its old index < 0 check fails on the first message.
  • 4171bfa52: stepAction did not exist before the fix, so the test cannot load there. This one is the weakest of the six.

The first version of the Telegram property passed against the old bug, because fast-check makes short arrays by default. It now asks for long messages (size: "max") and limits of 300-1,500, so splits happen.

Not here: the two UTF-8-across-chunks fixes (6e621cccf, ec235b1ae) need a real child process for each input, so they stay example tests.

  • pnpm typecheck: passes
  • pnpm lint: passes
  • The five changed test files, and the CI source guards (file-size-ratchet, comment-history, tighten-ratchets and the rest of that step): pass
  • pnpm typecheck, pnpm lint and pnpm test pass (typecheck, lint and the changed files pass; I did not run the whole pnpm test on this branch, which changes only tests)
  • New behaviour has a test
  • No secrets, personal data or local paths in the diff or screenshots

The message search PR from this fork also adds fast-check, so whichever merges second needs a one-line rebase of package.json and pnpm-lock.yaml.

This branch also carries the commits of #483: the fix for two tests red on dev (the find_tool ranking and the guest skill card), the flaky-test retry list for tests that failed at random in CI on Dec 1, and the link chaos fix, so this PR's CI can pass. They drop out of the diff once #483 merges.

Each property fails when its fix is taken back out:
- telegram watch (a9f4439): every note is bounded, keeps each character whole, sends every message whole and in order, and saves no offset past text not yet sent
- context budget (c5bf194): the default fold point is at most 80% of the window and never past 200k tokens
- delete from here down (3fa95b4): the first message is never cut, and exactly the messages before the cut stay
- engine exits on Windows (22115bb): an exception's NTSTATUS is booked as crashed and worded the same, signed or unsigned; Ctrl+C is not a crash
- browser batch (4171bfa): any way a model names opening a page, under any step key, runs as open

fast-check is a dev dependency only.
… and the guest skill card test stages four kinds of work

bacb532 left two tests red on dev. Its new skill_manage description dropped the word reusable, so find_tool ranked
skills_list first for "save this procedure as a reusable skill"; the description says reusable SKILL.md again (a skill
is recurring work, which that change keeps). Its duplicate check turns away a create that covers an existing skill, and
the guest skill card test staged four skills with one description, the same as an earlier test's: each now has its own
kind of work.

(cherry picked from commit 78889fc)
…list's two retries

Fifteen tests failed in CI on Dec 1 in runs of main, a release and PRs DuskBotAI#477-DuskBotAI#483 whose changes do not reach them, a
different set each run, and pass locally. Each entry names the runs it failed in. vps-routing's 'reuses the existing
VPS with $settings' failed too (PR DuskBotAI#477, run 46623618361) but is left out: its name is made per case, and the list
matches names written in the file.

(cherry picked from commit 54f5c51)
…s 60 servers link from their own addresses

Every link chaos run since the per-address limit on new links (adc99d7, Nov 14) was cancelled at CI's 60-minute
limit, on main pushes, the weekly run and every PR that touches the link service: the scenarios finished in about five
minutes and printed their table, but a socket or timer a scenario left open held the process. The run now exits once its
results are written. The storm's 60 servers set up their links over one connection, so the node's front gave them one
address, which the limit refused after 30 (Too many new links from here); each now uses its own connection, as 60
machines would. Locally, --quick passes all 12 scenarios and exits in 5.6 minutes.

(cherry picked from commit 83ab615)
…y list's retries

chat-mcp-tools' shutdown verdict, memory-order and the encrypted workspace restore failed in PR DuskBotAI#479's run 46740020170,
whose change does not reach them, and pass locally.

(cherry picked from commit c47197f)
…os job installs no packages

The job runs `node apps/link-service/chaos/run.mjs` straight after checkout, so the undici import failed
with ERR_MODULE_NOT_FOUND before any scenario ran.
…ds nothing for 8 s, as the app does

src/lib/live-events.ts gives up on a dial that sends nothing in LIVE_EVENTS_OPEN_MS (8 s) and dials again. The probe
dropped a quiet stream only after it had sent something, so one silent dial after node-5xx's 502s held it down until
the relay closed it, about 90 s, and failed the scenario in CI on five of seven runs.
@SiddDevZ
SiddDevZ merged commit 59918aa into DuskBotAI:dev Dec 3, 2026
31 of 33 checks passed
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.

2 participants