feat(event): score TDT mention links with precision and recall - #66
Conversation
Keep detected same-event pairs distinct from promoted instances and state transitions, and require computed precision, recall, and RMSE against known-truth pair sets.
|
Warning Review limit reachedNext included review available in 42 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 (11)
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 |
# Conflicts: # CHANGELOG.md # DOCUMENTATION.md # docs/TRACEABILITY.md
|
Reviewed and integrated current protected main without force-push. Current head: Verification at this exact head:
The link contract remains fail-closed: self-links and empty metric denominators reject, mention links cannot become instances or state transitions, and precision/recall are computed from normalized known-truth pairs. Please run protected current-head Checks and obtain the required independent approval before normal merge. |
|
Current-head review refresh for 633d41c:
|
|
Exact-head review receipt: current-main conflict repair was completed and pushed at |
Union of CHANGELOG/DOCUMENTATION rows; event_core error-variant and module/export union keeping link, intelligence, and first-story surfaces; ADR 0016 maturity consolidated to one statement; ADR index deduped to one 0016 row with combined wording; APA register keeps Allan et al. (1998) before Allen (1983); ledger keeps link precision/recall row and main's nested-ICC membership row.
| fn counted_rate(numerator: usize, denominator: usize) -> Result<f64, EventError> { | ||
| let numerator = u32::try_from(numerator).map_err(|_| EventError::InvalidWirePayload)?; | ||
| let denominator = u32::try_from(denominator).map_err(|_| EventError::InvalidWirePayload)?; | ||
| if denominator == 0 { | ||
| return Err(EventError::InvalidWirePayload); | ||
| } | ||
| Ok(f64::from(numerator) / f64::from(denominator)) | ||
| } |
There was a problem hiding this comment.
📝 Info: Empty-set precision/recall fails closed by design
event_link_precision errors on empty recovered set and event_link_recall errors on empty truth set, via the denominator==0 guard in counted_rate. This is a deliberate fail-closed choice matching the doctoring note and tests, not a defect.
Was this helpful? React with 👍 or 👎 to provide feedback.
| | evidence-bounded LLM interpretation | ADR 0010/0012; PRD | `tepp_api` router plus future `interpretation_gateway` | partial | | ||
| | evidence-bounded LLM interpretation | ADR 0010/0012; PRD | `tepp_api` router implemented-main plus future `interpretation_gateway` | partial | |
There was a problem hiding this comment.
📝 Info: Duplicate traceability rows for LLM interpretation
The change adds two near-identical 'evidence-bounded LLM interpretation' rows in docs/TRACEABILITY.md, differing only in wording ('router plus future' vs 'router implemented-main plus future'). The duplication looks unintentional and mirrors similar duplicate rows already present in the doc.
Was this helpful? React with 👍 or 👎 to provide feedback.
# Conflicts: # DOCUMENTATION.md # crates/event_core/src/error.rs # docs/TRACEABILITY.md # docs/adr/0016-tdt-chronos-event-intelligence-boundary.md # docs/research/standards-and-literature.md
# Conflicts: # CHANGELOG.md # DOCUMENTATION.md # crates/event_core/src/error.rs # docs/TRACEABILITY.md # docs/adr/0016-tdt-chronos-event-intelligence-boundary.md # docs/adr/README.md # docs/validation/temporal-event-foundation.md
There was a problem hiding this comment.
🔍 Pre-existing fused error-message tuple
The UnknownFirstStoryLabel entry is already fused with EventTrackIsNotEventInstance into a four-element tuple in the merge-base, the same defect as the newly introduced one. The test array was already structurally broken; fixing it in the same pass would restore both message assertions.
(Refers to this code)
Was this helpful? React with 👍 or 👎 to provide feedback.
| ( | ||
| EventError::UnknownEventLinkLabel, | ||
| "unknown event link label", |
There was a problem hiding this comment.
🔴 Link-label error test fused with first-story case
The added UnknownEventLinkLabel test entry never closes its tuple, so it absorbs the following FirstStoryIsNotEventInstance entry into one four-element tuple. The array now mixes tuple shapes and the message checks for both error variants no longer run.
| ( | |
| EventError::UnknownEventLinkLabel, | |
| "unknown event link label", | |
| ( | |
| EventError::UnknownEventLinkLabel, | |
| "unknown event link label", | |
| ), | |
| ( |
Was this helpful? React with 👍 or 👎 to provide feedback.
Summary
#45 remains preferred merge (0007) but is only locally blocked: hourly re-drafted it; this cycle marked it ready again. Exact-head required checks were cancelled by the draft and are re-queuing. No qualifying independent APPROVE (CodeRabbit COMMENTED only). #38 must not leapfrog #45.
Next no-0008 gap: TDT link-detection precision/recall in existing
event_core(does not recreate TDT/CHRONOS crates, does not wait on #48/#49/#53/#65, and does not allocate 0008).refuse_event_link_as_instance/refuse_event_link_as_transitionnever promote a detected pairEventLinkPairrefuses self-links and normalizes pair orderevent_link_precisionandevent_link_recallfail closed on empty setsTest plan
link_detection_contractfailed withE0432/E0599cargo test -p event_core --offlinecargo clippy -p event_core --all-targets --offline -- -D warningscargo test --workspace --offlinepython3 scripts/validate_documentation.pyandcheck_docstrings.pyDo not self-approve or merge. Prefer merge #45 when exact-head required checks and a qualifying independent APPROVE exist. Do not allocate 0008.