Repository navigation
fix: isolate assist publication credentials - #479
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4257f83a1b
ℹ️ 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".
| throw new Error( | ||
| `unsupported assist artifact schema version: ${String(artifact.schema_version)}`, | ||
| ); | ||
| } |
There was a problem hiding this comment.
Remove duplicate repo declaration
When src/assist-artifact.ts is included by tsconfig.json, this second const repo is in the same block as the declaration on the previous line, so the module is rejected before the build/tests or assist workflow can start. This makes every pnpm run build/workflow setup fail; drop the duplicate declaration.
Useful? React with 👍 / 👎.
|
Codex review: needs maintainer review before merge. Reviewed July 11, 2026, 10:07 AM ET / 14:07 UTC. Summary Reproducibility: yes. at source level. Current main gives issue-write permission to the workflow that performs model generation, and the earlier reviewed branch left command-bearing generated publications eligible for fast webhook routing; these paths are explicit in source, although current main was not mutated to exercise them. Review metrics: 4 noteworthy metrics.
Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Merge the exact reviewed head and retain the read-only generator, bounded artifact contract, single trusted publisher, immediate stale-state checks, and publication-marker filtering as one security boundary. Do we have a high-confidence way to reproduce the issue? Yes at source level. Current main gives issue-write permission to the workflow that performs model generation, and the earlier reviewed branch left command-bearing generated publications eligible for fast webhook routing; these paths are explicit in source, although current main was not mutated to exercise them. Is this the best way to solve the issue? Yes. Repository-scoped read-only generation, a strict bounded artifact, fresh narrow publisher credentials, immediate live-state revalidation, retry-safe ownership, and pre-routing publication filters are the narrowest coherent least-privilege solution. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 483cc21ca765. Label changesLabel changes:
Label justifications:
Evidence reviewedWhat I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
Review history (6 earlier review cycles)
|
0ff6ea2 to
b5d454b
Compare
b5d454b to
b198eb8
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3a54187d2e
ℹ️ 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".
| comment: LooseRecord, | ||
| { trustedAuthors = new Set() }: LooseRecord = {}, | ||
| ) { | ||
| if (isAssistPublicationCommentBody(String(comment?.body ?? ""))) return null; |
There was a problem hiding this comment.
Filter assist publications before webhook dispatch
When an assist/visual answer contains a visible command such as /review or @clawsweeper automerge, this guard only protects the scheduled router path. The fast webhook classifier in src/repair/comment-webhook.ts still checks only proof-nudge markers before running COMMAND_PATTERN/parseCommand, so accepted issue_comment events for ClawSweeper's own assist publication can still get an ack/reaction and dispatch a command-router run, which violates the new “never routes assist output” boundary. Reuse this predicate in webhook classification before the command-pattern check.
Useful? React with 👍 / 👎.
|
@clawsweeper re-review Exact head |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
ClawSweeper assist: The remaining proof is a fresh correctness review of the current head Evidence:
Suggested next action: Run Source comment: unknown |
|
@clawsweeper re-review Exact head |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Landed as 8891c32. Final reviewed head:
Local |
* fix: isolate assist publication credentials * test: pin assist reasoning binding * fix: grant assist publisher pull request writes * fix: stabilize assist retry identity * fix: block generated webhook commands
Summary
Live findings fixed
Validation
pnpm -s buildpnpm run build:repairpnpm run lint:srcpnpm run lint:repairpnpm run lint:scriptspnpm run format:checkactionlint .github/workflows/assist.ymlpnpm run checkreaches the same three macOS harness failures reproduced from an archived clean current-main snapshot: two Bash 3.2 lowercase-expansion cases and one coverage-tail fixture. Exact-head hosted Linux CI is green.Exact-head live proof
Exact head:
7d3b4834b62f36803bb1a52ee4273128a853aed4Both final runs used the same idempotency key. The first publisher reported
action: posted; the retry reportedaction: updated; exactly one marker-backed assist comment remains at the same comment ID. Each run shows the read-only token in the generation job, bounded artifact upload/download and validation, and the fresh write token only in the separate trusted publisher job.The earlier failed publication run is retained as root-cause proof: https://github.com/openclaw/clawsweeper/actions/runs/29154425050