Skip to content

ci(splinter): drop 10 stale ore_cllw allowlist rows, add unused-row check (CIP-3489) - #402

Merged
freshtonic merged 1 commit into
eql-3.0.1from
james/cip-3489-splintersh-10-stale-ore_cllw-allowlist-rows-and-no-unused
Jul 16, 2026
Merged

ci(splinter): drop 10 stale ore_cllw allowlist rows, add unused-row check (CIP-3489)#402
freshtonic merged 1 commit into
eql-3.0.1from
james/cip-3489-splintersh-10-stale-ore_cllw-allowlist-rows-and-no-unused

Conversation

@freshtonic

@freshtonic freshtonic commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Closes CIP-3489.

The CLLW-OPE migration removed the ore_cllw surface from src/v3, but its tasks/test/splinter.sh allowlist rows survived — and nothing could ever catch them. The awk classifier only tested if (key in allow) per finding and never iterated allow[], so no allowlist row could ever be reported as unused. A future re-introduction of ore_cllw would arrive pre-waived.

Changes

  • Remove 10 inert rows. eql_v3_internal.ore_cllw_{eq,neq,lt,lte,gt,gte} and eql_v3.{ore_cllw,has_ore_cllw} + eql_v3_internal.{ore_cllw,has_ore_cllw}. Confirmed 0 non-comment ore_cllw references remain in src/v3, so these rows waived nothing. The live ope_cllw and ore_block_256 comparator rows are untouched.
  • Fix regressed prose on the 2 live rows that still described routing "via ore_cllw": eql_v3.lt (the jsonb_entry lt wrapper now routes ord_termope_cllw) and eql_v3.-> (the chained ste_vec recipe extracts via eq_term / ord_term).
  • Add a for (k in allow) unused-row check (tobyhede's point on the thread). Allowlist rows that match no finding now fail the gate — with a diagnostic and a CI step-summary "Stale allowlist rows" section — enforcing the same "registered but referenced by nothing" invariant the known-failures gate applies to suppressed tests. Comment (#…) and blank heredoc lines are skipped so they are never counted as unused.

Verification (live install, splinter@55db5b1, PG17)

  • Built + installed EQL fresh, ran the modified gate: raw=1180, allowlisted=1180, unmatched=0, unused=0, exit 0 — the 10 removed rows were genuinely inert and no other row became unused (so the new check won't break CI).
  • RED test: injected a bogus eql_v3.bogus_nonexistent_fn allowlist row → gate reports it "matched NO finding" and exits 1.
  • Also unit-tested the awk classifier in isolation (matched → allowlisted, unmatched finding → denied, unmatched row → unused, comment/blank skipped).

CI-only change, no changeset (per CLAUDE.md exclusions).

Summary by CodeRabbit

  • Bug Fixes
    • CI now detects and reports stale allowlist entries that no longer match any findings.
    • Test summaries now include a dedicated section for stale allowlist rows.
    • Updated function-search-path mutability checks and related allowlist entries for encrypted JSONB operations.

@coderabbitai

coderabbitai Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 1eb8073f-2dbd-447b-8dc1-ab3a2263d909

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

The splinter test script now tracks allowlist rows that match no findings, reports stale rows in console and GitHub Actions summaries, and fails CI when stale rows or unmatched findings exist. Encrypted-JSONB allowlist entries and justification text were also updated.

Changes

Splinter allowlist validation

Layer / File(s) Summary
Update encrypted-JSONB allowlist entries
tasks/test/splinter.sh
The eql_v3 lt justification changed, and ORE-CLLW constructor and presence-check entries were removed from the encrypted-JSONB allowlist region.
Track and gate unused allowlist rows
tasks/test/splinter.sh
Allowlist matching now records unused rows, reports them in console and GitHub Actions summaries, and fails when unmatched findings or stale rows exist.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

Suggested reviewers: coderdan, tobyhede

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the CI splinter allowlist cleanup and new unused-row check.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch james/cip-3489-splintersh-10-stale-ore_cllw-allowlist-rows-and-no-unused

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@freshtonic
freshtonic requested review from coderdan and tobyhede July 14, 2026 11:46
@freshtonic
freshtonic force-pushed the james/cip-3489-splintersh-10-stale-ore_cllw-allowlist-rows-and-no-unused branch from 9199d3f to 30c8ef2 Compare July 14, 2026 12:00
@freshtonic
freshtonic added this pull request to the merge queue Jul 16, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jul 16, 2026
…heck (CIP-3489)

The CLLW-OPE migration removed the `ore_cllw` surface, but its splinter allowlist
rows survived and nothing could catch them: the awk only tested `if (key in allow)`
per finding and never iterated `allow[]`, so no allowlist row could ever be
reported as unused — a future `ore_cllw` would arrive pre-waived.

- Remove the 10 inert rows: eql_v3_internal.ore_cllw_{eq,neq,lt,lte,gt,gte} and
  eql_v3.{ore_cllw,has_ore_cllw} + eql_v3_internal.{ore_cllw,has_ore_cllw}. No
  such functions exist in src/v3 any more, so the rows waived nothing.
- Fix regressed prose on the two live rows that still routed "via ore_cllw":
  eql_v3.lt (jsonb_entry lt now routes ord_term → ope_cllw) and eql_v3.-> (the
  chained ste_vec recipe extracts via eq_term / ord_term).
- Add a `for (k in allow)` unused-row check: allowlist rows that match no
  finding now fail the gate (with a CI step-summary section), enforcing the same
  "registered but referenced by nothing" invariant the known-failures gate uses.
  Comment/blank heredoc lines are skipped so they are never counted as unused.

Verified end-to-end against a live install (splinter@55db5b1): the gate stays
clean (raw=1180, allowlisted=1180, unmatched=0, unused=0, exit 0) after the row
removals, and an injected bogus row is correctly reported unused and fails the
gate (exit 1).
@freshtonic
freshtonic force-pushed the james/cip-3489-splintersh-10-stale-ore_cllw-allowlist-rows-and-no-unused branch from 30c8ef2 to fa31d49 Compare July 16, 2026 06:02
@freshtonic
freshtonic changed the base branch from main to eql-3.0.1 July 16, 2026 06:02
@freshtonic
freshtonic merged commit bbd4d18 into eql-3.0.1 Jul 16, 2026
20 checks passed
@freshtonic
freshtonic deleted the james/cip-3489-splintersh-10-stale-ore_cllw-allowlist-rows-and-no-unused branch July 16, 2026 06:16
freshtonic added a commit that referenced this pull request Jul 17, 2026
The merge queue ejects PRs when the sqlx shards fail with `53200 out of
shared memory`. Despite the wording this is not RAM exhaustion — it is
the shared lock table running out of slots, exactly as the error's own
hint ("You might need to increase max_locks_per_transaction") says.

max_locks_per_transaction is not a per-transaction cap; it sizes the
CLUSTER-WIDE lock table as max_locks_per_transaction * max_connections.
The shipped uninstaller drops both eql_v3 schemas with DROP ... CASCADE,
which locks every one of the ~5,682 objects it removes and holds them all
until commit (sqlx::raw_sql sends the script as one implicit
transaction). Measured: 5,689 locks for a single uninstall against a
stock table of 64 * 100 = 6,400 slots — 89% of the entire cluster's
budget in one transaction. Overlapping uninstalls exhaust it, and the
backends that then fail are mostly innocent tests that were merely
installing EQL, which is why this surfaces as `failed to apply
migrations` in unrelated tests.

Sharding is what tipped it over: the queue runs 2 shards where PRs run 4,
doubling test density per shard so the uninstall-heavy tests overlap.
Partitioning is a deterministic hash, so they land in the same shard on
every run — hence shard 2/2 failing on all four PG versions while the
same commit passes on the PR. This is not specific to one PR: #382, #401
and #402 ejected with the identical signature.

Raise max_locks_per_transaction to 1024 (102,400 slots), sized for the
worst case of nextest's 16 concurrent tests each uninstalling (~91k
locks). Verified on postgres:17: 6 concurrent uninstalls fail 5/6 at the
default and pass 6/6 at 1024. Costs ~42MB of shared memory (145MB ->
187MB), well inside the container's 2GB limit.

Add lock_capacity_tests.rs as a preflight gate so an undersized lock
table fails once, immediately, with a message naming the cause and the
fix — instead of six unrelated tests dying 20 minutes into CI with what
reads like an OOM. NB: a Postgres container created before this change
keeps the old setting, so local devs must recreate it
(mise run postgres:down && mise run postgres:up postgres-17).

Deliberately not "fixed" by giving the queue 4 shards: that would only
hide an undersized lock table until the catalog grew again.
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