Skip to content

fix(fly): Sprites fake answers policy/network POST with 204, no body - #2725

Merged
lex00 merged 1 commit into
mainfrom
fix/2719-fake-policy-204
Sep 25, 2026
Merged

lex00 merged 1 commit into
mainfrom
fix/2719-fake-policy-204

Conversation

@lex00

@lex00 lex00 commented Sep 25, 2026

Copy link
Copy Markdown
Contributor

Summary

  • The in-process Sprites fake answered POST /v1/sprites/{id}/policy/network with 200 and the stored rules echoed back. The real Sprites API answers 204 with no body, and every official SDK (Go sprites-go, JS @fly/sprites, Python sprites-py, Elixir sprites) treats anything else as a failure; wisp answers 204 too. GET on the same path is unchanged (200 with the rules).
  • chant's own client (spriteApplyNetworkPolicy in sprite-config.ts) already tolerates any status below 300 and never parses the POST response body, so it needed no change — that's exactly why the bug went unnoticed here. A new test pins the fake's raw wire reply directly (status + empty body) so a regression can't hide behind that tolerance.
  • spritzer fixed the same bug in v0.6.1 (Network policy response is rejected by fountain v0.21.0: a limited Environment cannot provision spritzer#26, PR Temporal lexicon doesn't implement describeResources() — state snapshot skips Temporal entirely #27). SPRITZER_CONTAINER_IMAGE in emulator-images.ts was pinned to the buggy 0.6.0; bumped to 0.6.1 to pick up the fix.

Closes #2719.

Test plan

  • npx vitest run lexicons/fly — 336 passed, 1 skipped (unrelated, pre-existing)
  • npx tsx scripts/typecheck.ts — 31 known failures, no regressions (matches main)
  • npx eslint lexicons/fly/src/op/activities/sprites-fake.ts lexicons/fly/src/op/activities/sprite-config.test.ts lexicons/fly/src/op/activities/emulator-images.ts — clean

The Sprites fake answered POST /v1/sprites/{id}/policy/network with 200
and the stored rules echoed back. The real Sprites API answers 204 with
no body, and every official SDK (Go, JS, Python, Elixir) treats anything
else as a failure; wisp answers 204 too. GET on the same path is
unchanged: 200 with the rules.

chant's own client (spriteApplyNetworkPolicy) already tolerates any
status below 300 and never parses the POST response body, so it needed
no change; a new test pins the fake's raw wire reply directly so a
regression here doesn't slip past that tolerance.

spritzer fixed the same bug in v0.6.1 (INTENTIUS/spritzer#26, PR #27);
bump the container-exec-mode pin (SPRITZER_CONTAINER_IMAGE), which was
sitting on the buggy 0.6.0, to pick up the fix.

Closes #2719.
@lex00
lex00 merged commit b6dc404 into main Sep 25, 2026
10 checks passed
@lex00
lex00 deleted the fix/2719-fake-policy-204 branch September 25, 2026 20:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Sprites fake answers POST /policy/network with 200 and a body; the real API answers 204

1 participant