Repository navigation
P5: opt-in near-duplicate guard (train vs val, train vs holdout) - #22
Conversation
…d4075b; fail-closed wiring test; CI
Off unless HLX_NEARDUP_GUARD=1; threshold HLX_NEARDUP_THRESHOLD (0.7); mode fail|drop. Not wired into train.py. Code by deepseek-v4.1-flash via Jev router; reviewed.
|
CC @Zero-State-LLC/partner-agents. Flagged for shared triage. |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2731ca96e9
ℹ️ 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".
Port recoverable_structure from archived ad4075b so the training export imports in a clean checkout. Resolve the bundled hyperlexical module before an exposure snapshot is published. Refuse holdout identity fields that are not lists of strings. Co-authored-by: Daniel Meyer <scrimshawlife-ctrl@users.noreply.github.com>
Co-authored-by: Daniel Meyer <scrimshawlife-ctrl@users.noreply.github.com>
Candidate generation now includes 3-grams and 4-grams, so a pair that shares only a lower-order gram is scored in both fail and drop modes. The shadow checker is documented in the module README, and intent/2026-10-12-neardup-guard.md records the accepted harness-learning item. Co-authored-by: Daniel Meyer <scrimshawlife-ctrl@users.noreply.github.com>
Keep main's holdout-guard test list and add this branch's near-duplicate test to the same job. Co-authored-by: Daniel Meyer <scrimshawlife-ctrl@users.noreply.github.com>
Keep the run_report tests from main and this branch's near-duplicate test on the same holdout-guard list. Co-authored-by: Daniel Meyer <scrimshawlife-ctrl@users.noreply.github.com>
Harness-learning batch, item P5. Stacked on #20, because it imports
heldout_census.normalize_group_textfrom that port. Retarget to main after #20 lands.scripts/shadow/hyperlexical/neardup_guard.py: character 3-5-gram Jaccard over the normalized text, with an inverted 5-gram index so it stays fast at about 15k x 1k rows.HLX_NEARDUP_GUARD=1to enable. When enabled it fails closed: a missing holdout file, a bad threshold, or any pair at or above the threshold refuses withADMISSION FAIL.HLX_NEARDUP_MODE=dropdrops the offending train rows instead and writes a receipt.HLX_NEARDUP_THRESHOLD(default 0.7). CLI:python -m scripts.shadow.hyperlexical.neardup_guard --train T --val V [--holdout-texts H] [--threshold X](exits 2 if any pairs are found).tests/shadow/test_neardup_guard.py(10 pass locally).Code by deepseek/deepseek-v4.1-flash (high reasoning) through the Jev router, reviewed by Grok Bot. Do not merge without review.
Harness-learning batch, item P5. Stacked on #20, because it imports
heldout_census.normalize_group_textfrom that port. The PR base is main; the branch also contains the holdout-guard commits.scripts/shadow/hyperlexical/neardup_guard.py: character 3-5-gram Jaccard over the normalized text. The inverted index stores 3-grams, 4-grams, and 5-grams, so a pair that shares only a lower-order gram is still scored.HLX_NEARDUP_GUARD=1to enable. When enabled it fails closed: a missing holdout file, a bad threshold, or any pair at or above the threshold refuses withADMISSION FAIL.HLX_NEARDUP_MODE=dropdrops the offending train rows instead and writes a receipt.HLX_NEARDUP_THRESHOLD(default 0.7). Shadow checker, not aSKILL.mdcommand, documented inscripts/shadow/hyperlexical/README.md:python -m scripts.shadow.hyperlexical.neardup_guard --train T --val V [--holdout-texts H] [--threshold X](exits 2 if any pairs are found).intent/2026-10-12-neardup-guard.md(accepted with the 2026-10-12 harness-learning yes).tests/shadow/test_neardup_guard.py.Code by deepseek/deepseek-v4.1-flash (high reasoning) through the Jev router, reviewed by Grok Bot. Do not merge without review.