Skip to content

fix(logs): detect high-precision epoch timestamps - #89

Open
efegokdemir wants to merge 1 commit into
Basekick-Labs:mainfrom
efegokdemir:fix/74-epoch-precision
Open

efegokdemir wants to merge 1 commit into
Basekick-Labs:mainfrom
efegokdemir:fix/74-epoch-precision

Conversation

@efegokdemir

@efegokdemir efegokdemir commented Sep 26, 2026 •

Copy link
Copy Markdown

Closes #74.

Summary

Detect microsecond- and nanosecond-precision Unix epoch values during log field detection.

Implementation

  • Recognize epoch values by precision range rather than only 10- and 13-digit widths.
  • Convert with BigInt before converting to milliseconds, avoiding precision loss for nanosecond values.
  • Validate the resulting date is within the existing 2000–2100 plausibility window.
  • Reject values outside supported precision ranges and implausible high-precision values.
  • Preserve rejection of ordinary small integers and unrelated date formats.

Regression tests

Added coverage for valid 16-digit microsecond and 19-digit nanosecond timestamps, plus implausible 16- and 19-digit values.

Testing

  • npm run check — not run: Node/npm is unavailable in this environment.
  • npm run build — not run: Node/npm is unavailable in this environment.
  • npm test -- --run src/lib/logFieldDetector.test.ts — not run: Node/npm is unavailable in this environment.
  • git diff --check — passed.

AI disclosure

AI assistance was used during investigation and implementation; the change and validation results were reviewed before submission.

Signed-off-by: Efe Gökdemir <efe@rexcode.co.uk>
@github-actions

github-actions Bot commented Sep 26, 2026 •

Copy link
Copy Markdown

All contributors have signed the CLA. Thanks!
Posted by the CLA Assistant Lite bot.

@efegokdemir

Copy link
Copy Markdown
Author

I have read the CLA Document and I hereby sign the CLA

@efegokdemir

Copy link
Copy Markdown
Author

All contributors have signed the CLA. Thanks!

@efegokdemir

Copy link
Copy Markdown
Author

The only failed check is the old CLA signed run from 2026-09-26. The CLA bot subsequently reported that all contributors have signed, and the author confirmed the CLA on 2026-09-30. I attempted to rerun the failed job, but GitHub requires repository-admin permission. Please rerun the CLA workflow from the repository side.

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.

fix(logs): detect microsecond and nanosecond epoch timestamps

1 participant