Skip to content

fix(blackbox): a branch's start no longer writes 82 entries into its Blackbox - #229

Merged
SauravYadav12 merged 2 commits into
mainfrom
fix/v2-branch-ledger
Nov 11, 2026
Merged

SauravYadav12 merged 2 commits into
mainfrom
fix/v2-branch-ledger

Conversation

@SauravYadav12

Copy link
Copy Markdown
Collaborator

Fixes the two make integration-v2 failures on main since #221/#222 (401/403 → 403/403).

Cause

Every time a branch starts, healDblink runs ensureDblinkSQL. Since #221 that revokes EXECUTE on each of dblink's 41 functions, once from PUBLIC and once from db_client. The Blackbox records every GRANT and REVOKE, even one that changes nothing, so each start added 82 entries with no actor.

  • A restarted branch gained those 82 entries.
  • A branch made with fox ledger branch-before <id> starts once it's made, so it held 82 entries numbered after the entry it was made before.

Fix

Each REVOKE now runs only while the grant it removes exists. The check reads the function's ACL directly, with PUBLIC as grantee 0 and the default ACL for a function that has none.

  • A start that changes nothing records nothing.
  • A grant someone added is still taken away on the next start, and that REVOKE is recorded.

Tests

  • integration-v2 403/403
  • integration 936/936
  • Go unit tests in both editions (new: the REVOKEs are guarded by a look at the grant)
  • vet for macOS, Linux and Windows

Checked on the test VM: a branch's restart now adds 0 entries. A branch given 2 dblink grants lost both on restart, and the Blackbox recorded exactly those 2 REVOKEs.

…Blackbox

Each start revoked EXECUTE on dblink's 41 functions from PUBLIC and from
db_client again, and the Blackbox records every REVOKE, held or not. Each
REVOKE is now issued only while the grant it removes is there.
@vercel

vercel Bot commented Nov 11, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
foxbyte-get Ready Ready Preview Nov 11, 2026 4:50pm UTC

@SauravYadav12
SauravYadav12 merged commit 4680b73 into main Nov 11, 2026
8 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 11, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant