fix(status): remove fabricated uptime + gate payment-rail claims on real flag#28
Merged
Merged
Conversation
…eal flag
Two false-live claims on public status endpoints.
1. /system/status returned a hardcoded uptime_30d=99.97 + incidents=[] ("99.97%
uptime, zero incidents") with NO measurement behind it. The "real source"
query referenced service_probes.outcome / .created_at — columns that do not
exist (actual cols: probed_at, reachable, ...), so it raised
UndefinedColumnError on every call, hit `except: pass`, and always returned
the literal. Now reports uptime_30d=null, uptime_source="unmeasured",
incidents=null until a real source exists. status + components stay real,
live-measured.
2. /status advertised payment_rails {card:true, usdc_subscription:true,
x402_pay_per_call:true} and an x402 block claiming Base mainnet +
testnet_active:true — while RAILS_LIVE is off. x402_pay_per_call was keyed off
the mere presence of WAYFORTH_BASE_WALLET (set in prod), so it read true
despite the rail being dark. All three now read from the single source of
truth (core.rails.rail_live); x402 also requires funded settlement. With the
flag off they correctly report false. Same honesty rule as the status banner.
Tests updated to the honest contract (uptime null-or-numeric, incidents
null-or-list) — the old tests asserted the fabrication.
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.
Two false-live claims on public status endpoints — same family as the status banner we already fixed.
1.
/system/status— fabricated uptime + "zero incidents"Returned a hardcoded
uptime_30d: 99.97andincidents: []. The "real source" query referencedservice_probes.outcome/.created_at— columns that don't exist (actual:probed_at,reachable, …), so it threwUndefinedColumnErroron every call, hitexcept: pass, and always returned the literal. Confirmed live: prod returns99.97 / [].→ Now
uptime_30d: null,uptime_source: "unmeasured",incidents: nulluntil a real source exists.status+componentsstay real, live-measured.2.
/status— payment rails claimed live while RAILS_LIVE is offAdvertised
payment_rails {card:true, usdc_subscription:true, x402_pay_per_call:true}+ anx402block claiming Base mainnet &testnet_active:true.x402_pay_per_callwas keyed off the mere presence ofWAYFORTH_BASE_WALLET(set in prod) → readtruewhile the rail is dark.→ All three now read from the single source of truth (
core.rails.rail_live); x402 also requires funded settlement. With the flag off they correctly reportfalse. Thex402block'smainnet_active/testnet_activenow require the rail to actually be live on that chain.Tests
Updated to the honest contract (
uptime_30dnull-or-numeric,incidentsnull-or-list) — the old tests asserted the fabrication. Permissive both pre- and post-deploy.Note (separate, optional)
A real in-house uptime/incident recorder (scheduled self-health → table → real % "since ") is the follow-up that would populate these honestly. Tracked, not in this PR.
🤖 Generated with Claude Code