Skip to content

feat: name Allen interval relations on Event Lineage edges (v2.15.0) - #484

Merged
seonghobae merged 25 commits into
mainfrom
feat/event-lineage-interval-relation-v2150
Aug 25, 2026
Merged

feat: name Allen interval relations on Event Lineage edges (v2.15.0)#484
seonghobae merged 25 commits into
mainfrom
feat/event-lineage-interval-relation-v2150

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

Summary

Event Lineage edges now name the Allen (1983) relation between the two posts' dated windows. Reconstruct still owns the parent choice; this only labels how the windows sit in time.

After make seed, open the A-100 pricing follow-up. Both the revised quote and the delivery question come back Before it — every post is a point interval on its observed UTC creation day, and a mutable issue_ticket.due_date is not Event Lineage evidence, so it is never read. Click the Before row for the revised quote to open it.

  • Persist interval_relation_code on post_lineage_edge (migration 0140, ADR 0160).
  • Point-only intervals: each post is a point interval on its observed UTC created_at day. Ticket-aware windows (issue_ticket.due_date) are explicitly deferred until a provenance-bearing interval-evidence contract exists (ADR 0160's Context) — this PR does not implement them, and interval_from_post() never reads issue_ticket.due_date.
  • GET /api/lineage and GET /api/posts/{id}/lineage return the exact lookup label. Opening the child orients the stored parent→child code (Contains → During).
  • The DAG shows those labels as visible text and as a keyboard list. Indirect Keyman links stay unlabeled.
  • Independent of leftover-map feat: persist leftover interaction-map coordinates (v2.12.7) #481 and SKOS chips feat: show corroborated SKOS companion on organization chips (v2.14.0) #482.

Buyer next action

After seed, open Pricing renegotiation follow-up, read Before, click that row to open the revised quote.

Merge policy

Independent exact-head APPROVE required. Author will not self-approve. Do not squash-merge until independent APPROVE + exact-head required success.


Open in Devin Review

Summary by CodeRabbit

  • 새 기능

    • Event Lineage에 Allen 시간 구간 관계 라벨을 추가했습니다.
    • DAG와 관련 게시물 목록에서 Before, After, Contains, Overlaps 등 관계를 확인하고 해당 게시물을 열 수 있습니다.
    • 관계는 UTC 기준 게시물 생성일을 사용하며, 방향에 따라 올바르게 표시됩니다.
    • 다국어 환경에서 시간 관계 라벨을 제공합니다.
  • 문서

    • Event Lineage 관계 해석 기준과 2.15.0 변경 사항을 문서화했습니다.

Persist interval_relation_code on post_lineage_edge after reconstruct
chooses a parent. Ticket-aware windows (created day through earliest
open due date) make the A-100 pricing follow-up Contain the revised
quote and Overlap the delivery question. Click Contains to open the
revised quote.

ADR 0122. Independent of leftover-map #481 and SKOS chips #482.

Copy link
Copy Markdown
Contributor Author

Independent exact-head APPROVE required on 7edc1e3. Author will not self-approve. Independent of leftover-map #481 and SKOS chips #482. Do not squash-merge until independent APPROVE + exact-head required success.

@coderabbitai

coderabbitai Bot commented Aug 23, 2026

Copy link
Copy Markdown

Review Change Stack

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: c532dec0-3818-4e02-9d5b-a9ccc8c86e1e

📝 Walkthrough

Walkthrough

Event Lineage 간선에 Allen(1983) 구간 관계를 추가했습니다. 관계는 UTC 기준 게시물 생성일로 계산하며, 데이터베이스·API·DAG·관련 게시물 UI에 표시합니다.

Changes

Event Lineage 구간 관계

Layer / File(s) Summary
구간 관계 계약과 저장
lineageweave/interval_relation.py, migrations/0140_post_lineage_interval_relation.sql, scripts/seed_demo_data.py, tests/test_interval_relation.py, tests/test_schema.py, tests/test_migration_replay.py, docs/adr/0161-event-lineage-interval-relation.md, ARCHITECTURE.md, CHANGELOG.md, CHANGELOG.d/..., AGENTS.md, CLAUDE.md, pyproject.toml, lineageweave/__init__.py, frontend/package.json
13개 Allen 관계의 코드·라벨·역관계를 추가했습니다. 게시물 생성일을 UTC 날짜의 점 구간으로 변환합니다. 관계 코드를 저장하고 기존 데이터를 백필합니다. 시드와 관련 테스트를 갱신했습니다.
라인리지 수집과 API 응답
backend/app/lineage_ingestion.py, backend/app/main.py, backend/tests/test_api.py, tests/test_lineage_ingestion.py
라인리지 저장 전에 양끝 게시물의 관측 시간이 있는지 검증합니다. 재구축 후 관계 코드를 저장합니다. 그래프와 직접 연결 게시물 응답에 관계 코드·라벨·부모 여부를 추가합니다.
라인리지 UI와 접근성 표시
frontend/src/api.ts, frontend/src/LineageDag.tsx, frontend/src/App.tsx, frontend/src/App.css, frontend/src/i18n.ts, frontend/src/i18n.test.ts, frontend/src/LineageDag.test.tsx, frontend/src/App.test.tsx, frontend/src/LineageDag.stories.tsx, docs/storybook-inventory.md
DAG와 관련 게시물 목록에 관계 라벨과 배지를 표시합니다. 관계 행을 키보드로 선택하면 반대편 게시물을 엽니다. 한국어·중국어·일본어·베트남어 번역과 Storybook fixture를 추가했습니다.

Estimated code review effort: 4 (Complex) | ~45 minutes

Merge Risk: 🟡 Moderate · up to ad006

The database migration may pause writes while it validates existing lineage edges, especially on a large production dataset. Merge readiness requires either separating constraint creation from validation or obtaining explicit owner acceptance for the deployment impact.

Sequence Diagram(s)

sequenceDiagram
  participant Reconstruct
  participant LineageIngestion
  participant Database
  participant LineageDag
  Reconstruct->>LineageIngestion: 게시물 생성일과 lineage edge 전달
  LineageIngestion->>Database: interval_relation_code 저장
  Database-->>LineageIngestion: 관계 코드와 라벨 반환
  LineageIngestion-->>LineageDag: 그래프 edge와 직접 관계 전달
  LineageDag->>LineageDag: 관계 라벨과 탐색 버튼 렌더링
Loading
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 제목은 Event Lineage 엣지에 Allen 구간 관계를 명명하는 이번 변경의 핵심을 정확하고 간결하게 설명합니다.
Docstring Coverage ✅ Passed Docstring check was indeterminate for this PR — some files could not be analyzed in time. Not blocking.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/event-lineage-interval-relation-v2150

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.

Copy link
Copy Markdown
Contributor Author

Cycle note (not a review): requested Copilot review on this exact head. Independent APPROVE is still required before squash-merge. I will not self-approve. Leftover-criterion Post quality landing is a separate v2.12.8 increment on main leftover pairs (ADR 0049), not mixed here.

devin-ai-integration[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

@seonghobae

Copy link
Copy Markdown
Contributor Author

Strix MEDIUM disposition for run 32641170059: false positive. read_post_activity calls the shared _load_visible_post, which invokes _require_post_read(account) before acquiring the database connection and then applies the per-post visibility check. Exact-head commit bc555592 adds test_post_activity_requires_post_read: it removes the caller role’s post_read permission, requests the activity endpoint with a valid bearer token, and asserts HTTP 403. The focused activity authorization set passes 3/3 locally. No duplicate endpoint guard was added because the shared guard already protects this endpoint and its sibling readers.

devin-ai-integration[bot]

This comment was marked as resolved.

- Renumber migrations/0105_post_lineage_interval_relation.sql to 0140:
  0105 collides with the already-open PR #387's
  migrations/0105_post_lineage_edge_signal.sql on the same
  post_lineage_edge table. Update migrate.sh's whitelist,
  tests/test_schema.py, tests/test_migration_replay.py,
  backend/tests/test_api.py, and scripts/seed_demo_data.py to match.

- Renumber docs/adr/0122-event-lineage-interval-relation.md to 0160:
  0122 collides with the already-open PR #383's
  docs/adr/0122-otel-session-observability.md. Update every in-tree
  "ADR 0122" cross-reference (AGENTS.md, ARCHITECTURE.md, CLAUDE.md,
  CHANGELOG.d entry, the migration's SQL comment, and the seed script
  docstring) to ADR 0160, and note the renumber + collision in the
  ADR itself (see ContextualWisdomLab/.github#1249).

- Drop the unused "Click Contains to open the revised quote." i18n
  key from all four locale dictionaries and the i18n completeness
  test's required-keys list -- no component ever rendered it.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B5M79L945DMyMs3sg5yJ14
@seonghobae
seonghobae enabled auto-merge (squash) August 23, 2026 14:26
devin-ai-integration[bot]

This comment was marked as resolved.

@seonghobae

Copy link
Copy Markdown
Contributor Author

Resolved the newly introduced cross-PR ADR collision on exact head c5c9911c102cb1c7d7fac1e6386a637a7b41ab3a: PR #480 claimed ADR 0160 first, so Event Lineage moved to the then-free ADR 0161 and all normative references were updated. Immediately before push, protected main and all open-PR changed paths had no ADR 0161 claimant. Exact local validation: tests/test_documentation_hygiene.py 4/4 passed and git diff --check passed. The broader migration/interval partition was already green on the docs/reference-only parent; a local rerun attempt without the backend extra stopped at missing asyncpg, so it is not represented as a code failure or new exact-head pass.

devin-ai-integration[bot]

This comment was marked as resolved.

@github-actions
github-actions Bot disabled auto-merge August 23, 2026 14:44
# Conflicts:
#	CHANGELOG.md
#	frontend/package.json
#	pyproject.toml
#	tests/test_migration_replay.py
#	uv.lock
@github-actions
github-actions Bot disabled auto-merge August 24, 2026 16:42
@seonghobae
seonghobae enabled auto-merge August 24, 2026 17:04
@opencode-agent
opencode-agent Bot disabled auto-merge August 24, 2026 17:58
# Conflicts:
#	CHANGELOG.md
#	backend/app/main.py
#	frontend/package.json
#	pyproject.toml
#	uv.lock
@seonghobae
seonghobae enabled auto-merge August 24, 2026 18:56
@github-actions
github-actions Bot disabled auto-merge August 24, 2026 19:06
# Conflicts:
#	docs/storybook-inventory.md
#	frontend/package.json
#	frontend/src/LineageDag.test.tsx
#	frontend/src/LineageDag.tsx
#	frontend/src/i18n.test.ts
#	lineageweave/__init__.py
#	pyproject.toml
#	uv.lock
@seonghobae
seonghobae enabled auto-merge August 24, 2026 22:46
Both sides claimed [2.15.0]; main's WorkspaceNav release keeps it and
this PR's Allen-interval entry renumbers to [2.15.1] (version pins
bumped to match).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015HgzNGsCxqiTaT4YuJEb5J
devin-ai-integration[bot]

This comment was marked as resolved.

@github-actions
github-actions Bot disabled auto-merge August 24, 2026 23:29
@seonghobae
seonghobae enabled auto-merge (squash) August 24, 2026 23:48
@opencode-agent
opencode-agent Bot disabled auto-merge August 25, 2026 01:06
# Conflicts:
#	AGENTS.md
#	CLAUDE.md
#	backend/app/main.py
#	backend/tests/test_api.py
#	docs/adr/0049-leftover-pair-report-ui.md
#	tests/test_lineage_ingestion.py
@seonghobae
seonghobae enabled auto-merge (squash) August 25, 2026 01:51
devin-ai-integration[bot]

This comment was marked as resolved.

@github-actions
github-actions Bot disabled auto-merge August 25, 2026 02:08
@seonghobae
seonghobae enabled auto-merge August 25, 2026 02:11
@github-actions
github-actions Bot disabled auto-merge August 25, 2026 02:26
@seonghobae
seonghobae enabled auto-merge (squash) August 25, 2026 03:39
devin-ai-integration[bot]

This comment was marked as resolved.

@seonghobae
seonghobae merged commit cfd947f into main Aug 25, 2026
23 of 24 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