feat: add SlotSet/SlotGet/SlotClear to Storage interface#2870
Merged
Conversation
Metadata slot operations for key-value pairs stored in issue metadata JSON. Used by gt for delegation tracking, hook state, and other per-issue data. - SlotSet: set or overwrite a metadata key - SlotGet: read a metadata key (error if not found) - SlotClear: remove a metadata key (no-op if absent) Implemented in DoltStore, EmbeddedDoltStore, and InstrumentedStorage. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
❌ 7 Tests Failed:
View the top 3 failed test(s) by shortest run time
To view more test analytics, go to the Test Analytics Dashboard |
This was referenced Mar 28, 2026
The configStore mock in jira/tracker_test.go was missing the three new Storage interface methods, causing go vet to fail. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.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.
Summary
Add metadata slot operations to the Storage interface — key-value pairs stored in issue metadata JSON. Used by gt for delegation tracking, hook state, and other per-issue data.
SlotSet(ctx, issueID, key, value, actor)— set or overwrite a keySlotGet(ctx, issueID, key)— read a key (error if not found)SlotClear(ctx, issueID, key, actor)— remove a key (no-op if absent)Implementation
Storageinterface ininternal/storage/storage.goDoltStore(internal/storage/dolt/slots.go)EmbeddedDoltStore(internal/storage/embeddeddolt/slots.go)InstrumentedStorage(internal/telemetry/storage.go)All implementations use get-modify-put on the issue's
MetadataJSON field via existingGetIssue/UpdateIssuemethods.Motivation
gt PR gastownhall/gastown#3166 needs these to eliminate bd CLI shell-outs for delegation and hook state management.
Test plan
go build ./...clean🤖 Generated with Claude Code