Skip to content

Read database access keys through one shared helper - #1542

Merged
adamtheturtle merged 1 commit into
mainfrom
adamtheturtle/vws-web-tools-issue-1500
Aug 27, 2026
Merged

Read database access keys through one shared helper#1542
adamtheturtle merged 1 commit into
mainfrom
adamtheturtle/vws-web-tools-issue-1500

Conversation

@adamtheturtle

Copy link
Copy Markdown
Member

Closes #1500.

The "two grey boxes per key section" assumption was written out three times — twice in get_database_details and once in get_vumark_database_details — each as a wait spelling the rule one way, followed some lines later by [0] and [1] spelling it another, with a locally-scoped expected_key_boxes in between. Nothing tied the wait to the indexing except reading both.

_wait_for_access_keys and _access_key_pair now hold that rule in one place, and _access_key_pair's docstring states the precondition it depends on and that boxes past the first two are ignored, so adding a third does not silently change what comes back.

To be accurate about the reported symptom: an IndexError is not reachable today. The wait requires at least two filled boxes before either function indexes anything, so a section with fewer raises TimeoutException — and get_database_details is wrapped in the tenacity retry, which retries exactly that. What was wrong is that the invariant was duplicated and separated from its use, not that it could be violated.

No behaviour change, so no newsfragment.

🤖 Generated with Claude Code

https://claude.ai/code/session_01YJDy3qA1LyNTh11zS98ukM

Closes #1500

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YJDy3qA1LyNTh11zS98ukM
@adamtheturtle
adamtheturtle force-pushed the adamtheturtle/vws-web-tools-issue-1500 branch from 6f53c1b to d2d6054 Compare August 27, 2026 08:05
@adamtheturtle
adamtheturtle merged commit 2d4499c into main Aug 27, 2026
29 checks passed
@adamtheturtle
adamtheturtle deleted the adamtheturtle/vws-web-tools-issue-1500 branch August 27, 2026 10:12
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.

get_database_details assumes exactly two grey boxes per key section

1 participant