Conversation
…x, builder warnings
ABS-04: Add state-group accessor methods to Agent<C> (accessors.rs) for all sub-structs.
Accessors are pub(super), named identically to fields, enabling incremental migration
without breaking existing direct field access. Migration pattern: self.msg.x -> self.msg().x.
ABS-05: Fix convert_messages_structured() in OpenAI provider to preserve Recall,
CodeContext, Summary, CrossSession variants in tool-use messages. Previously, the
MessagePart::Text-only filter on assistant messages and the wildcard `_ => {}` on
user messages silently dropped these internal variants. Both arms now use as_plain_text()
which handles all text-like variants uniformly. Add regression test.
ABS-07: Add tracing::warn in with_context_budget() when budget_tokens == 0.
Add debug_assert in Agent::new_with_registry_arc() for max_active_skills > 0.
This was
linked to
issues
Mar 19, 2026
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.
Summary
Epic #1977: Abstraction Level Improvements — Phase 1. Tighten abstraction boundaries, reduce public API surface, and improve encapsulation.
Changes
ABS-04: Created
Agentstate-group accessor methods (msg(),memory_state(),runtime(),session_config(),metrics()+ mutable variants). Enables encapsulation without breaking existing code. Incremental migration of 835 field accesses across 24 files (Phase 1 covers 340 high-traffic accesses in 4 files).ABS-05 (bug fix): Fixed OpenAI
convert_messages_structured()silently dropping internal MessagePart variants (Recall, CodeContext, Summary, CrossSession). Now correctly converts to plain text using existingas_plain_text()method. Added regression test validating all internal variants are preserved. LLM serialization gate: 2 live OpenAI sessions, no 400/422 errors.ABS-07: Added builder validation —
tracing::warn!whencontext_budget() == 0,debug_assert!formax_active_skills > 0.Testing
convert_messages_structured_preserves_internal_variantscargo +nightly fmt --check— PASScargo clippy --workspace --features full -- -D warnings— PASSDeferred to Phase 2+
Related
Closes epic #1977 (Phase 1 only)
Validation team handoffs: