Repository navigation
refactor(coordinator): give state archive downloads an HTTP owner - #1032
Gajesh2007 wants to merge 11 commits into
Conversation
|
@codex review |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. Keep them coming! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
@codex review Parent refresh at |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 08730bc171
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 53f3097101
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…/coordinator-state-archive # Conflicts: # docs/reference/api-contracts.md
|
@codex review Please review current head |
|
Codex Review: Didn't find any major issues. Nice work! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
@codex review Please review current head |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b6941749e8
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
@codex review |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Consolidated into #1056 for review and merge after #1094, #1095 and #1096. #1056 contains this branch's exact head ( |
The state archive endpoint mixed authentication, environment gates and streaming in
api.Server.api/statearchive.Controllernow owns that HTTP operation, with separate configuration and byte-counting code.api/state_archive.gosupplies current admin credentials, logger and bearer parsing. The existingstateexportpackage still owns snapshot consistency, ZIP generation and age encryption.Stacked on #1031 (
refactor/coordinator-release-api).Before
flowchart TD A[GET state-export] --> B[Server.handleAdminStateExport] B --> C{Feature, admin key and output protection} C -->|reject| D[404, 403 or 412 before archive bytes] C -->|allow| E[Validate recipient; Archiver.Stage] E -->|failure| F[500 before headers] E -->|ready| G[200; ZIP through age and counting writer] G --> H[Flush encryption; log result; clean staging]After
flowchart TD A[Same GET state-export] --> B[statearchive.Controller.Download] B --> C{Same gates with current API credentials} C -->|reject| D[Same 404, 403 or 412] C -->|allow| E[Same recipient validation and Archiver.Stage] E -->|failure| F[Same 500 before headers] E -->|ready| G[Same 200 and streaming ZIP/age pipeline] G --> H[Same flush, logging and deferred cleanup]The feature switch precedes authentication. Only the admin key passes the fixed-length digest comparison. Recipient validation and staging finish before committing HTTP headers; cancellation, staged-file cleanup and encryption flush retain their existing order. No route, response, environment name, default, archive format or Server state changes.
The HTTP fixtures stay in
api/state_archive_test.gowith the same assertions and exact environment values. The pure root-precedence fixture follows the configuration owner. Private production environment constants do not become public APIs for tests.Validation:
stateexportrace suite passes: 13 top-level / 16 including subtests.Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.