Repository navigation
docs(go): an rc.5 changelog section - #1692
Conversation
Everything under Unreleased landed after the rc.4 tag, so it moves under a dated rc.5 heading. The section records three changes that had no entry. The EQL v4 bundle built from next differs from the one attached to rc.4: it adds 1,060 function and operator pairs that refuse a comparison between two EQL types, which PostgreSQL otherwise answered as plain jsonb, returning false for equal values (#1547). Its comparison functions also name the schema of every built-in operator they call (#1551, #1667). The crypto guest wipes more plaintext copies (#1643), and the host no longer leaves data in a guest buffer when a write fails (#1550). The upgrade note follows rc.3's: install the attached bundle, then grant access again and re-create the indexes, because the bundle drops the eql_v4 schemas with CASCADE. The uninstall script is unchanged, go.mod is unchanged, and no generated file changes.
|
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the
|
cipherstash-agent
left a comment
There was a problem hiding this comment.
Review attestation
Reviewed 085d8215 · posted from Claude Code · claude-opus-5-5 · effort medium
Sources: code-review · claude-opus-5-5
Skills: code-review, rust-security, review-cross-check
Findings (6): 2 major, 4 minor — 6 inline, 0 below.
rust-security found nothing to apply: the diff is Markdown only. Nine findings were raised; each was verified at head. Two were refuted: stashgen's run closing its engine is not user-visible (unexported in package main, called once), and lost ALTER DEFAULT PRIVILEGES cannot affect bundle-created functions, since every install drops the schema first. Not posted, for the author to decide: whether #1547 (a query that silently returned false now raises) belongs under Fixed, Changed, or Breaking.
Generated by Claude Code
| - **The bundle's comparison functions name the schema of each built-in | ||
| operator and function they call** (#1551, #1667). For example, the | ||
| functions write `OPERATOR(pg_catalog.@>)` and | ||
| `pg_catalog.cardinality(...)`. A `search_path` that puts another schema first can no longer | ||
| change which operator a comparison uses. `eql_v4.between` gets the same | ||
| change. |
There was a problem hiding this comment.
major This entry describes a wrong-result bug as hardening. With public off the search_path (a SECURITY DEFINER function with SET search_path = '', or a hardened role), rc.4's eql_v4.lt/eq/between on *OrdOre columns resolved the bare ORE operator to pg_catalog's record comparison and returned wrong rows with no error (169f985; the ORE fix is OPERATOR(public.<), not only pg_catalog). Move it under Fixed, name that trigger and effect, and tell readers to re-check rc.4 results from such sessions.
Source: code-review · claude-opus-5-5 (verified by review-cross-check)
Generated by Claude Code
There was a problem hiding this comment.
Fixed in 2df1aa6. Confirmed on an rc.4 install: ord_term_ore returns eql_v4_internal.ore_block_v2, a composite type whose < is in public. With search_path = pg_catalog, a bare < on two terms returned false through PostgreSQL's record comparison. With public on the path, the same expression reached EQL's ORE comparison. The entry is now under Fixed. It names the affected types (the …OrdOre types and TextSearchOre), the trigger (SECURITY DEFINER with SET search_path = '', or a role without public), and the effect. The upgrade note tells readers to check results they got from rc.4 if the case applies. The pg_catalog change for the other functions stays under Changed, with "results do not change".
| Re-running the bundle keeps your columns and data, because the column types | ||
| are in the `public` schema. The bundle drops the `eql_v4` and | ||
| `eql_v4_internal` schemas with `CASCADE`, and creates them again. That | ||
| removes every index that uses an `eql_v4` function, such as | ||
| `eql_v4.ord_term(col)`. Dropping the schemas also removes every grant on |
There was a problem hiding this comment.
major DROP SCHEMA ... CASCADE also drops the public EQL operators (their FUNCTIONs live in eql_v4/eql_v4_internal) and every user object depending on them or on an eql_v4 function: views, RLS policies, CHECK constraints, column defaults, and generated columns with their data. Reproduced on PG16: a restrictive RLS policy using an EQL operator is silently dropped (access widens), or a sole permissive one is (all rows denied), and steps 1-2 never re-create it; this also contradicts "keeps your columns and data". Add a step 0 to list them first (BEGIN; DROP SCHEMA eql_v4 CASCADE; ROLLBACK; and read the NOTICE, or query pg_depend), script their DDL, and re-create them after the bundle; the rc.3 note at line 183 has the same gap.
Source: code-review · claude-opus-5-5 (verified by review-cross-check)
Generated by Claude Code
There was a problem hiding this comment.
Fixed in 2df1aa6. Reproduced on PostgreSQL 17: re-running the bundle dropped a view, a restrictive RLS policy, and a CHECK constraint that use EQL, as well as the index, and left the permissive policy in place. The notice lists only the first 100 of the 4,402 objects dropped, so the steps use a query instead of reading the notice. The query lists objects outside the EQL schemas that depend on an EQL function, operator, or type. It listed exactly the dropped objects on rc.4 and on rc.5, and nothing on a fresh install. The note now says to run it, save each definition, install, re-create, and run it again. The domains' own CHECKs survived, so "columns and their data stay" still holds. I left the rc.3 note unchanged: it is a released entry, and anyone upgrading to rc.5 follows the rc.5 steps.
| needs the new SQL. But with the rc.4 bundle, PostgreSQL gives wrong | ||
| results for some comparisons. The rc.5 bundle refuses them, as the Changed | ||
| section below describes. |
There was a problem hiding this comment.
minor "The rc.5 bundle refuses them" is true only of #1547. The #1551/#1667 wrong results are corrected, not refused, so a reader who never saw a refusal is told they were unaffected. Say rc.5 refuses one class and corrects the other, and point at both entries.
Source: code-review · claude-opus-5-5 (verified by review-cross-check)
Generated by Claude Code
There was a problem hiding this comment.
Fixed in 2df1aa6. The note now says the rc.5 bundle corrects the first case and refuses the second, and points to the Fixed section for both.
| the decoding of JSON paths and predicates, and the opening of a sealed | ||
| JSON document. Stored values and query terms do not change. | ||
|
|
||
| ### Fixed |
There was a problem hiding this comment.
minor Fixed omits the stack-auth/stack-profile changes the Go auth guest builds in by path, which apply without workspace pinning: Token::refresh_with now clamps expires_in via expires_at_after (a076649; the rc.4 release guest wrapped an oversized value to an already-expired token, so every request refreshed), and auth.json/secretkey.json buffers are now wiped (SecretBuf, 8cc9c40). The PR's reason for omitting stack-auth fixes holds only for the pinning commits. Add a Fixed entry for both.
Source: code-review · claude-opus-5-5 (verified by review-cross-check)
Generated by Claude Code
There was a problem hiding this comment.
| - **The bundle's comparison functions name the schema of each built-in | ||
| operator and function they call** (#1551, #1667). For example, the | ||
| functions write `OPERATOR(pg_catalog.@>)` and | ||
| `pg_catalog.cardinality(...)`. A `search_path` that puts another schema first can no longer |
There was a problem hiding this comment.
minor This line is 93 characters, the only one over ~76 in the rc.5 section. Re-wrap lines 71-74.
Source: code-review · claude-opus-5-5 (verified by review-cross-check)
Generated by Claude Code
There was a problem hiding this comment.
Fixed in 2df1aa6. The section is re-wrapped, and no line in it is longer than 79 characters.
| Your Go code needs no change. `AccessKeyCredentials` is new. You can choose | ||
| to use it. |
There was a problem hiding this comment.
minor encrypt.Secret is also new in rc.5 (see Added), but this sentence names only AccessKeyCredentials.
| Your Go code needs no change. `AccessKeyCredentials` is new. You can choose | |
| to use it. | |
| Your Go code needs no change. `AccessKeyCredentials` and its `Secret` type | |
| are new. You can choose to use them. |
Source: code-review · claude-opus-5-5 (verified by review-cross-check)
Generated by Claude Code
There was a problem hiding this comment.
Applied in 2df1aa6, worded as two sentences: "AccessKeyCredentials and its Secret type are new. You can choose to use them."
From the review of 085d821, each checked against the rc.4 and rc.5 bundles: - The ORE comparison functions in rc.4 called a bare `<` or `=` on eql_v4_internal.ore_block_v2, a composite type whose operators are in public. With public off the search_path, PostgreSQL resolved them to its record comparison: on an rc.4 install, `<` under `search_path = pg_catalog` compared the raw bytes and returned false, where `public` on the path reaches EQL's ORE comparison. This is a wrong-result fix, so it moves to Fixed and says when it applied. - Re-running the bundle drops more than the indexes and grants. Tested on PostgreSQL 17: a view, a restrictive row-level security policy and a CHECK constraint that use EQL were all dropped without an error, and dropping the restrictive policy left the table more visible. The notice lists only the first 100 of the 4,402 objects dropped. The upgrade steps now start with a query that lists them, tested to list exactly those objects on rc.4 and rc.5 and nothing on a fresh install. - The cross-type blockers (#1547) move to Fixed too: they turn a silent false into an error. - Two credential-guest fixes from #1553 apply without workspace pinning and are now listed: an oversized expires_in no longer makes every request refresh, and profile files are read into a wiped buffer. - The upgrade note names Secret beside AccessKeyCredentials, and one long line is re-wrapped. The section is rewritten to the plain-language rules: one idea in each sentence of 25 words or fewer, a condition before its instruction, and ORE spelled out.
|
This replies to the review summary. Each of the six inline findings has its own reply. All six are fixed in 2df1aa6. On the open question of where #1547 belongs: it is now under Fixed. Before #1547, a comparison between two EQL types returned false with no error. That is a wrong result, and #1547 turns it into an error. The entry says that a query that returned no rows now fails, so a reader can find any query that depended on the old result. I did not list it as Breaking, because no correct query changes behaviour. |
Summary
This PR moves the Go module's Unreleased changelog entries under a dated
0.1.0-rc.5heading, so that rc.5 can be released fromnextafter it merges. The section also records three changes that were merged intonextafter rc.4 with no entry. It also adds an upgrade note.Changes
eql_v4schemas withCASCADE. That also drops the user's indexes, views, row-level security policies, andCHECKconstraints that use EQL, without an error. So the note now lists six steps:ANALYZE.publicwas not on thesearch_path(fix(eql): schema-qualify operators in comparison wrapper bodies #1551, chore: merge main into next #1667).AccessKeyCredentialsandSecret(feat(golang): add AccessKeyCredentials, a credentials struct with env tags #1690). These entries were already under Unreleased.How I checked the entries
nextwithmise run --force build --version go-0.1.0-rc.5. I compared it with theeql-v4-install.sqlattached to the rc.4 release, ignoring the version stamp.pg_catalogoperators.go.modis unchanged since rc.4. So is every generated*_stash.gofile. The guest lockfiles have only minor dependency bumps: tokio, uuid, and open.CHECKconstraint, and an index that use EQL. The query in step 1 listed exactly those objects on rc.4 and on rc.5. On a fresh install, the query listed nothing.<on two ORE terms undersearch_path = pg_catalogreturnedfalsethrough PostgreSQL's record comparison. Withpublicon the path, the same expression reached EQL's ORE comparison.CS_WORKSPACE_CRNpins a workspace. Go'sAutoCredentialsnever pins one. The two fix(stack-auth,stack-profile): clamp server expires_in and wipe secret buffers #1553 fixes above apply without pinning, so they are listed.Not covered
AutoCredentialsnow differs from Rust in one case. IfCS_WORKSPACE_CRNis set withoutCS_CLIENT_ACCESS_KEY, Rust uses that workspace's session and client key (since db76cf4 and 77f9fef). Go uses the current workspace. This PR does not change that.Related
After this merges, the release is
gh workflow run release-golang.yml -f version=0.1.0-rc.5 --ref next.