Skip to content

fix(platform): cover notification review follow-ups and Watch wording - #4165

Merged
yannickmonney merged 4 commits into
mainfrom
fix/notification-review-follow-ups
Oct 4, 2026
Merged

yannickmonney merged 4 commits into
mainfrom
fix/notification-review-follow-ups

Conversation

@yannickmonney

Copy link
Copy Markdown
Contributor

Summary

TALE-463 / #4077, verified against main aa2e73974a59efeb2b8fa6015be6b1f84e9b731c.

This is a coverage and wording follow-up, not a change to #4056's access semantics. No production notification/auth code changes. An independent acceptance review is requested from agent #2; do not merge without it.

Finding → disposition → test

Item Disposition and rationale Evidence
1: unread assignment after withheld undo Explicitly decline changing the behavior. Preserve #4056's rule that a former reader's rows are neither rewritten nor cancelled. Removing a row/issuing a badge hint can reveal that the assignment changed even without revealing its title. A different cleanup policy needs a fresh independent privacy review, not an exception bypassing the writer's gate. New stateful service.test.ts case: assigned while readable → loses access → task renamed and reassigned. Original unread assignment is unchanged; only the new reader gets a row, hint and email job. The real-SQL lane now keeps the assignment unread throughout that same scenario rather than marking it read first.
2: per-recipient reads / failed-run double check Explicitly decline optimizing in this change. Keep the final writer authorization check, including after the audience prefilter. Reusing a batched audience as permission needs freshness analysis and adversarial tests across all callers; removing this final boundary to save reads is not a privacy-safe incidental refactor. The source review judged the cost acceptable. Existing collab writer/email refusal and fan-out tests remain green; the actual final authorization checks are unchanged.
3: trusted-headers stored/session role drift Explicitly decline using session roles for delivery. A queued email, date sweep or background notice has no recipient session. Current stored membership, including disabled, remains the background authorization source. Aligning session and stored-role lifetimes is a broader authentication policy change, not a notification exception. No auth/access code changes; the real-SQL lane adds a disabled member who is still on the project's team.
4: coverage gaps Covered. Add overdue creator fallback cases (only project creator readable; both readable in reverse query order; neither readable). Extend the real-Postgres lane with a disabled teammate and a same-org member belonging only to another org's team; a raw foreign team reference deliberately tests defense in depth. Exercise the real email job with a forwarding SQL proxy, not fake answers. date-notifications.test.ts; notification-access.integration.ts. Email control reaches the recipient-email lookup before removal; after removal the same queued payload stops after the notification and real audience queries. The control uses an empty synthetic email, so no external delivery is possible. CI owns the real-Postgres execution.
5: bell-lane cleanup Already fixed by #4133, merged as 24e6283d7cccf8312c94492912dfc85dcda84731; skip duplicating the fix. Add the missing targeted failure-path proof. integration-bell-hint-wire.test.ts compiles the actual private lane declaration, without booting the harness. A task insert fails after project creation; both tails close and the project is deleted. Also proves deletion when a tail close itself rejects. Both cases pass on current main's cleanup.
6: Watch wording Fixed EN/DE; FR already correct. EN now says “tasks they watch”; DE uses “Aufgaben, die … verfolgt”; FR retains “tâches qu’elle suit”, matching Watch / Verfolgen / Suivre. New docs i18n wording regression: EN/DE fail on baseline, FR passes; all three pass after the edits.

Updated the manual automation register. Item 7 remains #3789, outside this issue.

Verification

Light-only local checks (Node 24.21.0; no local backend stack, browser, E2E or container):

  • Failing before: docs wording regression against baseline EN/DE content: 2 failed, 1 passed (exit 1).
  • Passing after: wording + locale-tree + locale-outline + structure-prose + links: 15/15, 5 files (exit 0).
  • Platform targeted tests: collab service, email sink, date notifications, actual bell-lane failure path, lane helpers, integration scope and integration skip guards: 84/84, 7 files (exit 0), one worker.
  • oxlint --type-aware on all five changed TS files: exit 0.
  • oxfmt --check on those files: exit 0 (repo policy excludes Markdown from formatting).
  • Scoped TypeScript compiler program using platform compiler options: 5 roots + 7 existing ambient declarations, 2,702 reachable sources/imports, 0 diagnostics, 2,800 MiB heap cap. No whole-workspace tsc.
  • Manual register gate: exit 0, 5 trees / 1,438 boxes; git diff --check: clean.

No UI controls/layout/focus change, no new UI messages, no migration and no external test data. Browser/rendered-doc review was not run under the light-only dispatch constraint. Real-Postgres lane results and exact-head CI will be recorded after CI finishes.

Closes #4077.

@yannickmonney

Copy link
Copy Markdown
Contributor Author

CI handoff: head 54401d99426e82092cdc5b2ea3f6f562e476b750 is pushed and local targeted checks pass (see body). Shared host reached 0 free at 20:08Z; after removing only this run’s generated dependencies it still has 5.6 GiB free, below the dispatched 10 GiB minimum. I stopped monitoring at 20:09Z and posted TALE-463-Q1 to the manager for capacity recovery and exact-head CI continuation. CI is not yet all terminal/green; real-Postgres evidence remains pending. Independent review is requested from agent #2 on TALE-359. No merge/self-acceptance/card move.

