Skip to content

fix(tests): fp_posters' offline-guard check forces GRIDFALL_OFFLINE itself - #140

Merged
KunalSiyag merged 1 commit into
mainfrom
droid/fix-posters-pump
Oct 30, 2026
Merged

KunalSiyag merged 1 commit into
mainfrom
droid/fix-posters-pump

Conversation

@KunalSiyag

Copy link
Copy Markdown
Owner

What

Main-red fix: fp_posters_test failed standalone on clean main with

  • "default transport under GRIDFALL_OFFLINE=1 makes 0 network requests"
  • "the offline request still gets a final texture"

Root cause

Not the virtual-ms pump from #125 — the env. _test_default_transport_offline asserts offline-guard behaviour but never sets GRIDFALL_OFFLINE; it leaned on the runner. Gate and CI export GRIDFALL_OFFLINE=1 (tools/gate.sh does it for every Godot run), so they stayed green; a bare godot --headless -s tools/tests/fp_posters_test.gd without it takes the live path with the default transport (fake key, live enabled) — one transport call and a provisional texture, failing both checks. Reproduced exactly on clean origin/main (passes with the env set, fails without).

Fix

The section now forces GRIDFALL_OFFLINE=1 itself and restores the prior value after — the check names the env, so it owns it. Four lines, no production change.

Verification

  • Clean main, env unset: FAIL (both checks) → with fix: PASS
  • With GRIDFALL_OFFLINE=1: PASS before and after
  • run_all + pre-commit green (the file is gdformat-grandfathered; verified the hook passes without reformatting)

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>

…tself

_test_default_transport_offline asserts the client makes no network
requests "under GRIDFALL_OFFLINE=1", but nothing set that env — the gate
and CI export it, so they stayed green, while a bare standalone
`godot -s` run without it took the live path with the default transport
and failed both checks (a provisional texture, one transport call). The
section now sets GRIDFALL_OFFLINE=1 itself and restores the prior value,
so the check holds however the test is launched.

Verified: fp_posters_test passes standalone with GRIDFALL_OFFLINE unset
and with it set to 1; run_all + pre-commit green.

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
@github-actions

Copy link
Copy Markdown

Automated review

No new findings on the 1 changed files (gdlint, complexity, TODO policy, dead code).

Run python3 tools/checks/run_all.py locally for the full set of checks.

@KunalSiyag
KunalSiyag merged commit 58721e9 into main Oct 30, 2026
6 checks passed
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.

1 participant