build(deps): update dependencies and fix hmac KeyInit import#34
build(deps): update dependencies and fix hmac KeyInit import#34ljahier wants to merge 12 commits into
Conversation
Deploying pratrol with
|
| Latest commit: |
c58e19d
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://8e0f2550.pratrol.pages.dev |
| Branch Preview URL: | https://chore-dissolve-ports-into-do.pratrol.pages.dev |
c6df2ec to
0237f57
Compare
…dedupe review plumbing
… the webhook/triage edge
There was a problem hiding this comment.
Needs attention — 1 issue in 1 file
The new changes are well-structured — graceful shutdown, dedup cache, Askama migration, and Score encapsulation are all correctly implemented. The contains("merge") guardrail false-positive remains the only actionable finding after four review cycles.
What this PR does
Major refactor: migrates manual .replace() template rendering to type-safe Askama templates, introduces graceful shutdown with TaskTracker + CancellationToken, adds moka-based dedup cache for duplicate webhook deliveries, extracts HMAC verification into an Axum extractor, encapsulates Score behind a clamping constructor, moves constants to dedicated modules, and separates history rendering from domain evaluation into the comment layer.
Prompt for AI agents (all issues)
Check if these issues are valid — if so, understand the root cause of each and fix them.
<assessment>
The new changes are well-structured — graceful shutdown, dedup cache, Askama migration, and `Score` encapsulation are all correctly implemented. The `contains("merge")` guardrail false-positive remains the only actionable finding after four review cycles.
</assessment>
<file name="src/agent/guardrails.rs">
<issue location="src/agent/guardrails.rs:8">
Substring matching with `contains("merge")` false-positives on words like "emerging", "submerge", "merger". This is the fourth review cycle raising this — a recommendation saying "avoid emerging patterns" on a high-suspicion PR will incorrectly trigger `InconsistentApproval`. Use a leading-space prefix to approximate word boundaries.
</issue>
</file>
Tag @mendral-app with feedback or questions. View session
|
|
||
| const URL_MARKERS: [&str; 3] = ["http://", "https://", "www."]; | ||
|
|
||
| const APPROVAL_MARKERS: [&str; 4] = ["approve", "merge", "lgtm", "looks good"]; |
There was a problem hiding this comment.
bug (P2): Substring matching with contains("merge") false-positives on words like "emerging", "submerge", "merger". This is the fourth review cycle raising this — a recommendation saying "avoid emerging patterns" on a high-suspicion PR will incorrectly trigger InconsistentApproval. Use a leading-space prefix to approximate word boundaries.
Suggested change
| const APPROVAL_MARKERS: [&str; 4] = ["approve", "merge", "lgtm", "looks good"]; | |
| const APPROVAL_MARKERS: [&str; 4] = ["approve", " merge", "lgtm", "looks good"]; |
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At src/agent/guardrails.rs, line 8:
<issue>
Substring matching with `contains("merge")` false-positives on words like "emerging", "submerge", "merger". This is the fourth review cycle raising this — a recommendation saying "avoid emerging patterns" on a high-suspicion PR will incorrectly trigger `InconsistentApproval`. Use a leading-space prefix to approximate word boundaries.
</issue>
No description provided.