Skip to content

test(result): pin MAX_LIST_ITEMS, EVIDENCE_KEYS, MIME map, TRUNCATED_KEY, steering note - #87

Merged
developerz-ai[bot] merged 1 commit into
mainfrom
dz/task-tsk_b9ddded8a73c1263efdb558e24d822c5
Sep 22, 2026
Merged

developerz-ai[bot] merged 1 commit into
mainfrom
dz/task-tsk_b9ddded8a73c1263efdb558e24d822c5

Conversation

@developerz-ai

@developerz-ai developerz-ai Bot commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

What

The integration test in outer-tools.test.ts exercises these constants only
behaviorally — a swap of MAX_LIST_ITEMS from 20 to 21 would still pass the
existing 25-item array assertion. Export the four module-private constants
and assert their values directly so any future edit flips the unit test.

Acceptance

  • src/mcp/tools/result.test.ts exists and contains unit tests that pin MAX_LIST_ITEMS=20, EVIDENCE_KEYS contents (Set(['screenshot','evidence'])), MIME map values for each known extension plus undefined for an unknown one, TRUNCATED_KEY='truncated', and the literal phrases of the steering-note text
  • Changing MAX_LIST_ITEMS, EVIDENCE_KEYS, the MIME map, TRUNCATED_KEY, or the steering-note text in src/mcp/tools/result.ts causes the new unit tests to fail (assertion literals, not behavioral inference)
  • bun test src/mcp/tools/result.test.ts passes
  • bun test passes for the whole suite (the new test file sits alongside the existing outer-tools.test.ts without disturbing it)

Changes

  • src/mcp/tools/result.ts (edit) — Export MAX_LIST_ITEMS, EVIDENCE_KEYS, mimeTypeFor, and steeringNote so the new unit test can pin their values. Only TRUNCATED_KEY is exported today; the other four are module-private even though the integration test only exercises them through behavior. Direct assertion beats behavioral inference — swapping MAX_LIST_ITEMS to 21 would still leave the existing 25-item integration test green.
  • src/mcp/tools/result.test.ts (create) — Unit-test the result-shaping constants directly: assert MAX_LIST_ITEMS === 20; assert EVIDENCE_KEYS equals a new Set(['screenshot','evidence']); for each path extension (.png, .jpg, .jpeg, .mp4, .log) and one non-matching path, assert mimeTypeFor returns the expected string or undefined; assert TRUNCATED_KEY === 'truncated'; assert steeringNote(['steps','bugs']) contains the literal phrases 'Truncated steps, bugs to the first 20 items', 'see "truncated" for the real totals', and 'fields=["steps", "bugs"]'. A future edit to any of these values flips the assertion.

Verification

./bin/check passed (exit 0) in 21s.


🤖 Opened by developerz.ai for task tsk_b9ddded8a73c1263efdb558e24d822c5 on developerz-ai/ui-debugger-mcp.

Raised automatically by the raw_task_triage lane.

🤖 developerz.ai maintainer bot — this PR is one slice of a stacked plan.
Dispatched automatically by the raw_task_triage lane
Model MiniMax-M3 on router.ai.developerz.ai via native, funded by box_env
Ran on box sebby-ovh-3
Cost unknown: no list price on record for MiniMax-M3 on router.ai.developerz.ai
Run timeline run_7a5321eceb7e4df0a616a526da84135c
Part 1/1 of plan rtk_7dddeda53fa24eaa99f800dfc0ac4695


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

…KEY, steering note

The integration test in outer-tools.test.ts exercises these constants only
behaviorally — a swap of MAX_LIST_ITEMS from 20 to 21 would still pass the
existing 25-item array assertion. Export the four module-private constants
and assert their values directly so any future edit flips the unit test.

Dz-Task-Id: tsk_b9ddded8a73c1263efdb558e24d822c5
@developerz-ai

developerz-ai Bot commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ Reviewed — nothing blocking

0 actionable comment(s) · grounded on your code

⏱ 1m 21s wall clock · glm-5.3-flash via zai · 16 model call(s) · 7,746 output token(s) · 15 tok/s observed (slowest call 39s)

🤖 developerz.ai — automated review, running on your model and your box.

@developerz-ai developerz-ai Bot added dz/fleet-pr Opened by the developerz.ai maintainer bot from a fleet run. dz/model:MiniMax-M3 developerz.ai: model that wrote this bot PR. dz/provider:router.ai.developerz.ai developerz.ai: provider that served this bot PR. labels Sep 22, 2026
@coderabbitai

coderabbitai Bot commented Sep 22, 2026

Copy link
Copy Markdown

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 7855862d-42c1-4ead-a9ca-a12b81a7bc2a

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Comment @coderabbitai help to get the list of available commands.

@developerz-ai developerz-ai Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review summary — 2 file(s), 0 finding(s).

Export-only widening of result.ts plus direct-assertion unit tests; all pinned literals (MAX_LIST_ITEMS, EVIDENCE_KEYS, MIME map, TRUNCATED_KEY, steering-note phrases) match the implementation. Clean.

No findings from: concern-tests.


🤖 developerz.ai review — automated, running on your model and your box. What is this?
Reviewed by zai/glm-5.3-flash on box sebby-ovh-3 — 253.3k in / 7.75k out over 16 calls; cost unknown: no price on record for zai/glm-5.3-flash.

@developerz-ai
developerz-ai Bot merged commit 8509547 into main Sep 22, 2026
3 checks passed
@developerz-ai
developerz-ai Bot deleted the dz/task-tsk_b9ddded8a73c1263efdb558e24d822c5 branch September 22, 2026 07:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dz/fleet-pr Opened by the developerz.ai maintainer bot from a fleet run. dz/model:MiniMax-M3 developerz.ai: model that wrote this bot PR. dz/provider:router.ai.developerz.ai developerz.ai: provider that served this bot PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants