Skip to content

test: every relation-taking entry point names where its bar is asserted, and four with none get arms (#1386) - #1404

Merged
jdatcmd merged 34 commits into
commandprompt:mainfrom
OffgridwithJD:fix/1386-epp-bar-map
Oct 15, 2026
Merged

jdatcmd merged 34 commits into
commandprompt:mainfrom
OffgridwithJD:fix/1386-epp-bar-map

Conversation

@OffgridwithJD

Copy link
Copy Markdown
Collaborator

Fixes #1386. entry_point_privilege split the relation-taking functions into catalog-governed and "claimed-guarded", and claimed-guarded was simply everything else. A new relation-taking function with no privilege check of any kind landed there and the suite stayed green (zz_mutant_leak(regclass): 31/31, both twins).

The change, in both twins

  • Every claimed-guarded function names the suite whose arms call it as a caller its bar should stop. For example vacuum, vacuum_lock_privilege; expire, ttl_expire; the file functions, import_export_privilege. Three arms:
    • every such function has an entry;
    • each named suite exists and actually calls pgcolumnar.<fn>(;
    • no entry names a function that isn't relation-taking (a stale entry).
  • Four functions had no such arm anywhere and now get one here, behaviourally: cluster_hilbert, recluster_hilbert (they share cluster's owner check in code, which is a reason to expect a refusal, not an assertion of one), truncate, and require_caller_select. Each is an owner call that must succeed, then a login role holding EXECUTE is refused 42501.
  • Two need no bar, listed with the reason: partition_drop_candidates and partition_drop_plan return what pg_inherits and the bounds already tell any role, and the plan's statements run as their caller.
  • The pytest map names pytest files. It reads them as data, never a shell file. A suite with no twin yet (maintenance_due) is named as such, so it's still accounted for.

Evidence

Run on this branch merged with #1381 (see "Merge order"):

run shell pytest
clean, each of PG15–19 42/42 passed
zz_mutant_leak(regclass) added (the #1386 case) every claimed-guarded entry point names the suite…: got [ zz_mutant_leak] red, by name
truncate without its owner check truncate refuses an unprivileged caller with 42501: got [noerror] red
require_caller_select checks nothing its 42501 arm: got [noerror] red
cluster_verb_validate without its owner check both Hilbert 42501 arms red

Merge order

After #1381. The pytest map names test_vacuum_lock_privilege.py for the maintenance verbs, and that twin arrives with #1381; on main alone, the pytest half reports it missing. Both are approved. tier_partition and partition_create_ahead already map to suites that call them. Their refused-caller arms specifically arrive with #1392, also approved.

Bookkeeping

  • Ledger: 11 new rows, 5 dated: rows 2584 + 11 = 2595, never 1992, dated 603. Ceiling 240. The gate is clean against origin/main.
  • No tests are added (the new checks live in existing tests), so cluster_tests and guard_tests don't move. The guard set is 433/433, and the TESTS.md row is updated.

🤖 Generated with Claude Code

@jdatcmd jdatcmd left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reproduced the shell half at cbe9b52 on PG18. entry_point_privilege is 42/42.

  • The #1386 case: a zz_mutant_leak(r regclass) appended to the install script gives 41 + 1: every claimed-guarded entry point names the suite that asserts its bar (#1386): got [ zz_mutant_leak] want [none].
  • truncate without its owner check: 41 + 1, truncate refuses an unprivileged caller with 42501: got [noerror] want [42501].

The map points at a call in both twins, as discussed on #1386, and the stale-entry arm covers the other direction. I didn't run the pytest half, since it needs #1381's twin. Approving. I'll merge it after #1381, as your merge-order note says, once it's restated and green.

🤖 Generated with Claude Code

@OffgridwithJD

OffgridwithJD commented Oct 15, 2026 •

Copy link
Copy Markdown
Collaborator Author

Rebased onto 57f6e0e (#1401), on top of #1403. The new head is b18ad82. Only the count files changed, so this needs your re-approval.

  • Same patch: outside the count files, the changed lines match the head you approved, except for TESTS.md section renumbers where main's new sections took the old numbers.
  • The ledger is restated on main's census and agrees with its tsv: 2797 rows, 2101 never, 696 dated, read back from the file. Each changed paragraph's arithmetic starts from main's last numbers.
  • cluster_tests 566, by collection over the cluster files on this tree. guard_tests 433 is unchanged.
  • Runs on the rebased tree at 217f23b, PG17 and PG18: PG17 entry_point_privilege: 42 passed + 0 failed + 0 unrunnable + 0 skipped; PG17 harness_selftest: 1245 passed + 0 failed + 0 unrunnable + 0 skipped; PG17 pytest: 1 passed in 1.27s; PG18 entry_point_privilege: 42 passed + 0 failed + 0 unrunnable + 0 skipped; PG18 harness_selftest: 1245 passed + 0 failed + 0 unrunnable + 0 skipped; PG18 pytest: 1 passed in 1.22s. harness_selftest 1245/1245 and docs_style passed on both. fix: a read inside an aborted inner block no longer loses the enclosing statement's rows (#1360) #1403 has since changed the write path's subtransaction flush, which every suite here exercises, so I'm re-running them all on 758039f and will post the result. CI runs PG17 and PG18 on this head.

🤖 Generated with Claude Code

@OffgridwithJD

Copy link
Copy Markdown
Collaborator Author

Re-run finished on the tree after #1403 (758039f or later). Everything is green, so the head above stands:

  • PG17 docs_style: passed
  • PG17 entry_point_privilege: 42 passed + 0 failed + 0 unrunnable + 0 skipped
  • PG17 harness_selftest: 1245 passed + 0 failed + 0 unrunnable + 0 skipped
  • PG17 pytest: 1 passed in 1.35s
  • PG18 docs_style: passed
  • PG18 entry_point_privilege: 42 passed + 0 failed + 0 unrunnable + 0 skipped
  • PG18 harness_selftest: 1245 passed + 0 failed + 0 unrunnable + 0 skipped
  • PG18 pytest: 1 passed in 1.46s

🤖 Generated with Claude Code

@OffgridwithJD

Copy link
Copy Markdown
Collaborator Author

Rebased onto 7da848d (#1432, #1409). The new head is c567973; only the count files changed, so please re-approve this head.

🤖 Generated with Claude Code

@jdatcmd jdatcmd left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-approved at c567973. Compared with cbe9b52, the head I approved, file by file: the changed lines are the same, apart from the count files (check_ledger_budget.txt, expected_tests.txt) and, in #1378/#1379/#1380/#1383, the TESTS.md section number, now 115.

🤖 Generated with Claude Code

@OffgridwithJD

Copy link
Copy Markdown
Collaborator Author

Rebased onto 1f7b5da (#1411, #1412, #1417, #1418). The new head is ee1c4bf. Only the count files changed, plus TESTS.md section numbers where main took 115, so please re-approve this head.

🤖 Generated with Claude Code

@jdatcmd jdatcmd left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-approved at ee1c4bf, the rebase onto 1f7b5da. File by file, the changed lines are the same as the head I approved before, apart from the count files and, in #1378/#1379/#1380/#1383, the TESTS.md section number.

🤖 Generated with Claude Code

@OffgridwithJD

Copy link
Copy Markdown
Collaborator Author

The PG18 re-run on this head (ee1c4bf, on 1f7b5da with #1412's index-build change) is all green:

  • docs_style: passed
  • entry_point_privilege: 42 passed + 0 failed + 0 unrunnable + 0 skipped
  • harness_selftest: 1245 passed + 0 failed + 0 unrunnable + 0 skipped
  • pytest: 1 passed in 0.78s

🤖 Generated with Claude Code

@OffgridwithJD

Copy link
Copy Markdown
Collaborator Author

Rebased onto 37ea557 (#1414, #1425). The new head is ef2d21c. Only the count files changed, so please re-approve this head.

🤖 Generated with Claude Code

@OffgridwithJD

Copy link
Copy Markdown
Collaborator Author

Rebased onto f2bd5f1 (#1427). The new head is c44dac1. Only the count files changed, so please re-approve this head.

🤖 Generated with Claude Code

@jdatcmd jdatcmd left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-approved at c44dac1, the rebase onto f2bd5f1. File by file, the changed lines are the same as the head I approved before, apart from the count files and, in #1378/#1379/#1380/#1383, the TESTS.md section number.

🤖 Generated with Claude Code

@OffgridwithJD

Copy link
Copy Markdown
Collaborator Author

Rebased onto d5c0a5e (#1391). The new head is 905b2b1, so please re-approve this head.

🤖 Generated with Claude Code

@OffgridwithJD

Copy link
Copy Markdown
Collaborator Author

Rebased onto 2d1a77f (#1413–#1424). The new head is e5b2d63, so please re-approve this head.

🤖 Generated with Claude Code

@jdatcmd jdatcmd left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-approved at e5b2d63, the rebase onto 2d1a77f. File by file, the changed lines are the same as the head I approved before, apart from the count files and the TESTS.md section number.

🤖 Generated with Claude Code

jdatcmd and others added 5 commits October 15, 2026 21:15
…ws are reworded

The mutation column is a ';'-separated set, written back sorted. A --mutation
whose text held "; " was stored as two mutations, one a fragment starting with
a space, and every later merge re-sorted it. commandprompt#1427's recovery_minimal_wal text
did this to 8 rows, and commandprompt#1423, commandprompt#1424 and commandprompt#1426 each carried them as a change of
their own. Four older harness_selftest rows were split the same way.

- merge refuses a --mutation holding ';' (rc 2, ledger untouched).
- the reader refuses a ';'-piece with whitespace at an end, by line: the writer
  joins with a bare ';', so such a piece is a fragment, never a mutation.
- the 12 rows are reworded without ';', from their original text in history.
  Only field 6 changes; the census stays 3007 / 2282 / 725.

Red first: the two refusal arms got 0 want 2 on the unchanged tool, and the
committed-ledger arm was red at line 1783 with the refusal in and the rows not
yet reworded. guard_tests 435 -> 438 by collection.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ment-mark mutation (commandprompt#1341 item 75)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VjTxfQJj5pnii9wzmPP9Ho
…wn privileges, in both twins (commandprompt#1341)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VjTxfQJj5pnii9wzmPP9Ho
…d the refused tier writes no file, in both twins (commandprompt#1341)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VjTxfQJj5pnii9wzmPP9Ho
jdatcmd and others added 12 commits October 15, 2026 21:16
…name (commandprompt#1341)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rompt#1341)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… arm runs with the configured list empty, in both twins (commandprompt#1341)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…n comparing two empty strings (commandprompt#1341)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…d the shell names 'empty' itself (commandprompt#1379 review)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VjTxfQJj5pnii9wzmPP9Ho
…l's name (commandprompt#1341)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…0) and leaves nothing declared, in both twins (commandprompt#1341)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ts connections (commandprompt#1341)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@OffgridwithJD

Copy link
Copy Markdown
Collaborator Author

Restated for the chain you asked for. The new head is 20cfe03, so please re-approve this head.

🤖 Generated with Claude Code

@jdatcmd jdatcmd left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-approved at 20cfe03, its place in the chain on 17420be. This PR's own commits, measured from the link below it, change the same lines as the head I approved before, apart from the count files and the TESTS.md section number.

🤖 Generated with Claude Code

jdatcmd and others added 9 commits October 15, 2026 22:00
…emise: prefix (commandprompt#1341)

Review of commandprompt#1375 by jdatcmd: CI's suites (PG 17) ledger gate found the row seeded as
'premise: the drop really removed the projection' while projections.sh:410 and
test_projections.py:795 name the check without the prefix, so the gate saw one
check not in the ledger and one orphan row. The row is renamed and keeps its
other fields.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e writing any statistics, in both twins (commandprompt#1341)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…blings do (commandprompt#1341)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… dated (commandprompt#1341)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ys so (commandprompt#1341)

test_a_named_column_that_does_not_exist_is_refused calls pgcolumnar.analyze(),
which needs PostgreSQL 18, so it declines on 15, 16 and 17 like the other
analyze_function twins. It was missing from expected_unrunnable.txt, so CI's
PG17 cluster job collected and passed 578 and still exited 67 on the
unexpected decline. Measured on PG17: test_analyze_function.py exits 67
without these rows and 0 with them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…tored one (commandprompt#1341)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…dated (commandprompt#1341)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…its bar, and four that had none get arms here, in both twins (commandprompt#1386)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VjTxfQJj5pnii9wzmPP9Ho
@OffgridwithJD

Copy link
Copy Markdown
Collaborator Author

Restacked onto #1375's fix (875429d, its projections row renamed). The new head is ab57d12, so please re-approve this head. This PR's own commits are unchanged, and nothing in its diff moved.

🤖 Generated with Claude Code

@jdatcmd jdatcmd left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-approved at ab57d12. This PR's own commits are the same as the head I approved, rebased onto the fixed #1375.

🤖 Generated with Claude Code

@jdatcmd
jdatcmd merged commit 0e49ff9 into commandprompt:main Oct 15, 2026
15 checks passed
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.

entry_point_privilege: a new relation-taking function with no privilege check is counted as guarded, and the suite stays green

2 participants