feat(showcase): serve a real /health instead of the SPA fallback - #51
Merged
Conversation
/health returned index.html. An SPA fallback answers 200 on every path, so the estate console could only record it as 'reachability' - proof that nginx is up and nothing more, however dead the bundle behind it. Now an exact-match location, declared before the fallback so try_files can never swallow it, serving a payload baked at image build. That also makes the showcase report WHICH commit it serves; it previously reported no version at all, so drift was undetectable. No uptime/instance/checkedAt: a static file cannot measure them, and a frozen checkedAt is precisely the 'something is serving a cached copy' signal the estate health contract relies on. Omitted beats fabricated. The container HEALTHCHECK now probes /health rather than /, so it fails when the bundle is missing instead of passing on index.html. Verified against the built image: envelope + application/json + no-store on /health, SPA and client-side routes unaffected.
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.
/healthreturnedindex.html. An SPA fallback answers 200 on every path, so the estate console could only record the showcase as reachability - proof that nginx is up and nothing more, however dead the bundle behind it.Now an exact-match
location, declared before the fallback sotry_filescan never swallow it, serving a payload baked at image build:{"success":true,"data":{"status":"ok","service":"agentage-ds","commit":"<sha>","buildTime":"<iso>"}}That also makes the showcase report which commit it serves - it previously reported no version at all, so drift was undetectable.
No
uptime/instance/checkedAt: a static file cannot measure them, and a frozencheckedAtis precisely the "something in front is serving a cached copy" signal the estate health contract relies on. Omitted beats fabricated.The container
HEALTHCHECKnow probes/healthrather than/, so it fails when the bundle is missing instead of passing onindex.html.Verified against the built image: envelope +
application/json+no-storeon/health;/and client-side routes unaffected.