Skip to content

fix: rebase write-clock slice to 0.87.1 with honest updated_at - #172

Closed
seonghobae wants to merge 2 commits into
feat/role-responsibility-agent-ontologyfrom
cursor/bc-0b71f444-e18a-4611-8884-9a6ba6f20460-456d
Closed

fix: rebase write-clock slice to 0.87.1 with honest updated_at#172
seonghobae wants to merge 2 commits into
feat/role-responsibility-agent-ontologyfrom
cursor/bc-0b71f444-e18a-4611-8884-9a6ba6f20460-456d

Conversation

@seonghobae

Copy link
Copy Markdown
Contributor

Buyer gap

ADR 0016 hid later-created titles, but the operator still could not tell which January titles were rewritten after the run. #150 started that slice on 6f79ecb and claimed 0.87.0. Current #74 already shipped 0.87.0 as granted retention purge plus Storybook tokens, and seeded_db's edited own-corp title broke the post-list exact set.

What the operator sees

Stacked on current #74 (69c035b). Prefer this over #150 at b4e6d2b. Do not merge before #74. Close #131 and #150 after this lands.

  • GET /api/analysis-runs/{id} still lists only ABAC-visible titles with created_at <= knowledge_cutoff.
  • Each title includes updated_at and live_after_cutoff. No post body, DSN, or source SQL.
  • After make seed, open Lineage reconstruction · Succeeded · Demo Corp: Demo public post is marked Updated after cutoff; Demo private post is not.
  • Opening a marked title still shows the live body and names both clocks (written 2026-01-13, after cutoff 2026-01-12). Cutoff body versioning stays a later slice.
  • A later title or body edit bumps source_post.updated_at unless the statement already assigned it (ADR 0021).
  • The cutoff badge uses ADR 0020 tokens (AnalysisRun/CutoffWriteClockBadge in Storybook).

Tests

  • tests/test_analysis_run_create.py — write clock > cutoff; trigger SQL honors an explicit pin.
  • backend/tests/test_api.py — edited own-corp title is in the January run and the live post list; a body-only update moves the clock; an assigned updated_at stays.
  • frontend lint/test/build — 60 passed, including badge + opened-body clocks.

Boundaries

  • Synthetic fixtures only. No real-org names or records.
  • TEPP stays behind tepp_client. This write does not invent a theta.
  • Null channels stay dropped. Reconstruct grouping keys are unchanged.
  • No AGENTS.md rewrite. No admin merge retry.

seonghobae and others added 2 commits August 16, 2026 16:40
In-cutoff titles now say whether the live row was rewritten after the
run. Demo public post is the edited counter-example; Demo private post
still matches the January cutoff. Bodies stay live. TEPP stays behind
tepp_client.
Keep #150's cutoff comparison on current #74, take 0.87.1 so it does
not collide with retention purge, bump source_post.updated_at on a
title or body rewrite unless the statement already assigned the clock,
and name both clocks on the opened live post. The seeded post-list
exact set now includes the edited own-corp title.

Co-authored-by: Seongho Bae <seonghobae@users.noreply.github.com>
@cursor

cursor Bot commented Aug 16, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@coderabbitai

coderabbitai Bot commented Aug 16, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 917207ea-444f-4aab-a1da-77a173676bed

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

@cursor cursor 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.

Extra-check on 5ca456c (not a CodeRabbit result)

CodeRabbit CLI 0.7.3 installed here; agent login timed out (no browser). GitHub CodeRabbit skipped this non-default base.

Slice verdict: SOUND for 0.87.1

Prefer this over #150 b4e6d2b and draft #131. Do not merge before #74. Do not self-approve. Close #131 and #150 after this lands. #171 is already covered here — do not land #171 on stale #150.

What holds:

  • Admission stays created_at <= knowledge_cutoff. updated_at is a separate comparison. Equal clocks stay unmarked.
  • Analysis-run detail stays titles + clocks. No post_body, DSN, or source SQL.
  • Migration 0021 bumps the write clock on title/body change unless the statement already assigned updated_at.
  • Exact-set includes Edited own-corp private post. Badge uses ADR 0020 tokens + Storybook.
  • TEPP stays behind tepp_client. No invented theta.

Residual buyer gap (next slice, not a merge blocker)

After make seed, Demo public post is marked rewritten, but the live body is still the same January sentence. The operator gets two clocks, not two texts. Keep bodies out of GET /api/analysis-runs/{id}.

Checks were still queued at review time. Wait for Frontend + Full test suite.

Open in Web View Automation 

Sent by Cursor Automation: Fix Issues

Comment thread scripts/seed_demo_data.py
"values (%s, %s, %s, 'Demo public post', "
"'Ada West at Demo Corp followed up with Priya Nair at Northridge Grid about the delayed shipment.', "
"'voc', 'public', '2026-01-10T12:00:00Z')",
"'voc', 'public', '2026-01-10T12:00:00Z', '2026-01-13T09:00:00Z')",

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This insert pins updated_at to 2026-01-13 on the same body the January cutoff already knew. The title is marked Updated after cutoff, but opening it still shows one sentence. Honest for the clock slice; the buyer still cannot compare two texts. Keep bodies out of the analysis-run payload. A later source_post_revision / as_of read should store the pre-rewrite sentence and show it only on the opened post.

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.

2 participants