| New file |
| | |
| | | # Auto Tune Dispatch Verification |
| | | |
| | | - Verification time: 2026-04-27 12:50:15 CST |
| | | - Branch: `codex/auto-tune-dispatch` |
| | | - HEAD: `0a13eab` |
| | | - Scope: Task 7 end-to-end verification and operator notes only. No business code was changed. |
| | | |
| | | ## Command Results |
| | | |
| | | | Command | Result | Notes | |
| | | | --- | --- | --- | |
| | | | `git status --short --branch` | PASS | Output: `## codex/auto-tune-dispatch`; no uncommitted files before this document was created. | |
| | | | `mvn -q -Dtest=FlowTopologySnapshotServiceImplTest,AutoTuneApplyServiceImplTest,AutoTuneCoordinatorServiceImplTest test` | PASS | Exit code 0. Output includes expected negative-path logs from tests that intentionally throw MCP, guard, log, and agent failures. Mockito/ByteBuddy dynamic agent warnings were also printed. | |
| | | | `mvn -q -DskipTests compile` | PASS | Exit code 0. | |
| | | | `mvn -q -DskipTests spring-boot:run` | PASS with controlled stop | Started far enough to confirm `Tomcat started on port 9090 (http) with context path '/wcs'`; process was then stopped to avoid hanging. | |
| | | |
| | | ## Startup Verification |
| | | |
| | | Startup log file from this run: `/tmp/zy-wcs-auto-tune-startup-43850.log`. |
| | | |
| | | Observed runtime startup evidence: |
| | | |
| | | - Tomcat initialized on port `9090`. |
| | | - Embedded context path initialized as `/wcs`. |
| | | - MySQL/Hikari connection pool started successfully in this environment. |
| | | - `AiMcpMountInitializer` logged `AI MCP mounts initialized, insertedOrRecovered=1`. |
| | | - `AiPromptTemplateServiceImpl` logged default prompt block initialization for `sceneCode=wcs_auto_tune_dispatch`, `version=1`. |
| | | - `AiPromptTemplateInitializer` logged `AI prompt templates initialized, insertedOrRecovered=1`. |
| | | - `McpServerAutoConfiguration` logged tools capability enabled and `Registered tools: 12`. |
| | | |
| | | Startup caveats: |
| | | |
| | | - The process was intentionally stopped after reaching Tomcat startup and MCP registration. |
| | | - License loading began after Tomcat startup, but longer runtime behavior was not verified. |
| | | - A macOS Netty DNS native-library fallback warning appeared. It did not block startup in this run. |
| | | |
| | | ## Coverage Evidence |
| | | |
| | | MCP snapshot sections: |
| | | |
| | | - `AutoTuneSnapshot` contains task, station runtime, cycle/loop load, topology, parameter, and timestamp fields: `taskSnapshot`, `stationRuntimeSnapshot`, `cycleLoadSnapshot`, `flowTopologySnapshot`, `currentParameterSnapshot`, `snapshotTime`. |
| | | - `AutoTuneSnapshotServiceImpl.buildSnapshot()` populates task, station runtime, cycle load, flow topology, current parameters, and snapshot time. |
| | | - `AutoTuneMcpTools.getAutoTuneSnapshot()` is covered by `snapshotToolDelegatesToSnapshotService`. |
| | | |
| | | Station runtime: |
| | | |
| | | - `AutoTuneSnapshotServiceImpl.toRuntimeItem()` maps only `stationId`, `autoing`, `loading`, `taskNo`, and `ioMode` from `StationProtocol`. |
| | | - `FlowTopologySnapshotServiceImplTest.calculateRuntimeCountsUsesOnlyAutoingLoadingAndTaskNo` verifies runtime counts using `autoing`, `loading`, and `taskNo`. |
| | | - No evidence in this verification path showed dependence on `taskWriteIdx` or `taskBufferItems`. |
| | | |
| | | Dry-run, apply, rollback, batch, buffer, and safety gate coverage: |
| | | |
| | | - `AutoTuneApplyServiceImplTest` covers whitelist rejection, numeric validation, range limits, step limits, cooldown rejection, dry-run no-write behavior, mixed valid/invalid real batch rejection, successful mixed batch apply across `sys_config`, `station`, `crn`, and `dual_crn`, write failure rollback, successful rollback, and failed rollback. |
| | | - `rejectStationOutTaskLimitAboveDirectionalBufferCapacity` verifies `station.outTaskLimit` cannot exceed directional `bufferCapacity`. |
| | | - `AutoTuneCoordinatorServiceImplTest` covers MCP apply dry-run requirement, direct real-apply rejection without dry-run token, matching token apply, mismatched token rejection, expired token rejection, rollback tool delegation, allowed tool sequence, disallowed tool rejection, and allowed tool failure handling. |
| | | |
| | | Scheduler/coordinator coverage: |
| | | |
| | | - `coordinatorSkipsWhenDisabled` covers disabled/idle skip. |
| | | - `coordinatorSkipsWhenNoActiveTasks` covers no active task skip. |
| | | - `coordinatorSkipsWhenIntervalNotReached` covers interval gating. |
| | | - `coordinatorTriggersAgentWhenEligible` covers active trigger path. |
| | | - `coordinatorSkipsWhenRunningLockIsNotAcquired` covers distributed lock gating. |
| | | - `coordinatorSetsGuardWhenAgentReturnsFailure` and `coordinatorSetsGuardWhenAgentThrows` cover failure throttle guard behavior. |
| | | - `coordinatorKeepsAgentResultWhenOperateLogFails` and `coordinatorRunsAgentAndReleasesLockWhenGuardWriteFails` cover cleanup/release behavior around secondary write failures. |
| | | |
| | | ## Not Fully Runtime-Verified |
| | | |
| | | - Actual MCP client calls were not executed against the running server; MCP behavior was verified by unit tests and startup tool registration logs. |
| | | - Auto-tune agent behavior against a real LLM was not executed; tests use mocked LLM and MCP tool manager responses. |
| | | - Long-running scheduler cadence was not observed in a live process; interval, active-task, lock, and failure-throttle behavior was verified by unit tests. |
| | | - Full operator UI/page flows were not verified because Task 7 did not include page interaction and no frontend files were changed. |