Build deterministic analysis core#5
Open
Spbd1 wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Description
engine/argument_risk_engine/extraction/claim_extractor.pywith typedClaimobjects, preserved character offsets, marker-based claim-type detection, precedence rules, and short-fragment filtering.engine/argument_risk_engine/explanation/evidence.pyviaEvidenceSpanandfind_evidence_spansthat return exact substring matches and never fabricate evidence, plus a legacy-compatibleevidence_spanwrapper.engine/argument_risk_engine/retrieval/inverted_index.pywith tokenization, stopword/generic-term suppression, field-specific indexing (name,synonyms,signals,trigger_patterns,definitions), activation/deprecation checks, candidate-only flags, and healthy-suppressor detection.engine/argument_risk_engine/retrieval/lexical_retriever.pyproducingRetrievedTaxonomyEntryobjects withretrieval_score, matched terms/fields,retrieval_reason,false_positive_risk, healthy-pattern suppression (penalties), diagnostics, and index caching; and addedcandidate_filterandretrieval_diagnosticshelpers for final filtering and observability.tests/test_claim_extractor.pyandtests/test_retriever.pyto cover sentence splitting, offsets and claim types, exact evidence spans, large neutral retrieval behavior (1000 rows), deprecated exclusions, candidate-only rows, and healthy-reasoning suppressor behavior.Testing
python -m ruff check --fixand finalpython -m ruff check, and issues were fixed by the automated pass (no remaining ruff errors reported).python -m pytest tests/test_claim_extractor.py tests/test_retriever.py -qwhich passed, and then ran the full test suite withpython -m pytest -qwhich completed successfully.25 passed, 3 warnings(pytest) and the lint checks completed successfully.Codex Task