Fold span grounding into EventMention (#170 / GAP-007) - #233
Conversation
|
Warning Review limit reachedNext included review available in 2 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (6)
📝 WalkthroughWalkthrough
ChangesSpan-grounded EventMention
Estimated code review effort: 3 (Moderate) | ~30 minutes Merge Risk: 🔵 Low · up to The new grounded-mention workflow is mergeable, but the tracking contract currently uses identical evidence for multiple mentions and therefore leaves a bounded gap in validating span and temporal ordering; owner awareness or follow-up is recommended. Suggested reviewers: Sequence Diagram(s)sequenceDiagram
participant Caller
participant DocumentRecord
participant EventMention
participant MentionEvidenceClocks
Caller->>DocumentRecord: 문서 텍스트 제공
Caller->>MentionEvidenceClocks: six-clock evidence 생성
Caller->>EventMention: 문서, SourceSpan, clocks, version, status 전달
EventMention->>DocumentRecord: span 문서 소속 및 surface form 검증
EventMention->>MentionEvidenceClocks: available_time과 knowledge_cutoff 검증
EventMention-->>Caller: 검증된 EventMention 반환
Caller->>EventMention: event instance 변환 요청
EventMention-->>Caller: SpanMentionIsNotEventInstance 오류 반환
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 55.26% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 76 functions across 9 files. (11 skipped: 11 unsupported.) ✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
4223fb1 to
0bbd116
Compare
Protected main already isolates TDT/CHRONOS scoring gates. Mentions still lacked exact source extents. This slice binds each mention to one SourceSpan, six-clock cutoff evidence, extractor version, and review status, and scores ACE exact-extent precision/recall against known documentary truth. Co-authored-by: Seongho Bae <seonghobae@users.noreply.github.com>
Close remaining fail-closed and half-rate paths on span-grounded mention scoring so exact-extent recovery stays fully exercised. Co-authored-by: Seongho Bae <seonghobae@users.noreply.github.com>
Issue #170 requires every mention to cite an exact source span. Remove the unused parallel mention type so EventMention can be constructed only from a document span, six-clock evidence, extractor version, and review status. Co-authored-by: Seongho Bae <seonghobae@users.noreply.github.com>
0bbd116 to
0a86d8d
Compare
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
# Conflicts: # CHANGELOG.md # docs/product-technical-gap-baseline.md
| ) -> Result<Self, EventError> { | ||
| if available_time.instant().as_nanosecond() > knowledge_cutoff.instant().as_nanosecond() { | ||
| return Err(EventError::MentionIneligibleAtCutoff); | ||
| } |
There was a problem hiding this comment.
📝 Info: Cutoff eligibility uses direct instant comparison
MentionEvidenceClocks::new gates eligibility with a direct as_nanosecond() comparison instead of temporal_core::evaluate_historical_eligibility. Equal instants are eligible, consistent with the doctoring note. The clocks are concrete single instants, so the simpler comparison is sufficient and honors the availability-before-cutoff contract.
Was this helpful? React with 👍 or 👎 to provide feedback.
| let surface_form = | ||
| document.text()[source_span.byte_start()..source_span.byte_end()].to_string(); |
There was a problem hiding this comment.
📝 Info: Whitespace-only surface no longer rejected
The previous constructor rejected whitespace-only surface forms; the new one derives the surface from the exact span (crates/event_core/src/mention.rs:53-54), which can be whitespace. This follows the new exact-extent design, but the old non-whitespace invariant is gone.
Was this helpful? React with 👍 or 👎 to provide feedback.
Product slice
Issue #170 / GAP-007 asked for one calibrated TDT + CHRONOS product workflow. On current protected
main(c482ccea),event_corealready has isolated mention/instance types plus first-story FAR/miss, link P/R, tracking P/R,WindowDiff/Pk, schema-slot P/R, and CHRONOS Brier scoring.The missing #170 contract implemented here is span-grounded
EventMention:EventMentionis the only constructible mention type; there is no second unused mention type that can be built without a spanSourceSpan, document identity, six-clock evidence, extractor/model version, and proposed/reviewed statusThis is not another identity gate and does not reimplement #226/#230/#231/#232/#239. Other-agent #235/#236/#237/#238/#240/#241 are left alone.
psychometric_coreandnetwork_analysisare identical toorigin/main. Workspace 0.2.0 versions are inherited from main. The EventMention CHANGELOG line stays under[Unreleased].Remaining #170 work
Unified TDT/CHRONOS workflow composition, Allen/CHRONOS interval consistency, persistence, and versioned JSON/JSON-LD/GraphML exports.
Verification
origin/mainc482cceacargo fmt -- --checkis cleancargo check --workspace --testscompilescargo test -p event_corepassedevent_coreauthored LCOV:mention.rs131/131,span_mention.rs170/170,error.rs147/147Draft until exact-head TEPP product CI is green (Format/lint/test/rustdoc, production line/branch coverage, live-postgres, Repository contracts and Python branch coverage, Validate planning).
Sources
Doddington et al. (2004) ACE extent mapping; Allan (2002) detection-vs-instance; Jensen & Snodgrass (1999) availability vs event time. Numeric provenance:
docs/doctoring/span-grounded-mentions.md.Summary by CodeRabbit
새 기능
문서
버그 수정