Skip to content

fix(glk): apply recall sensitivity ceiling to contradiction hunt#20

Merged
bob-codedaptive merged 1 commit into
develop/1.0.xfrom
codex/fix-corpus-hunt-sensitivity-bypass
Jul 13, 2026
Merged

fix(glk): apply recall sensitivity ceiling to contradiction hunt#20
bob-codedaptive merged 1 commit into
develop/1.0.xfrom
codex/fix-corpus-hunt-sensitivity-bypass

Conversation

@bob-codedaptive

Copy link
Copy Markdown
Member

Motivation

  • Prevent production-reachable disclosure by ensuring the contradiction hunter honors the same default sensitivity ceiling used by recall so Restricted/Secret drawers are not screened or leaked as borderline snippets.
  • Mirror the same policy in both Swift and Rust legs so the two-lane mining (drawer lane + corpus chunk lane) cannot expose protected content.

Description

  • Apply the default ceiling check (.sensitivityAtMost(.elevated)) before content screening/snippet generation in the Swift hunt loop in ContradictionHunt.swift.
  • Add the equivalent sensitivity guard in the Rust mirror in coordinator.rs so chunk→drawer-mapped candidates are skipped when above Elevated.
  • Update the hunt sensitivity doc comment to record the enforced ceiling.
  • Add regression tests in Swift (ContradictionHuntTests.swift) and Rust (coordinator.rs tests) that capture a Secret drawer paired with a Normal drawer and assert the hunt returns no proposals, no borderline snippets, and counts zero screened pairs.

Testing

  • Attempted to run the Rust test: cargo test --manifest-path packages/kits/GeniusLocusKit/rust/Cargo.toml hunt_protected_candidates_are_excluded_by_default_ceiling, but dependency resolution failed due to external network/GitHub access (crates.io index fetch → CONNECT tunnel failed, response 403).
  • Attempted offline Rust run (cargo test --offline ...) failed because required crate serde_json was not available in the offline cache.
  • Attempted to run the Swift test: swift test --package-path packages/kits/GeniusLocusKit --filter ContradictionHuntTests/protectedCandidatesAreExcludedByDefaultCeiling, but SwiftPM dependency fetches failed due to blocked GitHub access (CONNECT tunnel failed, response 403).
  • Tests were added and exercised locally up to dependency fetch; automated test runs were blocked by external network fetch failures and therefore did not complete successfully.

Codex Task

@github-actions

Copy link
Copy Markdown
Contributor

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.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6e17efc022

ℹ️ 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".

Comment on lines +228 to +229
guard a.adjectiveSensitivity.rawValue <= AdjectiveSensitivity.elevated.rawValue,
b.adjectiveSensitivity.rawValue <= AdjectiveSensitivity.elevated.rawValue

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Compare raw sensitivity bits before screening

This guard decodes through Drawer.adjectiveSensitivity before comparing, but that accessor falls back to .normal for any unrecognized 6-bit sensitivity value, whereas BitmapEvaluator's default .sensitivityAtMost(.elevated) compares the raw field. If an estate contains a future-version/imported/corrupt row with sensitivity bits above 16 but not one of the current enum cases, it passes this check and can still be screened or echoed in borderline snippets, violating the intended default ceiling. Compare the raw extracted sensitivity bits instead, and apply the same fix to the Rust mirror.

Useful? React with 👍 / 👎.

@bob-codedaptive bob-codedaptive merged commit 0dcac5f into develop/1.0.x Jul 13, 2026
1 check failed
@bob-codedaptive bob-codedaptive deleted the codex/fix-corpus-hunt-sensitivity-bypass branch July 13, 2026 21:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant