Skip to content

feat: start a pending lineage reconstruction (v0.88.0) - #183

Closed
cursor[bot] wants to merge 7 commits into
feat/role-responsibility-agent-ontologyfrom
cursor/bc-7369fd5e-dd99-43bb-9316-c488d0b02c93-c372
Closed

feat: start a pending lineage reconstruction (v0.88.0)#183
cursor[bot] wants to merge 7 commits into
feat/role-responsibility-agent-ontologyfrom
cursor/bc-7369fd5e-dd99-43bb-9316-c488d0b02c93-c372

Conversation

@cursor

@cursor cursor Bot commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

Buyer impact

After #125 an operator could record a Pending lineage run, then could not start reconstruction. Seed still owned the only Succeeded Demo Corp tree.

Open the Pending Demo Corp row, click Start reconstruction, hover the Result digest prefix, and confirm the designed A-100 fork (revised quote and delivery question under the pricing follow-up).

Why this PR

Canonical successor to dirty #142 / draft #152 after #145 landed ADR 0020 / v0.87.0 on feat/role-responsibility-agent-ontology.

This head takes ADR 0021 / v0.88.0. Migrations are 0021 (reconstruction + purge-aware deletes) then 0022 (snapshot members). It does not steal ADR 0019 or 0020.

Base must be feat/role-responsibility-agent-ontology. Do not merge onto protected main. Do not merge before #74.

What shipped

  • POST /api/analysis-runs/{id}/start runs ThreadWeave on the frozen analysis_source_snapshot_member bag
  • Locks Pending before Running (409, not 500)
  • Persists analysis_run_reconstruction + analysis_run_lineage_edge (3NF, immutable, two-or-more-word names)
  • Home Start reconstruction on a Pending lineage detail; titled parent→child edges after Succeeded
  • Result digest prefix is audible next to Code and Config
  • Edge titles stay public-or-affiliated
  • TEPP start is 422 — this path does not invent a theta
  • A Succeeded retry returns the stored digest
  • Granted purge also deletes reconstruction and member rows
  • Live Event Lineage stays a separate rebuild

Does not close #79. Prefer this head over #142 and #152. Do not open another start successor.

Verification

  • python3 -m pytest tests/test_documentation_hygiene.py tests/test_analysis_run_start.py tests/test_analysis_run_reconstruction_schema.py tests/test_analysis_run_registry_schema.py — 9 passed, live Postgres skipped
  • cd frontend && pnpm run lint && pnpm run test && pnpm run build — 60 tests, production build
Open in Web View Automation 

cursoragent and others added 4 commits August 16, 2026 16:28
Operators empty a run-bearing analysis-run registry only after an
unrevoked analysis_run_retention_grant and analysis_run_retention_admin
membership (ADR 0020). PUBLIC cannot execute the definer function.
Repeated citation chips and close buttons use named design tokens and
a Storybook catalog on Node 24.

ADR 0019 stays the R&R catalog-id bind. Do not reuse that number.

Co-authored-by: Seongho Bae <[email protected]>
After POST /api/analysis-runs the list refetch must include the new
Pending row so the buyer-facing "has not started yet" next action is
visible. The previous stub kept only the seed rows.

Co-authored-by: Seongho Bae <[email protected]>
After #148 the next-action phrase is pinned to registered kinds and
shown on both the created list row and the selected detail. Assert
both copies so getByText does not fail on the duplicate.

Co-authored-by: Seongho Bae <[email protected]>
Operators can open a Pending Demo Corp row and start ThreadWeave on
the frozen cutoff bag (ADR 0021). TEPP start stays 422 so this path
cannot invent a theta. A granted purge now also deletes reconstruction
and snapshot-member rows. Confirm the designed A-100 fork, then hover
the Result digest prefix.

Does not steal ADR 0019 or 0020. Prefer this head over #142 and #152.

Co-authored-by: Seongho Bae <[email protected]>
@cursor
cursor Bot requested a review from seonghobae August 16, 2026 16:52
cursoragent and others added 2 commits August 16, 2026 16:54
#74 already contains ADR 0021 / v0.88.0. Keep that start path and
follow with a purge-aware 0023 so a granted empty still works after
edges exist.

Co-authored-by: Seongho Bae <[email protected]>
After ADR 0021 start, a granted purge hit foreign keys on
analysis_run_reconstruction and analysis_source_snapshot_member.
Migration 0023 (ADR 0022) deletes those rows first, then the 0018
registry tables. Authorization stays conjunctive.

Next action: start a Pending lineage run, then empty the registry with
the documented grant + admin + phrase path.

Co-authored-by: Seongho Bae <[email protected]>

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

Review — #183 is the purge-after-start fix (v0.88.1)

Start reconstruction already landed on #74 as 1cf0bd7 (ADR 0021 / v0.88.0). This PR is no longer a start successor. It now adds migration 0023 / ADR 0022 / v0.88.1 so a granted purge still works after edges exist.

The 0020 function deleted only 0018 registry tables. After start, analysis_run_reconstruction and analysis_source_snapshot_member block that delete. 0023 keeps the same conjunctive lock (unrevoked grant + admin + published phrase, REVOKE ALL … FROM PUBLIC) and deletes reconstruction/members first.

Prefer this head over another start PR (#142 / #152 stay superseded). Do not steal ADR 0021. Do not invent a theta. Do not merge before #74. Do not merge #74 onto protected main.

Local verification: registry/start/hygiene static contracts passed (11 passed, live Postgres skipped).

Next operator action: mark this PR ready, review 0023, then merge onto feat/role-responsibility-agent-ontology after Checks go green.

View PR

Open in Web View Automation 

Sent by Cursor Automation: Fix Issues

#186 already claims 0.88.1 for the seeded period-report home row.
This purge-after-start fix stays ADR 0022 / migration 0023.

Co-authored-by: Seongho Bae <[email protected]>
@seonghobae

Copy link
Copy Markdown
Contributor

Start reconstruction and TEPP start already landed on #74 via #170 and #195. This draft is stale on 1cf0bd7. Closing as superseded. Do not merge.

@seonghobae seonghobae closed this Aug 16, 2026
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