Skip to content

Use shared Core tool declaration for saved call presentation - #677

Merged
trissim merged 5 commits into
mainfrom
fix/tool-declaration-consumer
Oct 16, 2026
Merged

trissim merged 5 commits into
mainfrom
fix/tool-declaration-consumer

Conversation

@trissim

@trissim trissim commented Oct 16, 2026 •

Copy link
Copy Markdown

Current delivery and installed observation

Merged as #677 and installed in Toad 24751e9 / Core 493878cde (native 6468a1979d983e9d). Core 493878cde includes both #932 and #925. The isolated Core 64e6bdcb topic is not a compatible pair by itself: it lacks ToolText. No module copy, source overlay or additional build was used.

On isolated display :77, the installed application opened this participant's original native history and Codex history. Saved native Read/Run/Edit/Write groups rendered; 129 actual admitted native tool groups retained the original start input object. A physical Codex Edit disclosure rendered its real saved diff, with the original foreign file_path input admitted without Pi argument validation. Evidence: /home/ts/.cache/agent-scratch/toad-outgoing-live/tool-contract-installed-20261016/01-open.png, 08-foreign-disclosed.png, native-return-frame.json and foreign-frame.json.

The actual Claude-code view also admitted unknown Monitor with its raw title, kind other and original input object. This is admitted-fragment evidence, not yet Monitor pixels. End-only/start-only coverage is accepted as authored source cases under Claude11664, not saved-session UI evidence. No saved end-only case was identified; Core owner11651 confirmed its examples were authored. The installed consumer ran those exact Read/Run/Edit/Write shapes: ends retain declaration title/kind, completed status and absent input; starts remain in_progress with the identical foreign input object; grouped ends complete without replacing that object; scalar17 remains unchanged. Results: .artifacts/tool-declaration-consumer/installed-authored-cases.json. No saved record, synthetic application or provider response was created. No provider input, failed-input replay, saved-record fabrication, test-suite run or watcher activation. Direct Send remains outstanding under critical resource headroom; saved native and CLI Run labels were physically observed.

Paired Core dependency: do not install against old Core

Drawing retained results through an execution decoder was stupid because an end-only event has no execution input, and foreign Codex arguments are not Pi arguments. Delete the ToolDeclaration/NativeTool presentation call and its invented {}. Core owns strict create_call execution decoding and metadata-only transcript presentation; this PR consumes the recorded event owners.

Consumer

src/toad/acp/status.py owns recorded status acquisition:

  • Initialize title/kind from the first recorded event's title/kind. End-only events receive declaration-owned metadata without fabricating a start or arguments.
  • A recorded start supplies its own title, kind and exact raw input. No decode or truthiness replacement of the input.
  • A start transitions the existing call to in_progress; an end alone supplies completed/failed. The production fragment grouper admits start-only fragments, so leaving them completed was a second wrong decision in the same owner.
  • Existing MRO dispatch, grouped event order and decoded output owners remain. No type/name switch, compatibility alias, fallback, alternate codec or new flag.

One related off-status-file edit is in src/toad/tool_output.py: delete its second raw_input or {} substitution. The existing dict check already handles absent/non-dict ACP input; it does not need invented arguments. Existing external ACP path spellings are unchanged.

Current Toad main, including the merged #681 nominal status consumers, was merged normally into #677 at 7a354b3. This avoids pairing the old row.working/row.attention consumers with current Core main. The authored diff remains two files, +6/-6. No manual scroll-path changes. Original failed inputs remain frozen; no provider input or replay.

Source evidence

The existing refactor-audit Package/Repository parser inventoried declarations, inheritance, imports, writes, calls and decisions across Toad and the Core owner's working tree before this change: 282 Toad and 322 Core modules, zero parse omissions. Evidence in .artifacts/tool-declaration-consumer/recorded-before.txt and current-before.txt in the owned persistent checkout. Core was explicitly an in-progress working source, not a reviewed combined head. Generic attribute retrieval does not prove dynamic receiver binding.

ToolCallStatus.from_transcript has one production caller in the existing transcript fragment producer. Both saved fragment consumers borrow its resulting status. Metadata now comes from Core's ToolTranscript/ToolStartTranscript title/kind owners; no Toad ToolDeclaration.start or NativeTool reference remains.

Verification and remaining dependency

  • Paired toad.acp.status source import and whitespace checks passed against the current Core working source. After inventory parses 282 Toad modules with zero omissions; no ToolDeclaration/NativeTool reference or empty-dict raw-input substitution remains in Toad.
  • A normal real-root transcript-fragment read failed during import: current Toad main requires agent_comms.sent_message, absent from that Core checkout. It failed before transcript acquisition. Raw failure is retained at .artifacts/tool-declaration-consumer/source-check-failure.txt; no workaround or shadow import was added.
  • Core's pushed presentation contract (29ea5e66, retained in P490: restore stopped watchers and support UI-only qualification #932 head 13d0fc17) matches this consumer. Codex confirmed the old-base problem and requested the Core owner finish the caller correction and merge current main into P490: restore stopped watchers and support UI-only qualification #932 normally. The standalone topic still lacks current main's sent_message module. The next dependency is that combined committed Core head for a paired-source saved-history opening; Codex builds the matched runtime afterward. Current source compatibility is not application acceptance.
  • Actual configured-root reads through the installed Core located saved Codex ExternalTranscript edits with original file_path input (for example exec-733de6a6-35ee-4d01-9a5f-c9bfca058d96:0), grouped Bash and unknown Claude ToolSearch/Monitor records, plus a naturally unfinished start in this agent's current native page. No fixture or input was created. Metadata locations are retained in retained-source-locations.json / retained-older-location.json. End-only source and all paired UI pixels remain unaccepted.
  • No tests authored/run, fake records/responses, build, installation or provider request. No app-success claim.

The earlier dependency failures above are retained history, superseded by the installed observation at the top. Merged and installed. Grouped/foreign history accepted from the actual saved-session UI; end-only/start-only accepted from explicitly authorized authored source cases against the installed consumer. Direct Send remains unverified. Core decoder/adapters: core-goal-retry. Toad consumer and original-history UI follow-up: toad-close-lifecycle. Integration/install: Codex.

@trissim
trissim marked this pull request as ready for review October 16, 2026 05:21
Copilot AI balanced review requested due to automatic review settings October 16, 2026 05:21
@trissim
trissim merged commit 4af393f into main Oct 16, 2026
2 checks passed

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@trissim
trissim deleted the fix/tool-declaration-consumer branch October 17, 2026 20:51
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.

2 participants