Skip to content

Keep ACP tool results readable and local JSON frames intact - #277

Merged
deepfates merged 1 commit into
mainfrom
codex/acp-result-view
Oct 2, 2026
Merged

deepfates merged 1 commit into
mainfrom
codex/acp-result-view

Conversation

@deepfates

@deepfates deepfates commented Oct 2, 2026 •

Copy link
Copy Markdown
Owner

Closes #276.

A large successful tool result became literal nil in ACP because the observer capture limit omitted its output. Smaller structured results were Elixir inspect dumps. ACP now distinguishes omission from real null/empty output, renders JSON and readable errors, and explicitly marks previews cut at 32,768 UTF-8 bytes. Call identity and completed/failed status remain intact; capture limits are unchanged.

The real-socket test exposed a separate prerequisite: TCP line mode split permitted JSON frames at the default driver buffer (9,216 bytes locally). Align listener/client buffers with the existing configured frame bound, and check the actual frame size after removing its newline. This preserves the frame cap while allowing large valid frames through.

Validation: the new result-view regression failed original (nil/inspect), then passed; the large bidirectional socket regression timed out original, then passed. Relevant ACP/local/capture suites passed 75 tests before the two new socket tests; local suite now passes 7 tests including fragmented UTF-8, back-to-back lines and oversized refusal. Full mix check passed: 59 doctests, 9 properties, 3,601 tests, 0 failures (13 skipped, 221 excluded). No providers, accounts, dependencies, releases or runtime settings changed.

Dwell's complete native result → bounded preview and Haven's final text projection are separate owning changes (GroveResearch/dwell#195, GroveResearch/haven#101). Release Imp first, then update Dwell to that released version. This does not reconstruct historical omitted cards or add full-result retrieval UI.

@deepfates deepfates left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Independent runtime/behavior review of 77d6e9b: no blocking findings.

Inspected capture omission, failure status, JSON rendering, UTF-8 bounds, listener/connecting socket framing, and the Dwell consumer. Independently ran mix test test/acp_local_test.exs test/acp_imp_acp_test.exs: 62 tests, 0 failures. Includes real sockets, permitted large bidirectional frames, fragmented UTF-8, consecutive frames, oversize refusal, and result-state distinctions. The configured frame cap remains enforced; socket buffers scale with that existing cap.

The ownership split is appropriate: Imp makes capture omission truthful and bounds ACP presentation; the retaining host supplies recovery coordinates. Dwell's operator recovery was separately exercised against this commit. This review does not establish Haven's display or historical card repair, and does not authorize release/deployment. CI was still running when inspected.

@deepfates

Copy link
Copy Markdown
Owner Author

Validation at 77d6e9b:

  • mix check: 59 doctests, 9 properties, 3,601 tests, 0 failures; 13 skipped and 221 excluded per ordinary gate.
  • mix test test/acp_imp_acp_test.exs test/acp_local_test.exs test/run_test.exs: relevant original projection/capture suites passed. Updated local transport suite: 7 tests, 0 failures.
  • Falsification: applying the new result-view test to original code produced nil for both genuine nil and capture-omitted success, an Elixir inspect map for structured success, and opaque error tuples/markers. Applying the >9KB socket test to original code timed out. Fixed socket tests cover bidirectional large UTF-8 frames, a split within a codepoint, back-to-back frames and refusal above the unchanged limit.

Dwell candidate 1d34ce4 was exercised with IMP_PATH pointing here; native recovery and six ACP cards (four completed, two failed) pass. No dependency lock or production configuration changed. Public Hex publication is still a separate owner-authorized action.

@deepfates
deepfates merged commit 39d1e63 into main Oct 2, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ACP tool results: distinguish capture omission and render readable bounded content

1 participant