Commit 1de6fdd
committed
fix(agent): replace stub implementations with proper inheritance
The OptimizedAgent had empty stub implementations for
core allocation methods.
Solution: OptimizedAgent now properly extends the original Agent class,
inheriting all working business logic while only overriding methods
that need performance optimization.
Changes:
- Renamed from `export class Agent` to `export class OptimizedAgent extends Agent`
- Import Agent and convertSubgraphBasedRulesToDeploymentBased from './agent'
- Remove all duplicated/stub method implementations
- Use inherited methods for core allocation operations
- Fix ActionReconciliationContext type to use HorizonTransitionValue
- Fix maxAllocationDuration API call (was maxAllocationEpochs)
- Use AllocationStatus.ACTIVE enum instead of string 'Active'
The optimized reconciliation loop adds:
- NetworkDataCache for caching network data
- CircuitBreaker for fault tolerance
- AllocationPriorityQueue for priority-based processing
- GraphQLDataLoader for batched queries
- ConcurrentReconciler for parallel processing1 parent d19f5a7 commit 1de6fdd
1 file changed
+75
-247
lines changed
0 commit comments