Skip to content

Conversation

@volmedo
Copy link
Member

@volmedo volmedo commented Nov 3, 2025

Expiration and Not Valid Before are useful when validating an invocation as part of deciding whether it should be executed. However, if we just want to check the validity of a given delegation chain that happened in the past, we don't care about time bounds.

These changes allow passing a custom time bounds validation function to decide how expiration and not valid before are validated.

@volmedo volmedo requested a review from alanshaw November 3, 2025 12:13
@volmedo volmedo self-assigned this Nov 3, 2025
@codecov
Copy link

codecov bot commented Nov 3, 2025

Codecov Report

❌ Patch coverage is 78.26087% with 5 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
server/options.go 0.00% 4 Missing ⚠️
validator/lib.go 91.66% 1 Missing ⚠️
Files with missing lines Coverage Δ
server/handler.go 94.11% <100.00%> (+0.17%) ⬆️
server/server.go 75.52% <100.00%> (+0.88%) ⬆️
validator/lib.go 86.20% <91.66%> (+0.04%) ⬆️
server/options.go 28.57% <0.00%> (-2.20%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Member

@alanshaw alanshaw left a comment

Choose a reason for hiding this comment

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

👌 It's not what I expected, but I like it.

FWIW I was thinking of effectively configuring "now" for the validation...

@volmedo
Copy link
Member Author

volmedo commented Nov 3, 2025

oh, that would've worked too, and maybe would've been more ergonomic. In the defence of this approach I'd say that it's so flexible that it can be used today, while right now it's impossible to know what "now" is, unfortunately. But I like the idea and we might consider doing it that way if things change in the future.

@volmedo volmedo merged commit a172e7e into main Nov 3, 2025
2 checks passed
@volmedo volmedo deleted the vic/feat/configurable-exp-validation branch November 3, 2025 14:48
volmedo added a commit to storacha/indexing-service that referenced this pull request Nov 3, 2025
storacha/go-ucanto#78 in go-ucanto changes the
signature of `validator.NewClaimContext` and
`validator.NewValidationContext`. This is a breaking API change that
impacts the indexing-service, so I proactively upgraded to the latest
version and adapted existing code to the new API.
volmedo added a commit to storacha/piri that referenced this pull request Nov 3, 2025
storacha/go-ucanto#78 in go-ucanto changes the
signature of `validator.NewClaimContext` and
`validator.NewValidationContext`. This is a breaking API change that
impacts piri, so I proactively updated to the latest version and adapted
existing code to the new API.
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.

3 participants