Repository navigation
fix(engine): hash the pg_query pins into the postgres fingerprint - #39
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
I reviewed the move of the pg_query pins into the Postgres crate's hashed sources, and checked the rebuilt artifact against the fingerprint test.
- Pins relocated:
PG_QUERY_COMMIT,LIBPG_QUERY_COMMITand their SHA-256s move toengine/postgres/vendor/pg_query-source.sh, andengine/build.shsources that file. It does so after itscd "$(dirname "$0")", so the relative path resolves. - Fingerprint coverage:
engine/postgres/build.rshashesvendor, and bothreylo_engine_build::source_hashand its TS mirror intests/fingerprint.test.tswalk that directory recursively, skipping only dotfiles. A pin change now changes the Postgres fingerprint. The.patched/pg_query/.sourcecheck inbuild.shstill keys the prepared copy on both commits plus the patch hash. - Artifact rebuilt:
node --experimental-strip-types --test tests/fingerprint.test.tspasses for all threeengine.wasmartifacts on this head. No CI workflow or script reads the pin variables out ofbuild.sh.
claude-opus-5-5 | 𝕏
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.

The Postgres engine's parser is the
pg_querycrate at a pinned commit, with the libpg_query commit its submodule names, both fetched byengine/build.sh --prepare. Those two commits lived inengine/build.sh, outside every directory an engine crate's build script hashes. Moving the parser to another commit therefore left the Postgres fingerprint unchanged. The loader keys its cache of analyses on that fingerprint, so analyses from the old parser stayed valid, and the artifact check intests/fingerprint.test.tscould not see a stalepackages/postgres/engine.wasm.engine/postgres/vendor/pg_query-source.sh, whichbuild.shsources. That directory is among the Postgres crate's hashed sources, so a new pin now changes the fingerprint, as a change to the patch beside it already did.packages/postgres/engine.wasmis rebuilt for the new fingerprint. Before the rebuild,tests/fingerprint.test.tsfailed on it, and nothing else in the engine changed.The SQLite amalgamation's version is already covered:
engine/sqlite/build.rsnames its directory.Cargo.lockstays out of the hash, because every engine shares it with the oracle and the build tooling, so an unrelated lockfile change would change every fingerprint.