Skip to main content
← Back to list
01Issue
BugClosedSwamp CLI
AssigneesNone

Relationships

#740 tf plan: FETCH_BUNDLE PAGE_FETCH_ERR / NO_STATES on cleanup-only plan (no resource changes)

Opened by robin · 6/21/2026

Summary

stategraph tf plan fails with FETCH_BUNDLE : PAGE_FETCH_ERR : idx=0Bad_request_err ... id = "NO_STATES" when the plan's entire diff is import-declaration cleanup (deleting hcl import nodes and their tfvar entries) with zero resource-level changes across any state.

The server computes the plan successfully (CALL_GENERATE / POLL_GENERATE both succeed); only the final FETCH_BUNDLE step fails. Because the failure happens before --out is written, no plan file is produced, so the result is also un-appliable via stategraph tf apply.

Environment

  • Server: 2.3.6 (also reproduced on 2.3.1)
  • Client: dev
  • State: github-repos — 608 instances / 608 resources / 187 modules / 423 edges
  • Plan diff: 605 hcl_delete + 605 tfvar_delete, object types hcl and tfvar only — no resource/instance objects touched.

Reproduction

  1. Onboard a repo via import blocks; apply so the import nodes are recorded in the revision.
  2. Remove the import blocks from local HCL (normal post-import cleanup).
  3. Run stategraph tf plan --out tfplan.json.

The only diff is the removal of the now-stale import declarations, which is a state no-op (no real resource changes).

Verbose trace (-vvv)

[tf] REVISION_HASH_COMPARE : dir=. workspace=default local=629435... remote=32d24f...
[tf] CREATE_TX : time=0.029588
[sg_tx_builder] ADD_REVISION : batch_size=264
[sg_tx_builder] APPEND_ENTRIES : batch_size=210
[sg_tx_builder] APPEND_ENTRIES : batch_size=1000
[tf] CALL_PREVIEW : time=0.030863
[sg_actuator] CALL_GENERATE : time=0.037307
[sg_actuator] POLL_GENERATE : time=0.388460
[ERROR] [sg_actuator] FETCH_BUNDLE : PAGE_FETCH_ERR : idx=0
[tf] ACTUATOR : time=0.521705
Actuator error: `Bad_request_err ({ ... id = "NO_STATES" })

Expected

A cleanup-only / empty plan should render cleanly (e.g. "No changes" or an empty plan diff) and write a valid plan file, rather than erroring at FETCH_BUNDLE.

Actual

  • Plan exits with an error.
  • No plan file is written, so the result cannot be applied.
  • Each failed plan leaves a dangling open transaction behind; these accumulate across retries.

Impact

Plans whose diff contains only import/tfvar deletions (a normal stage of the import lifecycle) cannot complete, and there is no way to finalize the cleanup through plan/apply. Dangling open transactions accumulate and must be aborted manually.

02Bog Flow
OPENTRIAGEDIN PROGRESSCLOSED

Closed

6/21/2026, 10:37:25 PM

No activity in this phase yet.

03Sludge Pulse
Editable. Press Enter to edit.

robin commented 6/21/2026, 10:31:33 PM

Claude is an idiot. This is not the correct repo.

How can I close it?

stack72 commented 6/21/2026, 10:37:22 PM

No worries :) I have it sorted!

Sign in to post a ripple.