Make a shared file that never reaches a guest explain itself #130

Merged
cruelacid merged 1 commit from worktree-listing-instrument into main 2026-09-23 19:40:06 +01:00
Owner

Task: NEC-87

A guest vault once missed a file the owner created while its folder listing was opening (CI run 531). It hasn't recurred in about 200 runs: roughly 180 on a Mac (two loops at once, plus a 0–1000 ms timing sweep of the owner's create) and 20 on the CI runner. Nothing logged could say where the owner's update stopped. This PR makes the next occurrence explain itself. What was ruled out, and why, is in docs/sync-limitations.md and on the card.

Plugin (diag log, debug level):

  • The folder listing lifecycle: subscribed, synced, changed here, update received, changed remotely.
  • Frames dropped for a document that isn't subscribed.
  • Two silent failures now log a warning: a listing subscribe that throws (it used to escape as an unhandled rejection with no line), and newly listed files that couldn't be acted on (the missing .catch).
  • No private references, and build-mirror --check is clean.

Server:

  • A refused subscribe is now logged at info. It used to be dropped with no reply and no line, and the client never retries.
  • TRACE_BROADCASTS (config.ts, off by default) logs every subscribe (seq from and to), every unsubscribe, and every update broadcast with its sender and recipients. Only the e2e identity suite turns it on.

e2e: waitForNote can name other vaults, and the NEC-87 step passes the owner. A failure now prints both vaults' diag logs.

Local gate: typecheck, lint, 1,740 unit tests, and build-mirror --check. A local identity run confirmed the trace appears.

Changelog

NONE

🤖 Generated with Claude Code

https://claude.ai/code/session_01StURdiv33xnMfE2XRyg8Lt

Task: NEC-87 A guest vault once missed a file the owner created while its folder listing was opening (CI run 531). It hasn't recurred in about 200 runs: roughly 180 on a Mac (two loops at once, plus a 0–1000 ms timing sweep of the owner's create) and 20 on the CI runner. Nothing logged could say where the owner's update stopped. This PR makes the next occurrence explain itself. What was ruled out, and why, is in `docs/sync-limitations.md` and on the card. **Plugin (diag log, debug level):** - The folder listing lifecycle: subscribed, synced, changed here, update received, changed remotely. - Frames dropped for a document that isn't subscribed. - Two silent failures now log a warning: a listing subscribe that throws (it used to escape as an unhandled rejection with no line), and newly listed files that couldn't be acted on (the missing `.catch`). - No private references, and `build-mirror --check` is clean. **Server:** - A refused subscribe is now logged at info. It used to be dropped with no reply and no line, and the client never retries. - `TRACE_BROADCASTS` (`config.ts`, off by default) logs every subscribe (seq from and to), every unsubscribe, and every update broadcast with its sender and recipients. Only the e2e identity suite turns it on. **e2e:** `waitForNote` can name other vaults, and the NEC-87 step passes the owner. A failure now prints both vaults' diag logs. Local gate: typecheck, lint, 1,740 unit tests, and `build-mirror --check`. A local identity run confirmed the trace appears. ## Changelog NONE 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01StURdiv33xnMfE2XRyg8Lt
Make a shared file that never reaches a guest explain itself
All checks were successful
Release note / release-note (pull_request) Successful in 14s
CI / build (pull_request) Successful in 4m27s
CI / e2e (pull_request) Successful in 4m55s
CI / promote (pull_request) Has been skipped
CI / e2e (push) Successful in 5m0s
CI / build (push) Successful in 5m2s
CI / promote (push) Successful in 32s
d869a2a67a
CI run 531 once showed a guest vault that joined a folder, synced the one
file its listing held, and never heard of a file the owner created moments
later. It has not recurred in about 200 runs since — 180 on a Mac, loops
and a 0-1000 ms timing sweep, and 20 on the CI runner — and nothing logged
could say where the owner's update stopped. This makes the next occurrence
say so.

Plugin (diag log): the folder listing being subscribed, synced, changed
here, updated remotely and changed remotely, and frames dropped for a
document not subscribed. Two paths that failed silently now log: a listing
subscribe that throws had no line and escaped as an unhandled rejection,
and newly listed files that could not be acted on vanished the same way.

Server: a refused subscribe is logged — it used to be dropped with no reply
and no line, and the client never retries. With TRACE_BROADCASTS, which only
the e2e identity suite turns on, every subscribe (seq from and to), every
unsubscribe, and every update broadcast with its sender and recipients.

e2e: a failed wait for a note now prints the other vault's diag log too, so
both ends of a missing file are on the page.

docs/sync-limitations.md records the reproduction attempts and what was
ruled out, and keeps the entry open.

Task: NEC-87

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01StURdiv33xnMfE2XRyg8Lt
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Nectenda/nectenda!130
No description provided.