[codex] add evidence-first TrustDocument extraction#17
Open
JamesbbBriz wants to merge 2 commits 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.
Problem
DocTruth's OSS value was drifting too parser-only: parsing improvements existed, but the SDK/CLI did not expose a complete evidence-first extraction workflow that users can inspect, replay, and audit.
What Changed
TrustDocumentcontract and JSON writer/parser surface for parser output.doctruth profilefor local parser latency/heap profiling.doctruth extractto write a complete run package:trust-document.jsonresult.jsonaudit.jsonmanifest.jsondoctruth:sourceDocIdanddoctruth:sourceUnitId.JsonExtractionBuilder.withEvidenceFirst()DocumentJsonExtractionBuilder.withEvidenceFirst()doctruth extract --evidence-first{ value, exactQuote }, validates the wrapped provider response, unwraps result JSON, and cites the supplied exact quote.items[].namematchingitems[0].name.$ref/$defsentries for evidence-first schema wrapping and CLI required-field collection.valueandexactQuoteare not mistaken for evidence wrappers.manifest.json; recordssourceFilenameandsourceSha256instead.Security / Privacy Impact
NOTICE.Fixture / Migration Notes
TrustDocument*,CitationSource, andwithEvidenceFirst().Citationconstructors remain available; TrustDocument source identity is exposed via optionalCitation.source().doctruth parse --jsonremains legacy parsed-section JSON;--format jsonwrites TrustDocument JSON.Tests Run
mvn -B -ntp spotless:apply spotless:check checkstyle:check -DskipTests mvn test mvn verify -P recorded git diff --checkResults:
spotless:check checkstyle:check: passed, 0 Checkstyle violations.mvn test: 766 tests before resolver coverage test, then 769 tests after resolver coverage test; 0 failures, 0 errors, 0 skipped.mvn verify -P recorded: passed; unit tests 769/0/0/0, integration tests 8 run with 3 skipped, JaCoCo checks met.git diff --check: passed.