fix: update_dataset_metadata handles partial update dicts without KeyError#76
Merged
BeckettFrey merged 2 commits intoreleasefrom Apr 8, 2026
Merged
Conversation
…Error Agent-Logs-Url: https://github.com/BrainBehaviorAnalyticsLab/voxkit-desktop/sessions/26ca3ecd-bd76-4725-a6cc-05070880986d Co-authored-by: BeckettFrey <83560790+BeckettFrey@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix KeyError in update_dataset_metadata for partial updates
fix: update_dataset_metadata handles partial update dicts without KeyError
Apr 8, 2026
Member
|
LGTM |
BeckettFrey
added a commit
that referenced
this pull request
Apr 9, 2026
) * fix: render View button in alignment action cells (#74) * Initial plan * fix: add layout.addWidget(view_btn) in _create_alignment_action_buttons Agent-Logs-Url: https://github.com/BrainBehaviorAnalyticsLab/voxkit-desktop/sessions/fd065a62-0e2c-4934-aae9-9420824c8957 Co-authored-by: BeckettFrey <83560790+BeckettFrey@users.noreply.github.com> * fix: correct alignment dict key references in _view_alignment --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: BeckettFrey <83560790+BeckettFrey@users.noreply.github.com> * fix: update_dataset_metadata handles partial update dicts without KeyError (#76) * Initial plan * fix: update_dataset_metadata handles partial update dicts without KeyError Agent-Logs-Url: https://github.com/BrainBehaviorAnalyticsLab/voxkit-desktop/sessions/26ca3ecd-bd76-4725-a6cc-05070880986d Co-authored-by: BeckettFrey <83560790+BeckettFrey@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: BeckettFrey <83560790+BeckettFrey@users.noreply.github.com> * Fix empty-state never shown on Datasets page (#77) * Initial plan * Fix empty-state bug in refresh_datasets: check metadata_list not the datasets module Agent-Logs-Url: https://github.com/BrainBehaviorAnalyticsLab/voxkit-desktop/sessions/9a9edc69-7179-41de-9459-9a6f265a0cf3 Co-authored-by: BeckettFrey <83560790+BeckettFrey@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: BeckettFrey <83560790+BeckettFrey@users.noreply.github.com> * fix: reload_models iterates all engines instead of hardcoding W2TGENGINE (#75) * Initial plan * fix: reload_models iterates all engines instead of hardcoding W2TGENGINE Agent-Logs-Url: https://github.com/BrainBehaviorAnalyticsLab/voxkit-desktop/sessions/003f14fe-b32d-4938-9a69-f6efc8a5087d Co-authored-by: BeckettFrey <83560790+BeckettFrey@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: BeckettFrey <83560790+BeckettFrey@users.noreply.github.com> * Batch ci fixes (#83) * lint: auto fixes applied * format: auto fixes applied * ci: all passing * typecheck: passing and issues resolved (no checking untyped defs for now) * ci: small fix for tests passing * fix: attach ci actions to makefile commands * ci: cut up testing into os dedicated workflows for visibility --------- Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
update_dataset_metadataused direct key access on theupdatesdict, requiring callers to supply all four fields (description,cached,anonymize,transcribed) even when only updating one. A partial dict like{"description": "new desc"}would raiseKeyError: 'cached', caught and surfaced as"Invalid metadata key: 'cached'"— misleading sincecachedis valid, just absent.Changes
src/voxkit/storage/datasets.py— replace four separateupdates["field"]guards with a single loop usingfield in updatesmembership check:Also drops the stale
KeyErrorfrom theRaisesdocstring.tests/storage/test_datasets.py— addstest_update_dataset_metadata_missing_keyspassing a genuinely partial dict (keys entirely absent, not justNone) and asserting only the provided field changes.Testing
Testing Notes: Existing tests already covered
None-value passthrough; new test covers the actual bug path (absent keys). Logic validated in isolation against both old and new behavior.Documentation
Documentation Notes: Removed misleading
KeyErrorfromRaisesdocstring.Checklist
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
astral.sh/usr/bin/curl curl -LsSf REDACTED(dns block)If you need me to access, download, or install something from one of these locations, you can either: