Keep /preview/currency.json JSON-safe when live data contains non-finite floats #147

Closed
opened 2026-07-23 05:05:51 +00:00 by coilyco-ops · 4 comments
Member

Live verification after Discord rich-preview rollout found /preview/currency.json returning HTTP 500 while /preview.json, /preview/world.json, /preview/logistics.json, and /preview/market.json return 200. The app log shows ValueError: Out of range float values are not JSON compliant: inf at http_app.py:452 in preview_currency_json when constructing JSONResponse(payload). This makes the registered /eco economy command resolve to the generic unavailable error. The module already has _sanitize_nonfinite, used by the user dossier path. Apply the JSON-safety boundary to the currency preview (and any shared preview response boundary if that is the more coherent narrow fix), add a regression test with nested inf/-inf/nan proving a 200 and strict JSON output, run the full ward validation gate, land it, and record the image build evidence. Do not change DiscordLink or global Discord command registration. After merge, the operator will reroll and live-verify the test-guild command.

Live verification after Discord rich-preview rollout found `/preview/currency.json` returning HTTP 500 while `/preview.json`, `/preview/world.json`, `/preview/logistics.json`, and `/preview/market.json` return 200. The app log shows `ValueError: Out of range float values are not JSON compliant: inf` at `http_app.py:452` in `preview_currency_json` when constructing `JSONResponse(payload)`. This makes the registered `/eco economy` command resolve to the generic unavailable error. The module already has `_sanitize_nonfinite`, used by the user dossier path. Apply the JSON-safety boundary to the currency preview (and any shared preview response boundary if that is the more coherent narrow fix), add a regression test with nested inf/-inf/nan proving a 200 and strict JSON output, run the full ward validation gate, land it, and record the image build evidence. Do not change DiscordLink or global Discord command registration. After merge, the operator will reroll and live-verify the test-guild command.
Author
Member

WARDED_WORKFLOW: done

details

Review: skipped — in-container review gate intentionally skipped by the temporary ward default pending brokered QA.
workflow: merge-remote-main; review summary: skipped (temporary ward default pending brokered QA)
Felt: narrow and direct.
Confidence: high.
Surprises: pre-commit has the baseline Ruff N999 on scripts/install-desktop-config.py; image build unavailable (no compatible Docker builder/Buildx).
Follow-up: director rebuild, rollout, and test-guild verification.

WARDED_WORKFLOW: done ✅ <details><summary>details</summary> Review: skipped — in-container review gate intentionally skipped by the temporary ward default pending brokered QA. workflow: merge-remote-main; review summary: skipped (temporary ward default pending brokered QA) Felt: narrow and direct. Confidence: high. Surprises: pre-commit has the baseline Ruff N999 on scripts/install-desktop-config.py; image build unavailable (no compatible Docker builder/Buildx). Follow-up: director rebuild, rollout, and test-guild verification. </details>
Author
Member

WARDED_WORKFLOW: blocked 🛑

salvage details

An ephemeral ward container (codex mode) dispatched for this issue finished but its work was not merged to main, so cleanup preserved it on a branch before teardown and reopened the issue (a closing reference for #147 never reached main). Recover from the salvage branch below.

  • Repo: coilyco-gaming/eco-app
  • Salvage branch: ward-salvage/eco-app-0c6e4df2
  • Pull request: not opened - PR creation failed: forgejo: parse created pull request: unexpected end of JSON input
  • Reason: merge conflict integrating onto main
  • Container uptime at reap: 5m (age of the baked Forgejo PAT snapshot; a long-lived container is likelier to carry a rotated token)

Cleanup diagnostics

--- reap diagnostics ---
ward version:      v0.792.0
version source:    pinned via WARD_VERSION/--ward-version (v0.788.0)
HEAD:              7d36becf9fb2
origin/main:       7d36becf9fb2
ancestry:          HEAD is ALREADY on origin/main - a salvage here is a FALSE salvage (ward#504 signature)
decision gate:     provenance missing or unreadable on already-landed merge-remote-main run
reason:            merge conflict integrating onto main
provenance:        missing or unreadable
run-owned landed:  no
working tree:      clean
container uptime:  5m (baked Forgejo PAT age proxy)
--- end reap diagnostics ---

Recover

git fetch https://forgejo.coilysiren.me/coilyco-gaming/eco-app.git ward-salvage/eco-app-0c6e4df2
git checkout -b ward-salvage/eco-app-0c6e4df2 FETCH_HEAD

— Codex, via ward agent

WARDED_WORKFLOW: blocked 🛑 <details><summary>salvage details</summary> An ephemeral `ward container` (codex mode) dispatched for this issue finished but its work was **not merged to `main`**, so cleanup preserved it on a branch before teardown and reopened the issue (a closing reference for #147 never reached `main`). Recover from the salvage branch below. - **Repo:** `coilyco-gaming/eco-app` - **Salvage branch:** `ward-salvage/eco-app-0c6e4df2` - **Pull request:** not opened - PR creation failed: forgejo: parse created pull request: unexpected end of JSON input - **Reason:** merge conflict integrating onto main - **Container uptime at reap:** 5m (age of the baked Forgejo PAT snapshot; a long-lived container is likelier to carry a rotated token) ## Cleanup diagnostics ``` --- reap diagnostics --- ward version: v0.792.0 version source: pinned via WARD_VERSION/--ward-version (v0.788.0) HEAD: 7d36becf9fb2 origin/main: 7d36becf9fb2 ancestry: HEAD is ALREADY on origin/main - a salvage here is a FALSE salvage (ward#504 signature) decision gate: provenance missing or unreadable on already-landed merge-remote-main run reason: merge conflict integrating onto main provenance: missing or unreadable run-owned landed: no working tree: clean container uptime: 5m (baked Forgejo PAT age proxy) --- end reap diagnostics --- ``` ## Recover ```bash git fetch https://forgejo.coilysiren.me/coilyco-gaming/eco-app.git ward-salvage/eco-app-0c6e4df2 git checkout -b ward-salvage/eco-app-0c6e4df2 FETCH_HEAD ``` </details> <!-- ward-agent-signature --> — Codex, via `ward agent`
Author
Member

WARDED_WORKFLOW: reservation-released

release details

Run finished with WARDED_WORKFLOW: blocked 🛑.

ward container reap released container engineer-codex-eco-app-147 (--harness codex): the terminal outcome supersedes the reservation, so a later redispatch no longer needs --override-reservation.

— Codex, via ward agent

<!-- ward-agent-reservation-released --> WARDED_WORKFLOW: reservation-released <details><summary>release details</summary> Run finished with `WARDED_WORKFLOW: blocked 🛑`. `ward container reap` released container `engineer-codex-eco-app-147` (`--harness codex`): the terminal outcome supersedes the reservation, so a later redispatch no longer needs `--override-reservation`. </details> <!-- ward-agent-signature --> — Codex, via `ward agent`
Author
Member

Verified resolved on the canonical deployment. Commit 0e1ee0c is on main, the current build-publish pipeline is green, and https://eco-app.coilysiren.me/preview/currency.json returns HTTP 200 and parses as strict JSON with no non-finite floats. The issue was reopened only by the documented false-salvage path.

Verified resolved on the canonical deployment. Commit `0e1ee0c` is on main, the current build-publish pipeline is green, and `https://eco-app.coilysiren.me/preview/currency.json` returns HTTP 200 and parses as strict JSON with no non-finite floats. The issue was reopened only by the documented false-salvage path.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
coilyco-gaming/eco-app#147
No description provided.