You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(stack): address code-review findings on the v3 integration harness (round 2)
- types.ts: exclude ORE (`*_ord_ore`) columns from `V3OrderableKeys` at COMPILE
time (they are orderAndRange-capable but not sortable through a jsonb path), so
`.order(oreCol)` is a type error matching the runtime rejection — no more
green-typecheck-then-500. Pinned with a `@ts-expect-error` in the type tests.
- relational: re-add the deleted `not(between())` precedence test — `between`
emits a two-clause conjunction and the passthrough `not` relies on
`v3Dialect.range` parenthesising it; the only surviving `not` test wrapped a
single-clause `eq` and could not catch a paren regression. Asserts ROW_C is
kept, which the buggy `value < bound` form would drop.
- relational: run-scope the table names (`_${RID}`) and DROP them in teardown,
like the family suites — a fixed name races a concurrent run's `beforeAll` DROP
on a shared/persistent DB.
- supabase adapter `expectRejected`: stop counting an arbitrary throw as a valid
rejection (it matched its own sentinel by message substring). Now a thrown
rejection must carry the `[supabase v3]` marker; a stray TypeError/network
error rethrows and fails the test.
- query-builder-v3: drop the cached `selectKeyToDb` field (a side effect of
`buildSelectString` read later by `postprocessDecryptedRow`) — derive it inline
from `this.selectColumns` so a reused builder can't postprocess with a stale
select map.
- vitest.shared.ts: add the bare `@cipherstash/stack` runtime alias (last, so the
subpaths still win) — both sibling tsconfigs map it, and without it a bare-
specifier importer would resolve to `dist/`, re-coupling `pnpm test` to a build.
- integration workflows: broaden the path filters to the source layers the
adapters' encoding rests on (`src/encryption`, `src/schema`, `packages/schema`)
so a break there triggers the live wire/round-trip suites.
Note: the `orderColumnName` bare-fallback finding was investigated and found to
be a non-issue — `validateTransforms` runs before the query executes and rejects
the column with a domain-specific message, so the bare name is only an
intermediate value on an about-to-be-rejected request. Corrected the misleading
comment instead of adding a throw (which regressed that message).
Claude-Session: https://claude.ai/code/session_01MxTTPaPP16m6br7Hoab94w
0 commit comments