fix: run_debate_cycle() counts a stance posted only if the GitHub writes succeeded - #590
Open
essentialbit wants to merge 2 commits into
Open
fix: run_debate_cycle() counts a stance posted only if the GitHub writes succeeded#590essentialbit wants to merge 2 commits into
essentialbit wants to merge 2 commits into
Conversation
…ting a stance as posted Previously incremented stances_posted unconditionally after attempting the comment+label posts, so a dropped write (e.g. GitHub 503 mid-outage) still counted as "posted" — the cycle report could overstate what actually landed. Now counts a stance as posted only if both the comment and label writes succeeded; a partial/failed write increments errors instead.
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
run_debate_cycle()incrementedsummary["stances_posted"]unconditionally after attempting the comment + consensus-label_gh_post()calls, without checking either return value._gh_post/_gh_deleteretry) still counted as "posted" — the hourly cycle report could overstate what actually landed on the issue._gh_post()calls must succeed (non-Nonereturn) for the stance to count; otherwise it's counted inerrorsinstead.Self-directed tooling fix — root cause flagged but left unfixed in a prior cycle's memory note (
fredai.md, "Separate, not-yet-fixed correctness gap"), fixed now as its own small scoped PR per that note. Not routed through the debate/consensus pipeline since it's a correctness fix to the pipeline's own reporting, not a new capability proposal.Test plan
python3 -c "from main import *"— import OK, no route/schema regressions_gh_post, deleted after use) covering 3 cases: both writes succeed → 1 posted/0 errors; comment write fails → 0 posted/1 error; label write fails → 0 posted/1 error. All pass.