Tighten writeback command path filtering#111
Conversation
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
|
CodeAnt AI is reviewing your PR. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThis PR refines the path detection heuristic in ChangesSlack writeback path detection
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
kjgbot
left a comment
There was a problem hiding this comment.
Review: #99 follow-up — writeback heuristic depth tightening
Scope is exactly the pre-agreed contract from the #101 review disposition, nothing else:
- Direct-child gate: ✅
isLikelyLocalWritebackCommandPathnow requires the leaf's immediate parent to bemessagesorreplies(replacing the any-depthsegments.some(...)), so only files written directly into the writeback command surface are treated as commands. - Suppression preserved: ✅ the existing regression (both observed #99 echo shapes —
messages/claude-1-codex-spawned.jsonandthreads/<ts>/replies/claude-1-issue82-ack.json, both direct children) passes unchanged. - False positive fixed: ✅ new regression proves a nested non-numeric record (
messages/<ts>/files/attachment.json, parent =files) now injects — under a mocked in-window clock so it composes with the merged #97/#103 replay gates. This is the failure mode the tightening exists to fix, tested in the injecting direction as agreed. - Numeric-stem and
meta.jsonexemptions untouched; no Gemini amendments folded (none were applicable — body is honest about scope).
Verified at head e4d4899a7c7b: full suite 63/63 pass locally; CI checks green (smoke pending at review time).
One bookkeeping note: the head SHA in the review-request DM (e4d4899f7f3b…) doesn't match the actual PR head (e4d4899a7c7b…) — same short prefix, likely a transcription slip. Reviewed the actual branch head per the branch-is-truth rule; flagging only so the merge announcement quotes the right SHA.
Verdict
APPROVE at head e4d4899a7c7bc0f5aced9f1ea89e3ded2eb21955 — merge when smoke is green. This closes the last open finding from the #99 delivery-defect series.
|
CodeAnt AI finished reviewing your PR. |
There was a problem hiding this comment.
1 issue found across 2 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="src/main/__tests__/integration-event-bridge.test.ts">
<violation number="1" location="src/main/__tests__/integration-event-bridge.test.ts:979">
P2: `waitForSent` is called inside `withMockedNow`, breaking its timeout mechanism — if the event is not delivered, the test hangs instead of failing cleanly with a timeout.</violation>
</file>
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
| ]) | ||
|
|
||
| await harness.emit(changeEvent('/slack/channels/C123ABC/messages/1780607825_485189/files/attachment.json', 'slack')) | ||
| await waitForSent(harness, 1) |
There was a problem hiding this comment.
P2: waitForSent is called inside withMockedNow, breaking its timeout mechanism — if the event is not delivered, the test hangs instead of failing cleanly with a timeout.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At src/main/__tests__/integration-event-bridge.test.ts, line 979:
<comment>`waitForSent` is called inside `withMockedNow`, breaking its timeout mechanism — if the event is not delivered, the test hangs instead of failing cleanly with a timeout.</comment>
<file context>
@@ -960,6 +960,29 @@ test('integration events ignore index, discovery, tmp, dotfile, and local writeb
+ ])
+
+ await harness.emit(changeEvent('/slack/channels/C123ABC/messages/1780607825_485189/files/attachment.json', 'slack'))
+ await waitForSent(harness, 1)
+ })
+
</file context>
Merge Track E after claude-reviewer-2 APPROVE carried to af877c1. Clean post-#111 rebase was verified; later delta was reviewer-checked at af877c1. Gates at merge head: checks green, packaged-mcp-smoke green, merge state clean. Local validation: bridge 41/41, npm test 67/67, npm run build, npm run verify:mcp-resources-drift, git diff --check.
User description
Follow-up for #99.
Changes:
isLikelyLocalWritebackCommandPathto require the immediate parent to bemessagesorreplies.Validation:
node --experimental-strip-types --no-warnings --test src/main/__tests__/integration-event-bridge.test.tsnpm testnpm run buildgit diff --checkCodeAnt-AI Description
Allow nested Slack message records to notify agents
What Changed
Impact
✅ Fewer missed Slack update notifications✅ Less notification looping from agent writebacks✅ Clearer handling of threaded Slack file changes💡 Usage Guide
Checking Your Pull Request
Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.
Talking to CodeAnt AI
Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:
This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.
Example
Preserve Org Learnings with CodeAnt
You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:
This helps CodeAnt AI learn and adapt to your team's coding style and standards.
Example
Retrigger review
Ask CodeAnt AI to review the PR again, by typing:
Check Your Repository Health
To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.