Epic 5.10: ResultFormatter + Telemetry — grounding/ package#48
Merged
Conversation
Extract 8 methods (lines 188-451) from grounding_agent.py into openspace/agents/grounding/results.py: Pure functions (no agent param): - build_iteration_feedback - remove_previous_guidance - format_tool_executions - check_task_completion - extract_last_assistant_message Agent-dependent functions: - generate_final_summary (uses agent._llm_client) - build_final_result (routes through agent for MRO) - record_agent_execution (uses agent._recording_manager) grounding_agent.py reduced from 451 to 237 lines. Pure functions bound as staticmethod; async functions use thin delegates. Removed now-unused imports (copy, json, GroundingAgentPrompts). 38 new tests in test_grounding_results.py covering all functions plus delegation seam verification. Full suite: 1721 passed. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
… test, clean _FakeAgent - Remove str(e) from error return in generate_final_summary (security) - Add MRO adversarial regression test with subclass override sentinel - Simplify _FakeAgent staticmethod bindings to bare function assignment - Update exception test to verify str(e) does NOT leak Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
🔒 Phase Gate Enforcement — 🚫 FAIL
Verdict: FAIL
|
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.
Epic 5.10: ResultFormatter + Telemetry
Extract final 8 methods from grounding_agent.py into grounding/results.py.
Metrics: grounding_agent.py 451->237 lines (-47%), results.py 285 lines new, 39 new tests (1722 total passed)
Review: 8eyes-impl PASS, 8eyes-sec PASS, GPT-5.4 REQUEST_CHANGES->fixed (MRO test), Opus 4.6 APPROVE