Skip to content

Adding error details to modTimeBlob for debugging#100

Merged
alice-luno merged 2 commits into
mainfrom
ayang-adding-error-details
Jun 2, 2026
Merged

Adding error details to modTimeBlob for debugging#100
alice-luno merged 2 commits into
mainfrom
ayang-adding-error-details

Conversation

@alice-luno

@alice-luno alice-luno commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

For External Submissions:

  • Adding error details to modTimeBlob for debugging
  • Fixed commenting documentation

Part of addressing issue #94

  • Have you followed the guidelines in our Contributing file?
  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?
  • If it's a non-trivial change, I've linked a new or existing issue to this PR
  • I have performed a self-review of my code
  • Does your submission pass existing tests?
  • Have you written new tests for your new changes, if applicable?
  • Have you added an explanation of what your changes do and why you'd like us to include them?

Summary by CodeRabbit

Release Notes

  • Bug Fixes

    • Improved error diagnostics for modtime cursor parsing failures, providing richer diagnostic metadata to aid troubleshooting and issue resolution.
  • Documentation

    • Removed documentation for the legacy two-part cursor format that is no longer supported by the system.

@coderabbitai

coderabbitai Bot commented Jun 2, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 76d33788-2218-4cf8-abc4-a6ebf3a3793d

📥 Commits

Reviewing files that changed from the base of the PR and between f97652c and 5dff401.

📒 Files selected for processing (1)
  • rblob/modTimeBlob.go
🚧 Files skipped from review as they are similar to previous changes (1)
  • rblob/modTimeBlob.go

📝 Walkthrough

Walkthrough

Adds rblob/errors.go defining four package-level errors for modtime cursor validation. Removes the local error var block from modTimeBlob.go, updates parseModTimeCursor documentation, and changes all parsing-failure wraps to include structured j.MKV metadata (cursor, separators, prefix, nano string, and tail) while preserving the successful parse result and modtimeCursor format.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • luno/reflex#97: Related earlier changes to rblob modtime cursor parsing and error handling.

Suggested reviewers

  • ScaleneZA
  • onkuh
  • RieshBissessur
  • donovan-luno

Poem

🐇 I hopped through code with careful paws,
Errors gathered in tidy laws,
Keys and nanos now wrapped in light,
Cursor tales made clear and bright,
A rabbit's refactor—short and right.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Adding error details to modTimeBlob for debugging' accurately reflects the main changes: extracting error definitions to a new file and enhancing error wrapping with structured metadata.
Description check ✅ Passed The description directly relates to the changeset by mentioning error details addition to modTimeBlob and fixed commenting documentation, which aligns with the extracted error values and updated documentation.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ayang-adding-error-details

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@rblob/modTimeBlob.go`:
- Around line 187-194: The error wrap currently logs the parsed ints (ns/offset)
which are zero on ParseInt failure; update the error returns in the parsing
block inside the modtimeCursor parsing function (where modtimeCursor{} is
returned) so the j.MKV includes the original input strings nanoStr and tail
instead of ns/offset (i.e., log "nanoStr" and "tail" values) when wrapping with
errModTimeCursorBadUnixNano and errModTimeCursorBadOffset to ensure the
malformed source strings are recorded.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 39dd3809-2d09-416e-a5b4-c88e84fe1e89

📥 Commits

Reviewing files that changed from the base of the PR and between e2ed56e and f97652c.

📒 Files selected for processing (2)
  • rblob/errors.go
  • rblob/modTimeBlob.go

Comment thread rblob/modTimeBlob.go
@sonarqubecloud

sonarqubecloud Bot commented Jun 2, 2026

Copy link
Copy Markdown

@alice-luno alice-luno merged commit e53b4cb into main Jun 2, 2026
5 checks passed
@alice-luno alice-luno deleted the ayang-adding-error-details branch June 2, 2026 14: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.

2 participants