Post ClawSweeper Endor review alerts through Hermit - #30
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: found issues before merge. Reviewed August 24, 2026, 10:03 PM ET / August 25, 2026, 02:03 UTC. ClawSweeper reviewWhat this changesAdds an authenticated Hermit endpoint that records and deduplicates ClawSweeper Endor review alerts before posting a Carbon Discord message to a configured channel. Merge readinessKeep this MEMBER-authored draft open: current main has no equivalent endpoint, but the new Discord authority path needs an explicit no-mentions fix and maintainer acceptance of the permanent integration boundary. Priority: P1 Review scores
Verification
Live VerificationCommand: Result: FAIL (failed) — execution before step 1 Assertions:
How this fits togetherHermit is a Cloudflare Worker that receives HTTP requests before ordinary Discord interaction handling. The endpoint validates a ClawSweeper event, records a D1 receipt, then sends a Carbon message to one configured Discord channel. flowchart LR
A[ClawSweeper review event] --> B[Hermit HTTP endpoint]
B --> C[Token and schema validation]
C --> D[D1 delivery receipt]
D --> E[Carbon message builder]
E --> F[Configured Discord channel]
Decision needed
Why: This adds a cross-repository authority boundary, persistent storage, two production secrets, and a server-owned notification channel; that scope needs explicit acceptance beyond the narrow code repair. Before merge
Findings
Agent review detailsSecurityNeeds attention: The new authenticated route reaches Discord with caller-provided text but does not explicitly disable all mention parsing. Review metrics
Merge-risk optionsMaintainer options:
Copy recommended automerge instructionTechnical reviewBest possible solution: Retain the server-owned channel and durable receipt design, explicitly suppress all parsed mentions with regression coverage, then land it only if maintainers want Hermit to own this ClawSweeper notification boundary. Do we have a high-confidence way to reproduce the issue? Yes—source inspection gives a current-head path: send a valid authenticated notification containing @everyone or @here and observe that the handler forwards it without an explicit empty parse list. Is this the best way to solve the issue? No—the endpoint and receipt design are coherent, but the final Discord payload must explicitly suppress all parsed mentions before this authority boundary is safe to merge. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 17a621b47dba. LabelsLabel changes:
Label justifications:
EvidenceSecurity concerns:
What I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
ClawSweeper has no strict way to send completed Endor remediation reviews through Hermit, so security results cannot reach a dedicated Discord channel with durable deduplication. Retrying delivery could otherwise create duplicate or mismatched messages. This PR adds an authenticated, schema-validated Hermit route with a server-owned channel and a D1 receipt. The same terminal event now yields one Carbon message and a stable Discord message receipt.
Change breakdown
Proof
Before: direct base
After: PR
The controlled proof uses the real request handler, SQLite-backed D1 adapter, Carbon serializer, and Discord request shape. It does not send to live Discord because production configuration was deliberately left unchanged.
Linux proof passed 8/8 tests on Hetzner Crabbox lease
cbx_cac45a64e489.How to verify
bun test tests/clawsweeperEndorApi.test.ts.bun run typecheckandbun run deploy:dry-run.bunx drizzle-kit check.Implementation notes
Apply migration
0013_many_chameleon.sql, setCLAWSWEEPER_ENDOR_DISCORD_CHANNEL_IDandCLAWSWEEPER_HERMIT_TOKEN, then deploy Hermit before enabling openclaw/clawsweeper#1241. OpenClaw Bay is unaffected because this is an internal notification path.