feat(file): add staleness detection for file deployments#346
Merged
Conversation
Add GET /file/stale endpoint with StaleDeployment and StaleDeploymentsResponse schemas. Regenerate server, SDK client, and docs. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
Add SDK types (StaleDeployment, StaleList) and File.Stale() method that calls GET /file/stale to list deployments out of sync with the object store. Includes conversion functions, export_test.go bridges, and full test coverage (200, 401, 403, 500, nil body, transport error). 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
Add `osapi client file stale` command that lists deployments where the source object has been updated since the file was last deployed. Wire the file-state KV through the controller setup and handler chain so the stale endpoint can compare deployed SHAs against current object store content. Add staleness detection section to file-management feature docs and a stale CLI reference page. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
Add Stale() method to SDK file doc page, usage example, and examples/sdk/client/file.go. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
Derive provider name from deployment path (service, certificate, cron, or file). Show PROVIDER column in CLI instead of PATH for cleaner output. Path remains in JSON response for programmatic use. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## main #346 +/- ##
========================================
Coverage 99.91% 99.91%
========================================
Files 440 441 +1
Lines 21377 21496 +119
========================================
+ Hits 21358 21477 +119
Misses 11 11
Partials 8 8
Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
Add test cases for certificate, cron, and file (default) provider paths, plus short key fallback in extractHostname. All stale handler functions now at 100% coverage. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <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.
Summary
GET /file/stalecontroller-only endpoint that detects deployments where the source object has been re-uploaded with new content since the last deployosapi client file staleCLI command with table output and--jsonsupportFile.Stale()method with full test coverageTest plan
🤖 Generated with Claude Code