Repository navigation
Stop copying app secret values onto agent jobs - #382
Merged
Merged
Conversation
A claim copied every encrypted secret of the app into job.app_secrets, and the copy stayed until the app was removed. A claim now stores only the app's secret revision. The packages request reads and decrypts the app's current secrets, returns the same response as before, and records the revision it delivered, which completion applies. A migration removes the stored values from existing jobs and keeps their app and revision.
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
widefleet-docs | d18e82e | Nov 25 2026, 10:10 AM |
This was referenced Nov 25, 2026
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.
Claiming an agent job copied every encrypted secret of the app into
job.app_secrets. The copy stayed until the app was removed, so each claim added another one, and a deleted secret survived in earlier jobs.What changes
{ appId, revision }on the job.appSecretsobject as before. It replaces the job's revision with the one it delivered.applied_secret_revision. When secrets change between claim and packages, the agent receives the newer revision and completion confirms that one. Jobs that never request packages (migrations, workflows, delete, and configure without a deployment) keep today's behavior.0043_job_secret_revisionsremovesvaluesfrom existingjob.app_secretsrows and keepsappIdandrevision.The packages wire contract and the agent are unchanged.
Upgrade notes
Self-hosted installations apply the migration when the new control plane starts. Hosted installations use Cloudflare execution, which accepts no agent jobs. An earlier control plane reads secret values from the job row. If one is run against the migrated database, the packages request fails for jobs that are still running, and those deployments must be retried.
Verification
pnpm checkpnpm exec vitest runfortests/platform.integration.test.ts(38 tests), the newtests/job-secret-revisions-migration.integration.test.ts, and the job-relatedrequired-secrets,app-removal,template-installsand migration integration tests: 59 passed, against local PostgreSQL and RustFS with synthetic data.jobs.ts. It covers:

Confidence Score: 5/5 
The PR appears safe to merge with the documented upgrade restriction.Summary
Stops storing encrypted secret values on agent jobs.
No actionable issues found.
Acknowledged by
tnkuehne: older control planes cannot serve packages from migrated job rows; affected deployments must be retried.Diagram
Reviews (1) · Last reviewed commit: "Stop copying app secret values onto agen..." · Reviewed by Greptile