Merge pull request '[agent/codex:gpt-5.4-mini] Read ~/spec/code/core/go/store/RFC.md fully. Find features d...' (#50) from agent/read---spec-code-core-go-store-rfc-md-fu into dev
Some checks are pending
Security Scan / security (push) Waiting to run
Test / test (push) Waiting to run

This commit is contained in:
Virgil 2026-04-03 06:08:29 +00:00
commit 91a88075fa
3 changed files with 9 additions and 0 deletions

View file

@ -163,6 +163,9 @@ func (storeInstance *Store) queryJournalFlux(flux string) (string, []any, error)
}
func (storeInstance *Store) journalBucket() string {
if storeInstance.bucket != "" {
return storeInstance.bucket
}
if storeInstance.journal.bucketName == "" {
return defaultJournalBucket
}

View file

@ -45,6 +45,8 @@ type Store struct {
purgeWaitGroup sync.WaitGroup
purgeInterval time.Duration // interval between background purge cycles
journal journalDestinationConfig
bucket string
org string
closeLock sync.Mutex
closed bool
@ -64,6 +66,8 @@ func WithJournal(endpointURL, organisation, bucketName string) StoreOption {
organisation: organisation,
bucketName: bucketName,
}
storeInstance.bucket = bucketName
storeInstance.org = organisation
}
}

View file

@ -106,6 +106,8 @@ func TestStore_New_Good_WithJournalOption(t *testing.T) {
assert.Equal(t, "events", storeInstance.journal.bucketName)
assert.Equal(t, "core", storeInstance.journal.organisation)
assert.Equal(t, "http://127.0.0.1:8086", storeInstance.journal.endpointURL)
assert.Equal(t, "events", storeInstance.bucket)
assert.Equal(t, "core", storeInstance.org)
}
// ---------------------------------------------------------------------------