Repository navigation
Display specs 4/4: Let agents check a display - #410
Merged
Merged
Conversation
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Add
loop_check_displayalongsideloop_diagramfor provider-key runs and native harnesses. Agents can validate raw or fenced display lines, get a short success result with the element count, and get line and element diagnostics plus the component reference for invalid displays.Scope
The checker uses the shared display parser and reports individual diagnostic locations within an 8,000-character budget. It counts omitted diagnostics and always includes the summary and reference. The component names and numeric reference limits come from the renderer. The checker performs no database reads or writes of its own and creates no dispatch receipt, artifact, answer, or result. The normal run access checks and outer tool activity apply. Review sessions still expose only
loop_review_read. The diff has no migrations, SQL module, dependency, UI, system prompt, or API contract changes.Verification
2095817676fe2ea1c58a0e2e5a138e571ea26866.activities-integration,activities-server,fleet-work-propagation,fleet-tool-revocation, anddisplay-spec. The native binding fixture checks schema compatibility, the catalog, correctable problems, source limits, and unchanged SQLitetotal_changes().npm run checkexited 0 with 445 contract tests.check: assets passed in 0.2 scheck: format passed in 26.4 scheck: typecheck passed in 23.9 scheck: openapi passed in 0.9 scheck: sql-index passed in 0.3 scheck: contracts passed in 167.2 scheck: all passednpm run buildexited 0.npm run test:nativeexited 0 with 512 passing tests.Follow-up verification
On
a641c608de4ce6a8a48f46ec057912c642a19558, focused tests, build, andnpm run checkexited 0.npm run test:nativeexited 0 with 512 passing tests.check: assets passed in 0.2 scheck: format passed in 24.3 scheck: typecheck passed in 4.0 scheck: openapi passed in 0.8 scheck: sql-index passed in 0.2 scheck: contracts passed in 161.9 scheck: all passedGitHub Actions run 44809034458 passed the required check and all three shards.
Loop review
GitHub Actions run 44805864989 passed the check and all three test shards. Loop review r1
32970680-763b-444e-9901-635450c307e2completed on 2095817 with all three reviewers, one P2, one P3, and no P1/security findings. Both fixed in a641c60. The diagnostic budget preserves the summary and reference even with thousands of invalid lines or repeated long keys. Quoted, shortened fields preserve diagnostic boundaries. The fence wrapper accepts the reader’s standard closing indentation. The revised head passed 102 focused tests, the full check (445 contracts), and the build. Incident regression cases use 2,000 malformed lines and repeated 525-character keys. Both the 512-test native rerun and GitHub CI passed.Loop review r2
54ed7c10-fa8a-4ed3-8c8c-d42ece952342completed on a641c60 with all three reviewers, one P2, one P3, and no P1/security findings. Commit91a978c66f85e95a37eda4ef1367879803287d15fixes both. The native binding fixture rejects an unlabeled Markdown wrapper and accepts aspeclanguage token with opening-line metadata and with encoded whitespace. A display at the reader's size limit still validates and the tool explains that the completeloop_replybody has its own 30,000-character limit.On
91a978c66, 156 focused tests passed across activities integration and server, display parser and rendering, open display fences, and reply publication.The fresh build and
npm run checkexited 0 (445 contracts). Both Codex reply-publication fixtures passed. The full 512-test native run above was on the preceding commit. The follow-up leaves native dispatch and the reply size threshold as before.check: assets passed in 0.1 scheck: format passed in 22.8 scheck: typecheck passed in 15.9 scheck: openapi passed in 0.9 scheck: sql-index passed in 0.2 scheck: contracts passed in 163.2 scheck: all passedGitHub Actions run 44812184212 passed the required check and all three shards on
91a978c66. Full Loop review r3560a0ff7-09b5-46a4-adbb-1d15763d9cfecompleted on that commit with three reviewers, two P2s, one P3 and no P1 or security findings. Commitdb591a564fixes all three findings. A fixture API provider received the oversized-block diagnostic and completed the run. A native Pi-protocol call successfully checked a 16-Text display with over 128,000 UTF-8 bytes, and the same-sized request naming another tool received HTTP 413. The checker validates within-limit source after Markdown removes the wrapper indentation. The remaining observation about repeated table references was raised as unmeasured performance work.Verification on
db591a56472f0bee20180947de40774f95140084The focused
activities-integration,activities-server,agent-mail-native,antigravity-native,display-specanddisplay-spec-renderfixtures passed (146 distinct tests). The fresh build andnpm run checkexited 0 (445 contracts).check: assets passed in 0.2 scheck: format passed in 21.9 scheck: typecheck passed in 6.6 scheck: openapi passed in 0.8 scheck: sql-index passed in 0.3 scheck: contracts passed in 167.4 scheck: all passedLocal Vitest with
--maxWorkers=1per shard ran 3,433 tests. Shards 1 and 2 exited 1 with three and six timeouts respectively acrossconversation-feed-state,fleet-enrollment,fleet-handoff, andfleet-catalog-capabilities. Shard 3 exited 0 with 1,091 passing. All nine failed cases passed in targeted reruns with their original timeout. The enrollment fixture also timed out with its default limit at base87525aed0.The initial
npm run test:nativeexited 1 with 511 passing and oneECONNRESETin the private control socket fixture. Its worker stopped making progress and was terminated so the suite could continue. The entiretest/connection.node.test.tsfile passed all eight tests in isolation. The fresh full native repeat with the other local suites stopped exited 0 with all 512 passing.The provider and bridge observations come from fixture runs. No live provider or device was exercised.
GitHub Actions run 44819165945 passed the required check and all three shards on
db591a564. Full Loop review r4943dcf21-4818-461a-8500-e16a1d2094a2completed on that commit with three reviewers, one P2, one P3 and no P1/security findings. Commit0ae83afdareplaces retained request strings with fixed-size SHA-256 digests while keeping request identity rejection. The checker parses a single Markdown fence through the end of a finished answer and uses the parser's preserved CRLF, so it measures the same source as the renderer. The 58 focused tests exited 0. The bridge fixture sent a large UTF-8 display through the standard MCP transport and through Pi, repeated identical arguments under one ID, and received HTTP 409 after changing those arguments. The checker and renderer fixtures both accept the open fence and apply the same size budget. Heap usage under many calls was not measured.Verification on
0ae83afda97d59090ba975a7247a7760fcaea4bfThe 58 focused tests passed. The fresh build and
npm run checkboth exited 0. The contract suite passed 445 tests.check: assets passed in 0.1 scheck: format passed in 21.6 scheck: typecheck passed in 5.1 scheck: openapi passed in 1.0 scheck: sql-index passed in 0.3 scheck: contracts passed in 158.9 scheck: all passedAll three local Vitest shards exited 0 with one worker per shard, for 1,263, 1,079 and 1,091 passing tests respectively. The first native run received SIGTERM after 252 tests passed and before the remaining tests could finish. The standalone
npm run test:nativererun exited 0 with all 512 tests passing.GitHub Actions run 44827938998 passed the required check and all three shards on
0ae83afda. Full Loop review r57a7c908f-11d0-4ac2-9faa-426506af37c4completed on that commit with three reviewers, one P2, one P3 and no P1/security findings. Commitdc68ca61creturns malformed checker arguments as a correctable tool result. The API fixture sent a numeric spec, received the diagnostic, and finished the run. The checker reports the series name and both counts when a chart would drop extra values. Existing chart rendering keeps its historical behavior. An oversized malformed bridge request again receives HTTP 413. The 127 focused tests exited 0. The observation about repeated table validation remains an unmeasured performance concern.Verification on
dc68ca61c4d833eaf91c1b0b474cb7435f87a35bThe 127 focused tests passed. The fresh build and
npm run checkexited 0 (445 contracts). The full native suite exited 0 with all 512 tests passing.check: assets passed in 0.2 scheck: format passed in 23.7 scheck: typecheck passed in 4.6 scheck: openapi passed in 0.8 scheck: sql-index passed in 0.3 scheck: contracts passed in 154.8 scheck: all passedLocal Vitest shard 1 passed 1,262 tests and exited 1 on a single five-second timeout in the fleet-enrollment fixture that also timed out on the base during r3. A targeted rerun timed out while another shard was active. With the other local suites stopped, the fixture passed in 4.43 seconds under its original limit. Local shards 2 and 3 exited 0 with 1,080 and 1,091 tests passing respectively.
GitHub Actions run 44832888289 passed the required check and all three shards on
dc68ca61c. Full Loop review r6baf436a0-e5e5-48b0-82ea-07677389ea07completed on that commit with all three reviewers, one P2 and no P1/security findings. Commit4a61802d1reports table cell overflow at the element and row. The checker fixture accepts rows that fit or need padding and reports the first supplied overflow. Existing test fixtures still draw normalized tables. Inspection of the installed MCP SDK confirmed that it accepts arbitrary string request IDs. The standard MCP bridge now applies the existing Pi limit before caching and the HTTP fixture confirms rejection at 200 characters. All 127 focused tests passed. Practical effects of API checker call-ID reuse and repeated synchronous validation were not established.Verification on
4a61802d1628e9bdbe32a3ef549eebff0ebf742cThe 127 focused tests passed. The fresh build and
npm run checkexited 0 (445 contracts). The full native suite exited 0 with all 512 tests passing.check: assets passed in 0.1 scheck: format passed in 22.0 scheck: typecheck passed in 13.8 scheck: openapi passed in 1.0 scheck: sql-index passed in 0.3 scheck: contracts passed in 155.4 scheck: all passedLocal Vitest ran all three shards. Shard 1 passed 1,261 tests and had assertion failures in
library-route-contracts(preferences event count) andrun-checkouts(Git CRLF status). Shard 2 passed 1,079 tests with a five-second timeout infleet-directory-sync. Shard 3 passed 1,090 with a five-second timeout infleet-handoff-http. All four failing cases passed together with one worker and with the full local suites stopped, using their original limits.GitHub Actions run 44837050615 passed the required check and all three shards on
4a61802d1. Full Loop review r7228ad0b7-68f3-4153-b4f8-ed27cedcdc57completed with all three reviewers, one P2, one P3 and no P1/security findings. Commite6371681cwarns when a leaf component would omit its children. It also preserves long IDs on standard MCP and keeps fixed-size bridge cache keys. The existing identity still reaches dispatch, and Pi retains its transport limit. The checker now validates each referenced table once and counts every visit toward the existing display budgets. The fixtures confirmed leaf diagnostics, the accepted long standard MCP ID, Pi's 400 response, and one table warning for two drawn references. All 128 focused tests passed. Shared-host latency and heap use were not measured.Verification on
e6371681ca3b0ebe76309116186acfb6564974adThe 128 focused tests passed. The fresh build and
npm run checkexited 0 (445 contracts). The full native suite exited 0 with all 512 tests passing.check: assets passed in 0.2 scheck: format passed in 22.4 scheck: typecheck passed in 14.2 scheck: openapi passed in 0.9 scheck: sql-index passed in 0.3 scheck: contracts passed in 157.0 scheck: all passedAll three local Vitest shards exited 0 with one worker per shard. The counts were 1,263, 1,080, and 1,092.
GitHub Actions run 44841282400 passed the required check and all three shards on
e6371681c. Full Loop review r8f6abc11e-2517-4f48-b10c-7295c32975b6completed with all three reviewers, one P2 and no P1/security findings. Commit2e8e40e6bhashes the original request ID code units. The Pi fixture confirmed two distinct unpaired surrogate IDs received their own results for different arguments. The checker also reports child types outside the documented Fields and Actions catalogs while preserving historical rendering. The 128 focused tests passed. Heap retention during a pending approval remains an unmeasured concern.Verification on
2e8e40e6b337f120b4c92f53384cae19ebecdab4The 128 focused tests passed. The fresh build and
npm run checkexited 0 (445 contracts). The full native suite exited 0 with 512 tests passing.check: assets passed in 0.2 scheck: format passed in 22.1 scheck: typecheck passed in 4.9 scheck: openapi passed in 0.8 scheck: sql-index passed in 0.2 scheck: contracts passed in 148.4 scheck: all passedAll three local Vitest shards exited 0 with one worker per shard. The counts were 1,263, 1,080, and 1,092. In GitHub Actions run 44844745093 attempt 1, the required check had one failure in
library-route-contracts:runCheckout projects a captured Git checkout without internal capture coordinationreceived a different capture ID and timestamp from the expected snapshot. That case passed locally in isolation, and the full local check had already passed. The required check passed on attempt 2 on the unchanged commit, and all three test shards passed on attempt 1.GitHub Actions run 44844745093 is green. Full Loop review r9
1ff9afd4-dbd1-4e1b-978b-c15be544ff19completed with all three reviewers, one reported P2 and no P1/security findings. The near-limit tests cited used different inputs. The installed Markdown parser preserves internal CRLF. The new exact-input fixture confirms the checker and renderer both accept the same indented CRLF fence at the limit and reject the same fence above it. Commitf48472fabalso fixes the separately confirmed leading BOM case by following Remark's fence detection. The test exercises both versions of the same source with and without a BOM. All 118 focused tests passed. The existing repeated chart validation path was observed without a measured latency impact.Verification on
f48472fab98e05d2d8c0286db1c42c42a6b35910The 118 focused tests passed. The fresh build and
npm run checkexited 0 (445 contracts). The full native suite exited 0 with 512 tests passing.check: assets passed in 0.2 scheck: format passed in 24.2 scheck: typecheck passed in 2.4 scheck: openapi passed in 0.9 scheck: sql-index passed in 0.3 scheck: contracts passed in 157.7 scheck: all passedLocal Vitest shard 1 passed 1,262 tests and exited 1 on a single five-second timeout in
fleet-enrollment:resumes a published but unconfirmed member only with fresh consent and its locally issued inactive grant. The enrollment case passed in 4.40 seconds with other local suites stopped and the original five-second timeout. Local shards 2 and 3 exited 0 with 1,080 and 1,092 tests passing respectively.GitHub Actions run 44848869056 passed the required check and all three shards on
f48472fab. Full Loop review r105d758135-f95c-4dbe-a4b3-8772af389a09completed with all three reviewers, one P3 and no P1/P2/security findings. Commit498c39f7aaccepts valid Actions with other drawn children. The exact-input fixture confirmed the checker accepts an Actions group with Text and a LinkButton and the renderer draws both. The checker reuses each validated chart as it does a table and continues charging the display budgets per reference. All 119 focused tests passed. Latency under repeated calls was not measured.Verification on
498c39f7a05c7bfef5ffdc34429d370127aa7079The 119 focused tests passed. The fresh build and
npm run checkexited 0 (445 contracts).check: assets passed in 0.2 scheck: format passed in 24.0 scheck: typecheck passed in 3.9 scheck: openapi passed in 1.0 scheck: sql-index passed in 0.3 scheck: contracts passed in 153.3 scheck: all passedLocal Vitest shard 1 passed 1,262 tests and exited 1 on the five-second fleet-enrollment timeout also seen on the base during r3. That fixture passed in 4.40 seconds in isolation with its original timeout. Local shards 2 and 3 exited 0. The initial native run exited 1 with 511 passes and one failure at the orphan-cleanup assertion in
heavy-command.node.test.ts. That case passed in isolation in 248 ms. The standalone full native rerun exited 0 with all 512 tests passing.GitHub Actions run 44853134922 passed the required check and all three shards on
498c39f7a. Full Loop review r11b0f5b37a-91b8-4666-aaf9-95398eaa4902completed with all three reviewers, one P2, one P3 and no P1/security findings. Commit1cb5d029areturns a retry message promptly for native display checks received during an approval. The fixture sent a large Pi request while another call awaited approval, observed the retry message before its 1.5-second client timeout, and verified that the run still awaited approval. The checker uses submitted line numbers for patch diagnostics, and exact-input tests show a standalone fence in a quote or list item passes and renders. All 130 focused tests passed. Aggregate heap impact was not measured.Verification on
1cb5d029ac59127e4ad72694904ffd92d6c2ae5cThe 130 focused tests passed. The fresh build and
npm run checkexited 0 (445 contracts). The full native suite exited 0 with 512 tests passing.check: assets passed in 0.2 scheck: format passed in 22.1 scheck: typecheck passed in 4.0 scheck: openapi passed in 0.7 scheck: sql-index passed in 0.2 scheck: contracts passed in 151.9 scheck: all passedLocal Vitest shard 1 passed 1,262 tests and exited 1 on a single five-second timeout in
fleet-enrollment:resumes a published but unconfirmed member only with fresh consent and its locally issued inactive grant. The enrollment fixture passed in 4.27 seconds in isolation with its original five-second timeout. Local shards 2 and 3 exited 0 with 1,082 and 1,092 tests passing respectively.GitHub Actions run 44856495244 passed the required check and all three shards on
1cb5d029a. Full Loop review r1247bedb97-b658-4fa4-8606-8c660f81b11acompleted on that commit with all three reviewers, two P3s and no P1/P2/security findings. Commit62496f8b4splits the display-check quota from the ordinary native tool quota while comparing duplicate IDs across both caches. The Pi fixture filled the display-check quota, observed the rejection of a fresh check and of a cross-tool reused ID, and then reached approval with a fresh ordinary tool request. The checker gives nested wrappers up to 524,288 submitted characters and tells the agent to submit raw patch lines if it exceeds that cap. The same nested input that exceeded the former wrapper cap now passes the checker and renderer. The extracted display still has a 65,536-character limit. All 130 focused tests passed.Verification on
62496f8b4eda759ed80b1540b0ad3881f04aeff7The 130 focused tests passed. The fresh build and
npm run checkexited 0 (445 contracts). The full native suite exited 0 with 512 tests passing.check: assets passed in 0.2 scheck: format passed in 20.7 scheck: typecheck passed in 2.2 scheck: openapi passed in 0.7 scheck: sql-index passed in 0.2 scheck: contracts passed in 154.6 scheck: all passedLocal Vitest shard 1 passed 1,262 tests and exited 1 on the five-second enrollment fixture
refuses expired or rebound ceremonies and a changed local directory. It also timed out on the base during r3. The enrollment fixture passed in 3.84 seconds in isolation under its original timeout. Local shards 2 and 3 exited 0 with 1,082 and 1,092 tests passing respectively.GitHub Actions run 44859537575 passed the required check and all three shards on
62496f8b4. Full Loop review r134cc40c5b-e85e-47ef-882d-8ef341d5a572completed on62496f8b4. All three reviewers completed. There were no P1, P3, or security findings. The one P2 documents a transport trade-off under the handoff review rule.The native bridge caps the complete JSON request at 512 KiB. The checker separately caps submitted text at 524,288 UTF-16 code units and extracted display source at 65,536. A fixture with 16 CJK text elements passed the checker as 146,101 bytes of raw Pi request JSON. The same patches with a heavily nested quote wrapper passed the direct checker and measured 609,395 bytes in the Pi envelope. That wrapper exceeds the native bridge body limit. Native callers can send just the JSON Patch lines in
specwhile keeping the nested formatting in the published answer. A fully escaped raw source at the reader limit takes at most 393,216 bytes before ordinary envelope overhead. This keeps the full raw display budget usable while bounding bytes buffered and parsed before tool selection. Rounds 3, 4, 11 and 12 traced both sides of this trade-off. The 512 KiB bridge cap is retained and the boundary is recorded in the handoff. Aggregate memory under repeated calls and real harness behavior remain unmeasured.The reviewed commit satisfies the handoff merge gate with the P2 documented and all CI jobs passing. This follow-up changes the PR description and handoff ledger only.