Repository navigation
Conversation
Disposable PostgreSQL 16 shaped like Cloud SQL (non-superuser CREATEROLE/ CREATEDB administrator in cloudsqlsuperuser) runs the pinned relayhistory-pipeline 60980e0e bootstrap, migrator and verifiers, activates bulls96_session_ingest and bulls96_read_api the way the GCP guide does, with bulls96_legacy_export_privacy absent, then checks each login's normalized catalog baseline and effective access, the refused bootstrap rerun (55000), the refused standalone privacy-role script (42501) and drift refusals. The positive upgrade case is reported pending: no supported Pipeline sequence exists at this pin. Refs #578 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
[Low impact] The latest change appears safe to merge and addresses the previous finding.
|
Output of scripts/ci/render-fast-path.py after the new lint.yml job. Refs #578 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ade sequence With UPGRADE_SEQUENCE set, the final case requires bulls96_legacy_export_privacy to exist (its shape is checked by the positive case); without it, the role must still be absent. Refs #578 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
AgentRelayBot
pushed a commit
that referenced
this pull request
Nov 29, 2026
…-logins; renumber to agent-relay 0.7.97 Takes main's registry and requirements doc, adds this branch's row as agent-relay 0.7.97, and says what the #578 evidence covers: a Pipeline source review and a plain PostgreSQL 16 fixture (#620), no Cloud SQL run, so Cloud SQL administrator behavior stays unverified. Co-Authored-By: Claude <noreply@anthropic.com>
This branch has not been deployed
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.
Refs #578
Scope
An offline Infra CI fixture for the two-login upgrade assertion in #578 (spec comments 7256860270 and 7257799942). The new suite is
ci/hoopdb-cloudsql-two-login-upgrade/, run by a newhoopdb-two-login-upgradejob inlint.yml. It covers both login baselines, effective-access probes, the refusal cases and drift refusals on a disposable PostgreSQL 16. The positive upgrade case is explicitly pending, because no supported Pipeline upgrade sequence exists at the pin.This PR changes no chart, guide, values note or Pipeline SQL, and bumps no version. It never connects to a real database, Cloud SQL instance or cluster.
How the starting state is built
The suite follows the same path a real Cloud SQL install takes through
docs/gcp-install/cloud-sql-setup.sh:pre(HoopDb part), run as the Cloud SQL administrator:CREATE DATABASE hoopdb,pg_trgmandbtree_gin.cloudsql_migration_roles.sql.hoopdb_owner,sessions_pipeline_runtimeandsearch_consumer_runtime, takes ownership, creates the schemas and appliescloudsql_owner_function_default_revoke.sql.src/hoopdb/migrate.ts, 126 migrations) runs ashoopdb_owner. It uses the GCP chart's migration profile fromvalues-gcp.yamlworker.migrations:cloudsql, no shim, no role bootstrap, runtimesessions_pipeline_runtimeLOGIN,global-default-revoke.bulls96_legacy_export_privacyis removed to model an install that predates it (see "Emulated" below).post-roles: the guide's exact statements promotebulls96_read_apiandbulls96_session_ingesttoLOGIN NOINHERIT:statement_timeout=5s,lock_timeout=2s,idle_in_transaction_session_timeout=10sstatement_timeout=2s,default_transaction_read_only=onpost(dedicated-owner layout), run ashoopdb_owner:session_read_api_role.sqlandsession_ingest_role.sql, with the samesedand refusal as the guide.GRANT CONNECT.session_read_api_role_verify.sql,session_ingest_role_verify.sqlandsession_ingest_verify.sql.Passwords for every login are generated at runtime and stored in a mode-700 temp dir. They reach psql only by environment name (
docker exec -e NAME,\getenv), never on a command line, andlog_min_error_statement=panic. After setup, every login uses scram-sha-256, and the suite checks that a wrong password is rejected. Before finishing, the suite greps every artifact and the server log for each generated password and fails if one is found.Emulated vs real
Real (pinned):
60980e0e.Emulated:
cloudsqladminis the bootstrap superuser (POSTGRES_USER), so PG16's automatic creator edges name it as grantor, as on Cloud SQL. On Cloud SQL it is Google-internal. Here the fixture logs in as it to set up the cluster, inject drift and read catalogs.cloudsqlsuperuseris aNOLOGIN CREATEROLE CREATEDBrole. The administratorpostgresis a non-superuserLOGIN CREATEROLE CREATEDBmember of it.cloudsqlsuperusermembers may do are not emulated. On vanilla PG16 the administrator holds no ADMIN option on the trampoline-created roles. The guide'sALTER ROLE ... LOGINpromotion as the administrator is therefore refused with42501 permission denied to alter role. The suite records this as anobservationand runs the guide's exact statements ascloudsqladmin. Whether real Cloud SQL accepts the promotion from the administrator is not established here.bulls96_legacy_export_privacyabsent: the pinned bootstrap creates it and migration062030requires it. The suite therefore removes it (DROP OWNED,DROP ROLE) after the pinned migrate. A real older install never had the role, and its schema would be an older migration prefix. No older Pipeline pin is used.Not emulated:
verify-full), IAM and private services access.relaycontrolandrelaycastdatabases.vectorextension (no pinned migration needs it).Pins
ci/hoopdb-cloudsql-two-login-upgrade/pipeline.pinandpipeline-files.sha256.fetch-pipeline.shclones into a new, empty directory andverify-pipeline.shrefuses any mismatch. Dependencies are installed withbun install --frozen-lockfile --ignore-scriptsinside the pinned Bun container.60980e0eb5a7632a188a293aa37452cee0c3885c; treessupabase/migrations57ef3b92de4529827314422efaf8806ca11be094,supabase/bootstrap54189b06ea9a52faa3a888558d0b4a29675726b0cloudsql_migration_roles.sql18c9b73e5b2c17cf0044e69cfb110e62a18382d370d330581fda314f9491b614legacy_export_privacy_roles.sqlfb9160f576b316ce49b99590267c7945305eb866b9f9e6e1f41b1d922b61c62esession_ingest_verify.sqldf835f634acc621d0a89a4cc6c63b21777e480800b35272b934de457101bdb6csession_read_api_role_verify.sql0779e4521f6912a8e2d03da7fd65a894f869dfb70ae61ef6e073edd642b2a0f6session_ingest_role_verify.sqlb25f1c1bf6e1eb75c5e0132d09c46310ab25d2e0b2c2de156369ef5fbf9ebaf3session_ingest_role.sqlb944c30a609fd8ad63d6c86424180c67a23fd8978d949b6e0340bb7b0a9e41a9session_read_api_role.sql8ab1906b39358947d2f4b6203d5daaf0fb9996bf3c57a4b7a4dba242c40de057session_ingest_roles.sqlff516c34423d7e445fcbfa4f1c6ef04f7a177b94486274b3b6a8458787084553session_read_api_roles.sql0ab86087d53e1afbfbc1b71ce2131252760aa5f5b91024c02b475729115f2598session_directory_search_worker.sqlfadb75e2fb1371d7c139122d2231cc2683da4ed685da715f48668ea848e9cac2session_token_verifier.sqlb6a96e9e6328db192041b6f507fe848cc3bc4691747b27f1dd8f714d584425cdcloudsql_owner_function_default_revoke.sqld630b68e6e15824178eb6ed315c2f6a63a7b28329cfbe9c89bcb4546372b1bbbsrc/hoopdb/migrate.tsf5c6b91f9840ff7d349a7bfd5909b6928e94942b3f0fda11ffe038e1b3b0cdeesrc/hoopdb/sessions-function-acl.jsonb7ae24d77c07f62e961b9028af8822a539f7b80949ce4a3ec7e129cdff631d47bun.locke2f636ed5e955b8653e57444095eecf10d123152eded3589a508bd6d7481eacapostgres:16@sha256:07abc3f43c9395b0bdbbab36bc25ddb0e8d83cd4fcafb5fb7d6abe14ff156dd8, the same digest as the existing RDS eraser test, andoven/bun:1.4.2@sha256:9114c058aeae42162ee16dd5084b95fe9473970bb6bcb5b232ab1630f0546895.Baseline (per login, separately)
snapshot.sqlbuilds a normalized catalog snapshot by name, with no OIDs and no password material, and compares it exactly withexpected/<role>.json. The snapshot covers:The baseline check fails if any of these layers fails:
invariantsexact-settings: ingestidle_in_transaction_session_timeout=10s, lock_timeout=2s, statement_timeout=5s; readerdefault_transaction_read_only=on, statement_timeout=2s. These are exact, not containment.snapshot: exact diff against the expected file.definer-execute: EXECUTE only on SECURITY DEFINER functions.definer-execute-allowlist(ingest): exactly the 81 entries of the pinned verifier'sv_allowed.pinned-verifier.Cases and expected results
bulls96_session_ingestbulls96_read_apiingest_turn_capability('{}')returnsregistered-v1;SELECT session_index.session_idand an INSERT raise 42501session_id(tenant A, tenant B, unbound, mixed);SELECT titleraises 42501; a write raises 25006bulls96_legacy_export_privacyis still absent, no trampoline is left, and both logins' snapshots are unchangedlegacy_export_privacy_roles.sqlas the non-superuser administrator is refused 42501 (caller may not create it); the role is still absentSELECTonsessions.session_indexgranted to the reader fails the baselineCREATEROLEon ingest, and on the reader, fails the baseline and is still refused after the bootstrap rerun, which preserves the driftcloudsqlsuperuserfor ingest, and for the reader, fails the baseline and is still refused after the rerunSELECT(sessions.turn_writers TO PUBLIC) fails the ingest baselinebulls96_legacy_export_privacyNOLOGIN NOINHERIT with no elevated flags, settings or membership edges, then both logins' baselines and probes are rerunEvery drift case reverts and requires the baseline to pass again before the next case runs.
The pending case is recorded as
pendinginresults.json, raises a::warningannotation and appears in the step summary. The suite exits non-zero unless exactly one case is pending and none failed, so the pending case can never become a silent pass. When Pipeline pins a sequence, setUPGRADE_SEQUENCEto a file of<admin|owner> <pipeline-relative .sql>lines and the positive case runs its checks. As a sanity check, running locally with an empty sequence correctly fails it, because the role is still absent.Results
Local (Docker Desktop, PostgreSQL 16.16 container capped at 768 MB, Bun container at 768 MB/1 GB, through the shared heavy queue): 16 passed, 0 failed, 1 pending, 1 observation. No generated password appears in any artifact or in the server log.
CI, on the
hoopdb-two-login-upgradejob inlint.yml(GitHub-hosted runner, PostgreSQL 16 service container, no published port):8589d665, job 141401045258: 16 passed, 0 failed, 1 pending, 1 observation on PostgreSQL 16.16 with Pipeline60980e0e. No generated password appears in any artifact or the server log. The case table is in the job's step summary, andresults.jsonand per-case logs are in thehoopdb-two-login-upgradeartifact.staticonly becausefast-path.ymlwas stale. That file is regenerated here withscripts/ci/render-fast-path.py, andstaticpasses on the later heads.The suite also runs from
fast-path.yml's generatedlint-hoopdb-two-login-upgradejob.Review follow-up (Greptile): the final case now requires
bulls96_legacy_export_privacyto exist whenUPGRADE_SEQUENCEis set, and to be absent otherwise.🤖 Generated with Claude Code