Repository navigation
feat: a thread reply can resolve the thread it verified as fixed - #105
Merged
Merged
Conversation
⚖️ Themis review: ✅ Ship itTL;DR: This adds a narrowly scoped, validated resolution signal for replies in the bot’s own review threads, while retaining the existing output redaction boundary and best-effort delivery behavior. The currently queued CI run provides no completed result yet.
📝 Walkthrough
🧪 How to verify
Product take: Solid workflow polish: maintainers no longer need to manually close bot findings that a follow-up has verified as fixed. 🧭 Assumptions & unverified claimsFocused tests and linting could not run locally because dependency installation could not reach PyPI; the CI run is still queued. A small closure for threads that have finally earned it. · reviewed at e87aae6 |
The discuss path had no way to resolve anything: it parses reply.md only, so resolve_thread was reachable from the review path alone. The agent, asked in a thread whether its finding was fixed, would answer "confirmed fixed — resolving" and nothing happened; every such thread stayed open. Add an optional resolution.json the agent writes when it verified the fix, acted on after the reply posts, and only for the bot's own threads.
Zaimwa9
force-pushed
the
feat/discuss-resolve-thread
branch
from
July 28, 2026 09:48
e87aae6 to
e650ae5
Compare
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
A thread reply can now resolve the thread it is replying in, when the agent verified in the checkout that its own finding is fixed.
Why
The discuss path had no resolve capability at all — it parses
reply.mdand nothing else, sogh.resolve_thread()was reachable only from the review path. Asked in a thread "is this fixed now?", the agent would reply "Confirmed fixed inabc1234— resolving." and nothing would happen.That is worse than not resolving: the bot narrates an action the harness cannot perform, so a maintainer reads "resolving", moves on, and the thread stays open. Observed live on a PR where all 12 bot threads remained open after several such replies.
How
resolution.json— a new optional output file ({"resolved": true}), added toOUTPUT_FILESin lockstep as that comment requires.parse_resolutionmirrorsparse_learning's contract: absent means no claim, malformed raisesOutputErrorwhich the caller treats as no-resolution rather than a job failure.discuss()acts on it after the reply is posted, and only for threads whose first comment is bot-authored — closing a human's thread would answer their question on their behalf. Reuses the same_bot_loginsownership rule as the review path.Resolution is best-effort by construction: the reply is the deliverable, so a malformed file, a non-bot thread, or a failing GraphQL call logs and moves on.
Tests
Own thread + verified → resolved; no file /
resolved: false→ left open; human thread → refused and logged; malformed JSON → reply still posts; failing resolve call → reply still succeeds; conversation comment → never attempted. Plusparse_resolutionunit coverage (absent, valid, five malformed shapes) and theOUTPUT_FILESguard.Note
Stacked on #104 (both touch
build_discussion_prompt); base retargets tomainonce that merges.