Skip to content

feat(ask): bind relative-time filters to event time (v2.13.0) - #581

Merged
seonghobae merged 15 commits into
mainfrom
feat/ask-event-time-filter-v2130
Aug 25, 2026
Merged

feat(ask): bind relative-time filters to event time (v2.13.0)#581
seonghobae merged 15 commits into
mainfrom
feat/ask-event-time-filter-v2130

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes #569. Global Ask relative-time questions (어제, 그저께, 지난주) now bind to the source-system event instant, not record ingestion time (ADR 0168).

Bulk imports cluster created_at near import time, so 어제 무슨 일이 있었나요? used to miss yesterday's events. Ask now compares coalesce(event_occurred_at, created_at) on the Asia/Seoul calendar. Missing event time falls back to created_at and is named as that fallback — never invented.

After make seed, leftover closest/farthest pairs still sit above the member list; a click still opens that post. Ask 어제 무슨 일이 있었나요? on bulk-imported fixtures that share one ingest day keeps the post whose event fell yesterday, drops last week's event, and names Time axis on the cited evidence. Open that cited post to read which clock matched.

Decision (ADR 0168)

  • Persist nullable source_post.event_occurred_at (Allen 1983; W3C Time; PROV-O prov:generatedAtTime stays on created_at).
  • Event time wins. Ingestion time is the documented fallback.
  • Cited sources disclose time axis: event occurred at or time axis: record created at.
  • Importers may map --event-occurred-at-column. Unmapped imports leave the column null.
  • Seed copies fixture occurred_at onto both clocks so reconstruct and leftover pairs stay on the designed January timeline.
  • Analysis-run knowledge cutoff and period-report week membership keep created_at.

Tests

  • uv run --python 3.12 --extra dev --with asyncpg pytest tests/test_ask_time_axis.py tests/test_global_ask_sources.py tests/test_post_chat.py tests/test_import_postgresql_posts.py tests/test_temporal_expressions.py — 90 passed, 2 skipped.
  • pnpm exec vitest run src/components/AskEvidenceLayerPopup.test.tsx — 9 passed.

Synthetic fixtures only. Independent APPROVE required. Do not self-approve. Squash-merge only with independent APPROVE + exact-head required success.


Open in Devin Review

Global Ask 어제/그저께/지난주 now compares coalesce(event_occurred_at,
created_at) on the Seoul calendar. Clustered bulk imports keep
yesterday's events retrievable. Cited evidence names Time axis so a
click still opens that post (ADR 0168).
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

Copy link
Copy Markdown
Contributor Author

Cycle note 2026-08-24T12:24Z.

Head ad845b94bb5685bd5f57b32b68c56247212b7b21 implements ADR 0168 / #569 on feat/ask-event-time-filter-v2130.

Independent APPROVE is required. I will not self-approve or squash-merge this PR. Squash-merge only with an independent APPROVE on this exact head plus required checks success.

Copilot review requested. seonghobae is currently the only collaborator, so a human independent APPROVE still has to come from outside this loop.

@coderabbitai

coderabbitai Bot commented Aug 24, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 15 minutes.

View limit details

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.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: cd42eed1-59de-42b3-a26a-87e34329b1bf

📥 Commits

Reviewing files that changed from the base of the PR and between 1d1379f and ce054b0.

📒 Files selected for processing (26)
  • AGENTS.md
  • ARCHITECTURE.md
  • CHANGELOG.d/2.17.0-ask-event-time-filter.md
  • CHANGELOG.md
  • CLAUDE.md
  • backend/app/post_chat_ingestion.py
  • backend/tests/test_api.py
  • docs/adr/0150-korean-relative-time-retrieval.md
  • docs/adr/0202-ask-event-time-filter.md
  • docs/adr/README.md
  • frontend/src/components/AskEvidenceLayerPopup.stories.test.ts
  • frontend/src/components/AskEvidenceLayerPopup.stories.tsx
  • frontend/src/components/AskEvidenceLayerPopup.test.tsx
  • frontend/src/evidenceKindLabels.ts
  • frontend/src/i18n.ts
  • lineageweave/ask_time_axis.py
  • lineageweave/post_chat.py
  • lineageweave/temporal_expressions.py
  • migrations/0183_source_post_event_occurred_at.sql
  • migrations/rollback/0183_source_post_event_occurred_at.sql
  • scripts/import_postgresql_posts.py
  • scripts/seed_demo_data.py
  • tests/test_ask_time_axis.py
  • tests/test_global_ask_sources.py
  • tests/test_import_postgresql_posts.py
  • tests/test_post_chat.py

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 left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Copilot/human independent review requested. Do not treat this comment as APPROVE.