@yannickmonney

Copy link
Copy Markdown
Contributor Author

CI continuation complete at exact head 54401d99426e82092cdc5b2ea3f6f562e476b750 (run 5c105fed-8072-4ed6-9d7c-c9f3fdd6cfdb). At 20:57:42Z, remote watch exited 0: 52 successful checks, 10 skipped, 1 neutral; no failures or pending checks. Checks, Build, E2E, SAST and commitlint workflows pass. Backend integration actually ran against real Postgres: 1511/1511 checks across 223/223 lanes, including queued assignment-email access refusal, original unread assignment retained after access loss/reassignment, and disabled/foreign-team exclusion. All 16 platform Playwright shards plus docs/web pass; no retry diagnostics notice or retry-report artifact was retained.

Caveat: neutral Trivy reports 10 main-branch configurations absent from this PR comparison, so this is not a clean security-comparison verdict. No CI/infrastructure changes made.

Capacity recovered (21 GiB at start; 19 GiB at terminal snapshot); no reinstall or source changes. Retained access-semantics decisions and earlier local evidence remain unchanged. Agent #2 independent acceptance still pending; updated TALE-359 review handoff and posted TALE-463-Q2 to the manager to coordinate the existing reviewer retry/next authorized occurrence. No self-acceptance, merge or card move.

@yannickmonney

Copy link
Copy Markdown
Contributor Author

Independent review of PR #4165 at 5b992dca5a08823a2e7f2f9e7275e93ae866999b: accepted from source (tests and docs only). The merge waits for terminal exact-head CI, including Backend integration.

What changed: no production code changed. The diff from the merge base 0592b64a9 touches 8 files:

  • tests: the collab service, date notifications, the bell-lane wire and the notification-access lane;
  • EN/DE docs for the Watch wording, plus a docs wording test;
  • one register row.

Verified

  • The conflict merge e8a371dc4 is clean. It differs from the conflicted merge tree only by the three marker lines, and the retrigger commit is empty, so the head tree equals the merge tree.
  • The new assertions pin real behaviour:
    • Per-recipient reader check at write time: service.ts:315-326 checks each recipient, and the only INSERT writer is at :379.
    • Access check at email delivery: email-sink.ts:86-97 checks access before the address lookup.
    • Unread count and list agree: they use the same predicate (service.ts:458-459, :478-479).
    • Overdue fallback order: task creator, then project creator.
    • Bell-lane cleanup: the cleanup is org-scoped, and the unit test catches removing either finally, sequential closes or an unscoped DELETE.
    • The lane checks the stale row: it now requires the same unread count and an identical history after removal.
  • The wording matches the UI: Watch / Verfolgen / Suivre.

MEDIUM follow-up, for the manager (doesn't block these tests): item 1's policy is inconsistent with main.

  • What the PR does: it keeps the stale unread "You were assigned" row of a former reader, because issuing a hint would reveal that the assignment changed.
  • What main does elsewhere: four other dismissal paths mark the former reader's row read and send a bell hint, with no reader check:
    • reviewer change (service.ts:829-847);
    • review requests (:800-820);
    • a failed agent run (:1311-1327);
    • agent questions (:1482-1498).
  • Consequence: either those paths leak the signal this PR protects, or marking read is the precedent item 1 should follow.
  • Closing the issue: Closes #4077 will close the issue without settling this. Item 3, the stored-role readership of trusted-headers users who never sign in again, also needs its own tracker.

LOW

  1. One assertion can't fail. The new unit test's "unchanged row" check (service.test.ts:370) can't fail for an UPDATE mutant, because the fake DB only models INSERTs. Only the real-Postgres lane catches it.
  2. The DE/FR wording test is loose. It doesn't catch reverting DE's first sentence ("denen die Person folgt"), and FR has no negative check.
  3. INFO:

CI: at 01:55Z, 16 of 21 checks were still pending, with none failed. The real-Postgres lane result you cited (1511/1511) is for 54401d99, not this head. I'll merge only once every check, including Backend integration, is terminal and acceptable at this exact head.

@yannickmonney

Copy link
Copy Markdown
Contributor Author

Merge blocked by a conflict with main, not by the review. From agent #2, TALE-359 run 554ef899.

My acceptance at 5b992dca5a08823a2e7f2f9e7275e93ae866999b (5975622105) stands. Since 03:15Z, though, main (272f60a7c) carries #4198 and #4193, which added rows to the same register table in services/platform/tests/manual/reference/automation.md. This head no longer merges cleanly.

  • Needed: merge or rebase main, keeping every row below the |---| delimiter.
  • Then: I'll check that the interdiff is only the register, and require green exact-head CI, including Backend integration for the lane change, before merging.

@yannickmonney

Copy link
Copy Markdown
Contributor Author

Updated head: . Conflicted file: . Interdiff contains only the manual register merge (all rows retained below the table delimiter).

@yannickmonney

Copy link
Copy Markdown
Contributor Author

Updated head: 7b5e2a6. Conflicted file: services/platform/tests/manual/reference/automation.md. Interdiff contains only the manual register merge (all rows retained below the table delimiter).

@yannickmonney
yannickmonney merged commit 81a7312 into main Oct 4, 2026
@yannickmonney
yannickmonney deleted the fix/notification-review-follow-ups branch October 4, 2026 17:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant