refactor: names follow the URL they serve - #569
Merged
Merged
Conversation
Applies the rule in osapi-io/specs#243. Five moves, no change to the provider tree's nesting. cron is not a caller's choice the way a container runtime is, so it leaves the URL. /schedule/cron becomes /schedule, the permission scopes become schedule:read and schedule:write, and the SDK service is Schedule. The provider keeps its driver directory at provider/schedule/cron, because that is where a second driver would go. The container handlers had the convention inverted: the directory was named for the second URL segment and the files for the first. The directory is now container and the files are docker_*.go, which is what network already does with dns_get.go and route_get.go. The agent processor follows. mem becomes memory. An abbreviation is not a name, and the URL, the SDK and the generated types all said memory already. What deliberately did not change: /container/docker keeps its driver in the URL, provider/container/docker and provider/network/netplan/* keep their nesting, and node/apt and node/ntp keep hiding their drivers. Refs #566 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FuKUsHFG1EqZXamffh9M2c
The spec change renamed the schedule operations and schemas, so the generated UI client had to be regenerated. orval writes new files but does not delete the ones it no longer produces, which left the old schedule-management-api-cron-operations module and twenty cron*.ts schemas beside the new ones. Both sets exported the same shapes and the build broke on the stale half. The three hand-written components follow: cron-picker, cron-block and cron-delete-block are named for the resource rather than the driver, like every other component in that directory. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FuKUsHFG1EqZXamffh9M2c
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FuKUsHFG1EqZXamffh9M2c
Three classes of reference the sweeps missed, all caught by go vet rather than by go test. The memory package's own _test.go files are package memory_test and refer to the package under test by its import name. The import path was rewritten and the references were not, because the sweep skipped files inside the package's own directory to avoid touching gopsutil's mem. The SDK's Client field is Schedule now, and two tests plus one example still read c.Cron. go test had been reporting these packages as cached passes from before the rename, which is why they looked green locally while CI failed. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FuKUsHFG1EqZXamffh9M2c
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## main #569 +/- ##
=======================================
Coverage 99.95% 99.95%
=======================================
Files 501 501
Lines 24073 24073
=======================================
Hits 24063 24063
Misses 10 10
Continue to review full report in Codecov by Harness.
🚀 New features to boost your workflow:
|
This was referenced Oct 1, 2026
retr0h
added a commit
that referenced
this pull request
Oct 4, 2026
#569 settled that cron is the driver and schedule is the domain, and renamed the URL, the provider directory, the processor and the SDK. The CLI help text and the documentation were not renamed with them, so `osapi client node schedule list --help` said it listed cron entries. The eight help strings that named the thing a user manages are now scheduled entries. The ones that name cron itself stay: the file paths under /etc/cron.d, the five-field expression format, and the provider. Whether cron implements it is not the caller's concern, which is the reason the URL says schedule. Three of these were wrong rather than merely stale. The SDK page was titled Cron, documented `client.Cron.List()` and used CronCreateOpts and CronUpdateOpts throughout its examples. The field is `Schedule *ScheduleService` and the types are ScheduleCreateOpts and ScheduleUpdateOpts, so every call on that page named something that does not exist and none of it would compile. The page also linked to examples/sdk/client/cron.go, which is schedule.go, so the link was dead. The SDK dropdown and the service index listed it as Cron as well. Swept docs/, examples/ and the README for other stale symbols. There were none. Closes: #590 Claude-Session: https://claude.ai/code/session_01FuKUsHFG1EqZXamffh9M2c Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Applies the rule merged as osapi-io/specs#243. Five moves. The provider tree's nesting is untouched.
What moved
cronis not a caller's choice the way a container runtime is. You would swap inatbehind the same entrypoint, so it leaves the URL. The provider keepsprovider/schedule/cronbecause that is where a second driver goes.The container handlers had it inverted both ways: the directory named for the second URL segment, the files named for the first.
networkalready does this correctly withdns_get.goandroute_get.go, so container now matches.What deliberately did not change
/container/dockerkeeps the driver in the URL. You choose Docker over Podman; Podman becomes/container/podmanbeside it.provider/container/dockerandprovider/network/netplan/*keep their nesting. The provider tree groups by implementation so a new driver is a new directory.node/aptandnode/ntpkeep hiding their drivers, because the host picks the package manager and chrony is swappable behind/ntp.Checks
go build ./internal/... ./cmd/... ./pkg/...clean.go test ./internal/...is 41 packages, 0 failures.Two things the tests caught, both path literals rather than identifiers:
/schedule/cron, which now matches/schedule/{name}withname=cronand has no POST, so they got 405 instead of 401provider/scheduled/cronStill to do, not in this PR: docs pages, the UI TypeScript, and the orchestrator once this merges.
🤖 Generated with Claude Code
https://claude.ai/code/session_01FuKUsHFG1EqZXamffh9M2c