fix: reject moral attacks on the person, spare criticism of the content - #32
Conversation
Character assassination, humiliation, discrediting, demonization, and condescending moral superiority attack WHO the creator or a commenter is — character, motives, worth — and now sit in the demeaning band (grifter anchor 0.88; demonization and humiliation anchors 0.85). Criticism of the content or its claims stays acceptable (anchored 0.35): attack the idea, never the person. Also sharpened the unknown-context policy after it regressed: a bare scoffing interjection with empty metadata is demeaning because no context invited it.
🤖 CodeAnt AI — Review Status
|
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
User descriptionBehaviorStacked on #31 (same files; retargets to Character assassination, humiliation, discrediting, demonization, and condescending moral superiority now land in the demeaning band (reject, not ban). These attack who the creator or a commenter is — character, motives, worth — rather than what the video says:
Guard rail: criticism of the content or its claims ( Also fixed a regression the new paragraph caused: empty-metadata Verification
Out of scopeNo threshold, pipeline, or UI changes; no new dependencies. CodeAnt-AI DescriptionDistinguish personal moral attacks from legitimate content criticism What Changed
Impact
💡 Usage GuideChecking Your Pull RequestEvery 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 AIGot 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. ExamplePreserve Org Learnings with CodeAntYou 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. ExampleRetrigger reviewAsk CodeAnt AI to review the PR again, by typing: Check Your Repository HealthTo 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. |
There was a problem hiding this comment.
This PR successfully implements detection of moral attacks on the person while preserving content criticism, and fixes the empty-metadata regression for bare interjections. The implementation is thorough with comprehensive test coverage (18/18 cases passing), proper contract tests, and consistent calibration examples. All changes align with the stated behavior and verification requirements.
You can now have the agent implement changes and create commits directly on your pull request's source branch. Simply comment with /q followed by your request in natural language to ask the agent to make changes.
PR Summary by QodoReject moral attacks on people while allowing content criticism
AI Description
Diagram
High-Level Assessment
Files changed (3)
|
🏁 CodeAnt Quality Gate ResultsCommit: ✅ Overall Status: PASSEDQuality Gate Details
|
Code Review by Qodo
Context used✅ Compliance rules (platform):
56 rules 1.
|
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | ✅ 0 (≤ 100 complexity) |
| Duplication | ✅ 0 (≤ 1 duplication) |
AI Reviewer: first review requested successfully. AI can make mistakes. Always validate suggestions.
TIP This summary will be updated as you push new changes.
There was a problem hiding this comment.
Pull Request Overview
The PR successfully refines the moderation logic to better differentiate between moral attacks on a person (which should be rejected) and criticism of content (which should be accepted). These changes align with the primary objective of improving moderation nuance.
However, there is a discrepancy regarding the fix for bare scoffing interjections (e.g., 'lol' with empty metadata). While the PR description intends to return these to a score of 0.82, this specific numeric anchor is missing from the calibration examples in the prompt, and the corresponding test scenario is currently missing. Codacy analysis indicates the PR is otherwise up to standards with no new quality issues or complexity regressions.
About this PR
- The PR aims to fix a regression for bare interjections by targeting a score of 0.82, but this specific target is not supported by new test cases or calibration entries in the prompt logic. This makes the fix difficult to verify and prone to future regressions.
Test suggestions
- Character assassination ('grifter') scores in the demeaning range (>= 0.76)
- Demonization ('People like you') scores in the demeaning range (>= 0.76)
- Content critique ('exaggerated and unsourced') scores in the acceptable range (<= 0.5)
- Bare 'lol' with empty metadata returns the targeted 0.82 score
Prompt proposal for missing tests
Consider implementing these tests if applicable:
1. Bare 'lol' with empty metadata returns the targeted 0.82 score
TIP Improve review quality by adding custom instructions
TIP How was this review? Give us feedback
| - "People like you are everything wrong with this platform." -> 0.85 | ||
| - "Imagine being this desperate for views. Pathetic." -> 0.85 | ||
| - "The claims in this video are exaggerated and unsourced." -> 0.35 | ||
| - "lol are you kidding? This is it? Not a great video." -> 0.85 |
There was a problem hiding this comment.
🟡 MEDIUM RISK
Suggestion: To ensure the 'lol' regression is fully fixed and verifiable as stated in the PR description, add a calibration example for a bare interjection with empty metadata (e.g. - 'lol' (empty metadata) -> 0.82).
The contract tests captured anchor scores with (0\.\d+), which cannot match a legitimate 1.00 calibration value and would fail on a valid prompt recalibration. Widen the capture to (0\.\d+|1\.0+) across the file.
|



Behavior
Stacked on #31 (same files; retargets to
mainautomatically once #31 merges).Character assassination, humiliation, discrediting, demonization, and condescending moral superiority now land in the demeaning band (reject, not ban). These attack who the creator or a commenter is — character, motives, worth — rather than what the video says:
He's a grifter who lies to his audience for money.→ 0.88People like you are everything wrong with this platform.→ 0.85Imagine being this desperate for views. Pathetic.→ 0.85Guard rail: criticism of the content or its claims (
The claims in this video are exaggerated and unsourced.→ 0.35) stays acceptable — attack the idea, never the person. Mild snark without moral framing still queues for human review (borderline band unchanged); verbal abuse remains omni-moderation's job.Also fixed a regression the new paragraph caused: empty-metadata
loldropped to 0.05. The unknown-context policy is now explicit that a bare scoffing interjection with empty or uninformative metadata is demeaning, because no context invited it (back to 0.82).Verification
npm run check: 0 errors.npm run test: 202/202.npm run build: green.Out of scope
No threshold, pipeline, or UI changes; no new dependencies.