Skip to content

Stabilize large finite time-offset errors#4449

Open
FlorianPfaff wants to merge 4 commits into
mainfrom
agent/stabilize-time-offset-large-errors
Open

Stabilize large finite time-offset errors#4449
FlorianPfaff wants to merge 4 commits into
mainfrom
agent/stabilize-time-offset-large-errors

Conversation

@FlorianPfaff

Copy link
Copy Markdown
Owner

Bug

time_offset_error_summary() computed residual magnitudes with np.linalg.norm at the original scale. Large but finite residual components could overflow during squaring, producing inf. _error_stats() then filtered those values out as non-finite and reported zero valid samples.

The same overflow pattern affected mean, standard-deviation, and RMSE reductions, including aggregated time-offset sweeps. For example, two valid residuals equal to 0.75 * np.finfo(float).max were reported as an empty result even though each residual and each expected summary metric is representable.

Fix

  • scale residual rows before computing Euclidean norms
  • compute means, standard deviations, and RMS values in normalized coordinates before restoring the original scale
  • scale aggregation weights and pooled-variance calculations to avoid intermediate overflow
  • preserve existing behavior for zero, empty, ordinary-scale, and genuinely non-representable results

Validation

  • reproduced the previous inf norm and zero-count summary
  • added end-to-end regressions for large finite residual summaries and aggregated sweeps
  • focused regression tests: 2 passed
  • syntax compilation passed for the implementation and regression test
  • compatibility checks passed for offset-grid generation, nearest-time matching, existing aggregate semantics, and recovery of a known offset

Full repository CI is requested by this pull request.

@github-actions

github-actions Bot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

MegaLinter analysis: Success

Descriptor Linter Files Fixed Errors Warnings Elapsed time
✅ COPYPASTE jscpd yes no no 23.18s
✅ JSON prettier 7 0 0 0 0.97s
✅ JSON v8r 7 0 0 3.38s
✅ MARKDOWN markdownlint 68 0 0 0 2.0s
✅ MARKDOWN markdown-table-formatter 68 0 0 0 0.76s
✅ PYTHON black 1543 197 0 0 90.39s
✅ PYTHON isort 1543 368 0 0 2.64s
✅ REPOSITORY betterleaks yes no no 2.3s
✅ REPOSITORY checkov yes no no 51.86s
✅ REPOSITORY gitleaks yes no no 13.6s
✅ REPOSITORY git_diff yes no no 0.46s
✅ REPOSITORY secretlint yes no no 63.11s
✅ REPOSITORY syft yes no no 5.56s
✅ REPOSITORY trivy-sbom yes no no 6.36s
✅ REPOSITORY trufflehog yes no no 32.3s
✅ YAML prettier 11 0 0 0 0.76s
✅ YAML v8r 11 0 0 10.79s
✅ YAML yamllint 11 0 0 0.61s

Notices

📣 MegaLinter 9.5.0 is out! Discover the new features and security recommendations in the release announcement. (Skip this info by defining SECURITY_SUGGESTIONS: false)

See detailed reports in MegaLinter artifacts

Your project could benefit from a custom flavor, which would allow you to run only the linters you need, and thus improve runtime performances. (Skip this info by defining FLAVOR_SUGGESTIONS: false)

  • Documentation: Custom Flavors
  • Command: npx mega-linter-runner@9.6.0 --custom-flavor-setup --custom-flavor-linters PYTHON_BLACK,PYTHON_ISORT,COPYPASTE_JSCPD,JSON_V8R,JSON_PRETTIER,MARKDOWN_MARKDOWNLINT,MARKDOWN_MARKDOWN_TABLE_FORMATTER,REPOSITORY_CHECKOV,REPOSITORY_GIT_DIFF,REPOSITORY_GITLEAKS,REPOSITORY_BETTERLEAKS,REPOSITORY_SECRETLINT,REPOSITORY_SYFT,REPOSITORY_TRIVY_SBOM,REPOSITORY_TRUFFLEHOG,YAML_PRETTIER,YAML_YAMLLINT,YAML_V8R

MegaLinter is graciously provided by OX Security
Show us your support by starring ⭐ the repository

@FlorianPfaff FlorianPfaff enabled auto-merge (squash) July 15, 2026 18:13
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