Skip to content

fix: harden workbench units and usability - #6

Merged
D-sudoasd merged 2 commits into
mainfrom
codex/fix-workbench-audit
Aug 23, 2026
Merged

fix: harden workbench units and usability#6
D-sudoasd merged 2 commits into
mainfrom
codex/fix-workbench-audit

Conversation

@D-sudoasd

@D-sudoasd D-sudoasd commented Aug 23, 2026

Copy link
Copy Markdown
Owner

Summary

  • enforce a fail-closed Q-axis unit contract across text, canSAS, NXcanSAS, CLI, and Workbench paths
  • harden scientific preflight checks, sector merging, instrument consistency, and structured-output axis gates
  • refine labels, tooltips, language refresh, output-format presentation, and small-screen behavior without redesigning stable workflows

Scientific and data-integrity fixes

  • preserve and normalize reciprocal-Q units, including Unicode and whitespace headers; reject bare/signless/unsupported unit hints
  • convert nm^-1 to A^-1 exactly once in CLI workflows, including safe explicit-column overrides
  • preserve canSAS/NXcanSAS Q metadata and absolute-intensity round trips
  • keep unknown uncertainty as NaN during sector merging and exclude non-finite intensities from weighting
  • make Tab2 dry check match run-time fluorescence, mode, sector, strict-instrument, and output-axis validation
  • reject Chi outputs for Q-only structured formats before processing
  • validate wavelength-energy consistency plus PONI/header distance, pixel, detector, and shape metadata

User-facing refinements

  • label fluorescence inputs and add contextual hover help
  • show readable localized output-format names while retaining stable internal tokens
  • move Tab3 output format into the execution area
  • refresh file labels, standard options, help text, and format labels when switching language
  • clarify fixed-thickness, transmission, grouping, reference-marker, and resume/raw-path wording
  • fix truncated preview labels, broaden detector/profile file filters, and cap minimum window size to the available screen

Verification

  • py -3.12 -m pytest -q — 975 passed
  • focused parser/CLI/Workbench suite — 340 passed
  • py -3.12 -m ruff check SASAbs.py src tests — passed
  • py -3.12 -m compileall -q src SASAbs.py — passed
  • git diff --check — passed
  • manual Windows GUI smoke in English and Chinese across Tab1, Tab2, Tab3, language switching, scrolling, and Help
  • independent read-only code review — APPROVE/CLEAR

Validation boundary

This is engineering and synthetic-data validation. No real beamline dataset was used, so it does not constitute scientific acceptance of an experimental calibration result.

本次 Agent 审查与改进

  • 审查基准: cac6efc2ad65a329221d0b32941d89629d635303
  • 主要发现: 复现了 Q 单位宽松解析与 10 倍换算风险、表头/强度列误选、重复归一化 provenance 覆盖、HDF5 缺少预检、非有限仪器容差绕过、错误 sector count 静默丢弃等问题。
  • 已完成修改: 统一严格 Q 单位与物理字段宽度合同;修复 quoted/CSV/semicolon/whitespace/comment 表头、id/indexI/cm 选择、显式 NaN 和行内注释、依赖/容差预检、sector fallback 与文件扩展名提示。
  • 新增或更新测试: 覆盖 malformed/conflicting Q、nm⁻¹→Å⁻¹ 单次换算、CLI/Workbench 一致性、自定义列选择、不确定度对齐、quoted header、物理列宽及行内注释等真实链路。
  • 合并前验证: 本地 975 项全套测试、340 项关键链路测试全部通过;Ruff、compileall、git diff --check 通过;两名独立终审均为 CLEAR/APPROVE;PR head CI run 32644359202 13/13 项成功。
  • 合并结果: 已于 2026-08-23 22:19:56 CST 以 squash 合并为 0c03f9372ba2c222a60eeae3a41cad98d35af44d;合并提交的文件树与已验证 head 完全一致。
  • 合并后验证: main CI run 32645103767 13/13 项成功。
  • 分支处置: 按仓库所有者要求,保留本地与远程 codex/fix-workbench-audit 分支,均仍指向 cac6efc2ad65a329221d0b32941d89629d635303
  • 剩余边界: 未使用真实 beamline 数据,也未完成完整 Tk GUI 人工验收;工程测试通过不等同于实验数据的科学验收。
  • 最终状态: PR fix: harden workbench units and usability #6 已完成审查、修复、复核、Ready、squash 合并及合并后 CI 闭环。

@D-sudoasd

D-sudoasd commented Aug 23, 2026

Copy link
Copy Markdown
Owner Author

Agent 审查总结

  • 已修复双代理审查与后续终审中复现的 Q 单位、表头/列选择、provenance、预检和数值边界缺陷,修复提交:cac6efc2ad65a329221d0b32941d89629d635303
  • 本地验证:975 项全套测试、340 项关键链路测试全部通过;Ruff、compileall、git diff --check 通过。
  • 两名独立修复后审查员均给出 CLEAR / APPROVE
  • PR head 的 CI run 32644359202 已成功,13/13 项检查全部通过。
  • 已于 2026-08-23 22:19:56 CST 以 squash 合并为 0c03f937;合并提交的文件树与已验证 head 完全一致。
  • 合并后的 main CI run 32645103767 已成功,13/13 项检查全部通过。
  • 按仓库所有者要求,本地和远程 codex/fix-workbench-audit 分支均已保留,未执行分支删除。
  • 验证边界:未使用真实 beamline 数据,也未完成完整 Tk GUI 人工验收,因此不把工程测试外推为实验结果的科学验收。
  • 当前账号是本 PR 作者,不能对自己的 PR 提交正式 Approval;本评论记录的是双代理审查、独立复核与合并闭环证据。

@D-sudoasd
D-sudoasd marked this pull request as ready for review August 23, 2026 14:19
@D-sudoasd
D-sudoasd merged commit 0c03f93 into main Aug 23, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant