Skip to content

Preserve CLEAR tracker identity precision - #5235

Open
FlorianPfaff wants to merge 3 commits into
mainfrom
agent/preserve-clear-tracker-id-precision
Open

Preserve CLEAR tracker identity precision#5235
FlorianPfaff wants to merge 3 commits into
mainfrom
agent/preserve-clear-tracker-id-precision

Conversation

@FlorianPfaff

Copy link
Copy Markdown
Owner

Bug

evaluate_clear(...) stored previous tracker identities in floating-point arrays solely to use NaN as the unmatched sentinel.

Exact integer tracker IDs above the binary64 precision boundary can therefore collapse to the same stored value. For example, tracker ID 2**53 + 1 is stored as 2**53; a subsequent match to the genuinely different tracker ID 2**53 is then treated as the same identity. This also gives the wrong immediate-timestep continuity bonus and suppresses a real CLEAR identity switch.

Fix

  • store previous and previous-timestep tracker identities in integer arrays;
  • use -1 as the unmatched sentinel, which is safe because validated tracker identities are non-negative;
  • preserve exact identity comparisons throughout continuity assignment and switch counting.

Regression coverage

Add a focused two-frame sequence that changes from tracker ID 2**53 + 1 to 2**53. The CLEAR evaluator must report two true positives and one identity switch.

Validation

  • reproduced current behavior: 2**53 + 1 rounds to 2**53 in the float sentinel array and the switch count is incorrectly zero;
  • exercised the revised integer-sentinel path in an isolated NumPy/SciPy harness and obtained the expected switch count of one;
  • branch comparison: 3 commits ahead, 0 behind main;
  • final diff is limited to the CLEAR evaluator and its focused tracking-metrics test.

GitHub Actions is the authoritative full repository, backend, lint, packaging, documentation, and integration validation.

@github-actions

github-actions Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

MegaLinter analysis: Success

Descriptor Linter Files Fixed Errors Warnings Elapsed time
✅ COPYPASTE jscpd yes no no 28.37s
✅ JSON prettier 7 0 0 0 1.37s
✅ JSON v8r 7 0 0 5.51s
✅ MARKDOWN markdownlint 68 0 0 0 2.29s
✅ MARKDOWN markdown-table-formatter 68 0 0 0 1.14s
✅ PYTHON black 1865 87 0 0 100.91s
✅ PYTHON isort 1865 139 0 0 2.87s
✅ REPOSITORY betterleaks yes no no 2.43s
✅ REPOSITORY checkov yes no no 57.63s
✅ REPOSITORY gitleaks yes no no 18.6s
✅ REPOSITORY git_diff yes no no 0.34s
✅ REPOSITORY secretlint yes no no 86.18s
✅ REPOSITORY syft yes no no 6.28s
✅ REPOSITORY trivy-sbom yes no no 6.02s
✅ REPOSITORY trufflehog yes no no 32.14s
✅ YAML prettier 11 0 0 0 0.85s
✅ YAML v8r 11 0 0 12.08s
✅ YAML yamllint 11 0 0 0.92s

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 marked this pull request as ready for review August 7, 2026 17:59
@FlorianPfaff
FlorianPfaff enabled auto-merge (squash) August 7, 2026 18:00
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