Repository navigation
fix(measure): preserve reanalysis storage paths on current main - #21
Merged
Merged
Conversation
There was a problem hiding this comment.
AI 代码审查(claude-opus-5-5)
本次修复方向正确:子执行的 CRYBIN 登记改为相对存储根目录的路径,WAV 分片复制后在旁边写入子执行自己的索引。新增测试覆盖了仪表盘和 Flow 两个历史读取出口、多分片以及损坏索引的拒绝路径。主要问题如下:
- 新索引仍写绝对路径:这与本 PR“登记相对存储根目录”的目标不一致。存储根迁移后,新索引会再次失效。
- 索引文件名推导逻辑重复:写入端用正则复制了读取端(
ProjectDashboardComponent.resolveWavIndexRelativePath)的规则,两处可能逐渐不一致。 - 兼容性与校验:读取旧索引时,编码和列数一致性的处理偏严或偏松。
其他意见:
MeasureReanalysisOutputs.finish()返回的fileUrl从绝对路径改为相对路径。请确认它的所有调用方(包括执行失败或取消时按fileUrl清理文件的逻辑)都已改为基于存储根解析。否则相对路径会按进程工作目录解析,导致清理失效或误操作。diff 中看不到这部分代码,无法确认。- 新的契约测试大量通过
ReflectionTestUtils.invokeMethod调用私有方法(applyRenderDataFile、buildRenderData、resolveWavIndexRelativePath)。这类测试在私有方法改名或改签名时会在运行期才失败,建议后续把被测契约提取为包可见或公开的方法。 - 缺少以下测试:取消发生在写索引阶段;原索引使用相对路径条目;原索引混用两列和三列。
- 按 CONTRIBUTING,PR 描述应使用
Refs #<编号>关联对应缺陷,当前描述中没有。
由 AI 自动生成,仅供参考,不作为合并依据。审查提交:
eb953fb。维护者可评论/review重新审查。
JohnWuY
pushed a commit
that referenced
this pull request
Nov 19, 2026
## Why Bring PR22 in line with the current `main` baseline and remove deterministic Windows and frontend CI failures. This PR is broader than the earlier `ChannelCursor` and FileSelect-only description. It includes the baseline repairs already present on the branch and the runtime changes they require. ## Current refs - Base: `main@b50ac07` - Head: `fix/main-ci-baseline-20261116@a9f30cf` ## Backend runtime changes - `ChannelCursor` closes the first shard reader when constructor-time validation or loading fails. - `GraphicConfigService` validates retained provider members, initializes axes when planning the first member, and opens unit-query scopes for standalone projections. Monitor Math saves and unit refreshes preserve independent binding rows. - Monitor can replay audio-only recordings that lack the optional CAN input service. - `ProjectService` accepts omitted legacy result-limit lists during import. - `ReferenceTestProjectionContextResolver` and `ReferenceTestExecutionPlanner` use active BK CPB shared-input declarations and ignore dormant legacy snapshots. - `BuiltInFftSignalAnalysisProvider` and `BuiltInOctaveSignalAnalysisProvider` handle BK FRF and reference-test result paths, including the single-channel cross-spectrum case. Mixed BK FFT requests use shared calibrated inputs for ordinary results and the stored unit plan for reference/test results. - `DefaultBoxExecutionSession` avoids duplicate default unit metadata when the prepared unit already matches the result unit. - `FrozenHistoricalArtifactFactResolver` restores time-window identity from frozen configuration when the persisted identity is incomplete. ## Frontend runtime changes - `use-grpc-exec.ts` distinguishes the single-value time-history case by the available value count before adding stamped points. - `tr-TR.ts` applies the Turkish measurement supplement after the English base messages so supplied Turkish strings take effect. These are product behavior changes, not test-only changes. The locale merge remains a shallow merge and requires the supplement namespaces to be complete. ## CI and test changes - Server test dependencies use Mockito 5.24.0 to fix handler lookup when inline and subclass mocks share a test process. - The Monitor HTTP and SQLite mutation suite runs in Maven Failsafe and loads the built-in plugin from the packaged artifact. Monitor fixtures preserve CAN catalog entries and supply the Math planner where the host prepares and reads results. - A SQLite regression test verifies that a failed project transaction refreshes only device-confirmed channel changes. - The frontend CI license variables are scoped to the unit-test step. - Backend CI skips the external Crowdin download because the Windows test runner does not provide the Crowdin CLI or credentials. The Maven property is quoted for PowerShell so Maven receives the full property name. - Backend and frontend fixtures now match the current platform and service contracts, including Windows paths, `file:` URIs, HDF5 reopen behavior, schema fixtures, plugin failure isolation, reference-result units, report navigation, numeric input event ordering, and locale expectations. - The report-navigation and numeric-input tests changed on this branch. The PR no longer claims that those areas are frozen. - The Standard Signal Chain test tracker now uses atomic lease references because two pipeline branches can release the same pooled array concurrently. - `ConcurrentFileManager` retains the remove-result ownership rule and the shutdown drain completes queued tasks exactly once. Existing latch tests cover the worker-consumed and shutdown-drained races. - The CAN editor tests wait up to five seconds for asynchronous DBC parsing and port discovery under the full CI worker load. - The Windows device protocol test now stubs the platform-native active-library path. - The HDF5 export test verifies the Unicode output bytes and reopens an ASCII inspection copy because the Windows native HDF5 reader cannot reliably reopen the Unicode path. - The CAN startup failure test waits for the asynchronous failure stop and asserts a failed stop rather than an elapsed-time success. - Server tests resolve SQL, YAML, and migration fixtures from Maven's module base directory instead of assuming the repository root is the working directory. - Tests that require an unavailable real Native license, external business plugin, or unavailable internal plugin fixture were removed from the server unit suite. Mocked Native boundary tests remain. ## Verification - GitHub Actions passed frontend checks, CodeQL, and docs policy for the previous PR head `e081498`. - The Windows backend check on that head reported 17 server unit-test failures. The follow-up changes target the Mockito and Monitor class-loading causes. - Java 21 on macOS passed the full Maven `verify` for `a9f30cf`. 8,825 tests passed, including all 55 packaged integration tests. Maven skipped 57 tests. - GitHub Actions passed both frontend checks and Windows backend tests for `a9f30cf`. See [CI run 44502956313](https://github.com/crysound/OpenTest/actions/runs/44502956313). - The AI review workflow for `a9f30cf` returned HTTP 524. The second attempt was canceled. ## Risk and review notes This PR changes measurement execution, provider unit declarations, historical result identity, BK FRF result production, locale merging, and CI test authorization scope. Review those runtime changes separately from the fixture-only updates. The branch contains focused regression tests. No merge or deployment has been performed. Refs #21.
yangdekun2026
approved these changes
Nov 20, 2026
KyleHuangFromHZ
approved these changes
Nov 20, 2026
Closed
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.
Why
Historical reanalysis children can write WAV indexes and result files under paths that the host cannot read after the child record is saved. The focused verifier reproduced 17 failures and 5 errors before this fix.
What changed
Preserve the source WAV index timing and frame fields when the executor copies child shards.
Write child indexes beside the copied WAV shard and keep output registrations relative to the shared storage root.
Add path contract coverage for dashboard and flow historical reads, WAV indexes, and multi-shard files.
Keep the handoff file removed as required by current
main; the historical handoff is not reintroduced.Merge the latest
mainat4731cb5.Make desktop native-library fixtures use the current platform and stub Windows in the mocked signing tests.
Verification
Local validation on macOS with Node.js 24.16.0, pnpm 10.6.5, and Java 21.
pnpm build:sdkandpnpm typecheck:testspassed.pnpm test:runpassed 15,202 frontend tests and 479 desktop tests. The suite skipped 63 frontend tests and 2 desktop tests.mvn -B --no-transfer-progress --fail-at-end -Dskip.crowdin.download=true -f apps/backend/pom.xml testpassed 8,785 tests, with 57 skipped, 0 failures, and 0 errors.pnpm check:boundariesand the staged docs policy check passed.