Skip to content

fix(marketing): stabilize the paused audit configuration lock (#1146) - #1147

Merged
athvin merged 2 commits into
mainfrom
issue/1146-audit-lock
Nov 21, 2026
Merged

athvin merged 2 commits into
mainfrom
issue/1146-audit-lock

Conversation

@athvin

@athvin athvin commented Nov 21, 2026 •

Copy link
Copy Markdown
Owner

Closes #1146

Claimed by Codex session 01a1fb62-5950-78d2-982c-5ecb2cd40d30 on brians-MacBook-Pro.local at 2026-11-21T03:14:31.299462+00:00.
Post-merge follow-up for #1139; the broader #1074 remains assigned separately.

Post-merge is part of this pull request. The ledger below records whether
the follow-up work actually happened. /land-pr closes it.

What

Use the latest queued visibility entry for the marketing audit. A paused audit now keeps configuration locked while visible, including when the browser batches an old offscreen observation with the current visible one.

Why

Main Chromium failed the paused-audit assertion in both attempts after #1139, on unchanged frontend source. The full local Linux shard reproduced the failure; consuming only the first observer entry left the parent lock stale.

Proof

make frontend passed: 83 unit/component files, 1,065 tests, and 918 browser tests (135 existing skips). The deterministic regression failed before the fix; nine repeated Linux runs then passed across desktop Chromium, mobile Chromium and mobile Safari. The complete Linux Chromium shard passed with 349 tests and two existing skips. Its first post-fix run encountered the separate saved-light-theme accessibility race already seen before this fix, now tracked in #1150; the unchanged full-shard repeat passed. Final head f7277630ec68d2ca2061f397bbf827d0511668d7 passed all required checks and every PR workflow after refresh onto ec16e855. Squash merge 89d14ca9a89bc082f8bfcf2a12905644954be97e landed at 2026-11-21T03:54:27Z; post-merge validation and the 30-minute watch are complete.

Risk & rollback

The observer watches one target, so the last queued entry represents its current visibility. Existing pause, completion and replay assertions remain; added checks cover offscreen unlock and return-to-view relock. Revert this follow-up if audit controls regress.

Post-merge ledger

Closed by: Codex · session 01a1fb62-5950-78d2-982c-5ecb2cd40d30 on brians-MacBook-Pro.local · 2026-11-21T04:24:43Z

  • main is green with this change on it — original DuckFleet merge 9e318ce6 passed backend CI 44858367018 and full local make check on the combined merged tree. Its marketing failure was repaired by follow-up fix(marketing): stabilize the paused audit configuration lock (#1146) #1147, merge 89d14ca9; main frontend 44863454746 executed and passed the audit in all three browser projects, and main Rust 44863454645 passed. Current main 7426991feee54746809266a75dfa867800e8ac79 contains both merges; its recent workflows are successful. No new main failure observed from 2026-11-21T03:54:27Z through 2026-11-21T04:24:43Z, completing the 30-minute watch.
  • images — run 44863454627 passed; er-web sha256:8d94386d85bb52fd877b1af594c3a2a7894d3cd9a4db67850418f187cf7eae52 maps to merge 89d14ca9.
  • deploy — 44863604441 deployed the merge SHA successfully. Dev web-api-green-846df95d8-8fgzm emitted Ready in 0ms at 2026-11-21T03:57:30.446671901Z. Prod web-api-blue-5f5b85c5cd-zsp2z emitted the same at 03:57:30.586120402Z with the new er-web digest (CloudWatch query 0e7093c4-f61e-47c7-bb2e-af64703a2226). Both readiness probes returned 200; traffic verified dev green 03:57:54Z, prod blue 04:01:21Z.
  • the push-only surface no pull request can pre-test — deploy and marketing preview passed. Latest scheduled kind 44690221398, cluster-objects 42907888432 and frontend-experiments 44693051420 passed. Drift 44862460349 remains red for the pre-existing unconfirmed SNS subscription in The er-alerts SNS email subscription has never been confirmed — 19 armed alarms reach nobody #1107; its failure predates this follow-up and does not reference this change.
  • the board card — Fix the paused marketing audit visibility and configuration-lock race #1146 closed automatically at 2026-11-21T03:54:29Z; Product Roadmap and Duck Fleet Product Roadmap both report Done.
  • follow-ups — Verify readable marketing theme transition for visitors with a saved light preference #1150 owns the separately observed saved-light-theme contrast/readiness finding; Stabilize marketing audit and volume interaction tests #1074 retains the broader volume-control work. Neither assertion was weakened.
  • what was learned is written down — Fix the paused marketing audit visibility and configuration-lock race #1146 records the native observer batch, reproduction and root cause; the single-target/latest-entry rule is documented beside the production observer and covered by the browser regression.

Specific to this change

Context — plan, discoveries, measurements, files

Plan

  1. Reproduce the paused audit lock failure from main in a disposable browser run; inspect observer updates and parent lock state.
  2. Correct the demonstrated race while retaining viewport-based locking, pause/resume and replay; add an explicit regression.
  3. Run repeated targeted browser checks, the complete frontend gate and hosted browser tiers.
  4. Land this follow-up, verify main and deployment, then close both post-merge ledgers before starting DuckFleet DuckFleet: make ingestion and result artifacts accessible to remote workers #1131.

Discoveries

A native IntersectionObserver callback contained two entries for the audit: offscreen at top 1046.7, then visible at top 63.7. Array destructuring read only the stale first entry. Isolated tests and CPU-throttled runs passed; the complete Linux Chromium shard reproduced the bug. The regression prepends an opposite stale observation and preserves the full lifecycle assertions.

Measurements

Files

This branch was successfully deployed

1 active deployment
marketing-preview — f7277630 Deployed Nov 21, 2026 by athvin via publish marketing preview #11
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.

Fix the paused marketing audit visibility and configuration-lock race

2 participants