test(result): pin MAX_LIST_ITEMS, EVIDENCE_KEYS, MIME map, TRUNCATED_KEY, steering note - #87
Conversation
…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
✅ Reviewed — nothing blocking0 actionable comment(s) · grounded on your code ⏱ 1m 21s wall clock · 🤖 developerz.ai — automated review, running on your model and your box. |
|
Important Review skippedBot user detected. To trigger a single review, invoke the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
There was a problem hiding this comment.
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.
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
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/checkpassed (exit 0) in 21s.🤖 Opened by developerz.ai for task
tsk_b9ddded8a73c1263efdb558e24d822c5on developerz-ai/ui-debugger-mcp.Raised automatically by the
raw_task_triagelane.Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.