Per-server opt-in for the legacy /status format#229
Open
passcod wants to merge 2 commits into
Open
Conversation
d298405 to
ae6a5c0
Compare
Making a health array mandatory is too blunt for servers still running an old reporter, so add a per-server `allow_legacy_status` flag (off by default). When set, a push with no `health` array is accepted as reachability-only: it carries the server's last known healthchecks forward instead of clearing them and files no events, so a server straddling an old and a new reporter doesn't flap its per-check issues. Operators toggle it from the server edit page. Drop the flag and the legacy path once every reporter speaks the new format. Also reformats the workspace (the tree wasn't clean under current stable rustfmt) and adds a CI rustfmt check to keep it that way. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
ae6a5c0 to
f80a5a2
Compare
The edit-page checkbox was reworded to "Allow status from Tamanu"; the Playwright test still looked for the old "Allow legacy status format" label and failed to find the control. Match the current label. Co-Authored-By: Claude Opus 4.8 <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.
🤖 Follow-up to #228, which made a
healtharray mandatory on/status. That blanket reject is too blunt for servers still running an old reporter, so this adds a per-server escape hatch.What
servers.allow_legacy_statuscolumn (boolean, off by default). A status push with nohealtharray is still rejected with400unless the server has this set.health/healthyforward (defaulting to "healthy, no checks" if the server has never reported the new format) and files no health events. So a server straddling an old and a new reporter doesn't flap its per-check issues, and the health snapshot keeps showing the last real report rather than blinking to "no checks" on every legacy ping.Also in here
cargo fmtacross the workspace — the tree wasn't clean under the current stable rustfmt, so a lot of unrelated files reflow. Committed deliberately so it doesn't keep re-surfacing on every PR.Rustfmtjob (just fmt-check) to keep it clean going forward.Wire specs (
crates/public-server/openapi.json,private-web/openapi.json,private-web/src/api-types.ts) regenerated. Coverage: public-server tests for accept/reject/carry-forward and a Playwright test for the edit-page toggle.