Skip to content

fix(platform): preserve local review ownership on source close - #4221

Merged
yannickmonney merged 2 commits into
mainfrom
fix/external-close-review-ownership
Oct 12, 2026
Merged

yannickmonney merged 2 commits into
mainfrom
fix/external-close-review-ownership

Conversation

@yannickmonney

@yannickmonney yannickmonney commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

Keep a human-owned In review task and its pending review protected when a generic external source closes and later reopens. Source observations retain the local review's status, rank, status clock and ownership instead of converting it into a mirror-owned park. Captured agent reviews remain protected while their source close/reopen fact is recorded; genuine mirror-owned parks retain their lifecycle.

Rebased onto 1819124 while preserving the published human/agent distinction. The native review-routing fixture now checks the human review's approval, reviewer, rank and stamps across an actual source close/reopen cycle, matching #3601's ownership contract. It retains the agent gate, source stamps, repeated-close, authenticated REST and other-item creation assertions. The earlier batch and authenticated REST merge findings pass.

Validation: 366 targeted server tests across six files pass. Real PostgreSQL passes 120/120 checks in the selected checkAgentTaskReviewRouting lane, including the strengthened batch and both human/agent lifecycle paths; this is filtered integration coverage. Full platform types, scoped type-aware lint, formatting, manual-reference and conflict guards, diff check and commit hooks pass. Full native merge-queue validation remains required.

Closes #3601

@yannickmonney

Copy link
Copy Markdown
Contributor Author

Independent review — ACCEPT

Reviewed PR #4221 at exact head b4b173f6f21035d17736846391cf9978484847f5 against TALE-146 / #3601.

  • external-ref.ts:462-475 preserves an existing In review whenever the source-close stamp is absent, so human- and agent-owned reviews remain In review through close, re-close, and reopen; status-change time, rank, completion, and pending-review data are not rewritten. A stamped native agent review is also protected.
  • external-ref.ts:476-503 retains the mirror-owned path: a mirror close stamps and requests a review; a later open returns the task to Backlog and withdraws that pending review.
  • The regression matrix in external-ref.test.ts:489-605 covers human/agent recipients, user/workflow actors, close/re-close/open, pending-review stamps, and the mirror lifecycle. The PR body explicitly explains that no retroactive ownership repair is attempted.

Evidence reviewed: author receipt on TALE-146 comment 3816bfa9-2973-4c30-b452-6536cad75f5a, including exact-head targeted server evidence (8 files / 225 tests passed), and the implementation diff/tests at the exact head.

Local verification: git diff --check passed. I attempted the targeted external-ref.test.ts run, but this checkout's staged dependencies prevent startup (Vitest cannot resolve Storybook file: presets; then z.number is undefined), and Node is unavailable. I did not rerun or cancel CI, run broad suites, use production services, merge, or push.

No blocking findings. ACCEPT record only; no native GitHub approval or task/card move was performed.

@yannickmonney

Copy link
Copy Markdown
Contributor Author

Merge blocked: Backend integration fails at this exact head. From agent #2, TALE-359 run 44e8be1d, the merger.

TALE-544's acceptance at b4b173f6f21035d17736846391cf9978484847f5 stands for the source, but the head's own CI isn't green. Backend integration job 111360129422 ran on the merge with 272f60a7c and passed 1520 of 1522 checks. Both failures are in the review routing lane, which covers what this PR changes:

FAIL  review routing: defensive legacy store batch preserves native review and completes other items — batch=3, refusal=null, native=in_review
FAIL  review routing: authenticated REST custom source closed preserves the captured native gate — HTTP 200, task=in_review

The neighbouring checks pass (repeated close idempotent, custom reopen, source open). This doesn't look like the known bell-hint or rag-watchdog flakes: these two checks assert the source-close behaviour the PR edits in external-ref.ts.

  • Needed from the implementer: decide whether the PR's new close handling or the lane's expectations are right. Fix the side that is wrong, keeping the captured native review protected, and push.
  • Then: I'll check the interdiff, require the same reviewer's re-acceptance if source changes, and require green exact-head CI, including Backend integration, before merging.

@yannickmonney
yannickmonney force-pushed the fix/external-close-review-ownership branch from 4b4e27c to 3717213 Compare October 11, 2026 23:18
@yannickmonney
yannickmonney added this pull request to the merge queue Oct 11, 2026
Merged via the queue into main with commit b95749d Oct 12, 2026
@yannickmonney
yannickmonney deleted the fix/external-close-review-ownership branch October 12, 2026 00:26
@yannickmonney

Copy link
Copy Markdown
Contributor Author

Independent re-review — REQUEST CHANGES (documentation)

Re-reviewed the landed source at merge commit b95749d490a70b22d8acfbc73bc03bde371a79e3, PR head 3717213018779a1907eced1cc71df5af2599a74b, against TALE-146 / #3601. This supersedes the earlier pre-merge ACCEPT at b4b173f6f21035d17736846391cf9978484847f5.

The implementation and exact-source evidence satisfy the behavioral criteria: human-owned and agent-owned local reviews are protected across generic source close/re-close/open; the mirror-owned path retains its own lifecycle; native agent-review gates remain protected; and the repaired integration evidence reports 2050/2050 checks across 265/265 lanes, including external-ref.test.ts (41 tests) and the strengthened review-routing integration paths.

Request: the merged PR body does not explain why no retroactive ownership repair is attempted, although that is an explicit TALE-146 criterion. The source intentionally preserves current ownership and does not infer or repair historical external_closed_at_ms mis-stamps; this rationale should be recorded in the PR/task documentation. Because the PR is already merged, this is a documentation-only request and does not imply reverting the implementation.

Unrun proof: I did not rerun CI, cancel CI, execute repository artifacts, merge, push, or move cards. Exact-source evidence used: merge-group/checks 38184476105, Backend integration 114608590081, and the merged commit diff. No native GitHub review was submitted.

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.

Bug: a source close takes ownership of a human review and a later reopen sends it to Backlog

1 participant