Skip to content

feat: ecosystem architecture enhancements (Graph, Loop, Context, Harness)#18

Merged
Patel230 merged 5 commits into
mainfrom
feat/contract-test-coverage
Jul 25, 2026
Merged

feat: ecosystem architecture enhancements (Graph, Loop, Context, Harness)#18
Patel230 merged 5 commits into
mainfrom
feat/contract-test-coverage

Conversation

@Patel230

Copy link
Copy Markdown
Contributor

This PR introduces cross-ecosystem architectural enhancements encompassing Graph Engineering, Loop Engineering, Context Management, and Prompt Frameworks.

What's Included

  • Graph Engineering: StateGraph implementations, A2A protocol support, and Cypher-like DSLs.
  • Loop Engineering: Async exponential backoff and retry handlers with strict context timeout support.
  • Context Engineering: Token budget optimizers prioritizing recent messages and system prompts.
  • Harness Engineering: Test harness wrappers for injecting mocks and running result validations.
  • Prompt Engineering: Secure text templating engines for LLM prompts.

All changes include appropriate edge-case handling for timeouts, cancellations, and state immutability.

Patel230 and others added 5 commits July 23, 2026 20:14
…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
@Patel230
Patel230 merged commit 489157a into main Jul 25, 2026
7 of 9 checks passed
@Patel230
Patel230 deleted the feat/contract-test-coverage branch July 25, 2026 10:14
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.

1 participant