feat: ecosystem architecture enhancements (Graph, Loop, Context, Harness)#18
Merged
Conversation
…hods Both Severity.String() and FinalizeErrorCode.String() checked only the upper bound (int(x) < len(names)) without a lower-bound check, so a negative enum value would pass the guard and panic on array indexing. Add int(x) >= 0 check.
- types/severity_test.go: add TestSeverityString (all severity levels + out-of-range → "unknown") and TestSeverityAtLeast (ordering comparisons). - types/finding_test.go: add TestFindingSliceSortOrder (severity-desc then confidence-desc), TestFindingSliceFilterBySource, TestFindingSliceFilterByConfidence, TestFindingSliceByFile, TestFindingSliceSummary (total, by-source, by-severity, avg confidence), TestFindingSliceSummaryEmpty (zero-value guard), TestFindingFromSight, TestFindingFromInspect. All package tests pass (agent, events, llm, policy, review, sessions, tools, types, verify). Co-Authored-By: Grok <noreply@xai.com>
- Add graph/ package with graph implementation - Add proto/hawk/contracts/v1/graph.proto - Update README
- Add NodeType enum (agent, tool, function, start, end, router) - Add NodeSpec, EdgeSpec, EdgeCondition, GraphSpec types - Update proto definitions to match - Add validation methods for new types
- Add robust Prompt Template engine with Go template support - Isolate prompt engineering logic into a core portable contract package
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.
This PR introduces cross-ecosystem architectural enhancements encompassing Graph Engineering, Loop Engineering, Context Management, and Prompt Frameworks.
What's Included
StateGraphimplementations, A2A protocol support, and Cypher-like DSLs.All changes include appropriate edge-case handling for timeouts, cancellations, and state immutability.