test(desktop): harden observer archive policy regression coverage#1994
Merged
Conversation
Closes the review-identified coverage gaps left open when #1923 merged production-verified but with Thufir's pass-2 REQUEST CHANGES still outstanding on tests/bridge fidelity only: - Mutable e2e bridge subscription state so merge/remove kind commands drive real state instead of no-op mocks (unlocks the fresh-install repair path and OSS toggle ON/OFF assertions). - Startup-barrier pair test: list_save_subscriptions call count is 0 while policy is pending, >0 only after it resolves. - Settings toggle disabled while policy is unresolved and after fail-closed policy rejection; no merge/remove command issued either way. - Reconciliation effect body extracted into startReconciliation() so identity-switch/unmount cancellation is tested against the real production lifecycle function rather than a re-implementation. - Removed the dead hasExplicitObserverArchiveChoice/ clearExplicitObserverArchiveChoice/setExplicitObserverArchiveChoice marker APIs — nothing reads them at this head. Co-authored-by: Will Pfleger <pfleger.will@gmail.com> Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
atishpatel
added a commit
that referenced
this pull request
Jul 17, 2026
…sanitize * origin/main: [codex] Enforce shared relay admission limits (BUZZ-SEC-019) (#1917) [codex] Block banned actors from moderation commands (BUZZ-SEC-007) (#1915) [codex] Fix relay WebSocket admission limits (#1682) fix(desktop): close mention popup after an exact name + trailing space (#2030) test(desktop): harden observer archive policy regression coverage (#1994) [codex] Bind release publishers to immutable tags (BUZZ-SEC-039) (#1914)
kalvinnchau
added a commit
that referenced
this pull request
Jul 17, 2026
* origin/main: (31 commits) chore(release): release Buzz Desktop version 0.4.14 (#2036) Strip media metadata on clients and reject it at the relay (#2006) fix(desktop): restore Doctor ACP login discovery (#2017) feat(desktop): animate starter team onboarding (#2032) fix(ci): use git diff for path filtering (#2029) fix(desktop): include exe dir and ~/.local/bin in provider discovery (#2007) [codex] Hold Git concurrency permits through streaming (BUZZ-SEC-018) (#1916) [codex] Enforce shared relay admission limits (BUZZ-SEC-019) (#1917) [codex] Block banned actors from moderation commands (BUZZ-SEC-007) (#1915) [codex] Fix relay WebSocket admission limits (#1682) fix(desktop): close mention popup after an exact name + trailing space (#2030) test(desktop): harden observer archive policy regression coverage (#1994) [codex] Bind release publishers to immutable tags (BUZZ-SEC-039) (#1914) fix: resolve invite downloads by platform (#2001) Bug-bash: mention/code-span, feed titles, autocomplete, edit-mentions, draft routing, and right-click media Download (#2027) fix(desktop): keep mesh allowlist on transient roster query failure (#2024) Polish Buzz theme and sidebar (#1971) Welcome new users with a live agent team kickoff (#1998) fix(desktop): case-insensitive relay media origin match, release 0.4.13 (#2023) feat(desktop): show owners in agent hover cards (#2015) ...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes the review-coverage gaps left open when #1923 merged with production code verified defect-free but Thufir's pass-2 REQUEST CHANGES still outstanding on tests/bridge fidelity. No production reconciliation, Settings, or gate logic is touched — this is a tests/bridge-only change.
saveSubscriptions) is now mutable:merge_save_subscription_kindsperforms a real atomic kind-union (creating the row if absent),remove_save_subscription_kindremoves a kind and deletes the row when empty. This mirrors the realmerge_owner_p_kinds/remove_owner_p_kindRust semantics instead of returningnullover an immutable list.list_save_subscriptionscall count is0while policy reconciliation is pending,>0only after it resolves; stays0on policy rejection.saveSubscriptionslist now shows a24200row is created after reconciliation — the actual production repair path the original bug report was about.useObserverArchiveSeed's reconciliation effect body is extracted into an exportedstartReconciliation()orchestration function that the hook's effect calls verbatim; identity-switch (A→B pending/failure/success) and unmount (pending/resolved) cancellation are tested directly against that function instead of a test-local re-implementation.hasExplicitObserverArchiveChoice/clearExplicitObserverArchiveChoice/setExplicitObserverArchiveChoicemarker APIs — nothing reads the marker at this head.Related: #1923
Changed files
desktop/src/testing/e2eBridge.tssaveSubscriptionsstate cloned at install; real atomic merge/remove semantics;observerArchiveDefaultEnabledDelayMs/observerArchiveDefaultEnabledErrorknobs for policy pending/failure simulation.desktop/tests/helpers/bridge.tsdesktop/tests/e2e/observer-archive-policy.spec.tsdesktop/src/features/local-archive/useObserverArchiveSeed.tsstartReconciliation(); hook delegates to it directly.desktop/src/features/local-archive/useObserverArchiveSeed.test.mjsstartReconciliation()directly.desktop/src/features/local-archive/ui/LocalArchiveSettingsCard.tsxsetExplicitChoicecall.desktop/src/features/local-archive/observerArchivePreference.ts