fix: align command status comment trust config#83
Merged
Conversation
Reuse the repair lane trusted bot configuration when updating command status comments and align the direct env fallback with the workflow's STATUS_COMMENT_ID name.
Member
Author
|
@codex review |
|
Codex Review: Didn't find any major issues. You're on a roll. ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
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.
Problem
PR #75 fixed a real command-status targeting bug: ordinary event-item reviews and
/clawsweeper re-reviewcommand runs share the sameclawsweeper_itemworkflow, but only command-triggered re-reviews have a command status comment to update. When an ordinary PR/issue event had nocommand_status_markerorstatus_comment_id, the old parser could treat--marker ""as the string"true", causingupdate-command-statusto scan comments forbody.includes("true")and potentially patch a human comment such as one containingisError: true.That fix left two follow-up issues in the merged code:
update-command-statushardcodedclawsweeperandopenclaw-clawsweeperas trusted status comment authors, while the rest of the repair lane supports trusted bot overrides throughCLAWSWEEPER_TRUSTED_BOTS.CLAWSWEEPER_STATUS_COMMENT_ID, but the workflow exportsSTATUS_COMMENT_IDand passes that value to--status-comment-id.Solution
This follow-up keeps PR #75's conservative behavior:
update-command-statusonly updates a status comment that can be proven by exact comment id or full command marker, and the target must be authored by a trusted bot.The changes are:
src/repair/config.tsso command status updates do not maintain a second copy of that policy.--trusted-bots/CLAWSWEEPER_TRUSTED_BOTSinsrc/repair/update-command-status.tsand useisAllowedMutationActor()for the samefoo/foo[bot]normalization used elsewhere in the repair lane.STATUS_COMMENT_IDwhen--status-comment-idis not provided.Test plan
pnpm run build:repair && node --test test/repair/update-command-status.test.tsnvm use 24 && pnpm run check