devin-ai-integration[bot]

This comment was marked as resolved.

@github-actions
github-actions Bot disabled auto-merge August 24, 2026 15:15
…ilter-v2130

# Conflicts:
#	CHANGELOG.md
#	CLAUDE.md
#	frontend/package.json
#	pyproject.toml
#	uv.lock
The post-merge seeded_db fixture created source_post rows with
event_occurred_at (scripts/seed_demo_data.py::insert_fixture_source_posts)
but never applied migrations/0168_source_post_event_occurred_at.sql,
so six backend/tests/test_api.py tests failed with UndefinedColumn.
Wire the migration in alongside the other seeded_db migrations.
devin-ai-integration[bot]

This comment was marked as resolved.

@seonghobae
seonghobae enabled auto-merge August 24, 2026 16:13
@opencode-agent
opencode-agent Bot disabled auto-merge August 24, 2026 16:51
@seonghobae
seonghobae enabled auto-merge August 24, 2026 17:03
@opencode-agent
opencode-agent Bot disabled auto-merge August 24, 2026 17:59
…ilter-v2130

# Conflicts:
#	CHANGELOG.md
#	backend/app/post_chat_ingestion.py
#	backend/tests/test_api.py
#	frontend/package.json
#	pyproject.toml
#	uv.lock
@seonghobae
seonghobae enabled auto-merge August 24, 2026 18:56
devin-ai-integration[bot]

This comment was marked as resolved.

@github-actions
github-actions Bot disabled auto-merge August 24, 2026 19:05
…ilter-v2130

# Conflicts:
#	backend/tests/test_api.py
#	frontend/package.json
#	pyproject.toml
#	uv.lock
devin-ai-integration[bot]

This comment was marked as resolved.

@seonghobae
seonghobae enabled auto-merge August 24, 2026 22:46
@github-actions
github-actions Bot disabled auto-merge August 24, 2026 23:06
seonghobae and others added 2 commits August 25, 2026 08:17
Main's 0183 slot is taken by the GNB four-Korean-chrome ADR (#587), so the
incoming ask-event-time-filter ADR moves to the next free number (0202).
All references across AGENTS.md/CLAUDE.md/ARCHITECTURE.md, docstrings,
ADR 0150 related links, seed comments, and changelog fragments follow.
CHANGELOG.md keeps both the 2.13.0 and 2.15.0 entries in descending order.
devin-ai-integration[bot]

This comment was marked as resolved.

@seonghobae
seonghobae enabled auto-merge (squash) August 25, 2026 00:35
@opencode-agent
opencode-agent Bot disabled auto-merge August 25, 2026 01:07
@seonghobae
seonghobae enabled auto-merge (squash) August 25, 2026 01:10

@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 found 0 new potential issues.

Open in Devin Review

@github-actions
github-actions Bot disabled auto-merge August 25, 2026 01:17
@seonghobae
seonghobae enabled auto-merge August 25, 2026 01:21
# Conflicts:
#	AGENTS.md
#	ARCHITECTURE.md
#	CHANGELOG.d/2.13.0-ask-event-time-filter.md
#	CHANGELOG.md
#	CLAUDE.md
#	backend/app/post_chat_ingestion.py
#	docs/adr/0150-korean-relative-time-retrieval.md
#	docs/adr/0183-ask-event-time-filter.md
#	docs/adr/0201-ask-event-time-filter.md
#	docs/adr/0202-ask-event-time-filter.md
#	docs/adr/README.md
#	lineageweave/temporal_expressions.py
#	scripts/seed_demo_data.py
devin-ai-integration[bot]

This comment was marked as resolved.

@github-actions
github-actions Bot disabled auto-merge August 25, 2026 02:14
@seonghobae
seonghobae enabled auto-merge August 25, 2026 02:27
@opencode-agent
opencode-agent Bot disabled auto-merge August 25, 2026 02:28
seonghobae added a commit that referenced this pull request Aug 25, 2026
…ncrement

0202 is now claimed by the ask event-time filter ADR (#581), so this
increment takes 0203. Doc conflicts resolve toward main's canonical
agent-guide structure while keeping this branch's share sentence and
amendment list; CLAUDE.md takes main's restructured section wholesale.
@seonghobae
seonghobae enabled auto-merge August 25, 2026 03:25

@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 found 0 new potential issues.

Open in Devin Review

@seonghobae
seonghobae merged commit 3d35c2e into main Aug 25, 2026
21 of 22 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.

[Data] Temporal Ask filters should bind to event time, not record ingestion time

1 participant