Repository navigation
fix(huddl)!: keep a recurring series within its own group - #724
Merged
Merged
Conversation
Which series a huddl belongs to is set by the series code alone: when a recurring huddl is created and when its dates are generated. Creating or updating a huddl no longer takes a series as input, on any interface. Editing a whole series reads only the edited huddl's own group, so the edit stays inside that group whatever series the huddl carries. BREAKING CHANGE: the API no longer accepts huddl_template_id when creating or updating a huddl.
A series has no group of its own, so a huddl that already carries another group's series could still rewrite that series' schedule with a whole-series edit, even though the other group's huddlz were out of reach. - a whole-series edit is refused while the series has huddlz in another group - the generation worker skips such a series - series announcements are deduplicated within the huddl's group - the regression test now checks the series' own schedule
Scope each HuddlTemplate to a single owning group and filter Huddl's belongs_to :huddl_template relationship to group_id == parent(group_id). - Backfill huddl_templates.group_id, detach any huddl carrying another group's series as a one-off, and remove unreferenced empty templates - Authorize HuddlTemplate reads directly against its owning group - Validate internally passed series_template_id belongs to the huddl's group - Scope virtual time-zone lookup to the huddl's own group - Remove cross-group series guards now enforced by the relationship filter
…ership * origin/main: fix(api): accept only sign-in tokens on the GraphQL socket (#730) fix(huddl): tie organizer-only huddl details to the current role (#726) fix(groups): keep a group's address book with its organizers (#725) fix(discover): noindex empty filtered public discovery responses (#734)
The migration picked a series' group by counting the huddlz that carry it. The only way a series came to span groups was a huddl being attached to another group's series, so the count let the attached huddlz outvote the series they joined and turn its own dates into one-offs. The audit history records the first huddl being created with its series. That huddl's group is now the home. The count remains for a series with no such record. A series whose group is gone is removed, and a huddl that carried it becomes a one-off like any other detached huddl. - Run the migration in a test against rows as they could stand before it: the home it picks, what a detached huddl keeps, and a second run
The edit form and the organizer's huddlz list decided whether a huddl recurs from the id on its row, then read the schedule from the series. A huddl's series is read through its own group, so a row naming a series its group does not have has none, and the pages now treat it as the one-off it is instead of failing on the missing schedule. - Cover the organizer's list, the edit form and the copy notice for a huddl whose row names another group's series
Rewrite the series-and-group tests around the rule itself: a series belongs to the group of the huddl that started it, and a huddl whose row names another group's series has none. They now also cover the series announcement, the series' own edits leaving such a huddl alone, and who reads a private group's series. - Read a series by its group's members; the owner is one of them - Put the whole-series change back as it is on main: the group check it was restructured around is gone - Drop the whole-series test this file duplicates - Define a recurring series in the glossary
Neither the series' update nor the huddl's accepts a group, so the two cannot drift apart after they are written. Say so in a test.
…ership * origin/main: fix(api): authenticate API, GraphQL and MCP from the bearer alone (#729)
The relationship filter looks redundant next to the rule that a series and its huddlz share a group. Record that it is the read-side half of that rule, which no database constraint backs.
…ership * origin/main: fix(auth): bind administrator viewing credentials to the browser session (#736)
The migration read the earliest creation record naming a series as proof of where the series started. Where a series' own huddlz predate the audit history and a later huddl in another group was created into it, that record was the later huddl's, and the series went to the wrong group. A record now settles the home only when it is the creation of the series' first huddl, the earliest added of the huddlz carrying it. Otherwise the group holding most of the series' huddlz takes it; groups level on that go by whose huddl was added first, then by group id. A huddl whose own record shows it was created outside the series joined it afterwards, and is neither its first huddl nor counted. - Cover the partial history, a tie, later huddlz created into a series and an older huddl attached to one
The release command migrates before the new servers take traffic, and the migration made a series' group required by the column. Servers still running the release before start series without a group, so every series started during a rollout failed on them. The column is now optional and the rule lives in the application: the series' create action requires a group, and nothing else writes one. A series an old server starts in that window has no group, and until it has one no huddl reads it; its dates would never be generated if a new server picked up the job. Reading any series now first gives each such series its home, by the migration's rule, and removes one none of whose own huddlz is left. - Cover a series started without a group: its home on first read, its dates being generated, a huddl of another group naming it, and removal
Three readers still took a huddl for part of a series whenever its row named one. A row can name a series its group does not have: one written before the two were kept together, or by a server of the release before while this one rolls out. That huddl is a one-off, but: - publishing it planned a series announcement, and a second such huddl in the group lost its own to the once-per-series rule - its delete dialog spoke of other occurrences - the sitemap left it out beyond the recurring window All three now ask whether the huddl is in a series of its own group: a new in_series calculation over the group-scoped relationship, the relationship itself where the announcement is planned, and the same join in the sitemap's SQL. The read of a series' later huddlz and the once-per-series check ask it of every huddl they match as well, so neither can take a one-off naming the series for one of its dates. - Build the migration test's huddlz before the schema is rolled back: creating one now reads its series
A series whose own group was gone still passed to another group when one of that group's huddlz had been created into it: with the series' own huddlz deleted, that huddl was the earliest left and its creation record was read as the series' start. The start is now the earliest creation record naming the series, whether or not that huddl still exists, and it counts only when no huddl carrying the series without a record was added before it. Its group is the home; if that group is gone the series has none and is removed. A series whose huddlz are all gone stays with the group that started it. The rule for a series written without a group during a rollout is the same text, so it changes with it. One statement cannot both update and delete a row, so each home is worked out first and only series that get one are updated.
…ership * origin/main: fix(groups): authorize membership changes against their roster (#739)
…ting The home pick read the audit history and deleted series, and a series written without a group was repaired by a write on whatever read came first. Both were too clever: - the migration deleted a series that still had dates, and a roll back and forward moved an already-settled home - a valid series started by a server of the release before read as a one-off until something repaired it - reading one group's huddl wrote another group's series, and failed outright in a read-only transaction A series' home is now the group of the earliest-created huddl that carries it, ties broken by the huddl's id. The huddl that starts a series is created with it and its later dates after it in the same group, so that is the group it started in. No audit history, and nothing is deleted. - Migration: store that group, then make a one-off of each huddl in any other group. A series no huddl carries is left alone, without a home. The earliest huddl is never detached, so up, up again, and down then up all pick the same home. - HuddlTemplate.home_group_id is the stored group, or the same rule in SQL for a series stored without one. The huddl's series, in_series, the later-dates read, the read policy, the sitemap and the checks on generated dates all compare a huddl's group with it. A series written without a group is its first huddl's group's for every reader at once. - HuddlTemplate.Homes and its preparation are gone. Reads never write. - Index huddlz by series and creation order: it finds the earliest huddl, and serves the later-dates read and the series' foreign key.
Two readers of such a series were only reached indirectly: the time zone a huddl takes from its series when it moves online, and the text of the series announcement once it is delivered. Cover both, and check after the page and sitemap reads that nothing was stored on the series.
* origin/main: fix(auth): have open pages follow a change of access (#735)
mwoods79
added a commit
that referenced
this pull request
Dec 1, 2026
* origin/main: fix(admin): limit what viewing as someone can do (#749) fix(groups): bind invitations only to accounts with a confirmed address (#728) fix(photos): follow the current organizer role for huddl photos (#746) fix(api): keep restricted fields out of sorting and filtering (#744) fix(huddl)!: keep a recurring series within its own group (#724)
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
A recurring series belongs to the group that started it. New series require a group. For existing series, the migration matches a retained generation job to the starting huddl’s creation snapshot. When the evidence identifies one surviving group, the migration stores it. When the evidence is missing or conflicts, the series keeps its links and every linked huddl reads as a one-off.
Organizer pages, the sitemap, announcements, generation and whole-series edits use the stored group. JSON:API and GraphQL no longer accept a series id as a public huddl input.
Evidence
Merge Danger
Door: one-way
Blast Radius: Data
Up clears links to a series outside its proven home. Down drops every stored home. Cleared links stay cleared. A later up can recover only homes whose generation job and founding snapshot still exist. This includes series whose last huddl has been deleted.
The migration scans creation history and retained generation jobs, updates links, indexes the stored group and validates foreign keys. These operations take table locks. Deleting a group removes its stored series. A huddl detached from a series retains its RSVPs, waitlist, cover and schedule.
Before deployment, this query lists series whose homes the migration cannot establish. Their huddlz stop recurring until the homes can be independently confirmed.
After deployment, this query lists series still awaiting confirmation and their carrier counts.