fix(source-control): thread extra_bot_logins into resolve_thread.py - #1337
Conversation
…thread.py's is_bot calls Two is_bot call sites in babysit_resolve_thread.py -- project_thread's botOnly computation and the humanThreadsActed counter -- omitted the caller's extra_bot_logins config, unlike every other classifier call site (e.g. actor_kind in babysit_classify.py). An operator who registered a non-structural bot account via babysit_extra_bot_logins (no [bot] suffix, API __typename reports User) had that account's threads miscategorized at both sites. Add an --extra-bot-logins CLI flag (matching the snapshot wrapper's shape), thread it through project_thread and fetch_threads via a closure, and pass it to both is_bot call sites. Update SKILL.md's flag-delivery table to list resolve-thread as a consumer, and bump the plugin patch version with a CHANGELOG entry. Closes #637 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
Claude finished @kyle-sexton's task in 2m 8s —— View job PR Review: fix(source-control): thread extra_bot_logins into resolve_thread.py
This is a well-targeted, minimal fix that correctly resolves a real omission. Here's my analysis. SummaryThe bug: The fix correctly threads CorrectnessSite 1 — Site 2 — Closure pattern in
No correctness issues found. Test Coverage
The four new test methods are well-structured:
One observation: the Documentation and VersioningCHANGELOG — The 0.26.3 entry accurately describes both omission sites, the severity characterization ("Low severity — dormant unless an operator has configured the userConfig key"), and the pre-existing nature relative to #534/#634. No issues. SKILL.md — The one-line change updating
OverallThe change is correct, minimal, consistent with codebase patterns, and properly tested in both directions for both affected call sites. No blocking issues. |
|
Claude finished @kyle-sexton's task in 1m 44s —— View job Security Review
FindingsNo security issues found. Scope reviewed: What was checked and why it's safe: Injection surfaces (command, path, template) — Trust boundary for Authorization bypass via bot-classification — classifying a human as a bot would allow their threads to be auto-resolved, bypassing human review. However, the only way to trigger this is to control the operator's Mutable-default-argument footgun — both GitHub Actions patterns — no workflow files are modified; not applicable. Secrets / credentials — no new secret handling introduced. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4184c85bbb
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
… command form The delivery-table row alone did not deliver anything: configuration reaches these scripts only through CLI flags, and the exact resolver commands the agent copies -- the two pinned degradation forms in safety.md, the Worker Contract clause and the Worker Prompt Template in orchestration.md, and the thread-resolution bullet in SKILL.md -- all still invoked the new option with its empty default, leaving a registered non-structural bot account's threads classified as human and skipped in worker tier. safety.md now states the rule alongside the wrapper's other flag contracts so a future command form does not drop it again. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012SV88ZgGDKdUKEPJaJtDpG
Both sides appended independent test classes to test_babysit_resolve_thread.py; kept both. main released 0.28.0, so this branch's entry moves to 0.28.1. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012SV88ZgGDKdUKEPJaJtDpG
|
Claude encountered an error after 2s —— View job I'll analyze this and get back to you. |
|
Claude encountered an error after 2s —— View job I'll analyze this and get back to you. |
|
Warning Automated review did not complete — this is an infrastructure failure, not a review verdict. Treat any Claude comment on this PR (including a placeholder like "I'll analyze this and get back to you") as incomplete, not "no findings."
Re-running the job, or pushing a new commit, will retry the review. |
|
Warning Automated security review did not complete — this is an infrastructure failure, not a review verdict. Treat any Claude comment on this PR (including a placeholder like "I'll analyze this and get back to you") as incomplete, not "no findings."
Re-running the job, or pushing a new commit, will retry the review. |
# Conflicts: # plugins/source-control/.claude-plugin/plugin.json # plugins/source-control/CHANGELOG.md
|
Claude encountered an error after 3s —— View job I'll analyze this and get back to you. |
|
Claude encountered an error after 2s —— View job I'll analyze this and get back to you. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1f82ce256a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…ne skill cap The #637 addition pushed babysit-prs/SKILL.md to 501 lines, over the skill-quality hard cap. Rewrapping the thread-resolution bullet at the file's 100-column prose width restores headroom with identical content.
# Conflicts: # plugins/source-control/.claude-plugin/plugin.json # plugins/source-control/CHANGELOG.md
|
Claude encountered an error after 2s —— View job I'll analyze this and get back to you. |
|
Claude encountered an error after 2s —— View job I'll analyze this and get back to you. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 54267ab45f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…er form safety.md's read-only-forms bullet listed the resolve-thread thread-list command without the flag, contradicting the rule stated directly below it that every resolve-thread form — listing and mutating alike — carries --extra-bot-logins. A listing run without it reports a configured non-structural bot's threads as human, which is the miscategorization #637 exists to remove.
|
Claude encountered an error after 2s —— View job I'll analyze this and get back to you. |
|
Claude encountered an error after 2s —— View job I'll analyze this and get back to you. |
Closes #637
This was generated by AI during work-loop execution.
Summary
babysit_resolve_thread.pycalled the sharedis_botclassifier at two sites without passingthe caller's
extra_bot_loginsconfig —project_thread'sbotOnlycomputation (L117-120) andthe
humanThreadsActedreporting counter (L477) — unlike every other classifier call site (e.g.actor_kindinbabysit_classify.py). An operator who registered a non-structural bot accountvia
babysit_extra_bot_logins(no[bot]login suffix, API__typenamereportsUser) hadthat account's threads miscategorized at both sites. Pre-existing relative to #534/#634 (that PR
migrated these call sites to the shared
is_botbut did not introduce the omission).This PR adds an
--extra-bot-loginsCLI flag tobabysit_resolve_thread.py(samecomma-separated shape as the snapshot wrapper's flag), threads it through
project_threadandfetch_threadsvia a closure, and passes it to bothis_botcall sites.SKILL.md'sbabysit_extra_bot_loginsflag-delivery table now listsresolve-threadalongsidesnapshot.Patch-bumps
source-controlto 0.26.3 with a matching CHANGELOG entry.Test plan
ProjectThreadExtraBotLogins(site 1) andHumanThreadsActedExtraBotLogins(site 2) totests/test_babysit_resolve_thread.py— each asserts a configured non-structural login iscorrectly classified as bot, and that an unconfigured one still falls back to structural
detection alone (regression coverage for both directions).
python -m pytest tests/ -qinplugins/source-control/skills/babysit-prs/scripts— 352passed, 58 subtests passed (full existing suite, no regressions).
python -c "import ast; ast.parse(...)"— syntax check on the modified script.Related
N/A
🤖 Generated with Claude Code