Repository navigation
deploy check: the topic map route's selector requires its handler switch - #3482
Merged
Merged
Conversation
… when the route is selected The deploy's Rust health check compares the handler switches polis-api reports as on with the switches the selected routes need. It had no entry for the report topic map route, so a box that selected delphiTopicMap with POLIS_API_DELPHI_TOPIC_MAP_READS=1 would have failed the check and the deploy. It now expects that switch exactly when delphiTopicMap is selected, as it does for version, comments, testConnection and postVotes: selected with the switch off, or the switch on without the route, still fails. No other switch is newly accepted. Nothing is selected by this change: for every route list that does not name delphiTopicMap the check is unchanged, and the empty-list rollback is unchanged. The tests run the check's own JavaScript over every combination of pca2, version, comments and delphiTopicMap with their switches, near-miss selector names, unrelated switches beside it, and the existing health and version refusals. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KvftUARCjBArGpuPBmjRZ1
Contributor
Delphi Coverage Report
|
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.
deploy: the health check accepts the topic map route's switch exactly when the route is selected
What anyone observes: nothing. No route is selected and no switch is turned on by this change. A deploy whose route list does not name
delphiTopicMapvalidates exactly as before, and the empty-list rollback is unchanged.The problem
The deploy's Rust health check (
scripts/validate_service.sh,polis_api_ready) compares the handler switches polis-api reports as on (routing.enabledSwitchesin its/health) with the switches the selected routes need. It had no entry for the report topic map route. So a box whose settings selectdelphiTopicMapinRUST_API_ROUTESand turn onPOLIS_API_DELPHI_TOPIC_MAP_READS=1, which the route needs to answer instead of handing the request back to Node, would fail the Rust health check, and with it the deploy.The change
scripts/validate_service.sh: one more entry in the switch table:POLIS_API_DELPHI_TOPIC_MAP_READSis expected exactly whendelphiTopicMapis selected, the same wayversion,comments,testConnectionandpostVotesare listed. Selecting the route with the switch off, or turning the switch on without selecting the route, still fails the check. No other switch is newly accepted.scripts/tests/test_api_health.py: three tests that run the check's own JavaScript against fake health replies:pca2,version,commentsanddelphiTopicMapagainst every combination of their switches;delphiTopicMapShadow), white space and a repeated name, and unrelated switches beside the route's;What was checked
python3 -m unittest scripts/tests/test_api_health.py: 25 tests, OK. The two new selector tests fail against the unchanged check (19 failures), so they test the new entry.file-server/nginx/render-rust-api.sh, thedelphiTopicMaplocation and its rate template). This change does not touch nginx or Compose.docker-compose.yml, thepolis-apiservice'senv_file), so the route's switch, its database URLPOLIS_API_DELPHI_TOPIC_MAP_DATABASE_URL, the shadow env namePOLIS_API_DELPHI_TOPIC_MAP_SHADOW_ENVand the optional identity database URL reach it with no Compose change. The stored-map switchDELPHI_TOPIC_MAP_DOCUMENTand the every-comment listDELPHI_SHADOW_ALL_COMMENTSalready reach the Delphi shadow's daemon and scheduler by Compose interpolation. No Compose or env template change is needed.Scope
No schema change. Nothing on the vote, comment or next-comment path: the check runs only at deploy time, from the server container, against polis-api's
/health.🤖 Generated with Claude Code