fix(resources): pause/resume returns 'item' field matching GET shape (#81)#79
Merged
Merged
Conversation
Migration 024 added a CHECK constraint with only ('active','paused','expired','deleted'),
but ~220 prod rows carry status='reaped' from a prior worker cleanup job. The
migration failed in v6.0.0 rollout with:
check constraint "resources_status_check" of relation "resources" is violated by some row
Keep 'reaped' in the allowed set rather than collapsing it into 'deleted' —
losing the worker-reaped vs user-deleted distinction would erase historical signal.
Verified: ENVIRONMENT=production, v6.0.0-2026-05-13 image, instance crash-looped on this exact constraint after 25 migrations succeeded.
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
cbd1f5b to
46c2c5d
Compare
mastermanas805
added a commit
that referenced
this pull request
Jun 3, 2026
- go1.25.10 → go1.25.11 fixes GO-2026-5039/5038 (net/textproto, mime), which blocked govulncheck/osv-scan (same pre-existing stdlib CVE as worker #79). - Regenerated openapi.snapshot.json for the /deploy/new 10MB cap description change (snapshot-drift gate). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
mastermanas805
added a commit
that referenced
this pull request
Jun 3, 2026
…age nudge) (#220) * feat(deploy): P1 — cap /deploy/new tarball at 10 MB (413 + image nudge) First phase of the multi-source deploy plan (PLAN-deploy-multisource-2026-06-03). Direct source uploads on POST /deploy/new now cap at 10 MB (was 50): a 10 MB gzipped source tar is ample for app code; larger almost always means vendored deps / build output that belong in the build, not the upload. - maxTarballBytes (10<<20) + enforceTarballCap() helper, applied on /deploy/new. - Over-cap → 413 Payload Too Large (was 400), code stays `tarball_too_large` (no breaking rename), with a routed agent_action nudging the caller to slim the upload or deploy a prebuilt image (source=image, P2) instead of uploading. - Updated codeToAgentAction["tarball_too_large"] (was 50 MiB copy) + openapi. - Fiber global BodyLimit stays 50 MiB (/stacks/new multi-service + webhooks). - Scope: /deploy/new only this phase. Redeploy + /stacks/new keep 50 MB — tightening them to 10 MB is the P1.1 fast-follow (they sit behind extra gates that need their own fixtures). Tests: white-box TestEnforceTarballCap (413 + agent_action + at-cap boundary, 100% on the helper) + DB-gated TestDeployNew_OversizedTarball_413 (end-to-end 413). build + vet + agent_action contract green. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * fix(ci): bump toolchain go1.25.11 (stdlib CVE) + regen openapi snapshot - go1.25.10 → go1.25.11 fixes GO-2026-5039/5038 (net/textproto, mime), which blocked govulncheck/osv-scan (same pre-existing stdlib CVE as worker #79). - Regenerated openapi.snapshot.json for the /deploy/new 10MB cap description change (snapshot-drift gate). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 (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.
Closes #81 — adapter mismatch.
Dashboard W9-B1 PauseResumeButton reads
r.item(matching GET /resources/:id which already usesitem). Pause/Resume previously returned only top-level fields, no nested adapted Resource. Result: button click 200s but dashboard state update silently fails.Fix: wrap response body with
item: resourceToMap(resource)to match GET shape. Legacy top-level fields preserved (additive).Co-Authored-By: Claude Opus 4.7 (1M context) noreply@anthropic.com