Skip to content

feat(channels): allow viewers to reply and react - #9621

Closed
tellaho wants to merge 17 commits into
mainfrom
tho/viewer-thread-permissions
Closed

tellaho wants to merge 17 commits into
mainfrom
tho/viewer-thread-permissions

Conversation

@tellaho

@tellaho tellaho commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Category: new-feature
User Impact: When creating a View only channel on mobile, owners can let viewers reply in threads, react, or do both while reserving channel posts for writers.

Problem: Discussing or reacting to an announcement currently requires posting access, which also lets participants start new conversations in the channel feed.

Solution: Add two independent viewer permissions, both off by default. Mobile can set them when creating a View only stream, and the relay commits the Viewer join role and both grants with the create event. The relay checks the viewer's role and target for each action. Mobile also rechecks reactions when someone selects an emoji from a picker that was already open.

Apply the Viewer grants migration 0102 after the artifact rollback in 0098–0100 and the push gateway foreign-key removal in 0101. Deploy the relay before rolling out the mobile and desktop clients. The desktop settings editor is in block/buzz-app #3745. Existing members keep their roles unless an admin changes them. Public and Private creation continue to use their existing admission settings.

File changes

NOSTR.md
Document the grants, signed metadata and allowed contributions.

crates/buzz-db/src/runtime/migration.rs
Verify that the embedded migrator includes Viewer grants at 0102 after the push gateway migration.

crates/buzz-db/src/store/channel.rs
Persist and read the grants in the existing channel settings paths.

crates/buzz-db/src/store/channel_members.rs
Include the grant columns when reading channels during membership operations.

crates/buzz-db/src/store/event_hydration/postgres_tests.rs and crates/buzz-db/src/store/unlisted_channels_postgres_tests.rs
Keep existing database creation fixtures explicit about their default admission settings.

crates/buzz-db/src/store/dm.rs
Keep internal channel construction compatible with the expanded channel schema.

crates/buzz-relay/src/handlers/guest_contributions_postgres_tests.rs
Exercise initial Viewer admission and signed settings, both auth inputs, the grant matrix, and revocation against Postgres.

crates/buzz-relay/src/handlers/ingest.rs
Commit the viewer settings with a View only create, and authorize viewer actions against the relevant channel, thread ancestry and event ownership.

crates/buzz-relay/src/handlers/mod.rs
Register the Postgres coverage.

crates/buzz-relay/src/handlers/side_effects.rs
Publish the committed settings in signed channel metadata.

migrations/0102_channel_guest_contributions.sql
Add default-off grant columns for automatic migration.

schema/tables/public/channels.sql
Expose the same columns to desired-state deployments.

mobile/lib/features/channels/channels_page.dart, mobile/lib/features/channels/channels_page/sheets.dart, mobile/lib/features/channels/ios_create_channel_sheet.dart, and mobile/ios/Runner/NativeCreateChannelSheet.swift
Offer View only and two independent viewer permissions in the Android and iOS creation forms.

mobile/lib/features/channels/channel_management_actions.dart and mobile/lib/features/channels/channel_management_provider.dart
Submit one signed create event and surface the refusal from an older relay.

mobile/lib/features/channels/channel.dart
Carry viewer settings through channel models and persistence.

mobile/lib/features/channels/channel_detail_page.dart
Use effective permissions for the composer with the currently opened channel.

mobile/lib/features/channels/channel_detail_page/banners.dart
Show the appropriate access state on the channel page.

mobile/lib/features/channels/channel_directory.dart
Keep grants when constructing a channel from its directory details.

mobile/lib/features/channels/channel_management_provider.dart
Carry signed grants through channel detail lookups.

mobile/lib/features/channels/channel_permissions.dart
Combine the current channel settings and roster role for each action.

mobile/lib/features/channels/channels_provider.dart
Carry grant values through channel discovery.

mobile/lib/features/channels/message_actions.dart
Gate the message actions sheet and pass its channel to the picker callback.

mobile/lib/features/channels/message_actions/quick_reaction_row.dart
Recheck live permission when selecting an emoji and distinguish additions from removal.

mobile/lib/features/channels/reaction_row.dart
Check the relevant permission for adding and removing reactions from a message row.

mobile/lib/features/channels/send_message_provider.dart
Recheck permissions during asynchronous delivery preparation and preserve sends in new direct chats.

mobile/lib/features/channels/thread_detail_page.dart
Use the reply grant in threads and require posting access for sending to the channel.

mobile/lib/features/forum/forum_posts_view.dart and mobile/lib/features/forum/forum_thread_page.dart
Keep the forum-specific comment and vote protocol writer-only.

mobile/lib/shared/relay/nostr_models.dart
Decode explicit viewer grant tags from relay metadata.

mobile/test/features/channels/channel_permissions_test.dart
Verify independent grants, live roster and settings updates, and parsing and persistence.

mobile/test/features/channels/message_actions_test.dart
Exercise revocation while a picker is open, including removal of an owned reaction.

mobile/test/features/channels/send_message_provider_test.dart
Exercise revocation after asynchronous recipient lookup.

mobile/test/features/channels/channel_detail_page_test.dart, mobile/test/features/channels/channel_messages_journey_test.dart, and mobile/test/features/channels/channel_send_journey_test.dart
Supply membership for existing channel journeys so their sending assertions exercise the permission-aware flow.

mobile/test/features/channels/reaction_row_test.dart, mobile/test/features/channels/reaction_row_test/combined_tests.dart, and mobile/test/features/channels/reaction_row_test/shortcode_tests.dart
Provide channel permission data in the existing reaction and native sheet fixtures.

mobile/test/features/forum/forum_widgets_test.dart
Provide role data in the existing forum composer and retry tests.

mobile/test/features/channels/channel_management_provider_test.dart, mobile/test/features/channels/channels_page_test.dart, and mobile/test/features/channels/ios_create_channel_sheet_test.dart
Exercise the creation form, the iOS bridge, and a rejected create without a Public retry.

mobile/test/shared/community/community_provider_test.dart
Wait for background cache cleanup to remove the community directory before asserting that it is gone.

How to try it

  1. On mobile, open New channel, choose View only under Visibility, enable Allow viewers to reply in threads, and leave reactions off. Create the channel and post a message as its owner.
  2. In the companion desktop app, open the channel with a second account and join it as a Viewer. Mobile's read-only preview has no join action for this channel type. Open the joined channel on mobile as the Viewer and reply in the owner's thread. Confirm the Viewer has no channel composer, Send to channel action, or reaction add control.
  3. Enable viewer reactions from the owner's channel details in the companion desktop app. As the Viewer, add a reaction and open another picker from the message actions sheet. Revoke the grant as the owner and then select another emoji. Confirm no new reaction appears and the Viewer can still remove their own reaction.
  4. On an older Buzz relay, choose View only and submit. The form reports that the relay does not support View only creation, stays open, and leaves the channel list unchanged.

Validation

At c20eb02c058cadfadc899c401813577b2b37aa2d, normal pre-push checks passed, including Rust tests, desktop Tauri Clippy and tests, Flutter analysis and tests, and file-size checks. The consolidated PostgreSQL permission journey and embedded migration and upgrade checks passed at 49676e262; the subsequent changes were mobile-only. PostgreSQL applied 0094 and 0095 in order and reported both new columns as non-null with false defaults.

At 9ba2f6f6c, the branch picked up the mainline deletion fix. All 17 previously failing PostgreSQL deletion cases passed locally, as did the migration checks and normal pre-push hooks. Mainline fix.

A loopback relay walkthrough at c20eb02c0 passed over the NIP-42 WebSocket endpoint with disposable identities and fresh local PostgreSQL and Redis. It confirmed independent reply and reaction grants, the root-post restriction, revocation, and removal of an owned reaction from history.

The mobile picker was tested in the Flutter widget journey. A native walkthrough and native screenshots remain open.

At b8c5823d4bf6f9bf53e604de36b95119f7458753, both PostgreSQL viewer journeys passed. A loopback NIP-42 check verified signed metadata before the first self-join, the new Viewer's signed roster entry, and reply-only access. The preceding relay revision refused the same create command and left no channel row. A fresh database applied the roster-trigger retirement before the Viewer grants at that revision. The 121 focused Flutter tests passed and the UIKit form type-checked against the iOS simulator SDK. The native device walkthrough remains open.

