Skip to content

test(heavy): drop the links RLS policy in the pre-v0.13 down-mutate fixture - #61

Merged
rosseyre merged 1 commit into
masterfrom
fix/heavy-pg-upgrade-matrix-rls
Oct 22, 2026
Merged

rosseyre merged 1 commit into
masterfrom
fix/heavy-pg-upgrade-matrix-rls

Conversation

@rosseyre

Copy link
Copy Markdown

Summary

Heavy Tests on master fail at tests/heavy/pg_upgrade_matrix.sh. Building the pre-v0.13 fixture fails with:

ERROR:  cannot drop column origin_page_id of table links because other objects depend on it
DETAIL:  policy ks_source_isolation on table links depends on column origin_page_id of table links

Migration v129 (#53, per-artifact access labels) changed the links RLS policy so it reads origin_page_id. As a result, the down-mutate's ALTER TABLE links DROP COLUMN origin_page_id can't run. run-heavy.sh stops at the first failing script, so the three scripts after the matrix haven't run in CI since then either.

Fix: the pre-v0.13 down-mutate now drops ks_source_isolation ON links before it drops the column. A real pre-v0.13 brain never had this policy, so the fixture is now more accurate. The walk-forward (v11 → v129) adds the column back first and then re-creates the policy. This PR changes the fixture only; no product code changes.

Test plan

Run locally against Postgres 16 + pgvector with Bun 1.3.13:

  • Reproduced the exact failure on unmodified master (_build_legacy_fixtures.sh pre-v0.13 exits 3)
  • bash tests/heavy/pg_upgrade_matrix.sh: both shapes walk forward cleanly
  • After the walk-forward, the links policy exists again and still has its origin_page_id clause
  • bun run test:heavy: all 6 scripts pass, including the 3 that had been hidden behind the matrix failure

Generated by Claude Code

v129's ks_source_isolation policy on links reads origin_page_id, so the
pre-v0.13 fixture's DROP COLUMN origin_page_id fails with "other objects
depend on it" and pg_upgrade_matrix aborts the whole Heavy Tests run. A
pre-v0.13 brain never had the policy; the walk-forward re-creates it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GCX2qPfuXzjf2QBmBDjbJY

rosseyre commented Oct 21, 2026 •

Copy link
Copy Markdown
Author

Two red unit shards. Neither is caused by this PR, which only changes tests/heavy/fixtures/down-mutate-pre-v0.13.sql. No unit test loads that file.

I'm keeping both fixes out of this PR so it stays scoped to the Heavy Tests fixture. I tried to re-run the failed jobs, but this integration doesn't have permission (403), so a maintainer would need to use "Re-run failed jobs".


Generated by Claude Code

@rosseyre
rosseyre marked this pull request as ready for review October 22, 2026 07:40
@rosseyre
rosseyre merged commit 574bc0e into master Oct 22, 2026
36 of 39 checks passed
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