Skip to content

fix(scheduler): persist normalized URLs, expand tests, upgrade Go/tooling#25

Merged
hyp3rd merged 3 commits intomainfrom
feat/scheduler
Feb 26, 2026
Merged

fix(scheduler): persist normalized URLs, expand tests, upgrade Go/tooling#25
hyp3rd merged 3 commits intomainfrom
feat/scheduler

Conversation

@hyp3rd
Copy link
Owner

@hyp3rd hyp3rd commented Feb 25, 2026

  • Apply result.NormalizedURL back to request.URL and callback.URL so normalized values are used across scheduling, retries, and callbacks
  • Add //nolint:G704 where appropriate

Tests

  • Introduce helpers for retrier, TLS scheduler, retry-then-success and callback payload handlers
  • Refactor TestRetrier_Validate to table-driven cases (valid, zero/invalid max retries, invalid backoff/interval/timeout, etc.)
  • Update retry/timeout expectations and add assertion/wait helpers

Tooling/CI

  • Enable golangci-lint tests in .golangci.yaml
  • Bump Go to 1.26.0; update Makefile/.project-settings.env accordingly
  • Upgrade golangci-lint to v2.10.1 and buf to v1.65.0
  • Update pre-commit hooks to v9.7.0

Deps

  • go.mod: go 1.26.0; github.com/hyp3rd/sectools v1.2.3; golang.org/x/net v0.50.0; golang.org/x/text v0.34.0
  • Refresh go.sum

…ling

- Apply result.NormalizedURL back to request.URL and callback.URL so normalized values are used across scheduling, retries, and callbacks
- Add //nolint:G704 where appropriate

Tests
- Introduce helpers for retrier, TLS scheduler, retry-then-success and callback payload handlers
- Refactor TestRetrier_Validate to table-driven cases (valid, zero/invalid max retries, invalid backoff/interval/timeout, etc.)
- Update retry/timeout expectations and add assertion/wait helpers

Tooling/CI
- Enable golangci-lint tests in .golangci.yaml
- Bump Go to 1.26.0; update Makefile/.project-settings.env accordingly
- Upgrade golangci-lint to v2.10.1 and buf to v1.65.0
- Update pre-commit hooks to v9.7.0

Deps
- go.mod: go 1.26.0; github.com/hyp3rd/sectools v1.2.3; golang.org/x/net v0.50.0; golang.org/x/text v0.34.0
- Refresh go.sum
Copilot AI review requested due to automatic review settings February 25, 2026 20:25
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request improves URL handling in the scheduler by persisting normalized URLs, refactors tests with helper functions and table-driven patterns, and upgrades tooling including Go 1.26.0, golangci-lint v2.10.1, and related dependencies. The changes ensure that URL normalization results from validation are consistently used across scheduling, retries, and callbacks.

Changes:

  • Core functionality: Apply normalized URLs from validation results back to request.URL and callback.URL fields
  • Testing improvements: Introduce reusable test helpers and refactor validation tests to table-driven format
  • Tooling upgrades: Update Go to 1.26.0, golangci-lint to v2.10.1, buf to v1.65.0, and pre-commit hooks to v9.7.0

Reviewed changes

Copilot reviewed 11 out of 12 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
pkg/scheduler/scheduler.go Apply NormalizedURL from validation results to request/callback URLs; add nolint directives for gosec
tests/scheduler_test.go Extract test logic into reusable helpers (retrier, scheduler, handlers, assertions); improve test maintainability
tests/retrier_test.go Convert validation tests to table-driven format with mutation functions; add timeout constants
go.mod Update Go version to 1.26.0 and upgrade sectools, golang.org/x/net, golang.org/x/text dependencies
go.sum Refresh checksums for updated dependencies
Makefile Update tool versions to match project settings
.project-settings.env Centralize tool version configuration
.pre-commit/unit-test-hook Update Go toolchain version reference
.pre-commit/golangci-lint-hook Update golangci-lint version reference
.pre-commit-config.yaml Update cspell-cli pre-commit hook to v9.7.0
.pre-commit-ci-config.yaml Update cspell-cli pre-commit hook to v9.7.0
.golangci.yaml Enable linting for test files and update Go version

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +519 to +520

return scheduler.CallbackPayload{}
Copy link

Copilot AI Feb 25, 2026

Choose a reason for hiding this comment

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

The return statement after t.Fatal is unreachable code. The t.Fatal call will stop test execution immediately, so the subsequent return will never be executed. Consider removing this unreachable return statement.

Suggested change
return scheduler.CallbackPayload{}

Copilot uses AI. Check for mistakes.
…ling

- Apply result.NormalizedURL back to request.URL and callback.URL so normalized values are used across scheduling, retries, and callbacks
- Add //nolint:G704 where appropriate

Tests
- Introduce helpers for retrier, TLS scheduler, retry-then-success and callback payload handlers
- Refactor TestRetrier_Validate to table-driven cases (valid, zero/invalid max retries, invalid backoff/interval/timeout, etc.)
- Update retry/timeout expectations and add assertion/wait helpers

Tooling/CI
- Enable golangci-lint tests in .golangci.yaml
- Bump Go to 1.26.0; update Makefile/.project-settings.env accordingly
- Upgrade golangci-lint to v2.10.1 and buf to v1.65.0
- Update pre-commit hooks to v9.7.0

Deps
- go.mod: go 1.26.0; github.com/hyp3rd/sectools v1.2.3; golang.org/x/net v0.50.0; golang.org/x/text v0.34.0
- Refresh go.sum
@hyp3rd hyp3rd merged commit 3aa1013 into main Feb 26, 2026
9 of 10 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