Public: anyone can read this; the crew can change it.

Sentinel: shared:01m23vygyffx5hg2f5vm8r74sr:ky51wt3erj is past its budget: trevato/forge: "tools/list stays under 40 KB, with 3 KB of headroom (37,000 bytes)" failed on 4 pulls in the last hour … #5795

opened this

Merged 38d 2h ago, live in production

This pull only buys a little room. The test was never flaky, so the underlying problem isn't fixed. tools/list is a pure function of the code, and the test passes here on an unmodified branch.

Notes

opened this

This pull only buys a little room. The test was never flaky, so the underlying problem isn't fixed. tools/list is a pure function of the code, and the test passes here on an unmodified branch.

Before my change it measured 36,653 bytes. That is 47 bytes under the 36,700 argument-description cap and 347 under the 37,000 headroom. Each pull that adds a tool or a description pushes it past one of those limits, so the check goes red for reasons that have nothing to do with machine load.

What changed: in src/http/mcp.ts I removed spawn.followMode's description, which only repeated its enum, and shortened REVEAL_ARG (the reveal argument on spawn and claim_link) to "true: show the secret link." That frees roughly 80 bytes. Neither argument changed in meaning.

What I left out: I didn't raise any ceiling, since the test says those are the owner's. I also didn't make further cuts, because the remaining argument descriptions are already about as short as they go. The real fix is to merge new capabilities into existing tools with an action or kind argument, as docs/MCP.md describes, instead of adding new tools.

Checks: bun test test/mcp passes (196 tests). bun x tsc --noEmit couldn't run here because the bun types are missing, so it's unchecked. The forge's check will cover it.

To try it: run bun test test/mcp-size.test.ts.

Closes #5791

commented

This pull only buys a little room. The test was never flaky, so the underlying problem isn't fixed. tools/list is a pure function of the code, and the test passes here on an unmodified branch.

Before my change it measured 36,653 bytes. That is 47 bytes under the 36,700 argument-description cap and 347 under the 37,000 headroom. Each pull that adds a tool or a description pushes it past one of those limits, so the check goes red for reasons that have nothing to do with machine load.

What changed: in src/http/mcp.ts I removed spawn.followMode's description, which only repeated its enum, and shortened REVEAL_ARG (the reveal argument on spawn and claim_link) to "true: show the secret link." That frees roughly 80 bytes. Neither argument changed in meaning.

What I left out: I didn't raise any ceiling, since the test says those are the owner's. I also didn't make further cuts, because the remaining argument descriptions are already about as short as they go. The real fix is to merge new capabilities into existing tools with an action or kind argument, as docs/MCP.md describes, instead of adding new tools.

Checks: bun test test/mcp passes (196 tests). bun x tsc --noEmit couldn't run here because the bun types are missing, so it's unchecked. The forge's check will cover it.

To try it: run bun test test/mcp-size.test.ts.

commented

This pull frees about 170 bytes in tools/list. The sentinel will probably still fire, because the underlying problem is that pulls adding tools keep landing over the limit.

I rebased the branch on current main. The test passes there, at 36,595 bytes against the 37,000 headroom, so main is not the red lane. The red pulls are the ones that add tools or descriptions and cross the line.

What changed:

  • The limb and cloud_account tool descriptions in src/http/mcp.ts no longer list their action and verb values, since the schema's enum already carries them.
  • Together with the earlier trims (spawn.followMode, reveal), tools/list is now 36,488 bytes. That is 512 bytes under the headroom and 212 under the 36,700 argument-description cap.
  • bun test test/mcp passes (200 tests). I did not run the type check, because the bun types are missing in this sandbox.

What I left out:

  • I didn't raise any ceiling, because the test says those are the owner's.
  • I didn't merge or remove any tools, because that is a design change for the owner.
  • The durable fix is for new capabilities to extend existing tools with an action or kind, as docs/MCP.md describes, instead of adding new tools.

To try it: run bun test test/mcp-size.test.ts.

Sign in to join this conversation.

Search
↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs