Skip to content

fix(drivers/189): decode JSON strings before parsing timestamps - #3033

Merged
PIKACHUIM merged 1 commit into
mainfrom
fix-grpmsg-250502
Sep 4, 2026
Merged

fix(drivers/189): decode JSON strings before parsing timestamps#3033
PIKACHUIM merged 1 commit into
mainfrom
fix-grpmsg-250502

Conversation

@jyxjjj

@jyxjjj jyxjjj commented Sep 4, 2026

Copy link
Copy Markdown
Member

Summary / 摘要

Decode JSON strings before parsing timestamps in the 189pc and 189_tv drivers. JSON-escaped Unicode spaces such as \u202f and \u00a0 now reach the existing whitespace normalization as decoded characters, preventing time parsing errors for these responses.

Extend regression coverage through JSON unmarshalling, including escaped spaces, invalid input, and XML compatibility. This fixes a source-level decoding gap; it has not been confirmed as the cause of the reported upload error because the original response is unavailable.

  • This PR has breaking changes.
    / 此 PR 包含破坏性变更。
  • This PR changes public API, config, storage format, or migration behavior.
    / 此 PR 修改了公开 API、配置、存储格式或迁移行为。
  • This PR requires corresponding changes in related repositories.
    / 此 PR 需要关联仓库同步修改。

Related repository PRs / 关联仓库 PR: None.

Testing / 测试

Targeted tests matching TestTimeUnmarshal passed for 189_tv with the default checks enabled. The same tests passed for 189pc with -vet=off; the default invocation was blocked by two pre-existing non-constant format string errors in calls to fmt.Errorf. Tests cover JSON-escaped Unicode spaces, existing date formats, invalid JSON input, and XML compatibility. Formatting and whitespace checks passed. Dependency downloads were disabled during testing.

  • Full test suite.
  • Manual upload test.

Checklist / 检查清单

  • I have read CONTRIBUTING.
  • I confirm this contribution follows the repository license, contribution policy, and code of conduct.
  • I have formatted the changed code with gofmt, go fmt, or prettier where applicable.
  • I have requested review from relevant maintainers or code owners where applicable.

AI Disclosure / AI 使用声明

  • This PR includes AI-assisted content.

Tools used / 使用工具:

  • Codex

Usage scope / 使用范围:

  • Code generation / 代码生成

  • Documentation / 文档

  • Tests / 测试

  • Review assistance / 审查辅助

  • I have reviewed and validated all AI-assisted content included in this PR.

  • I have ensured that all AI-assisted commits include Co-Authored-By attribution.

  • I can reproduce all AI-assisted content included in this PR without any AI tools.

- Decode JSON time strings before normalizing Unicode spaces in both 189 drivers
- Exercise escaped spaces and existing date formats through JSON unmarshalling
- Cover invalid JSON input and XML time parsing

Co-authored-by: Codex <267193182+codex@users.noreply.github.com>
Signed-off-by: jyxjjj <16695261+jyxjjj@users.noreply.github.com>
@PIKACHUIM
PIKACHUIM merged commit c3d3da9 into main Sep 4, 2026
14 checks passed
@jyxjjj
jyxjjj deleted the fix-grpmsg-250502 branch September 4, 2026 18:45
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.

2 participants