Fix contradiction hunt sensitivity disclosure#21
Conversation
|
Thank you for your contribution to MOOTx01. Before it can be merged we need you to sign our Contributor License Agreement. You can read it here: CLA.md. To sign, post a comment on this pull request with exactly the following text: I have read the CLA Document and I hereby sign the CLA You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 26c07098fa
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| /// Default MCP hunt disclosure ceiling, matching recall's default | ||
| /// `.sensitivityAtMost(.elevated)` posture. | ||
| internal static func isHuntRecallEligible(_ drawer: Drawer) -> Bool { | ||
| drawer.adjectiveSensitivity.rawValue <= AdjectiveSensitivity.elevated.rawValue |
There was a problem hiding this comment.
Compare the raw sensitivity field, not the decoded enum
For drawers whose adjective bitmap contains a reserved/intermediate sensitivity raw value above elevated (for example a future tier at raw 24), drawer.adjectiveSensitivity falls back to .normal, so this check lets the pair reach ConflictCue and can still emit borderline snippets. Default recall's .sensitivityAtMost(.elevated) is enforced as a raw bitmap threshold, so this helper is not actually equivalent to the recall ceiling it is trying to mirror; compare the extracted raw field to 16 instead of comparing the lossy decoded enum.
Useful? React with 👍 / 👎.
| if a.adjective_sensitivity().raw_value() > max_hunt_sensitivity | ||
| || b.adjective_sensitivity().raw_value() > max_hunt_sensitivity |
There was a problem hiding this comment.
Compare the raw sensitivity field, not the decoded enum
When a drawer has a reserved/intermediate adjective-sensitivity raw value above Elevated, adjective_sensitivity() decodes it through from_raw and falls back to Normal, causing this gate to allow the pair even though the default recall ceiling uses a raw SensitivityAtMost(Elevated) threshold and would exclude it. This leaves a disclosure gap for newer/imported rows using reserved sensitivity values; the hunt gate should compare the raw bits from adjective_bitmap directly.
Useful? React with 👍 / 👎.
Motivation
Description
GeniusLocusKit.huntContradictionsto skip candidate drawers whoseadjectiveSensitivityis above.elevatedand addedisHuntRecallEligiblehelper to centralize the ceiling check (packages/kits/GeniusLocusKit/Sources/GeniusLocusKit/Brain/ContradictionHunt.swift).hunt_contradictions) by skipping drawers whoseadjective_sensitivity()exceeds theElevatedtier (packages/kits/GeniusLocusKit/rust/src/coordinator.rs).ContradictionHuntTests.swift; Rust test added tocoordinator.rs).Testing
swift test --filter ContradictionHuntTestsbut execution was blocked by SwiftPM dependency fetch failures (HTTP 403) so tests could not complete in this environment.cargo testfor the new Rust test but execution was blocked by crates.io index fetch failures (HTTP 403) so tests could not complete in this environment.cargo fmt --check; pre-existing repository formatting drift produced failures unrelated to this change and prevented a clean check in this environment.Codex Task