fix(publish_issue): hard-block publishing a body that leaks a staging URL
Per aaronrene's review of #186's publish_issue.py: the staging.musehub.ai check was only a warning printed to stderr alongside the successful publish. The failure mode being guarded against is a leaked internal hostname, and a warning is exactly the thing that gets skimmed past at the moment someone's about to post a ticket link on social media.
Raises StagingUrlLeakError (a RuntimeError) before any production create/update happens, refusing to publish rather than publishing with a note. main() already catches RuntimeError, so the CLI surfaces this as `❌ ...` + exit 1 with no changes needed there.
The bare-issue-reference check (#182-style refs that won't resolve on production) stays a warning, not a block — reviewed by aaronrene, only the staging-URL leak was flagged as needing a hard stop.
Tests: tests/test_publish_issue.py — updated the staging-URL test to assert pytest.raises(StagingUrlLeakError) and that nothing is published to production when it fires. Full file: 8 passed.
Co-Authored-By: Claude Sonnet 5 <[email protected]>
Semantic Changes
8 symbols
Files Changed
~2
1075 in snapshot
0 comments
muse hub commit comment sha256:411992ae51c0ea420190eb8cfc86e6f04de4d0af5f11238a7542e04cf80afc18 --body "your comment"
No comments yet. Be the first to start the discussion.