Skip to content

sqlitedb: _is_safe_uid delegates to did.file.is_safe_uid - #96

Merged
stevevanhooser merged 1 commit into
mainfrom
claude/is-safe-uid-delegate
Oct 24, 2026
Merged

stevevanhooser merged 1 commit into
mainfrom
claude/is-safe-uid-delegate

Conversation

@stevevanhooser

Copy link
Copy Markdown
Contributor

Small cleanup found while writing the bridge entries in #91.

  • The problem: the docstring of did.file.is_safe_uid says SQLiteDB._is_safe_uid delegates to it, but _is_safe_uid was a separate copy of the same predicate. The two bodies agreed, so there was no bug yet, just two copies that could drift apart.
  • The fix: _is_safe_uid now calls is_safe_uid, the way MATLAB's sqlitedb.isSafeUid calls did.file.isSafeUid. There's no behaviour change.
  • Bridge entries: both isSafeUid entries, the implementations one and the file one, are updated to say it delegates.
  • Tests: the existing path-traversal tests already cover _is_safe_uid's behaviour, so there are no new ones.

Locally: black --check, ruff check (0.16.5), pytest (800 passed) and check_bridge_coverage.py (0 problems).


Generated by Claude Code

The docstring of did.file.is_safe_uid said SQLiteDB's _is_safe_uid
delegated to it, but it was a separate copy of the same predicate. The
two bodies agreed, so behaviour is unchanged. _is_safe_uid now calls
is_safe_uid, as MATLAB's sqlitedb.isSafeUid calls did.file.isSafeUid, so
the check lives in one place. Both bridge entries are updated to match.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012Dn4gCNCU2jUGdmfPVCAGK
@stevevanhooser
stevevanhooser merged commit 0f0218d into main Oct 24, 2026
7 checks passed
@stevevanhooser
stevevanhooser deleted the claude/is-safe-uid-delegate branch October 24, 2026 15:31
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