Skip to content

Goal history is Core's one RecordedGoalHistory record - #1301

Merged
trissim merged 1 commit into
mainfrom
refactor/one-goal-history-record
Oct 28, 2026
Merged

trissim merged 1 commit into
mainfrom
refactor/one-goal-history-record

Conversation

@trissim

@trissim trissim commented Oct 28, 2026

Copy link
Copy Markdown

Paired consumer change for OpenHCSDev/agent-comms#3538 (commit 7326056): goal history is one record, Core's agent_comms.goal_history.RecordedGoalHistory.

Summary in numbers

  • 1 commit, 7 files, +18/−19.
  • Goal-history result classes Toad depends on: 1 → 1, but the one is now Core's record instead of an empty runtime-request subclass. Core goes from 3 classes (RecordedGoalHistory, GoalHistory, GoalHistoryReply) to 1.
  • GoalHistoryReply references in Toad: 16 → 0.

What changed

Core deleted GoalHistoryReply (runtime_requests.py) and GoalHistory (tools.py). Both were empty subclasses of RecordedGoalHistory that existed only so each boundary had its own reply class, picked by an argument to recorded_history. RecordedGoalHistory now extends ToolResult, and both the MCP tool and the owner socket return it.

Toad consumers moved, with no alias or re-export:

  • src/toad/acp/agent.py: get_goal_history decodes the owner's goal_history reply as RecordedGoalHistory.
  • src/toad/agent_binding.py: the unbound binding returns RecordedGoalHistory.empty().
  • src/toad/goal_interaction.py, src/toad/screens/goal_details.py: annotations.
  • tests/support/goals.py, tests/native/test_native_goal_owner.py, tests/textual/test_goal_owner_views.py: the scripted owner, its default empty history, and the hand-built history.

Evidence

  • Encoding is unchanged. One populated history/failure payload decodes and re-encodes byte-identically through GoalHistory, GoalHistoryReply and RecordedGoalHistory before the Core commit, and through RecordedGoalHistory after it. empty() encodes as {"failures": [], "history": []} on both sides.
  • RecordedGoalHistory is already on installed Core 3b1ab81, so this branch imports against today's install.
  • Census of fresh main (2bbca26) for GoalHistoryReply|GoalHistory|recorded_history in src/tests/tools: these 7 files, 16 sites, now 0. The same search finds 18 RecordedGoalHistory sites.
  • py_compile and a stdlib undefined-name pass on all 7 files.

Not done here

  • No tests run. The root runs the paired Core/Toad goal-owner selection and the real owner-socket/MCP comparison.
  • Landing order relative to #3538 is the root's call.

🤖 Generated with Claude Code

https://claude.ai/code/session_01RnH6dS2Kmg1WxNnAc78YHA

Core #3538 deletes GoalHistoryReply, an empty subclass of
agent_comms.goal_history.RecordedGoalHistory that existed only so the owner
socket had its own reply class. The owner's goal_history reply now decodes
as RecordedGoalHistory, the record Core already ships.

Seven consumers move to it, with no old-name alias: acp/agent.py (decode),
agent_binding.py (unbound empty()), goal_interaction.py,
screens/goal_details.py, tests/support/goals.py,
tests/native/test_native_goal_owner.py and
tests/textual/test_goal_owner_views.py.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RnH6dS2Kmg1WxNnAc78YHA
Copilot AI balanced review requested due to automatic review settings October 28, 2026 09:35

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 insufficient remaining quota.

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 merged commit 5fa29f3 into main Oct 28, 2026
2 of 3 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.

2 participants