Repository navigation
Conversation
What was broken The previous fix added resource-based forum defaults and new-topic emails, but QA found that unwatching the forum left topic and announcement watch states unchanged and individual topic opt-outs did not survive forum re-watching. Root cause Topic reads only checked whether a TopicWatch row existed. Unwatching deleted that row, leaving no explicit opt-out to override forum notification defaults. Challenge authors also received automatic topic watches on creation. What was changed Resolve inherited topic watches from the effective forum preference. Persist challenge-topic opt-outs and exclude them from notification recipients. Preserve individual opt-ins across forum toggles and let new challenge topics inherit without an automatic author watch. Add the TopicWatch.watching migration, regenerate Prisma exports, and update API and deployment documentation. Existing watch rows remain opt-ins because historical manual/author provenance was not recorded. General-topic author watches and unwatch behavior remain intact. Any added/updated tests Add registrant/copilot HTTP regressions for list/detail/email consistency through forum toggles, announcements, individual overrides, and new authored topics. Add real PostgreSQL preference/projection tests and command/recipient regressions. Lint and build pass. The normal suite with database checks passes 193 tests. Enabling all database suites passes 200 tests and reproduces one pre-existing public-import provenance failure on unchanged origin/develop.
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.
What was broken
The previous PM-6594 fix (PR #19) added default challenge forum watches and new-topic emails. QA found that forum opt-out did not update topic/announcement watch states, and individually unwatched topics could still receive forum notifications.
Root cause
Topic reads treated any
TopicWatchrow as watched and ignored the forum preference. Topic unwatch deleted the row, losing the opt-out required to override forum defaults. New challenge topics also automatically watched their author independently of the forum preference.What was changed
TopicWatch.watchingcolumn, regenerate Prisma exports, and update documentation. Existing watch rows are preserved as opt-ins because historical rows do not distinguish manual from automatic author watches.Deploy migration
20261020000000_topic_watch_preferencesbefore this API, then Platform UI PR #2527. The previous challenge-watch migration remains required. No dependency changes.Any added/updated tests
Validation after
nvm use:pnpm lintandpnpm build: passed; changed service/test files also checked directly with ESLint.pnpm exec prisma migrate deploy: all six migrations passed on disposable local PostgreSQL.pnpm test --runInBandwith PostgreSQL schema checks: 193 passed, eight optional public-forum database tests skipped.category-topic:99001provenance failure also reproduces on unchangedorigin/develop(seven passed, one failed). No unrelated importer changes were made.