fix(godforge): audit patches — NameError crash, version strings, deprecated env docs, env-var routing#9
Merged
Conversation
…o GODFORGE_VERSION
…GE_OWNER_USER_ID, GODFORGE_REPORTS_CHANNELS)
…GE_OWNER_USER_ID, GODFORGE_REPORTS_CHANNELS)
…GE_OWNER_USER_ID, GODFORGE_REPORTS_CHANNELS)
…GE_OWNER_USER_ID, GODFORGE_REPORTS_CHANNELS)
…GE_OWNER_USER_ID, GODFORGE_REPORTS_CHANNELS)
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.
Summary
This PR applies three audit patches to the GodForge repository.
Patch 1 + 7 — Fix
format_draft_showNameError and stale version strings (utils/formatter.py)_add_forgelens_status_fieldinsideformat_draft_showthat referenced the undefined variableexport, which would raise aNameErrorat runtime whenever.draft showwas invoked.v1.6footer literals in embed footers withf"GodForge v{GODFORGE_VERSION} ..."so they track the module-levelGODFORGE_VERSIONconstant (2.1.0-rc) instead of a stale string. Affected footers:format_draft_board,format_draft_show,format_draft_end,format_claim_embed,format_board_from_snapshot, andformat_draft_end_from_export.Patch 6 — Mark deprecated channel ID vars in
.env.exampleGODFORGE_ENABLE_LEGACY_ECONOMY=true, since ForgeLens now owns betting and ledgers.Patch 9 — Move hard-coded single-tenant constants in
bot.pyto env vars_GOD_USER_ID = 146116042182098944with_GOD_USER_ID = int(os.getenv("GODFORGE_OWNER_USER_ID", "0")).REPORTS_CHANNELS = {1129404279808073758: 1496553890181550110, ...}dict with an env-var-driven dict comprehension readingGODFORGE_REPORTS_CHANNELS(comma-separatedguild_id:channel_idpairs)..env.example.Test plan
.draft showon an active draft — confirm noNameErroris raised and the ForgeLens Status field appears once (not twice).GodForge v2.1.0-rcinstead ofGodForge v1.6..env.exampleto.env, setGODFORGE_OWNER_USER_IDandGODFORGE_REPORTS_CHANNELSto your Discord IDs, restart the bot, and verify elevated commands and report channel routing work correctly.GODFORGE_OWNER_USER_IDandGODFORGE_REPORTS_CHANNELSare unset (defaults to0/ empty dict, disabling those features gracefully).https://claude.ai/code/session_01Xodut6PZZtu2JRzx8wqbik
Generated by Claude Code