Conversation
…el catalog, model registry, online models, performance budget, replay, resource loot reward, runtime, safety envelope, snapshot builder, tactical blackboard, tactical states, target proposal, UI bridge, and UI presenter - Implement tests for lifecycle initialization and termination - Verify loader order for unified tick and event bus - Ensure metrics maintain bounded counters, gauges, and samples - Test model catalog registration and lifecycle - Validate model registry behavior and evidence handling - Check online models for streaming statistics and Markov state predictions - Assess performance budget degradation of optional work - Confirm deterministic replay functionality - Evaluate resource and loot observation handling - Test runtime initialization and lifecycle management - Validate safety envelope for decision-making - Ensure snapshot builder reconciles spectators correctly - Test tactical blackboard for owner validation and expiration - Validate tactical proposal states for lure and pull behaviors - Ensure target proposal adapts legacy targets correctly - Verify UI bridge exposes required sections - Test UI presenter for state mapping and command execution Update ring buffer utility to export globally and bump version to 5.0.0
…with v5 API updates - Updated discovery_spec.lua to enhance test coverage for the Discovery orchestrator, including state transitions and policy states. - Revised readiness_spec.lua to incorporate backward compatibility and new role-based readiness checks. - Enhanced scheduler_spec.lua with additional tests for action processing, acknowledgment, and backoff mechanisms. - Improved state_machine_spec.lua to reflect new state definitions and transition logic, including terminal state checks. - Added comprehensive tests for tactical intelligence in tactical_intelligence_spec.lua, ensuring accurate model diagnostics and unified read models. - Updated bot_doctor_spec.lua to include new checks for actionable intelligence issues and performance metrics. - Modified ui_bridge_spec.lua to reflect changes in UI sections for the Tactical Intelligence window.
…ning to Tactical Intelligence - Deleted HuntAnalyzer and its associated UI components. - Updated analytics event names to reflect the new Tactical Intelligence framework. - Refactored intelligence runtime to publish canonical events for session management and loot observation. - Enhanced model catalog to use a neutral prior for fresh predictions. - Improved monster profiling by integrating telemetry data into Tactical Intelligence. - Updated documentation to reflect changes in analytics reporting and module integration. - Added unit tests for new functionality and legacy cleanup.
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Defines 20 closure reasons and 5 ambiguous reasons for episode state machine validation. Provides isValid(), isAmbiguous(), and all() API. Registered as nExBot.IntelligenceOutcomeReasons.
Defines IntelligenceEventSchema with SCHEMA_VERSION, TYPES enum, REQUIRED_FIELDS, and validation helpers (isValidType, requiredFieldsFor, hasField). Tests cover schema version, all 25 types, common fields, per-type fields, unknown/nil rejection, and global registration.
Implements bounded event deduplication with LRU eviction for the intelligence pipeline. Tracks both eventId and idempotencyKey with proper cleanup on eviction. 16 tests covering all API surface.
Removed player:health, player:mana, container:update, and combat:target from the second EventBus block — they were already handled by the sectionTracker block above, causing double dirty-marking.
- OutcomeRecord.new(config): create instance - record:create(config): create outcome with decisionId, actionId, closureReason - record:validate(outcome): validate well-formed outcome - record:measure(outcome, key, value): add measurement to outcome - Validates closureReason against IntelligenceOutcomeReasons - 20 passing tests, no regressions
Creates core/intelligence/records/decision_record.lua with create, close, and validate methods. Follows outcome_record.lua patterns. Includes 29 busted tests covering required field validation, decisionType enum checking, default prediction table, outcome attachment, and global registration.
- EpisodeBase.new/create/close/validate/isOpen API - Validates episode types: action, encounter, loot, route_segment, hunt - Uses IntelligenceOutcomeReasons for closure validation - Idempotent close (returns unchanged if already closed) - Non-mutating close (returns copy) - 24 passing tests
- Tracker.new(config) with episodeBase dependency - start/close/get/getOpen/stats API - 17 passing tests
- Tracker manages loot episode lifecycle via EpisodeBase - API: start, close, get, getOpen, stats - Validates required fields, rejects duplicate IDs - Tracks lootLifecycle counters per episode - 20 passing tests
- Initialize episodeBase, encounterTracker, lootEpisodeTracker, routeSegmentTracker, huntTracker in runtime init block - Add combat:target_changed handler to start encounter episodes - Add loot:received handler to start loot episodes - Set/clear sessionId and huntId on session start/end events - Use dofile fallbacks for test compatibility
- Cost.new(config) with optional initialCosts - getCost(action, context), recordCost(action, cost), getAverage(action) - 7 passing tests
- Add optional eventFactory/eventContext params to LootObserver.new() - Emit loot_item_observed on each item in observe() - Add moveAttempted() emitting loot_move_attempted - Add moveVerified() emitting loot_move_verified - Register as nExBot.IntelligenceLootObserver - 13 tests passing, no regressions
- Initialize rewardVector and rewardNormalizer after episode tracker - Add intelligence:encounter_closed event handler - Update test fixtures to load reward modules
- target_value_model, route_reliability_model, resource_efficiency_model - timing_model, risk_assessment_model, loot_opportunity_model - ensemble_meta_model (combines other model predictions) Each model extracts contextual features and maintains per-model state. Dynamic dispatch wrappers ensure method overrides work through registry. Co-Authored-By: opencode <noreply@opencode.ai>
TDD: 6 tests covering construction, gate evaluation, promotion eligibility, and insufficient data handling.
…n explanations - Explainer.new(config) constructor - explain(decision) returns explanation table with baseline, selected, adjustment, confidence, factors, guardrails, pricesKnown, modelVersion - format(explanation) returns readable string - Handles missing fields gracefully
Replace obsolete model names (NavigationCostModel, MonsterBehaviorModel, TargetUtilityModel, TargetSwitchModel, LureSafetyModel, PullContinuationModel, WavePredictionModel) with equivalents from the rewritten model catalog (RouteReliabilityModel, TargetValueModel, RiskAssessmentModel, ResourceEfficiencyModel, TimingModel).
All 28 new modules created during the v5 ML redesign were missing from the loader, causing runtime.lua to fail when trying to load them via dofile() fallback. Added them in dependency order before intelligence/runtime.
…vider, kill_switch Three modules used bare globals instead of nExBot.X registration, causing runtime.lua to fail loading when the loader couldn't find them. This cascade-failed everything downstream (applyContextAdjustment, advanceGeneration, etc.)
OTClient uses Lua 5.1/LuaJIT where unpack is a global function, not table.unpack (which doesn't exist pre-5.2).
OTClient's sandbox apparently strips both unpack and table.unpack from globals. The existing shim in event_bus.lua only fires if unpack exists (which it doesn't here). Replaced with a simple ipairs-based copy function.
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.
No description provided.