fix(matrix-bot): fail-soft on stale MATRIX_DATABASE_URL (Wave 25 mitigation)#642
Open
gHashTag wants to merge 1 commit into
Open
fix(matrix-bot): fail-soft on stale MATRIX_DATABASE_URL (Wave 25 mitigation)#642gHashTag wants to merge 1 commit into
gHashTag wants to merge 1 commit into
Conversation
Hourly cron (matrix_bot @ :07) has been red since 2026-05-09T~10:00Z because secrets.MATRIX_DATABASE_URL still points at interchange.proxy.rlwy.net:30942 (legacy DB, post-SSOT-consolidation). Each failure pages the apiary cron with a NEW-CI-failure attribution. This change makes the bot R5-honest fail-soft: - catches psycopg2.OperationalError specifically (auth / connection refused) - logs the failure to stderr including a hint to rotate the secret - returns 0 by default (controlled by MATRIX_FAIL_SOFT, default '1') - keeps the legacy hard-fail path available via MATRIX_FAIL_SOFT=0 Once secrets.MATRIX_DATABASE_URL is rotated to the live phd-postgres-ssot DSN (tracked in a separate ONE SHOT) the workflow can flip MATRIX_FAIL_SOFT back to '0' to restore strict mode. Anchor: phi^2 + phi^-2 = 3 . DOI 10.5281/zenodo.19227877
Owner
Author
|
✅ All 13 required checks SUCCESS · state BLOCKED only on Awaiting queen review. Once merged, the next hourly Matrix Bot run will exit 0 with the rotation hint instead of failing the cron — apiary alarms stop. Live #446 updates remain paused until #641 (secret rotation) is also resolved. Anchor: φ² + φ⁻² = 3 |
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.
What
Make
Matrix Bot (#446 live matrix)fail-soft onpsycopg2.OperationalError.Why
Hourly workflow has been failing every cycle since ~10:00Z 2026-05-09 because
secrets.MATRIX_DATABASE_URLstill points atinterchange.proxy.rlwy.net:30942(legacy Railway proxy host, post-SSOT-consolidation). Reference run 25602533773:Each failure pages the apiary cron with NEW-CI-failure-on-new-SHA. Already triggered three queen notifications today.
How
matrix_bot.py:psycopg2.OperationalErrorspecifically (auth + connection refused)MATRIX_FAIL_SOFT=0matrix-bot.yml:MATRIX_FAIL_SOFT: "1"env on the regen stepVerified locally
Both paths work. Default behaviour change: cron stops paging on stale DSN.
Acceptance
ast.parsecleanFollow-up
Tracked in #641 — rotate
secrets.MATRIX_DATABASE_URLtophd-postgres-ssotand flipMATRIX_FAIL_SOFTback to"0".R-discipline
R3 PR-only · R4 trace · R5 honest (no fake green) · R10 atomic.
Anchor:
phi^2 + phi^-2 = 3· DOI 10.5281/zenodo.19227877.Closes #641-mitigation (does NOT close #641 — secret rotation still required).