The normal pre-push Rust, Flutter, Tauri, and file-size checks passed on the same head.

At b5852f0fbc6b2928a8076540052a25dc9422645a, the relay upgraded a populated PostgreSQL database from 0095 through 0096, 0097, and the then-numbered Viewer migration 0098 in order. Both grant columns are non-null with false defaults, and the existing channel kept its join role with both grants off. Over loopback NIP-42, the relay signed reply-only settings before the first self-join, signed the new Viewer roster entry, stored the thread reply, and refused root posting and reactions. A separate View only create with both grant tags omitted signed both grants as false.

The normal pre-push checks passed on this head, including Rust tests, Tauri Clippy and tests, Flutter analysis and tests, and the file-size check. The cache-cleanup test now waits for the background removal of the community directory it checks.

At 0c3809ee3a0ff5abed385fe16cb876b9acfd8462, relay startup upgraded a disposable PostgreSQL database from 0097 through the then-numbered Viewer migration 0101 in order. The artifact rollback preserved the existing channel artifact head and revision and restored the required channel ID. The existing stream kept its member join role and both Viewer grants defaulted to false. Over loopback WebSocket, the relay signed the View only settings and the first Viewer roster entry, accepted the enabled thread reply, and refused root posts and reactions. Creating a separate View only stream without grant tags produced signed settings with both grants off.

The normal pre-push checks passed on this commit, including Rust, Tauri, Flutter, and the file-size check.

At 439ae1277fab20f0f072b280faf974a2296ebbf2, a populated PostgreSQL database upgraded from 0097 through 0102. The artifact rollback preserved the channel artifact. Migration 0101 removed the push gateway delegation foreign key and preserved the installation and delegation rows. The existing stream retained its member join role with both Viewer grants off. Over loopback WebSocket, View only creation produced signed settings and the first self-join produced a signed Viewer roster entry. With only the reply grant enabled, the Viewer could reply in a thread, and the relay refused root posts and reactions. A create without grant tags signed both grants as off.

All 834 focused headless Flutter tests passed, covering Huddle controls and history, unread cues, channel discovery and creation, and Viewer permissions.

The normal pre-push checks passed on this commit, including Rust, Tauri, Flutter, and the file-size check.

tellaho and others added 7 commits November 17, 2026 11:38
Co-authored-by: Carl <acda9e433d19dcd0e6b6840f7f4b98f3a56f1fab98049d444c087019e6d36560@feedback.communities.buzz.xyz>
Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
Co-authored-by: Carl <acda9e433d19dcd0e6b6840f7f4b98f3a56f1fab98049d444c087019e6d36560@feedback.communities.buzz.xyz>
Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
Co-authored-by: Carl <acda9e433d19dcd0e6b6840f7f4b98f3a56f1fab98049d444c087019e6d36560@feedback.communities.buzz.xyz>
Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
Co-authored-by: Carl <acda9e433d19dcd0e6b6840f7f4b98f3a56f1fab98049d444c087019e6d36560@feedback.communities.buzz.xyz>
Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
Co-authored-by: Carl <acda9e433d19dcd0e6b6840f7f4b98f3a56f1fab98049d444c087019e6d36560@feedback.communities.buzz.xyz>
Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
Co-authored-by: Carl <acda9e433d19dcd0e6b6840f7f4b98f3a56f1fab98049d444c087019e6d36560@feedback.communities.buzz.xyz>
Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
Co-authored-by: Carl <acda9e433d19dcd0e6b6840f7f4b98f3a56f1fab98049d444c087019e6d36560@feedback.communities.buzz.xyz>
Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
@tellaho

tellaho commented Nov 17, 2026

Copy link
Copy Markdown
Contributor Author

🤖 Ned, a coding agent, reviewed the relay and mobile changes at 3a9ce4818cdeb269a444e4879db57665ed496f36 at source level. The review found that a mobile reaction picker already open when the grant changed could still attempt to add a reaction. The relay rejected that attempt.

c0395d5522a121b1adb1e41856137ab33b199497 rechecks the latest grant when an emoji is selected and keeps removal of an owned reaction available. The Flutter regression covers both outcomes. The consolidated PostgreSQL journey exercises both auth inputs, all four grant combinations, root and broadcast restrictions, and revocation. The embedded migration check and PostgreSQL upgrade test passed with migrations 0094 and 0095 applied in order.

