1.8 KiB
1.8 KiB
Task 07: excludeDuplicateComments — правило не применяется
Assigned to: Antigravity (Implementation Orchestrator)
Priority: MEDIUM (audit-trail accuracy)
Date: 2026-08-21
Base SHA: 8741569817f4463387c5dc3ac36c0beaedbd0663
Scope
- Semantic decision on duplicate comments:
- Randomayzer core algorithm
HMAC_SHA256_FY_V1andexecuteDeterministicDrawV1operate on a 1-participant = 1-chance model (AGENTS.md§1 forbids altering deterministic randomizer/draw algorithms without explicit owner task). - Multi-weight/multi-entry draws would require modifying the deterministic randomizer and snapshot data structures, which is out of scope.
- Therefore, choose Option B: Unconditional deduplication.
- Randomayzer core algorithm
- Backward compatibility & Conditions Hash versioning:
- Ensure
computeConditionsHashhandles backward compatibility: snapshots created in legacy format (containingexcludeDuplicateComments) must continue to verifyverified: truewith identical hash values (conditionsIntegrity: true).
- Ensure
- Fix duplicate merging in
filter-engine.ts:- Fix
commentsCountsumming so that duplicates withcommentsCount: 0(orundefined) do not artificially add+ 1.
- Fix
- Update UI and validation schemas if
excludeDuplicateCommentsis removed or deprecated:- Clean up or deprecate gracefully in
DEFAULT_FILTER_RULES,filterRulesSchema,src/app/giveaways/new/page.tsx.
- Clean up or deprecate gracefully in
- Create regression tests
tests/duplicate-comments-rule.test.ts:- Duplicate with
commentsCount: 0does not add 1. - Legacy snapshots with
excludeDuplicateCommentsinfilterRulesSnapshotretainverified: trueand match originalconditionsHash. - Filter engine deduplication behaves deterministically.
- Duplicate with
- Verify and output report to
agents/antigravity/done/TASK-2026-08-21-07-duplicate-comments-rule.md.