Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

🤖 tests: backup payload MCP-redaction test counts unrelated global JSON.stringify calls

Open Beginner friendly
#4,920 2 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
85/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
bun, typescript
Domain
testing-qa

Research direction

Start in src/node/services/backup/payload.test.ts at the "rejects too many MCP redactions before serializing paths" test, then run that targeted test under Bun. Check how the JSON.stringify spy records calls across the await, and make the assertion depend only on backup-payload serialization. Done means the test passes reliably without unrelated global calls affecting its count.

Written by the indexing model from the issue text.

Description

flake

Flake

src/node/services/backup/payload.test.ts > "backup payload > rejects too many MCP redactions before serializing paths" failed in the merge queue (run https://github.com/coder/xum/actions/runs/36353983065, job Test / Unit (6/6), for #4915, which does not touch backup code):

986 |       expect(stringify.mock.calls).toHaveLength(0);
error: expect(received).toHaveLength(expected)
Expected length: 0
Received length: 3

Likely cause

The test spies on the global JSON.stringify and asserts zero calls across an await. Any async work still running in the same Bun process (for example a late config, lease or status write from an earlier test file in the shard) that calls JSON.stringify meanwhile is counted.

Possible fix

Assert on calls whose arguments come from the backup payload (filter the spy's calls), or inject the serializer instead of spying on the global.

Log

  • 2026-09-27: #4915 removed from the merge queue by this failure; re-enqueued (1/3).

Generated with xum • Model: anthropic:claude-opus-5-5 • Thinking: high • Cost: $8.57

Dominant language
TypeScript
Stars
2k
Forks
136
Avg merge
8h 34m
Merged PRs (30d)
620

Getting set up

We have not checked this project's setup files yet. Start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from coder/xum

All issues in coder/xum

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.