The initial push checks also found mobile composer regressions and missing roster fixtures. c20eb02c058cadfadc899c401813577b2b37aa2d preserves sending in newly opened direct messages and updates the existing fixtures. The draft head passed the normal Rust, desktop Tauri, and Flutter pre-push checks. A native mobile walkthrough remains open.

tellaho and others added 8 commits November 17, 2026 12:35
Co-authored-by: Carl <acda9e433d19dcd0e6b6840f7f4b98f3a56f1fab98049d444c087019e6d36560@feedback.communities.buzz.xyz>

* origin/main:
  buzz-db: stop calling the dropped lock-key function in SQL (#9615)
  Clean up account records and refresh member lists (#9364)
  perf(mobile): save own thread interest once per unread catch-up (#9614)

Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
Co-authored-by: Carl <acda9e433d19dcd0e6b6840f7f4b98f3a56f1fab98049d444c087019e6d36560@feedback.communities.buzz.xyz>
Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
Move the unreleased viewer grants to migration 0096 after the roster-trigger retirement.

Co-authored-by: Carl <acda9e433d19dcd0e6b6840f7f4b98f3a56f1fab98049d444c087019e6d36560@feedback.communities.buzz.xyz>
Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
Co-authored-by: Carl <acda9e433d19dcd0e6b6840f7f4b98f3a56f1fab98049d444c087019e6d36560@feedback.communities.buzz.xyz>
Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
Move the unreleased Viewer grants to migration 0098 after single-table guard retirement and community artifact expansion.

Co-authored-by: Carl <acda9e433d19dcd0e6b6840f7f4b98f3a56f1fab98049d444c087019e6d36560@feedback.communities.buzz.xyz>
Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
Observe removal of the cache directory itself because background recursive cleanup can remove its child before the parent disappears.

Co-authored-by: Carl <acda9e433d19dcd0e6b6840f7f4b98f3a56f1fab98049d444c087019e6d36560@feedback.communities.buzz.xyz>
Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
Reuse authorized Viewer reply metadata and leave Solo member role commands outside thread resolution.

Co-authored-by: Carl <acda9e433d19dcd0e6b6840f7f4b98f3a56f1fab98049d444c087019e6d36560@feedback.communities.buzz.xyz>
Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
Preserve Bestie transcript journaling and channel recovery UI. Recheck the channel send permission after the signed event is journaled.

Co-authored-by: Carl <acda9e433d19dcd0e6b6840f7f4b98f3a56f1fab98049d444c087019e6d36560@feedback.communities.buzz.xyz>
Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
Preserve the community artifact rollback and move the Viewer grants migration to 0101.

Co-authored-by: Carl <acda9e433d19dcd0e6b6840f7f4b98f3a56f1fab98049d444c087019e6d36560@feedback.communities.buzz.xyz>
Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
TheSentinel454 added a commit that referenced this pull request Nov 19, 2026
## Summary

Retire the last foreign key in the push gateway schema:
`push_gateway_delegations.installation_id →
push_gateway_installations(id)`. This follows `docs/database.md` Rule 2
and the relay FK retirement work (#9399, #9404).

- **Gateway migration 0008** drops the constraint.
- **Relay migration 0101** drops the relay's legacy copy (Rule 4:
gateway schema changes go in both).
`schema/tables/public/push_gateway_delegations.sql` loses the inline
`REFERENCES`.

## Required stop

Every gateway and rollback target must run #9627 (`44cdd9fe`) or later
before this merges and deploys. #9627 makes the reaper lock expired
installations before it deletes their delegations. Without the FK, an
older reaper can leave an orphaned delegation. This is step 2 of the
Rule 5 retirement sequence; #9627 is step 1.

## Why the app already enforces the reference

| Path | Check |
|---|---|
| `upsert_delegation` (only delegation insert) | Locks the installation
`FOR UPDATE` in the same transaction; rejects a missing or revoked one.
|
| `create_installation` (replaces expired installations) | Locks the
matching installations `FOR UPDATE`, deletes their delegations, then the
installations. |
| `reap_expired` | Locks expired installations `FOR UPDATE`, deletes
their delegations, then the installations (#9627). |
| `authorize_delivery` | Reads the installation through the delegation;
a missing installation is `Rejected`. |
| `revoke_delegation` | Updates the delegation only; an orphan has no
effect. |
| `revoke_installation`, `rotate_endpoint`, `advance_assertion_counter`
| Update the installation; they never delete it. |

The relay never reads or writes the `push_gateway_*` tables (the gateway
requires its own database), so dropping the relay copy changes no relay
behavior.

## Tests

The gateway tests run against the migrated schema, which no longer has
the FK, so they prove the app check.

- `migrated_schema_has_no_foreign_keys` (new): the gateway schema has no
foreign keys after migrations. It fails if gateway migration 0008 is
removed.
- `delegation_for_missing_installation_is_rejected` and
`reaper_deletes_delegation_committed_while_it_waits` (from #9627) now
run without the FK.
- `reaper_retains_revocation_tombstones_until_authority_expiry`: its
hand-built schema drops the FK too.
- Relay: `push_gateway_delegations` joins the constraint parity check in
`admin_schema_parity_between_desired_state_and_migrations`, and the
migration count test covers 0101.

## Validation

Blox at `33f7df90` (before the rename to 0101; CI covers the rebased
head):

- `cargo fmt --check`, clippy (`buzz-push-gateway`, `buzz-db`, all
targets), gateway unit tests, `buzz-db` migration unit tests: pass.
- `scripts/postgres-test-run.sh -p buzz-push-gateway --lib --tests`:
16/16 pass.
- `buzz-db` Postgres tests for migrations, parity, push, floor
retirement and retained guards: 56/56 pass, including
`admin_schema_parity_between_desired_state_and_migrations`.
- Must-fail check: with gateway migration 0008 removed,
`migrated_schema_has_no_foreign_keys` fails (1 foreign key vs 0).

## Coordination

- On main after #8696, #9398 and #9710 (relay 0095–0100). #9627 shipped
this PR's reaper fix and tests separately, so this PR is the schema drop
only.
- Renumbered to relay 0101 after #9710 took 0098–0100 (rename only; file
contents unchanged). #9690 and #9621 also add a relay 0098; whichever
merges second renumbers.
- #8328 adds the gateway's declarative schema with the inline FK.
Whichever PR merges second removes it there.

## What got simpler

One fewer database object. Every gateway reference check now lives in
one place: the gateway's own transactions.

buzz-review-completed

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Signed-off-by: Luke Tornquist <tornquist@squareup.com>
Co-authored-by: Elrond <28d6302a099e5225b02c4155ac4236e4912603df2ab08dbfc2f4fef08ce598c8@buzz.block.builderlab.xyz>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Preserve the push gateway foreign key removal and move the Viewer grants migration to 0102.

Co-authored-by: Carl <acda9e433d19dcd0e6b6840f7f4b98f3a56f1fab98049d444c087019e6d36560@feedback.communities.buzz.xyz>
Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
@TheSentinel454

Copy link
Copy Markdown
Contributor

🤖 #9610 merged to main as relay migration 0101 (bc3023a0). This PR also uses 0101, so it needs to move to 0102.

  • Rename migrations/0101_channel_guest_contributions.sql to 0102_channel_guest_contributions.sql, and update the migration count test in crates/buzz-db/src/runtime/migration.rs to 102.

@TheSentinel454

Copy link
Copy Markdown
Contributor

🤖 Main now ends at relay migration 0104: #9740 merged 0102–0104 (729cb10b). This PR still adds 0102, so it needs to move to 0105.

  • Rename migrations/0102_channel_guest_contributions.sql to 0105_channel_guest_contributions.sql, and update the migration count test in crates/buzz-db/src/runtime/migration.rs to 105.

#9690 also needs a new number. Whichever of the two merges second takes 0106.

@tellaho tellaho closed this Nov 20, 2026
TheSentinel454 added a commit that referenced this pull request Nov 20, 2026
## Summary

Migrations up to `0104` dropped every trigger, function and foreign key.
`docs/database.md` Rules 1 and 2 forbid adding them back, but nothing
enforced that. This PR adds the guard.

- **Migration lint.**
`migrations_after_retirement_add_no_triggers_functions_or_foreign_keys`
scans each migration numbered after `0104`. It fails on `CREATE [OR
REPLACE] FUNCTION | PROCEDURE | TRIGGER | RULE`, `CREATE CONSTRAINT
TRIGGER`, `CREATE EVENT TRIGGER`, `REFERENCES` and `FOREIGN KEY`,
outside `--` comments. The error names the file and line, for example
`migrations/0105_probe.sql:2: CREATE OR REPLACE FUNCTION`. Nested `/*
*/` comments are skipped. Quoted identifiers and string values are data,
except a string passed to `EXECUTE` or `format(`. Each dollar-quoted
body is scanned as SQL up to its closing delimiter, so DDL run through
`EXECUTE` in a `DO` block is caught, and an apostrophe inside `$$...$$`
cannot hide the rest of the file. It runs in the infra-free `buzz-db
--lib` unit lane.
- **Schema file check.**
`desired_state_schema_layout_is_complete_and_schemabot_shaped` allows
`schema/` files only under `tables/public/`, `types/`, `partitions/` and
`seeds/`, and runs the same scan on every file. A `functions/` or
`triggers/` file, or an inline `REFERENCES` in a table file, fails it.
- **Catalog check.**
`admin_schema_parity_between_desired_state_and_migrations` now asserts
that both bootstrap paths (pgschema + reconcile, and all migrations)
have zero non-internal triggers, event triggers, `public` functions and
procedures, rules and foreign keys. Extension members (pgcrypto) are
excluded. No allowlist is needed: main with all 104 migrations applied
has none of these objects.

Main now has `0105`, which passes the lint. Open PRs that add a
migration only need to renumber to `0106` or later. The two open ones
(#9621 and
#9690) add no forbidden object.

### What got simpler

- The parity test's per-table trigger comparisons (`events`,
`event_mentions`, and the five tables `0096` unguarded) and its separate
foreign-key check are replaced by one zero-object assertion.
- The scoped-key lint no longer parses foreign keys. None may exist, so
checking that they lead with `community_id` is dead logic.
- `schema/schema.sql` drops its empty `-- functions` and `-- triggers`
sections. Its header and `docs/database.md` stop describing `functions/`
and `triggers/` directories that no longer exist, and the doc's
"remaining triggers stay as a backstop" text now says they are gone.

### Checklist (`docs/database.md`)

- [x] Phase: none. Test and docs change only. No migration and no
runtime code.
- [x] No trigger, function, procedure, rule or foreign key is added.
- [x] No migration mutates rows.
- [x] Rule 4 locations: no schema change. `schema/schema.sql` changes
only comments.

### Related issue

None found.

### Testing

Run on a Linux workstation with PostgreSQL 17 at `b7254f90`, before the
review fixes. CI passed with the first review fixes at `0fed6b1b`.
`9749e618` adds dollar-quote, nested `EXECUTE $tag$` and `$1` cases to
`schema_object_lint_reports_each_construct_with_its_line`, and CI checks
it.

- `cargo fmt --check` and `cargo clippy -p buzz-db --all-targets -D
warnings`: pass.
- `cargo test -p buzz-db --lib` and `cargo nextest run -p buzz-db
--lib`: 223 passed.
- `scripts/postgres-test-run.sh` for
`admin_schema_parity_between_desired_state_and_migrations`,
`migrated_catalog_retires_universal_fences_but_keeps_deletion_guards`
and `pgschema_reapply_keeps_runtime_partitions`: 3 passed.
- Proof the lint can fail: a temporary `migrations/0105_probe.sql` with
a function and a `REFERENCES` column fails the lint with
`migrations/0105_probe.sql:2: CREATE OR REPLACE FUNCTION` and
`migrations/0105_probe.sql:3: REFERENCES`.
- Proof the catalog check can fail: a temporary `0105` that creates
`probe()` fails the parity test with `the migrations leave a trigger,
function, rule or foreign key`, `left: ["function probe()"]`.
- The catalog on main at `9c0bcd62`, with all 104 migrations applied
through psql, has no triggers, functions, foreign keys, rules or event
triggers.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Signed-off-by: Luke Tornquist <tornquist@squareup.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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.

2 participants