[agent/codex:gpt-5.4-mini] Read ~/spec/code/core/go/store/RFC.md fully. Find features d... #118
1 changed files with 5 additions and 7 deletions
12
scope.go
12
scope.go
|
|
@ -751,14 +751,12 @@ func (scopedStore *ScopedStore) checkQuota(operation, group, key string) error {
|
|||
return core.E(operation, "quota check", err)
|
||||
}
|
||||
if existingGroupCount == 0 {
|
||||
// This group is new — check if adding it would exceed the group limit.
|
||||
knownGroupCount := 0
|
||||
for _, iterationErr := range scopedStore.backingStore.GroupsSeq(namespacePrefix) {
|
||||
if iterationErr != nil {
|
||||
return core.E(operation, "quota check", iterationErr)
|
||||
}
|
||||
knownGroupCount++
|
||||
// This group is new, so count existing namespace groups with the public helper.
|
||||
groupNames, err := scopedStore.backingStore.Groups(namespacePrefix)
|
||||
if err != nil {
|
||||
return core.E(operation, "quota check", err)
|
||||
}
|
||||
knownGroupCount := len(groupNames)
|
||||
if knownGroupCount >= scopedStore.MaxGroups {
|
||||
return core.E(operation, core.Sprintf("group limit (%d)", scopedStore.MaxGroups), QuotaExceededError)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue