Skip to content

feat(event): score TDT story segments with WindowDiff and Pk - #72

Merged
seonghobae merged 4 commits into
mainfrom
agent/event-story-segmentation
Aug 25, 2026
Merged

feat(event): score TDT story segments with WindowDiff and Pk#72
seonghobae merged 4 commits into
mainfrom
agent/event-story-segmentation

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Summary

#45 remains preferred merge (deac1d6, ready, MERGEABLE BLOCKED). CodeRabbit COMMENTED only; no qualifying independent APPROVE. Do not self-approve or force-merge. Do not leapfrog #45 with #43.

Next no-0008 gap: ADR 0016 TDT story-segmentation WindowDiff/Pk/boundary precision-recall and segmentation-versus-instance refusal in existing event_core (does not recreate TDT/CHRONOS, topic_measurement, psychometric_core, compute_backend, concept_dictionary, model_selection, interpretation_gateway, or network_analysis, and does not allocate 0008).

  • refuse_story_segmentation_as_instance / refuse_story_segmentation_as_transition never promote a detected story cut
  • story_window_diff and story_pk fail closed on empty, misaligned, or oversized windows
  • story_boundary_precision and story_boundary_recall fail closed on empty recovered or truth boundary sets
  • decide_story_boundary uses an inclusive probability threshold
  • Computed RMSE of known boundary targets is lower under calibrated scores than under an always-cut predictor

Test plan

  • RED: story_segmentation_contract failed to compile before segment.rs existed
  • cargo test -p event_core --offline --lib --tests
  • cargo clippy -p event_core --all-targets --offline -- -D warnings
  • cargo test --workspace --offline --lib --tests
  • python3 scripts/validate_documentation.py and docstring/workspace contracts
  • event_core line coverage 455/455; nightly branches 32/32
  • exact-head required Checks (do not treat queued evidence as passed)

Do not self-approve or merge. Prefer merge #45 when exact-head required checks and a qualifying independent APPROVE exist. Do not allocate 0008.


Open in Devin Review

Keep story cuts as detection evidence. Refuse instance and transition
promotion, and compute WindowDiff, Pk, and boundary recovery against
known truth.
@coderabbitai

coderabbitai Bot commented Aug 13, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@seonghobae, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 33 minutes

Limit 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.

How can I continue?

Wait for the limit to reset, then comment @coderabbitai review or push new commits to the PR.

An organization admin can change what happens after included review limits in Billing.

How do review limits work?

CodeRabbit enforces per-developer PR review limits within each organization.

For paid Pro and Pro+ reviews, CodeRabbit uses a developer's included PR review attempts over the past 7 days to set the current hourly allowance. At typical activity levels, the full plan allowance applies. Higher sustained activity can lower the allowance until earlier attempts leave the 7-day window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 56027c5c-9845-4746-a984-b030abc19d78

📥 Commits

Reviewing files that changed from the base of the PR and between c45be17 and 8996569.

📒 Files selected for processing (17)
  • CHANGELOG.md
  • DOCUMENTATION.md
  • crates/event_core/src/error.rs
  • crates/event_core/src/lib.rs
  • crates/event_core/src/segment.rs
  • crates/event_core/tests/story_segmentation_contract.rs
  • docs/TRACEABILITY.md
  • docs/adr/0009-purpose-bound-pii-governance.md
  • docs/adr/0010-adaptive-llm-orchestration.md
  • docs/adr/0011-standalone-modular-msa-boundary.md
  • docs/adr/0013-bitemporal-persistence-reproducibility-and-split-authority.md
  • docs/adr/0016-tdt-chronos-event-intelligence-boundary.md
  • docs/adr/README.md
  • docs/connectors/naruon-artifact-consumer.md
  • docs/research/standards-and-literature.md
  • docs/research/tdt-story-segmentation.md
  • docs/validation/temporal-event-foundation.md

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@seonghobae
seonghobae marked this pull request as ready for review August 20, 2026 10:48
@seonghobae

Copy link
Copy Markdown
Contributor Author

Revalidated at current HEAD ce5c5a706b2b18a36404c30080a7c477258c2fb8 after integrating origin/main (7c29e7c).

  • WindowDiff/Pk now use prefix boundary counts instead of repeated window scans.
  • Full offline workspace Rust tests pass.
  • event_core clippy with -D warnings passes.
  • Workspace, docstring, documentation, formatting, and diff checks pass.
  • Known-truth tests assert exact WindowDiff/Pk and boundary precision/recall values rather than relative-only results.

Please run protected current-head Checks and obtain an independent qualifying approval before normal merge.

@seonghobae

Copy link
Copy Markdown
Contributor Author

Current-head review refresh for ce5c5a7:

  • TDT story-segment evaluation reports WindowDiff and Pk against known boundaries and does not promote segmentation output into a state transition.
  • git diff --check, documentation validation, workspace contract, docstring contract, and cargo fmt --all -- --check passed locally.
  • All hosted exact-head checks, including Rust tests, PostgreSQL integration, coverage, security scans, and Strix, pass.
  • No new actionable defect was found at this exact head; no approval is being self-issued.

@seonghobae

Copy link
Copy Markdown
Contributor Author

Exact-head review receipt for PR #72 after normal main synchronization.

Current PR head: 8996569
Base protected main: c45be17

The story-segmentation branch was synchronized with protected main through a normal merge. CHANGELOG.md and the two overlapping ADR maturity sections were merged without dropping either the TDT segmentation capability or naruon loopback capability. Inherited documentation whitespace was corrected so the exact-head diff is clean.

Local proof at this exact HEAD: Rust 1.97.1 cargo fmt --check; cargo test --workspace --offline including six story-segmentation contracts; documentation validation; workspace contract; git diff --check; CodeGraph sync; CodeReviewGraph update against protected main.

@cwl-noema-review @opencode-agent Please issue a formal independent review verdict for exactly 8996569. Review only; do not modify files, push, approve on behalf of another identity, or merge.

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Open in Devin Review

@opencode-agent opencode-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

OpenCode cannot approve yet because required coverage evidence did not pass.

Review outcome

1. HIGH .github/workflows/opencode-review.yml:1 - Coverage evidence did not prove required test/docstring evidence

  • Problem: The required coverage-evidence job result was failure, so OpenCode cannot establish approval sufficiency for this head.

  • Root cause: Automated approval is only valid when the same-head coverage-evidence job proves supported repository test suites passed and configured docstring gates passed or were advisory, or reports not applicable because no supported source files or package manifests exist. Missing, failed, skipped, unavailable, or unsupported-tooling test evidence is a blocker.

  • Fix: Install or configure the repository test/docstring evidence tooling when source files or package manifests exist, rerun the current-head coverage-evidence job, and approve only after it reports success with required evidence or explicit no-source not-applicable evidence.

  • Regression test: Keep the approval branch checking needs.coverage-evidence.result == success before posting APPROVE, and publish REQUEST_CHANGES when coverage-evidence blocker states such as cancelled, skipped, failed, unsupported-tooling, or below-100 evidence are present.

  • Result: REQUEST_CHANGES

  • Reason: coverage-evidence result was failure, so required test/docstring evidence was not proven for current head 899656968cc9f68a3d8fc55dddc4fd257fb27050.

  • Head SHA: 899656968cc9f68a3d8fc55dddc4fd257fb27050

  • Workflow run: 32699622037

  • Workflow attempt: 1

Coverage evidence

Coverage Decision

  • Result: FAIL
  • Test evidence: not proven passing
  • Docstring evidence: not proven passing when configured
  • Failure count: 1

Changed-File Evidence Map

flowchart LR
  PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
  Evidence --> S1["Changed file (6 files)"]
  S1 --> I1["repository behavior"]
  I1 --> Conflict["Merge conflict blocks this path"]
  Conflict --> V1["required checks"]
  Evidence --> S2["Docs (11 files)"]
  S2 --> I2["operator or user guidance"]
  I2 --> Conflict["Merge conflict blocks this path"]
  Conflict --> V2["docs review"]
Loading

@opencode-agent

Copy link
Copy Markdown
Contributor

OpenCode Review Overview

  • Head SHA: 899656968cc9f68a3d8fc55dddc4fd257fb27050
  • Workflow run: 32699622037
  • Workflow attempt: 1
  • Gate result: REQUEST_CHANGES (approval step)

Pull request overview

OpenCode cannot approve yet because required coverage evidence did not pass.

Review outcome

1. HIGH .github/workflows/opencode-review.yml:1 - Coverage evidence did not prove required test/docstring evidence

  • Problem: The required coverage-evidence job result was failure, so OpenCode cannot establish approval sufficiency for this head.

  • Root cause: Automated approval is only valid when the same-head coverage-evidence job proves supported repository test suites passed and configured docstring gates passed or were advisory, or reports not applicable because no supported source files or package manifests exist. Missing, failed, skipped, unavailable, or unsupported-tooling test evidence is a blocker.

  • Fix: Install or configure the repository test/docstring evidence tooling when source files or package manifests exist, rerun the current-head coverage-evidence job, and approve only after it reports success with required evidence or explicit no-source not-applicable evidence.

  • Regression test: Keep the approval branch checking needs.coverage-evidence.result == success before posting APPROVE, and publish REQUEST_CHANGES when coverage-evidence blocker states such as cancelled, skipped, failed, unsupported-tooling, or below-100 evidence are present.

  • Result: REQUEST_CHANGES

  • Reason: coverage-evidence result was failure, so required test/docstring evidence was not proven for current head 899656968cc9f68a3d8fc55dddc4fd257fb27050.

  • Head SHA: 899656968cc9f68a3d8fc55dddc4fd257fb27050

  • Workflow run: 32699622037

  • Workflow attempt: 1

Coverage evidence

Coverage Decision

  • Result: FAIL
  • Test evidence: not proven passing
  • Docstring evidence: not proven passing when configured
  • Failure count: 1

Changed-File Evidence Map

flowchart LR
  PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
  Evidence --> S1["Changed file (6 files)"]
  S1 --> I1["repository behavior"]
  I1 --> Conflict["Merge conflict blocks this path"]
  Conflict --> V1["required checks"]
  Evidence --> S2["Docs (11 files)"]
  S2 --> I2["operator or user guidance"]
  I2 --> Conflict["Merge conflict blocks this path"]
  Conflict --> V2["docs review"]
Loading

Merge Conflict Guidance

  • Current merge state: DIRTY
  • Base branch: main
  • Head branch: agent/event-story-segmentation
  • Fix direction: merge or rebase origin/main into agent/event-story-segmentation, resolve conflict markers in the changed files, rerun the focused checks, then push the same branch.
  • Repair commands:
gh pr checkout 72 --repo ContextualWisdomLab/TEPP
git fetch origin main
git merge --no-ff origin/main  # or: git rebase origin/main
git status --short
# resolve files, then git add <resolved-files>
# merge path: git commit
# rebase path: git rebase --continue
git push origin HEAD:agent/event-story-segmentation
# rebase path only: git push --force-with-lease origin HEAD:agent/event-story-segmentation

@seonghobae
seonghobae merged commit 3824b6d into main Aug 25, 2026
34 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant