Date: 2026-04-18
Status: Planning
Phase 1 Summary: ✅ Completed - 102 MCP integration tests, all passing
- aeon_jit: 77/85 unit tests passing (91%), 8 known failures
- MCP interface: 102 new tests (Phase 1) ✅
- Roadmap: 6 workstreams defined, Workstreams 1-4 in planning/early implementation
- Test coverage gaps: Integration tests, error cases, boundary conditions
| Option | Value | Effort | Dependencies |
|---|---|---|---|
| Workstream 1 Testing | 🔥 Very High | Medium | core aeon_jit tests |
| Coverage Metrics | 🔥 Very High | Low | existing tests |
| Boundary Cases | Medium | Medium | core tests stable |
| Fix aeon_jit Failures | 🔥 Very High | High | root cause analysis |
Implement Phase 2 as a two-part initiative:
Part A (Priority 1): Fix aeon_jit failures + implement Workstream 1 token-efficient topology testing
- Unblock Workstream 1 implementation
- Resolve 8 known test failures
- Add test coverage for new
get_function_skeletonandget_data_flow_slicetools - Value: Enables agent triage workflow, fixes framework issues
Part B (Priority 2): Comprehensive test coverage improvements
- Add coverage metrics for Phase 1 (MCP tests)
- Implement boundary case testing for aeon_jit
- Add integration tests for complex control flow
- Value: Improves test robustness, prevents regressions
Current failures:
- 7 flag-conditional branch tests (branch target address returns 0)
- 1 bridge callback test (invoked 3x instead of 1x)
Investigation plan:
-
Debug flag conditional branch compilation
- Trace Cranelift IL generation for SetFlags + CondBranch
- Verify condition evaluation propagates to return value
- Check JIT entry point for register state setup
-
Debug bridge callback invocation count
- Add logging to bridge callback registration
- Verify BRIDGE_COUNT reset per test
- Determine if called during compile vs. execute phase
Expected outcome: 85/85 unit tests passing
Purpose: Agents decide whether to read full IL/assembly by getting dense function summary
Implementation:
// crates/aeon/src/api.rs
pub fn get_function_skeleton(&self, addr: u64) -> Result<Value, String> {
// Returns:
// - arg_count: number of parameters
// - calls: [target addresses or names]
// - strings: local string references
// - loops: count of detected loops
// - crypto_constants: known crypto material
// - stack_frame_size: local variable space
// - suspicious_patterns: potential obfuscation
}
// crates/aeon-frontend/src/service.rs
fn tool_get_function_skeleton(&self, args: &Value) -> Result<Value, String> {
// MCP dispatch
}Test coverage needed:
- Skeleton for simple function (no loops, no calls)
- Skeleton for function with multiple calls
- Skeleton for function with string references
- Skeleton for function with loops
- Skeleton for function with crypto operations
- Error handling (invalid address, unmapped address)
Purpose: Agents get backward/forward slices on single values without reading whole function
Implementation:
// crates/aeon/src/analysis.rs
pub fn compute_backward_slice(target_addr: u64, register: Reg) -> Vec<Instruction> {
// Return instructions that contribute to target_register at target_addr
}
pub fn compute_forward_slice(start_addr: u64, register: Reg) -> Vec<Instruction> {
// Return instructions that consume start_register
}
// crates/aeon-frontend/src/service.rs
fn tool_get_data_flow_slice(&self, args: &Value) -> Result<Value, String> {
// MCP dispatch with mode: "backward" | "forward"
}Test coverage needed:
- Simple backward slice (direct assignment)
- Complex backward slice (through multiple operations)
- Backward slice with loop iterations
- Forward slice to consumer instruction
- Forward slice through multiple consumers
- Slice with invalid register
- Slice with unmapped address
New test file: crates/aeon-frontend/tests/mcp_workstream1.rs
Test structure:
mcp_workstream1.rs (40+ tests)
├── function_skeleton tests (15 tests)
│ ├── Simple functions (no loops, no calls)
│ ├── Complex functions (calls, loops, strings)
│ ├── Edge cases (empty functions, large functions)
│ └── Error cases (invalid addresses)
└── data_flow_slice tests (25 tests)
├── Backward slice tests (10 tests)
├── Forward slice tests (10 tests)
└── Edge cases (loops, calls, invalid registers)
Expected results: 40+ new tests, all passing
| Item | Status | Tests |
|---|---|---|
| Fix aeon_jit failures | Planned | 8 fixed |
Implement get_function_skeleton |
Planned | 15 tests |
Implement get_data_flow_slice |
Planned | 25 tests |
| Total new tests | — | 40+ |
| aeon_jit tests passing | Target | 85/85 |
Objective: Understand test coverage depth for MCP integration tests
Analysis needed:
-
Code coverage measurement (tools, branches, statements)
cargo tarpaulinorcargo llvm-covfor coverage metrics- Identify uncovered MCP tool paths
- Identify uncovered error paths
-
Test matrix creation
- Map tests to tools (25 tools × test coverage)
- Identify untested tool combinations
- Document coverage gaps
Deliverable: Coverage report showing % of lines/branches covered by Phase 1 tests
Objective: Systematically test edge cases in aeon_jit instruction compilation
New test file: crates/aeon-jit/tests/boundary_cases.rs
Test areas:
-
Register pressure (10 tests)
- All 31 ARM64 registers used simultaneously
- Register spillage patterns
- Nested function calls with register preservation
-
Memory edge cases (10 tests)
- Misaligned memory access
- Overlapping memory writes and reads
- Large memory operations (> 128 bytes)
- Memory at boundary addresses (0x0, max address)
-
Control flow extremes (10 tests)
- Deep nesting (10+ levels of branches)
- Large switch statements
- Loop with many iterations
- Unreachable code paths
-
Operand boundaries (10 tests)
- Minimum/maximum immediate values
- Zero operands
- Negative operands
- Shift counts at boundaries
Expected: 40 new tests covering edge cases
Objective: Exercise full compilation pipeline with complex scenarios
New test file: crates/aeon-jit/tests/integration_complex.rs
Test scenarios:
-
Complex control flow (5 tests)
- Nested loops
- Nested branches
- Loop with early exit
- Switch with fallthrough
- Function with multiple return paths
-
Bridge callback scenarios (5 tests)
- Unresolved branch with register state
- Multiple bridges in single block
- Bridge preserving register values
- Bridge with memory side effects
-
Cross-block patterns (5 tests)
- Multiple blocks in sequence
- Blocks with shared memory
- Blocks with shared registers
- Block composition patterns
Expected: 15 new integration tests
| Item | Tests | Effort |
|---|---|---|
| Coverage metrics | N/A | Low |
| Boundary cases (aeon_jit) | 40 | Medium |
| Integration tests (aeon_jit) | 15 | Medium |
| Total new tests | 55 | — |
Week 1:
- Investigate + fix 8 aeon_jit failures
- Implement
get_function_skeletontool - Write 15 tests for function skeleton
Week 2:
- Implement
get_data_flow_slicetool - Write 25 tests for data flow slice
- Integration testing + bug fixes
Expected outcome:
- 8 aeon_jit failures fixed ✅
- 40 new tests passing ✅
- Workstream 1 tools ready for agent use ✅
Week 3:
- Run coverage metrics on Phase 1 tests
- Implement boundary case tests for aeon_jit
- Debug and fix edge cases
Week 4:
- Implement integration tests for complex control flow
- Final testing and bug fixes
- Documentation and summary
Expected outcome:
- Coverage report generated ✅
- 55 new tests passing ✅
- Test matrix created ✅
- ✅ All 8 aeon_jit failures fixed (85/85 tests passing)
- ✅
get_function_skeletontool implemented and tested (15 tests) - ✅
get_data_flow_slicetool implemented and tested (25 tests) - ✅ Tools integrated into MCP frontend
- ✅ Documentation updated in README
- ✅ Coverage metrics report generated
- ✅ Boundary cases identified and tested (40 tests)
- ✅ Integration tests for complex scenarios (15 tests)
- ✅ All new tests passing
- ✅ Coverage improved to 95%+ for Phase 1 tests
- ✅ 95+ new tests implemented
- ✅ aeon_jit test suite 100% passing
- ✅ Workstream 1 features ready for agents
- ✅ Coverage metrics document created
- ✅ All work committed with clear messages
- Enables agent efficiency: Function skeleton helps agents make token-smart decisions
- High-value feature: Critical for autonomous agent triage workflow
- Builds on Phase 1: Uses existing tool infrastructure
- Unblocks other workstreams: Data flow slices enable datalog queries (Workstream 2)
- Unblocks development: 8 known failures prevent progress
- Simple ROI: Each failure is likely root-cause analyzable
- Improves confidence: Ensures framework stability
- Prerequisite for advanced tests: Complex scenarios need stable base
- Quality assurance: Understand test depth vs. breadth
- Identify gaps: Systematic view of uncovered scenarios
- Regression prevention: Can measure coverage regressions
- Credibility: Demonstrates thorough testing to stakeholders
| Risk | Likelihood | Impact | Mitigation |
|---|---|---|---|
| aeon_jit failures hard to fix | Medium | High | Root-cause analysis first; consider deferring |
| Workstream 1 design unclear | Low | Medium | Refer to roadmap.md; validate design before coding |
| Coverage metrics show large gaps | Medium | Low | Expected; identify priority gaps |
| Boundary tests find new bugs | Medium | Low | Expected; fix bugs as found |
Phase 2 recommended approach:
- Part A (Priority 1): Fix aeon_jit failures + Workstream 1 token-efficient topology (40+ tests, ~2 weeks)
- Part B (Priority 2): Coverage metrics + boundary cases + integration tests (55+ tests, ~2 weeks)
- Total: 95+ new tests, 100% aeon_jit pass rate, Workstream 1 ready for agents
This approach:
- ✅ Unblocks Workstream 1 (critical for roadmap)
- ✅ Fixes framework issues (8 failures)
- ✅ Improves test quality (coverage + boundary cases)
- ✅ Maintains momentum (build on Phase 1 success)
- ✅ Delivers concrete agent-facing features
Next step: Proceed with implementation plan approval and start Part A Week 1 work.