Skip to content

Fix duration parsing to support i64 range and add Makefile targets#133

Merged
philhassey merged 3 commits intocedar-policy:mainfrom
strongdm:i64-duration
Mar 4, 2026
Merged

Fix duration parsing to support i64 range and add Makefile targets#133
philhassey merged 3 commits intocedar-policy:mainfrom
strongdm:i64-duration

Conversation

@philhassey
Copy link
Copy Markdown
Contributor

  • Fix ParseDuration overflow check from MaxInt32 to proper int64 overflow detection at digit accumulation, unit multiplication, and total accumulation steps.
  • Add overflow checking to datetime offset and durationSince eval operations to prevent silent int64 wraparound.
  • Add Makefile targets: test, linters, corpus-download, corpus-convert, corpus-update.
  • Update DEVELOPMENT.md with make targets, DCO requirements.
  • Update corpus GitHub action issue body to reference make targets.
  • Suppress false-positive staticcheck warning on json:"-,omitempty" tag.

- Fix ParseDuration overflow check from MaxInt32 to proper int64 overflow
  detection at digit accumulation, unit multiplication, and total
  accumulation steps.
- Add overflow checking to datetime offset and durationSince eval
  operations to prevent silent int64 wraparound.
- Add Makefile targets: test, linters, corpus-download, corpus-convert,
  corpus-update.
- Update DEVELOPMENT.md with make targets, DCO requirements.
- Update corpus GitHub action issue body to reference make targets.
- Suppress false-positive staticcheck warning on json:"-,omitempty" tag.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Phil Hassey <phil@strongdm.com>
@philhassey philhassey requested a review from patjakdev March 4, 2026 17:55
Signed-off-by: Phil Hassey <phil@strongdm.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Comment thread Makefile
Comment thread Makefile
Signed-off-by: Phil Hassey <phil@strongdm.com>

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@philhassey philhassey merged commit c3beedb into cedar-policy:main Mar 4, 2026
2 checks passed
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