instance_id stringlengths 10 65 | repo stringlengths 5 59 | pr_number int64 1 313k | task_type stringclasses 1
value | base_commit stringlengths 40 40 | review_commit stringlengths 40 40 | title stringlengths 2 282 | body stringlengths 7 3k | patch stringlengths 202 204k | n_defects int64 1 72 | n_supported int64 1 65 | n_major int64 0 32 | defects stringlengths 140 18.8k | certifier_count int64 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
sourcenetwork__defradb__1541 | sourcenetwork/defradb | 1,541 | defect | d1ace768a1e4f02d26f9e319dd31aea79a9ea378 | 4312f463260bdbdf7ac5eaa81c6c8df2ec730712 | fix: Filter splitting and rendering for related types | ## Relevant issue(s)
Resolves #1539, #1540
## Description
Fixes the filter splitting of related types issue. This issue was also directly related to the rendering of these related filters within the explain requests, so this PR covers both.
## Tasks
- [x] I made sure the code is well commented, particula... | diff --git a/planner/mapper/targetable.go b/planner/mapper/targetable.go
index 1d2861f23f..36047b9a47 100644
--- a/planner/mapper/targetable.go
+++ b/planner/mapper/targetable.go
@@ -86,6 +86,52 @@ func NewFilter() *Filter {
}
}
+func (f *Filter) ToMap(mapping *core.DocumentMapping) map[string]any {
+ return filte... | 5 | 4 | 1 | [{"id": "G0", "claim": "Reviewer asks whether the value under a PropertyIndex key could ever be something other than a map[connor.FilterKey]any, questioning the unchecked type assertion `subObj := v.(map[connor.FilterKey]any)` in filterObjectToMap.", "category": "correctness", "verdict": "opposed", "priority": "P3", "s... | null |
sourcenetwork__defradb__1625 | sourcenetwork/defradb | 1,625 | defect | 5e35e008e97040528320a98d7fcc15a1fd0715b4 | cc23fdc743782aef851efc8ce67a5ad04e8b2e22 | feat: Schema list API | ## Relevant issue(s)
Resolves #1624
## Description
This PR adds an API for listing schemas.
### HTTP
`curl http://localhost:9181/api/v0/schema/list`
#### Output
```
{
"data": {
"collections": [
{
"name": "User",
"id": "bafkreibpnvkvjqvg4skzlijka5xe63zeu74ivcjwd76q... | diff --git a/api/http/handlerfuncs.go b/api/http/handlerfuncs.go
index d6e90af778..45a18c6315 100644
--- a/api/http/handlerfuncs.go
+++ b/api/http/handlerfuncs.go
@@ -26,6 +26,7 @@ import (
"github.com/multiformats/go-multihash"
"github.com/pkg/errors"
+ "github.com/sourcenetwork/defradb/client"
corecrdt "githu... | 4 | 4 | 2 | [{"id": "G0", "claim": "A unit test for the listSchemaHandler should be added to show the expected output and catch future changes to the schema structure, ideally also covering the error paths.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The `result... | null |
sourcenetwork__defradb__1699 | sourcenetwork/defradb | 1,699 | defect | e6c57708d8f821babc39a622f266a4e821e4e3be | d237572003318a01e9bb23c5d10f86a3eeebd9e4 | test: Expand backup integration tests | ## Relevant issue(s)
Resolves #1696
## Description
Expands the backup integration tests, and fixes an invalid schema declaration.
Documents https://github.com/sourcenetwork/defradb/issues/1697
I went over the CLI tests too, but found no gaps. | diff --git a/tests/integration/backup/one_to_one/import_test.go b/tests/integration/backup/one_to_one/import_test.go
index a323561aa3..685741221b 100644
--- a/tests/integration/backup/one_to_one/import_test.go
+++ b/tests/integration/backup/one_to_one/import_test.go
@@ -151,7 +151,8 @@ func TestBackupImport_WithMultipl... | 3 | 3 | 1 | [{"id": "G0", "claim": "The self-reference import tests use hand-written import content that a real export would not produce (it lacks `_newKey`), so the tests should use the generated export as the import content (or otherwise valid content).", "category": "testing", "verdict": "supported", "priority": "P1", "scope": ... | null |
sourcenetwork__defradb__1701 | sourcenetwork/defradb | 1,701 | defect | de8540ac547376481921abce3608f84ce1a9d1d1 | 6df104715f0511149b006c963d2b525a554ac7e3 | fix(i): Add self reference import handling | ## Relevant issue(s)
Resolves #1697
## Description
This PR add the capability to handle self referencing docs on import.
## Tasks
- [x] I made sure the code is well commented, particularly hard-to-understand areas.
- [x] I made sure the repository-held documentation is changed accordingly.
- [x] I mad... | diff --git a/db/backup.go b/db/backup.go
index 0356f5928f..89925a6c53 100644
--- a/db/backup.go
+++ b/db/backup.go
@@ -69,6 +69,19 @@ func (db *db) basicImport(ctx context.Context, txn datastore.Txn, filepath strin
return NewErrJSONDecode(err)
}
+ // check if self referencing and remove from docMap for key... | 2 | 1 | 0 | [{"id": "G0", "claim": "The self-reference import handling in db/backup.go does not look like it will work with TestBackupSelfRefImport_SplitPrimaryRelationWithSecondCollection_NoError once the export is fixed, so the PR should wait for the comprehensive tests added in the PR that found the bug to be sure it is fixed."... | null |
sourcenetwork__defradb__1746 | sourcenetwork/defradb | 1,746 | defect | 602134e7b4abc7b77f80049c7c409719d3bf5bfd | dd99a110b25627d678efdec12b63883edd6244dd | refactor: Simplify fetcher interface | ## Relevant issue(s)
Resolves #1589
## Description
Simplifies the fetcher interface, removing 2 of the 3 FetchFoo functions. As well as making it simpler, this also means that all (one) of the functions have to behave in the same way (e.g. deleted doc support).
There is a fair amount going on here, suggest ... | diff --git a/db/fetcher/encoded_doc.go b/db/fetcher/encoded_doc.go
index ec3803a2fa..35432e0a66 100644
--- a/db/fetcher/encoded_doc.go
+++ b/db/fetcher/encoded_doc.go
@@ -22,6 +22,13 @@ type EncodedDocument interface {
// Key returns the key of the document
Key() []byte
SchemaVersionID() string
+ // Status return... | 2 | 2 | 1 | [{"id": "G0", "claim": "The `decodedpropertyCache` field should be properly camelCased as `decodedPropertyCache`.", "category": "maintainability", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "In encodedDocument.Properties the `onlyFilterProps` filter check should run before t... | null |
sourcenetwork__defradb__1768 | sourcenetwork/defradb | 1,768 | defect | 480f1a9ab473bbd0f6df18de5fd6d3fb48ddb705 | f59cc2280e68a207fff013505dfbab9995a66cda | fix: Handle the querying of secondary relation id fields | ## Relevant issue(s)
Resolves #1654
## Description
Handles the querying of secondary relation id fields.
It does this by joining the related object and copying the dockey value into the secondary related id field.
- ~~Is currently blocked by https://github.com/sourcenetwork/defradb/issues/1769 but can st... | diff --git a/planner/mapper/mapper.go b/planner/mapper/mapper.go
index 5b823f6ec2..b293eb2a76 100644
--- a/planner/mapper/mapper.go
+++ b/planner/mapper/mapper.go
@@ -93,6 +93,11 @@ func toSelect(
return nil, err
}
+ fields, err = resolveSecondaryRelationIDs(descriptionsRepo, desc, mapping, fields)
+ if err != n... | 3 | 1 | 0 | [{"id": "G0", "claim": "A test should be added in the one_to_one_to_one package querying Book with joins on both Author and Publisher, to confirm that two or more joins on one object work as expected in makeTypeJoinOne.", "category": "testing", "verdict": "opposed", "priority": "P2", "scope": "pre_existing"}, {"id": "G... | null |
sourcenetwork__defradb__1818 | sourcenetwork/defradb | 1,818 | defect | 856ff58bb04a5ff70d96d3cfdda6cc001ca3eb4d | 633f90b509e1025e82dba5d09e17b42d436322f0 | test(i): Test UpdateDoc tests with gql and Collection.Save | ## Relevant issue(s)
Resolves #1816
## Description
Adds a new make command and CI action to test any test with a defined `UpdateDoc` test action using an equivalent GQL request (using id param to target). This enforces consistency across both (future=all) mutation pathways, without any notable effort from us ... | diff --git a/.github/workflows/test-gql-mutations.yml b/.github/workflows/test-gql-mutations.yml
new file mode 100644
index 0000000000..58928caeb4
--- /dev/null
+++ b/.github/workflows/test-gql-mutations.yml
@@ -0,0 +1,55 @@
+# Copyright 2022 Democratized Data Foundation
+#
+# Use of this software is governed by the Bu... | 3 | 1 | 0 | [{"id": "G0", "claim": "The new workflow's name should be renamed to follow the repo's naming convention, ending with `Workflow` (suggested 'Test GQL Mutations Workflow', or 'Run GQL Mutation Tests Workflow' to match the other test workflow).", "category": "maintainability", "verdict": "supported", "priority": "P2", "s... | null |
sourcenetwork__defradb__1870 | sourcenetwork/defradb | 1,870 | defect | 482be749b60f33ba69fba4afa1ac48c03337eb9b | 3bf0f63ea0fcf44b3ef6feb8d519b10181a7ca4c | test(i): Test top level agg. wt compound relational filter | ## Relevant issue(s)
Resolves #1868
## Description
Adds a test for aggregates with a compound relational filter.
Documents https://github.com/sourcenetwork/defradb/issues/1869
I believe this predates the release, and may be a fiddly fix with lots more testing required, so I'm documenting it now and movin... | diff --git a/tests/integration/query/one_to_many/with_cid_dockey_test.go b/tests/integration/query/one_to_many/with_cid_dockey_test.go
index b792db5492..aa8dd1906e 100644
--- a/tests/integration/query/one_to_many/with_cid_dockey_test.go
+++ b/tests/integration/query/one_to_many/with_cid_dockey_test.go
@@ -60,7 +60,7 @@... | 2 | 1 | 1 | [{"id": "G0", "claim": "AssertPanicAndSkipChangeDetection does not work with the http client, so the new test will not pass until that is sorted out.", "category": "correctness", "verdict": "supported", "priority": "P0", "scope": "introduced"}, {"id": "G1", "claim": "Rename AssertPanic (and its doc comment) to AssertPa... | null |
sourcenetwork__defradb__2033 | sourcenetwork/defradb | 2,033 | defect | 11e1efbde6297f7d9c3a0c89d37691f9f45eaaf8 | 8a8c66c527b5b9d2790fb871411f29bee7141aff | ci: Add windows test runner | ## Relevant issue(s)
Resolves #2032
## Description
Adds a windows test run to our test matrix.
Strongly suggest reviewing commit by commit - I've tried to explain why a bunch of stuff I had to change has been changed in the commit bodies.
## Notes
- The windows run is consistently slower than the mac... | diff --git a/.github/workflows/test-and-upload-coverage.yml b/.github/workflows/test-and-upload-coverage.yml
index cc3aa84a7e..f871442584 100644
--- a/.github/workflows/test-and-upload-coverage.yml
+++ b/.github/workflows/test-and-upload-coverage.yml
@@ -28,6 +28,7 @@ jobs:
name: Run tests matrix job
strate... | 2 | 1 | 0 | [{"id": "G0", "claim": "The test errors on the new windows CI runner appear to all stem from incorrect file paths and should be fixed.", "category": "correctness", "verdict": "uncertain", "priority": "P0", "scope": "introduced"}, {"id": "G1", "claim": "The comment added atop datastore/badger/v4/datastore_test.go contai... | null |
sourcenetwork__defradb__2096 | sourcenetwork/defradb | 2,096 | defect | 16b66ea2adf15be7cbbf68b4321cb41b7d7411c3 | ce14a55d2bc99f9c36ebe0c5aca4d553eee26738 | feat: New cmd for docs auto generation | ## Relevant issue(s)
Resolves #2095
## Description
This change adds a new command for generating documents automatically.
It also includes fixes for some overlooked edge cases.
## Tasks
- [x] I made sure the code is well commented, particularly hard-to-understand areas.
- [x] I made sure the reposito... | diff --git a/cli/gendocs.go b/cli/gendocs.go
new file mode 100644
index 0000000000..c46cfc0a14
--- /dev/null
+++ b/cli/gendocs.go
@@ -0,0 +1,129 @@
+// Copyright 2023 Democratized Data Foundation
+//
+// Use of this software is governed by the Business Source License
+// included in the file licenses/BSL.txt.
+//
+// A... | 11 | 10 | 3 | [{"id": "G0", "claim": "Production code should not reference anything in the tests directory; move whatever the CLI needs out of the tests directory.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "If the gendocs feature is to be in the main CLI tool, it ... | null |
sourcenetwork__defradb__2178 | sourcenetwork/defradb | 2,178 | defect | d2cfd876c5fa3f8a6dbc1e663278a9460351238b | 860deb16bde0ecb5ecdf9805222af4cbbf7e0d08 | fix: Handle multiple nil values on unique indexed fields | ## Relevant issue(s)
Resolves #2174 #2175
## Description
Forbid `nil` values for fields that are unique-indexed.
## Tasks
- [x] I made sure the code is well commented, particularly hard-to-understand areas.
- [x] I made sure the repository-held documentation is changed accordingly.
- [x] I made sure th... | diff --git a/db/collection_index.go b/db/collection_index.go
index 531c839280..4367d8ebdf 100644
--- a/db/collection_index.go
+++ b/db/collection_index.go
@@ -13,6 +13,7 @@ package db
import (
"context"
"encoding/json"
+ "errors"
"fmt"
"strconv"
"strings"
@@ -236,23 +237,20 @@ func (c *collection) iterateAll... | 2 | 2 | 1 | [{"id": "G0", "claim": "Users should still be allowed nil values in unique-indexed fields, as SQL-standard unique constraints allow (including multiple nils), instead of the change rejecting any nil value.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G3", "claim": "T... | null |
sourcenetwork__defradb__2192 | sourcenetwork/defradb | 2,192 | defect | 72732f3e4debbd736b4975d66353a47a18e30a6e | 9cc88ff20e063982ccb6a2f6d21d6f1c41d43310 | fix(i): Handle field in view query but not view SDL | ## Relevant issue(s)
Resolves #2183 #2189
## Description
Handle field in view query but not view SDL.
As such fields cannot be queried by the user anyway, we can safely ignore them (instead of panicing). | diff --git a/core/doc.go b/core/doc.go
index 2a149dccc5..379ac79bf9 100644
--- a/core/doc.go
+++ b/core/doc.go
@@ -180,6 +180,21 @@ func (mapping *DocumentMapping) SetFirstOfName(d *Doc, name string, value any) {
d.Fields[mapping.IndexesByName[name][0]] = value
}
+// TrySetFirstOfName overwrites the first field of... | 2 | 2 | 0 | [{"id": "G0", "claim": "The new test's Description should be made more descriptive than \"One to many view\".", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The indentation of the new query strings (this one and the one above) is slightly off an... | null |
sourcenetwork__defradb__2258 | sourcenetwork/defradb | 2,258 | defect | 6f53af2b1e5c14c9de21d121548804e86c8ede84 | 4b2ae9a26cc7d220aec6aa8a28e4a3c665016074 | refactor: Decouple net config | ## Relevant issue(s)
Resolves #2263
## Description
This is part of a larger refactor of the config package.
## Tasks
- [x] I made sure the code is well commented, particularly hard-to-understand areas.
- [x] I made sure the repository-held documentation is changed accordingly.
- [x] I made sure the pull ... | diff --git a/cli/start.go b/cli/start.go
index 62cc281dbf..9f155f3bc7 100644
--- a/cli/start.go
+++ b/cli/start.go
@@ -220,7 +220,9 @@ func start(ctx context.Context, cfg *config.Config) (*defraInstance, error) {
var node *net.Node
if !cfg.Net.P2PDisabled {
nodeOpts := []net.NodeOpt{
- net.WithConfig(cfg),
+ ... | 1 | 1 | 1 | [{"id": "G0", "claim": "The net config should support listening on multiple addresses, e.g. 0.0.0.0 for external exposure and 127.0.0.1 so several local nodes can talk to each other.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduced"}] | null |
sourcenetwork__defradb__2296 | sourcenetwork/defradb | 2,296 | defect | 216db8f8b1c8d778156db3424d6b565bccd32bae | 45787c03a6170523c8713e36df05b6980e602361 | refactor: Node config | ## Relevant issue(s)
Resolves #2295
## Description
This PR refactors the node setup logic into a new `node` package.
## Tasks
- [x] I made sure the code is well commented, particularly hard-to-understand areas.
- [x] I made sure the repository-held documentation is changed accordingly.
- [x] I made su... | diff --git a/cli/server_dump.go b/cli/server_dump.go
index 0ba638d268..c57299dafc 100644
--- a/cli/server_dump.go
+++ b/cli/server_dump.go
@@ -11,65 +11,40 @@
package cli
import (
- "fmt"
- "os"
- "os/signal"
-
"github.com/spf13/cobra"
"github.com/sourcenetwork/defradb/config"
- ds "github.com/sourcenetwork/d... | 2 | 1 | 0 | [{"id": "G0", "claim": "The new TestNodeStart test may add little value, since it appears to cover what the existing integration tests already cover, at the cost of a 5-second wait.", "category": "testing", "verdict": "opposed", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The new store option tests... | null |
sourcenetwork__defradb__2306 | sourcenetwork/defradb | 2,306 | defect | 86610d71bfe9b1b6d2dfdb274c6dbb3854edc7e9 | 46224edaaf83a4606752331fbfb9c2433f84d553 | fix: Add missing delta payload | ## Relevant issue(s)
Resolves #2299
## Description
This PR fixes a regression bug and adds integration tests to ensure that future changes don't break the expected query results
## Tasks
- [x] I made sure the code is well commented, particularly hard-to-understand areas.
- [x] I made sure the repository... | diff --git a/planner/commit.go b/planner/commit.go
index 3caf6d2f4a..7b95eb978b 100644
--- a/planner/commit.go
+++ b/planner/commit.go
@@ -346,7 +346,7 @@ func (n *dagScanNode) dagBlockToNodeDoc(block blocks.Block) (core.Doc, []*ipld.L
}
n.commitSelect.DocumentMapping.SetFirstOfName(&commit, request.HeightFieldNa... | 3 | 1 | 0 | [{"id": "G0", "claim": "The new commits query test should assert the delta value as a base64 encoding instead of a raw []uint8 byte literal, since that is what clients receive.", "category": "testing", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Replacing the hard-coded fiel... | null |
sourcenetwork__defradb__2339 | sourcenetwork/defradb | 2,339 | defect | 392bd96a00d85b3e60d79fb88df078f7a757133d | 9287d95a4407b902a0c01905c993023fa81bc14f | refactor: Generate field ids using a sequence | ## Relevant issue(s)
Resolves #2333
## Description
Generates field ids using a sequence instead of their index in the array.
This is required for allowing field deletion and schema branching as otherwise those two will alter the position and thus id of fields. For example, previously if two schema branches... | diff --git a/client/collection.go b/client/collection.go
index 9ce1e135d6..35df2cad33 100644
--- a/client/collection.go
+++ b/client/collection.go
@@ -18,14 +18,6 @@ import (
"github.com/sourcenetwork/defradb/datastore"
)
-// CollectionDefinition contains the metadata defining what a Collection is.
-type Collectio... | 5 | 3 | 0 | [{"id": "G0", "claim": "The new FieldDefinition type (and GetFields) should carry documentation explaining why it exists and how it should be used, especially now that there are three different field descriptions/definitions.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"... | null |
sourcenetwork__defradb__2352 | sourcenetwork/defradb | 2,352 | defect | 727c883f731e6bfda14ce9385eade78dae21e655 | 4e267bc3838508ac0b4d553a1b2f0bbef4549be6 | ci(i): Remove lens test split in make file | ## Relevant issue(s)
Resolves #2351
## Description
Removes lens test split in make file.
`make test` and friends will now compile the lens modules and execute the lens related tests. Note, the rustup dependency is already noted in CONTRIBUTING.md. | diff --git a/Makefile b/Makefile
index 56ff8cbcbe..9d8dd7fe41 100644
--- a/Makefile
+++ b/Makefile
@@ -72,9 +72,8 @@ COVERAGE_FILE=coverage.txt
COVERAGE_FLAGS=-covermode=atomic -coverpkg=./... -args -test.gocoverdir=$(COVERAGE_DIRECTORY)
PLAYGROUND_DIRECTORY=playground
-LENS_TEST_DIRECTORY=tests/integration/schema/... | 1 | 1 | 1 | [{"id": "G0", "claim": "Remove the `make test:all` target completely, since it still invokes the removed `test:lens` target and is now invalid.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}] | null |
sourcenetwork__defradb__2378 | sourcenetwork/defradb | 2,378 | defect | b45ad8894b6d15b052dd3203ae2287682581db7f | 1927cdca7d6bddac47e30d60059f7b2942d994e3 | fix: Update GetCollections behaviour | ## Relevant issue(s)
Resolves #2371
## Description
This PR updates the behaviour of `getCollections` to return inactive collections if a specific version is requested even if the `--get-inactive` flag hasn't been set.
## Tasks
- [x] I made sure the code is well commented, particularly hard-to-understand... | diff --git a/db/collection.go b/db/collection.go
index 99b1bdc595..b018c97788 100644
--- a/db/collection.go
+++ b/db/collection.go
@@ -763,7 +763,8 @@ func (db *db) getCollections(
continue
}
}
- if !options.IncludeInactive.Value() && !col.Name.HasValue() {
+ // By default, we don't return inactive collec... | 2 | 2 | 0 | [{"id": "G0", "claim": "The new test does not need three schema versions — the first schema patch and the SetActiveSchemaVersion action could be removed and the test could query for schemaVersion1ID instead.", "category": "testing", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim":... | null |
sourcenetwork__defradb__2511 | sourcenetwork/defradb | 2,511 | defect | febcbe05452a43d356812911f27e3eaca94e69e7 | d3012ec15adff1a330a2a87f1c9d25aacbd1ce55 | fix: Allow update when updating non-indexed field | ## Relevant issue(s)
Resolves #2510
## Description
This PR adds a check to the index validation step where if the resulting KV pair is the same on update as the previous KV pair, the outcome will be an no-op instead of an index existing error.
## Tasks
- [x] I made sure the code is well commented, parti... | diff --git a/db/collection_index.go b/db/collection_index.go
index 1a7af8cc25..7d009cd405 100644
--- a/db/collection_index.go
+++ b/db/collection_index.go
@@ -197,9 +197,13 @@ func (c *collection) updateIndexedDoc(
return err
}
for _, index := range c.indexes {
- err = index.Update(ctx, txn, oldDoc, doc)
- if ... | 3 | 3 | 1 | [{"id": "G0", "claim": "The dirty-check in `isUpdatingIndexedFields` should instead compare the old and new documents' values for the indexed fields, so a no-op update to the same value does not trigger an index update and only indexed fields are iterated.", "category": "design", "verdict": "supported", "priority": "P2... | null |
sourcenetwork__defradb__2573 | sourcenetwork/defradb | 2,573 | defect | 3b90e8babd01a6e8bc208c37385ea65efbb5917a | 549421b9d69980fe3c74c08cfc62ef317c5e9e78 | fix: Add check to filter result for logical ops | ## Relevant issue(s)
Resolves #2571
## Description
This PR adds a check post doc filtering in the fetcher to see if we need to rely on the external conditions instead to ensure a valid filtering operation. This is specially important when filtering with logical operators `_and` and `_or`.
## Tasks
- [x] ... | diff --git a/planner/filter/complex.go b/planner/filter/complex.go
index acc2de4883..2c85228623 100644
--- a/planner/filter/complex.go
+++ b/planner/filter/complex.go
@@ -17,7 +17,7 @@ import (
// IsComplex returns true if the provided filter is complex.
// A filter is considered complex if it contains a relation
-... | 1 | 1 | 0 | [{"id": "G0", "claim": "isComplex could be simplified a bit and made to avoid the potential panic from the unchecked v.([]any) type cast.", "category": "correctness", "verdict": "supported", "priority": "P2", "scope": "pre_existing"}] | null |
sourcenetwork__defradb__2602 | sourcenetwork/defradb | 2,602 | defect | ed3550aa5a352ec778a02600494a17cd47e56ef7 | a4831bc82a0b156eb25fdddeea7f855c5bac332f | feat: Enable sec. indexes with ACP | ## Relevant issue(s)
Resolves #2365
## Description
Enable secondary indexes with ACP. | diff --git a/internal/db/collection_index.go b/internal/db/collection_index.go
index a5db0a96d3..14f9a1b805 100644
--- a/internal/db/collection_index.go
+++ b/internal/db/collection_index.go
@@ -256,12 +256,6 @@ func (c *collection) createIndex(
ctx context.Context,
desc client.IndexDescription,
) (CollectionIndex... | 1 | 1 | 0 | [{"id": "G0", "claim": "Add the policy ID as a comment above the policy definition in the test fixtures for future reference.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}] | null |
sourcenetwork__defradb__2656 | sourcenetwork/defradb | 2,656 | defect | 761243e886b97d0e3b83e695871eb038c09a4c13 | 82f714851254d7728bd999d7cc73b759507fa591 | refactor: Extract Defra specific logic from ACPLocal type | ## Relevant issue(s)
Resolves #2655
## Description
Extracts Defra specific logic from the ACPLocal type so that it may be re-used for SourceHub ACP.
None of the code has changed, it's just moved around.
I'm opening a PR now, as a lot of us (including Bruno) are working in this space, and merging refactor... | diff --git a/acp/acp_local.go b/acp/acp_local.go
index e569efd5d0..6433063df1 100644
--- a/acp/acp_local.go
+++ b/acp/acp_local.go
@@ -14,17 +14,9 @@ import (
"context"
protoTypes "github.com/cosmos/gogoproto/types"
- "github.com/sourcenetwork/corelog"
"github.com/sourcenetwork/immutable"
"github.com/sourcene... | 3 | 1 | 0 | [{"id": "G0", "claim": "Rename `sourcehubClient` to `sourceHubClient` — the type declaration, its doc comment and the field that uses it — to match the casing of `sourceHubBridge`.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Having both the `... | null |
sourcenetwork__defradb__2708 | sourcenetwork/defradb | 2,708 | defect | 05a0932a43486d6389b85185cd82121ad3cb0581 | 5ccea09fb5203c7841a67d3d243803351676cc8d | feat: Add async transaction callbacks | ## Relevant issue(s)
Resolves #2707
## Description
This PR adds async versions for all transaction callbacks.
## Tasks
- [x] I made sure the code is well commented, particularly hard-to-understand areas.
- [x] I made sure the repository-held documentation is changed accordingly.
- [x] I made sure the p... | diff --git a/datastore/concurrent_txn.go b/datastore/concurrent_txn.go
index f46637e99d..409a26223c 100644
--- a/datastore/concurrent_txn.go
+++ b/datastore/concurrent_txn.go
@@ -15,8 +15,6 @@ import (
"sync"
ds "github.com/ipfs/go-datastore"
-
- "github.com/sourcenetwork/defradb/datastore/iterable"
)
type co... | 1 | 1 | 0 | [{"id": "G0", "claim": "The async transaction callbacks should be launched before the synchronous ones in Commit and Discard, otherwise they are less async than they could be.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}] | null |
sourcenetwork__defradb__2719 | sourcenetwork/defradb | 2,719 | defect | 6e9688892a7f8362f0f1ba6d6c37ba21da9e0d75 | 10e35c3408cdbef29a9d1241746768ab9e7e54a9 | fix: Merge retry logic | ## Relevant issue(s)
Resolves #2718
Resolves #2721
## Description
This PR fixes issues with merge retry and DAG sync processes. It also moves the `docQueue` from the `net` package into the `db` package.
## Tasks
- [x] I made sure the code is well commented, particularly hard-to-understand areas.
- [... | diff --git a/events/dag_sync.go b/events/dag_sync.go
index 4ab568b7d0..d6150c9118 100644
--- a/events/dag_sync.go
+++ b/events/dag_sync.go
@@ -14,7 +14,6 @@ import (
"sync"
"github.com/ipfs/go-cid"
-
"github.com/sourcenetwork/immutable"
)
@@ -23,6 +22,8 @@ type DAGMergeChannel = immutable.Option[Channel[DAGM... | 4 | 3 | 1 | [{"id": "G0", "claim": "Removing the docQueue opens the door for transaction conflicts on the dag sync process (which already failed a test-matrix run and can leave blocks missing from the blockstore), so the reviewer asks to keep the docQueue in.", "category": "correctness", "verdict": "supported", "priority": "P1", "... | null |
sourcenetwork__defradb__2784 | sourcenetwork/defradb | 2,784 | defect | c6c23736b0cabe78637979927e0dbe604230f759 | 1aaf57e998f424cc75d010b6d56abf8310738364 | fix: Keyring output | ## Relevant issue(s)
Resolves #2759
Resolves #2758
Resolves #2757
## Description
This PR adds more logs to the keyring to improve the user experience.
## Tasks
- [x] I made sure the code is well commented, particularly hard-to-understand areas.
- [x] I made sure the repository-held documentation is ch... | diff --git a/cli/keyring_generate.go b/cli/keyring_generate.go
index f9e073d0d5..34209671a5 100644
--- a/cli/keyring_generate.go
+++ b/cli/keyring_generate.go
@@ -17,12 +17,14 @@ import (
)
func MakeKeyringGenerateCommand() *cobra.Command {
- var noEncryption bool
+ var noEncryptionKey bool
+ var noPeerKey bool
v... | 1 | 1 | 0 | [{"id": "G0", "claim": "The CLI's own help should be clearer about the different kinds of keys - ideally listing each key with its keyring name and a short description of what it does, and surfacing or linking the key-management documentation from the CLI instead of leaving users to find the readme.", "category": "docu... | null |
sourcenetwork__defradb__2850 | sourcenetwork/defradb | 2,850 | defect | 25a30634559aef23e9210c4de787621be7aeca4b | 1aed0e0127b451de5042d142ea112cef49768b79 | fix(i): Tests with primary doc patch update events | ## Relevant issue(s)
Resolves #2849
## Description
This PR fixes an issue with primary document patch updates. We also now assert that the document updates match the expected updates. We can most likely remove the `events` test package now that every test asserts the expected events.
## Tasks
- [x] I mad... | diff --git a/client/definitions.go b/client/definitions.go
index c04159f679..e2f1c41234 100644
--- a/client/definitions.go
+++ b/client/definitions.go
@@ -10,6 +10,12 @@
package client
+import (
+ "strings"
+
+ "github.com/sourcenetwork/defradb/client/request"
+)
+
// CollectionDefinition contains the metadata de... | 4 | 4 | 0 | [{"id": "G0", "claim": "The `updates` parameter of waitForUpdateEvents should be renamed (e.g. to `docIDs`) or documented to make clearer what it is.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The confusing inline comment (around the network... | null |
sourcenetwork__defradb__2867 | sourcenetwork/defradb | 2,867 | defect | 8e4690fed1de62a76f91169ffeae494cd8142230 | 14ba02197dcff7a30a07127e438577e9e08c2c02 | fix: Handle multiple child index joins | ## Relevant issue(s)
Resolves #2862
## Description
Handles multiple child index joins.
Init is called multiple times (IIRC when joining in this direction it is called 1+NPrimaryDocs times) and the state was preserved between calls. The new `resetState` func duplicates the overwriting of props set in init, ... | diff --git a/internal/db/fetcher/indexer.go b/internal/db/fetcher/indexer.go
index eff5146d6f..fa3db23901 100644
--- a/internal/db/fetcher/indexer.go
+++ b/internal/db/fetcher/indexer.go
@@ -68,6 +68,8 @@ func (f *IndexFetcher) Init(
reverse bool,
showDeleted bool,
) error {
+ f.resetState()
+
f.col = col
f.do... | 2 | 1 | 0 | [{"id": "G0", "claim": "In IndexFetcher.resetState, use f.execInfo.Reset() instead of assigning f.execInfo = ExecInfo{}.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "If PR #2871 merges first, this test could use testUtils.NewDocIndex for these... | null |
sourcenetwork__defradb__2947 | sourcenetwork/defradb | 2,947 | defect | 64a2adae2dea52a2fab53d6407521d8ccf1ba36f | e882c5609a7703432e9a7c3625680f9762219cec | fix: Panic with different composite-indexed child objects | ## Relevant issue(s)
Resolves #2924
## Description
Make multiScanNode keep track of all calls.
The issue was that multiScanNode that keeps track of how many calls to Next() should be made, would call Init() and Start() every time without tracking, which would result in child nodes being initialized and started mult... | diff --git a/internal/planner/multi.go b/internal/planner/multi.go
index de220c43e5..ac564c4ed1 100644
--- a/internal/planner/multi.go
+++ b/internal/planner/multi.go
@@ -1,4 +1,4 @@
-// Copyright 2022 Democratized Data Foundation
+// Copyright 2024 Democratized Data Foundation
//
// Use of this software is governed ... | 4 | 4 | 1 | [{"id": "G0", "claim": "The five per-call counters and separate error fields (nextErr, initErr, startErr, closeErr) in multiScanNode should be stored as a single error state rather than duplicated state.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "cla... | null |
sourcenetwork__defradb__2994 | sourcenetwork/defradb | 2,994 | defect | 379af34af75d9c82051c2eb15bbd3281e51c0239 | 00b8311bc39083ef24eb64eb30f12db7c176327a | refactor: Index field directive | ## Relevant issue(s)
Resolves #2926
## Description
This PR fixes an issue where the index directive was defined twice. ~The `@index` field level directive has been renamed to `@indexField`.~
The `fields` arg has been renamed to `includes` and is now a list of objects of type:
```
type IndexFieldInput {
... | diff --git a/docs/website/references/query-specification/relationships.md b/docs/website/references/query-specification/relationships.md
index bfecbf329e..d3ceadf654 100644
--- a/docs/website/references/query-specification/relationships.md
+++ b/docs/website/references/query-specification/relationships.md
@@ -66,7 +66,... | 1 | 1 | 1 | [{"id": "G0", "claim": "Use a single `@index` directive for both type-level and field-level index definitions, adding support at the field level for field-selection indexes (one directive with consistent args instead of separate `@index` and `@indexField`).", "category": "design", "verdict": "supported", "priority": "P... | null |
sourcenetwork__defradb__2997 | sourcenetwork/defradb | 2,997 | defect | 379af34af75d9c82051c2eb15bbd3281e51c0239 | cf9eaee901ab1bf78f10e8535eb5e23691e5920b | feat: Default scalar field values | ## Relevant issue(s)
Resolves #2952
## Description
This PR adds support for default field values using a new `@default` directive.
## Tasks
- [x] I made sure the code is well commented, particularly hard-to-understand areas.
- [x] I made sure the repository-held documentation is changed accordingly.
- ... | diff --git a/client/collection_field_description.go b/client/collection_field_description.go
index 98b012d641..ff735a6afe 100644
--- a/client/collection_field_description.go
+++ b/client/collection_field_description.go
@@ -38,6 +38,9 @@ type CollectionFieldDescription struct {
//
// Otherwise will be [None].
Rela... | 8 | 7 | 6 | [{"id": "G0", "claim": "Please add tests for the error condition raised when @default is applied to a field whose type is not a named scalar (e.g. an object or a list).", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "Please add tests for the error condit... | null |
sourcenetwork__defradb__3035 | sourcenetwork/defradb | 3,035 | defect | 09b49c64a2fc03ea91fe9a808e1a8b039e77c8e6 | 4d75ba0dfb99fb7cde83ec5fa71439bd16f2626a | fix: Queries with filter on 2 rel fields of composite index | ## Relevant issue(s)
Resolves #3032 #2928
## Description
Make parallel node perform a real merge instead of copying fields of a fetched doc, which resulted every next doc overwrite previous fields.
| diff --git a/internal/planner/multi.go b/internal/planner/multi.go
index ac564c4ed1..170239a833 100644
--- a/internal/planner/multi.go
+++ b/internal/planner/multi.go
@@ -136,12 +136,22 @@ func (p *parallelNode) nextMerge(_ int, plan planNode) (bool, error) {
return false, err
}
- doc := plan.Value()
- copy(p.cu... | 3 | 3 | 0 | [{"id": "G0", "claim": "Document why the node should be mutating child relations, including why mergeDoc recursively mutates child documents instead of just the top doc, before merge.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Tweak the docu... | null |
sourcenetwork__defradb__3044 | sourcenetwork/defradb | 3,044 | defect | cddc6d626a5da65029cd4982aad4ea19f89f2b58 | f0c625d805cdef2b6848b914dab79222b87a252b | refactor: GraphQL order input | ## Relevant issue(s)
Resolves #3043
## Description
This PR fixes an issue where GQL variables could not be used with ordering input args. The order input type on collections and aggregates has been refactored to a list so that ordering is preserved in all environments.
## Tasks
- [x] I made sure the code... | diff --git a/internal/request/graphql/parser/commit.go b/internal/request/graphql/parser/commit.go
index b08d80fc69..22e5afe0b0 100644
--- a/internal/request/graphql/parser/commit.go
+++ b/internal/request/graphql/parser/commit.go
@@ -55,11 +55,11 @@ func parseCommitSelect(
}
case request.OrderClause:
- v, o... | 3 | 3 | 2 | [{"id": "G0", "claim": "The example in the comment in parseOrderCondition shows an invalid order object — a single unordered map intending name and birthday to be explicitly ordered — and should use the list form `order: [{author: {name: ASC}}, {author: {birthday: DESC}}]`.", "category": "documentation", "verdict": "su... | null |
sourcenetwork__defradb__3066 | sourcenetwork/defradb | 3,066 | defect | 0b2a90dc790e1b91174a31217611e7ff16188f28 | d8a8ec0274d8c6c6456ca9986699da4df9eb188c | feat: GraphQL fragments | ## Relevant issue(s)
Resolves #3047
## Description
This PR enables support for GraphQL fragments.
## Tasks
- [x] I made sure the code is well commented, particularly hard-to-understand areas.
- [x] I made sure the repository-held documentation is changed accordingly.
- [x] I made sure the pull request ... | diff --git a/go.mod b/go.mod
index 4788e9667c..34d06fe31d 100644
--- a/go.mod
+++ b/go.mod
@@ -49,7 +49,7 @@ require (
github.com/sourcenetwork/badger/v4 v4.2.1-0.20231113215945-a63444ca5276
github.com/sourcenetwork/corelog v0.0.8
github.com/sourcenetwork/go-libp2p-pubsub-rpc v0.0.14
- github.com/sourcenetwork/gr... | 2 | 2 | 1 | [{"id": "G0", "claim": "The pull request should also support inline fragments (per the GraphQL spec) and fragments with variables.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The fragment test functions should be renamed to underscored form, e.g. Test... | null |
sourcenetwork__defradb__3138 | sourcenetwork/defradb | 3,138 | defect | 6cc39a7418fd8d1f3246357f5665302e48817305 | 3603b26cfed87457d2b3613f7440fa9b2806d722 | fix(i): Index directive field arg name | ## Relevant issue(s)
Resolves #3132
## Description
This PR fixes a mistake I made when refactoring the index directive. The `name` argument of the `includes` fields has been changed to `field`.
## Tasks
- [x] I made sure the code is well commented, particularly hard-to-understand areas.
- [x] I made sur... | diff --git a/internal/request/graphql/schema/index_parse_test.go b/internal/request/graphql/schema/index_parse_test.go
index 0c8413ec85..e10394f38d 100644
--- a/internal/request/graphql/schema/index_parse_test.go
+++ b/internal/request/graphql/schema/index_parse_test.go
@@ -24,7 +24,7 @@ func TestParseIndexOnStruct(t *... | 1 | 1 | 0 | [{"id": "G0", "claim": "The constant naming for the index directive's field argument (`IndexFieldInputName`/`IndexFieldInputDirection`) does not match the naming convention of the surrounding constants and should be renamed, e.g. to `IncludesPropField`/`IncludesPropDirection`.", "category": "maintainability", "verdict"... | null |
sourcenetwork__defradb__3143 | sourcenetwork/defradb | 3,143 | defect | 6cc39a7418fd8d1f3246357f5665302e48817305 | e8d75cadc854834df0cb80ba0bd483ea8f6e72ce | fix(i): Panic in object equal filter | ## Relevant issue(s)
Resolves #3141
## Description
This PR fixes a bug where the object equality check would panic when comparing with a non object type.
## Tasks
- [x] I made sure the code is well commented, particularly hard-to-understand areas.
- [x] I made sure the repository-held documentation is c... | diff --git a/internal/connor/eq.go b/internal/connor/eq.go
index 6b9f56293a..65c17356f0 100644
--- a/internal/connor/eq.go
+++ b/internal/connor/eq.go
@@ -75,8 +75,8 @@ func objectsEqual(condition map[string]any, data any) (bool, error) {
if data == nil {
return condition == nil, nil
}
- d := data.(map[string]an... | 2 | 1 | 0 | [{"id": "G0", "claim": "It would be worth documenting how the data can fail to be a map[string]any at this type assertion (especially since it was missed originally), so future readers do not remove the guard.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", ... | null |
sourcenetwork__defradb__3176 | sourcenetwork/defradb | 3,176 | defect | bb0917e720a56de39e1067b3c045abcec3108038 | a653f05daa80eed1b73d8bad118fda796aee7a75 | test: Allow soft-referencing of Cids in tests | ## Relevant issue(s)
Resolves #3172
## Description
Allows soft-referencing of Cids in tests.
When encountering an unpleasant change-detector problem in https://github.com/sourcenetwork/defradb/pull/3173 I realised we had no need to reference Cids based on index, and we really only ever cared that they were ... | diff --git a/tests/integration/query/commits/simple_test.go b/tests/integration/query/commits/simple_test.go
index ca8c1e51b5..3660efdb87 100644
--- a/tests/integration/query/commits/simple_test.go
+++ b/tests/integration/query/commits/simple_test.go
@@ -37,13 +37,13 @@ func TestQueryCommits(t *testing.T) {
Result... | 4 | 1 | 0 | [{"id": "G0", "claim": "The new Validator interface should be reshaped along the lines of established matcher interfaces like Gomega's (matchers return (bool, error) via FailureMessage instead of asserting/panicking inside Validate), because the current design cannot combine validators such as AnyOf of two UniqueCids w... | null |
sourcenetwork__defradb__3201 | sourcenetwork/defradb | 3,201 | defect | bb0917e720a56de39e1067b3c045abcec3108038 | c4077d3299e77cd07fa62455d82e16554217bf40 | feat: Filter alias target | ## Relevant issue(s)
Resolves #3194
## Description
This PR adds alias targeting in filters.
**Aggregate targets are not included in this PR as they require more changes.**
## Tasks
- [x] I made sure the code is well commented, particularly hard-to-understand areas.
- [x] I made sure the repository-h... | diff --git a/client/request/filter.go b/client/request/filter.go
index aabfafb9b9..feacb02f2b 100644
--- a/client/request/filter.go
+++ b/client/request/filter.go
@@ -13,9 +13,10 @@ package request
import "github.com/sourcenetwork/immutable"
const (
- FilterOpOr = "_or"
- FilterOpAnd = "_and"
- FilterOpNot = "_not... | 9 | 6 | 1 | [{"id": "G0", "claim": "In ObjectProperty it may be better to check the success of the cast to map[string]any (returning an error on failure) instead of checking for the core.Doc type first.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The reviewer ask... | null |
sourcenetwork__defradb__3217 | sourcenetwork/defradb | 3,217 | defect | 6d6c9f2523f90a796f98c75d9bedaa6750639a15 | 4dd9ef4263324276f3f71e957648134c9f3ca831 | feat: Order alias target | ## Relevant issue(s)
Resolves #3196
## Description
This PR adds alias targeting to query orderings.
**Aggregate targets are not included in this PR as they require more changes.**
## Tasks
- [x] I made sure the code is well commented, particularly hard-to-understand areas.
- [x] I made sure the repos... | diff --git a/client/request/consts.go b/client/request/consts.go
index 18fed52946..ce31c95133 100644
--- a/client/request/consts.go
+++ b/client/request/consts.go
@@ -48,6 +48,7 @@ const (
VersionFieldName = "_version"
MaxFieldName = "_max"
MinFieldName = "_min"
+ AliasFieldName = "_alias"
// New ge... | 1 | 1 | 0 | [{"id": "G0", "claim": "It would be nice to add a test covering a compound order query that includes an alias.", "category": "testing", "verdict": "supported", "priority": "P2", "scope": "introduced"}] | null |
sourcenetwork__defradb__3247 | sourcenetwork/defradb | 3,247 | defect | 198454b2bd22820b0aebdc0f6ff49659a3a40934 | 473b68132a93a69df3ef04a2835656f1ca42db3f | feat(i): Handle collection commits over P2P | ## Relevant issue(s)
Resolves #3212
## Description
Handles the syncing of collection commits over P2P.
~~Note: The behaviour in `TestQueryCommitsBranchables_HandlesConcurrentUpdatesAcrossPeerConnection` is currently under discussion and may be changed or linked to #3245 and #3246 before this PR is merged.~... | diff --git a/internal/db/merge.go b/internal/db/merge.go
index 47db8740b1..211267e002 100644
--- a/internal/db/merge.go
+++ b/internal/db/merge.go
@@ -28,6 +28,7 @@ import (
"github.com/sourcenetwork/defradb/event"
"github.com/sourcenetwork/defradb/internal/core"
coreblock "github.com/sourcenetwork/defradb/intern... | 5 | 4 | 0 | [{"id": "G0", "claim": "executeMerge should build the HeadstoreKey in one if/else block and call getHeadsAsMergeTarget once, saving a few lines.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The branchable peer-sync test's expected cid identifi... | null |
sourcenetwork__defradb__3260 | sourcenetwork/defradb | 3,260 | defect | 27893cfac3229f6cd7c665615377b157c0b72507 | 142b2a43480015f021d0ac7d01f0a2483232431f | feat: Add support for branchable collection time-traveling | ## Relevant issue(s)
Resolves #3257
## Description
Add support for branchable collection time-traveling.
Also fixes the docID param which was misbehaving (see commit `Create document with actual docID not user provided value`).
Suggest reviewing commit by commit, it should be easier to follow.
Do not ... | diff --git a/internal/db/fetcher/versioned.go b/internal/db/fetcher/versioned.go
index 24f3ab8467..01afe7e2e2 100644
--- a/internal/db/fetcher/versioned.go
+++ b/internal/db/fetcher/versioned.go
@@ -16,7 +16,7 @@ import (
"fmt"
"github.com/ipfs/go-cid"
- ds "github.com/ipfs/go-datastore"
+ cidlink "github.com/ipl... | 2 | 1 | 0 | [{"id": "G0", "claim": "Passing the docID for a timetravel query is unnecessary and misleading since it will never be used, so references to docID should probably be removed from this block.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "pre_existing"}, {"id": "G1", "claim": "It mi... | null |
sourcenetwork__defradb__3550 | sourcenetwork/defradb | 3,550 | defect | e7b448d42537424b6d49ea03f60d020bfa9cecef | 816afa234ff4a20239591781a28ca0e6db87e319 | test: Add example CLI integration tests | ## Relevant issue(s)
Resolves #3569
## Description
Adds the example CLI integration tests using new test framework.
Largely as seen in the demo last week, but with a little more polish. I think it is good to commit these now and then we can expand them as/when we feel like, and use it as an example for oth... | diff --git a/cli/test/action/action.go b/cli/test/action/action.go
new file mode 100644
index 0000000000..32c4aa295f
--- /dev/null
+++ b/cli/test/action/action.go
@@ -0,0 +1,187 @@
+// Copyright 2025 Democratized Data Foundation
+//
+// Use of this software is governed by the Business Source License
+// included in the... | 9 | 8 | 0 | [{"id": "G0", "claim": "The interface name 'Argmented' is a misspelling and should be 'Augmented'.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The execute function duplicates the body of executeBytes and should wrap it instead of reimplementi... | null |
sourcenetwork__defradb__3617 | sourcenetwork/defradb | 3,617 | defect | cb12d0429345f106f045e3a0e94a7a0e3d16ade8 | 4cdace571e1fe67562f9835cfb962c5ad672fe13 | feat: Configure fallback signer | ## Relevant issue(s)
Resolves https://github.com/sourcenetwork/defradb/issues/3607
## Description
Allow configuring fallback identity that is used when signing is activated and the identity provided for a request is missing the private key. This happens when requests are sent over HTTP where we do not pass pri... | diff --git a/cli/config.go b/cli/config.go
index adb125100c..bc01cd7f18 100644
--- a/cli/config.go
+++ b/cli/config.go
@@ -55,6 +55,7 @@ var configFlags = map[string]string{
"store": "datastore.store",
"no-encryption": "datastore.noencryption",
"no-signing": "data... | 2 | 1 | 0 | [{"id": "G0", "claim": "The fallback signer should be taken from the context like the signing identity instead of being passed as a signBlock parameter, for consistency and ease of understanding.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The fallbac... | null |
sourcenetwork__defradb__3703 | sourcenetwork/defradb | 3,703 | defect | 03b34711cd1a3d9b9f732b3f958e2bdcee27ea28 | 1a3cef04d357328b0d0d8d12f7d871f41da2bdd0 | perf: Cache collection short ids within txn context | ## Relevant issue(s)
Resolves #3702
## Description
Caches collection short ids within txn context, introducing a framework for all future txn-scoped caches to use (such as collection versions, and field short ids).
Performance impact of this PR will be quite small, this will have a much bigger impact when a... | diff --git a/cli/utils.go b/cli/utils.go
index 63db955366..b31cd7ab50 100644
--- a/cli/utils.go
+++ b/cli/utils.go
@@ -141,7 +141,7 @@ func setContextTransaction(cmd *cobra.Command, txId uint64) error {
if err != nil {
return err
}
- ctx := db.SetContextTxn(cmd.Context(), tx)
+ ctx := db.InitContext(cmd.Context(... | 2 | 2 | 1 | [{"id": "G0", "claim": "The package-level `collectionShortIDCacheKeyValue` variable should be removed because using the type directly is normal and the extra variable is confusing and unnecessary.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "T... | null |
sourcenetwork__defradb__3781 | sourcenetwork/defradb | 3,781 | defect | 28659e7668a521412c737e06bde7af2197c71c88 | 43277315786115cee61e567465336c6bf75aadef | fix: Bypass composite index ordering on order mismatch | ## Relevant issue(s)
Resolves #3779
## Description
Ignore secondary index for ordering queries if ordering or query fields doesn't match secondary index fields. | diff --git a/internal/db/fetcher/indexer.go b/internal/db/fetcher/indexer.go
index 445af9c7e6..246600407b 100644
--- a/internal/db/fetcher/indexer.go
+++ b/internal/db/fetcher/indexer.go
@@ -153,3 +153,40 @@ func (f *indexFetcher) Close() error {
}
return nil
}
+
+// CanBeOrderedByIndex checks if the index can be ... | 3 | 2 | 1 | [{"id": "G0", "claim": "The `[0]` indexing in CanBeOrderedByIndex (fieldIndexes[0] and ordering[i].FieldIndexes[0]) is unproven and possibly incorrect, so the reason it is safe should be documented.", "category": "correctness", "verdict": "opposed", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "order... | null |
sourcenetwork__defradb__3863 | sourcenetwork/defradb | 3,863 | defect | b79833348cf8afa4eb085a02172004297ab041a2 | fbc001763bd954717192d37b2a39d624fee21f5f | feat: SourceHub ACP JS | ## Relevant issue(s)
Resolves [#3862](https://github.com/sourcenetwork/defradb/issues/3862)
## Description
This PR implements SourceHub ACP for JS client (`sourcehub_acp_js.go`), adds `secp256r1` support, and introduces multiple improvements to the JS defradb client.
## Tasks
- [x] I made sure the code i... | diff --git a/acp/dac/local.go b/acp/dac/local.go
index a1f2545966..cc671a952f 100644
--- a/acp/dac/local.go
+++ b/acp/dac/local.go
@@ -295,7 +295,7 @@ func (l *LocalDocumentACP) AddActorRelationship(
return false, err
}
- return setRelationshipResponse.RecordExisted, nil
+ return setRelationshipResponse.GetRecor... | 6 | 5 | 0 | [{"id": "G0", "claim": "The source_hub_js.go ACP implementation should be no-op-ed or removed because it gets completely removed in the reviewer's upcoming NAC PR.", "category": "design", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G2", "claim": "The unused callJSFunction helper (and the t... | null |
sourcenetwork__defradb__3927 | sourcenetwork/defradb | 3,927 | defect | 71b29b2a58a2e1b53c8f7ed48372127b4e67a3a2 | d076bc569a50decd8a434d8b9508441ad52468ee | fix: Allow operations on _similarity results | ## Relevant issue(s)
Resolves #3928
## Description
This PR fixes an issue where querying with order on a `_similarity` field would quietly do nothing. The issue was simply that the similarity plan was executed after the query ops (order, limit).
## Tasks
- [x] I made sure the code is well commented, part... | diff --git a/internal/planner/planner.go b/internal/planner/planner.go
index 1079a01b79..28a1bbe202 100644
--- a/internal/planner/planner.go
+++ b/internal/planner/planner.go
@@ -207,6 +207,10 @@ func (p *Planner) expandSelectTopNodePlan(plan *selectTopNode, parentPlan *selec
// wire up source to plan
plan.planNode... | 1 | 1 | 0 | [{"id": "G0", "claim": "The trailing '1' in the test function name TestQuerySimple_WithSimilarityAndOrderingWithLimitOnSimilarityResult_ShouldSucceed1 looks like a copy-paste leftover and should be renamed.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}] | null |
sourcenetwork__defradb__3996 | sourcenetwork/defradb | 3,996 | defect | 4514c0080825f19c60d113edc44b74cfc07578f6 | 420904af79e33ef9908dfbe2c105d4ad3adbe2e2 | feat: Gate collection patch op with NAC | Resolves #3995
## Description
- Gates collection patch command with `Collection Patch` perm
- Uses the same `Collection Patch` perm for `Schema Add` operation as well (soon to be `Collection Create`).
- Sharing the same perm between them because, patch command can delete/update/create collections.
## How has t... | diff --git a/acp/types/types.go b/acp/types/types.go
index 083bb817e4..4574712adf 100644
--- a/acp/types/types.go
+++ b/acp/types/types.go
@@ -88,7 +88,7 @@ const (
NodeNACStatusPerm
NodeNACRelationAddPerm
NodeNACRelationDeletePerm
- NodeSchemaAddPerm
+ NodeCollectionUpdatePerm
)
// RequiredResourcePermission... | 6 | 4 | 1 | [{"id": "G0", "claim": "The new node permission should be named `collection-patch`, not `collection-update`, which is misleading given the agreed client-facing terminology.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The per-endpoint NAC gating tests ... | null |
sourcenetwork__defradb__4019 | sourcenetwork/defradb | 4,019 | defect | b3856df4c34406807c5d8fe5e7dbfc8911c92f44 | 46b8838e82abd01c330bd6d85b0e0e9c8e40c72c | feat: Support Commit API on GQL Subscriptions | ## Relevant issue(s)
Resolves #4018
Resolves #3986
Resolves #4017
## Description
Primarily adds support for the commit API on GQL subscriptions. Additionally it fixes a bug in how we were reporting certain kind of GQL validation errors to SSE clients. Lastly, it fixes a bug in the `dagScanNode` planner that... | diff --git a/client/request/commit.go b/client/request/commit.go
index c89dba5e6a..fb47fb7607 100644
--- a/client/request/commit.go
+++ b/client/request/commit.go
@@ -10,7 +10,9 @@
package request
-import "github.com/sourcenetwork/immutable"
+import (
+ "github.com/sourcenetwork/immutable"
+)
var (
_ Selectio... | 18 | 12 | 2 | [{"id": "G0", "claim": "The `_` placeholder fields in the default operation types are an old GQL-library artifact no longer needed for Subscription or Query and can be removed.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Changing cid+docID co... | null |
sourcenetwork__defradb__4035 | sourcenetwork/defradb | 4,035 | defect | 280db02e1cdf01765e01ce1d192886c7b4ef98ae | 2c45a6f8bf6adc6dd2aefad90538bbe43301f825 | chore: Allow test framework to test message relaying | ## Relevant issue(s)
Resolves #4030
## Description
~~This PR fixes a devex issue where bootstrap instance would not be connected to until a message was sent over the pubsub network. This resulted it the bootstrap instance not knowing about the new instance until later than expected.~~
~~The workaround for ... | diff --git a/internal/db/p2p/p2p.go b/internal/db/p2p/p2p.go
index a98f29df68..c9d4f7abef 100644
--- a/internal/db/p2p/p2p.go
+++ b/internal/db/p2p/p2p.go
@@ -13,11 +13,13 @@ package p2p
import (
"context"
"fmt"
+ "log/slog"
"sync"
"time"
"github.com/fxamacker/cbor/v2"
"github.com/ipfs/go-cid"
+ ipld "gi... | 4 | 4 | 0 | [{"id": "G0", "claim": "Remove the commented-out error-logging code block left in processPushlogRequest.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The bootstrap-peer connection loop in NewPeer could be moved into a separate function.", "cat... | null |
sourcenetwork__defradb__4071 | sourcenetwork/defradb | 4,071 | defect | da9e14b65845d324c6cf2028f1b90435607a9b74 | 64017a7fd0e462a87193caab4e1a26663e83417d | fix: Version query with delete | ## Relevant issue(s)
Resolves #4008
## Description
This PR fixed an issue where doing a version query on a document that had been deleted cause the query to hang. This also appeared in subscriptions since subscriptions use a version query to return the appropriate document state.
The problem stems from the ... | diff --git a/internal/core/crdt/composite.go b/internal/core/crdt/composite.go
index 1f755462ed..7f6de62c21 100644
--- a/internal/core/crdt/composite.go
+++ b/internal/core/crdt/composite.go
@@ -170,6 +170,13 @@ func (m DocComposite) deleteWithPrefix(ctx context.Context, key keys.DataStoreKe
return err
}
+ // Si... | 5 | 4 | 1 | [{"id": "G0", "claim": "It is unclear what appending an entry with an empty/nil value to kvArray means and in what cases the dsKey.InstanceType == keys.ValueKey check is false, so the always-true check should be removed or its intent documented with a code comment.", "category": "maintainability", "verdict": "supported... | null |
sourcenetwork__defradb__4077 | sourcenetwork/defradb | 4,077 | defect | da56a94a0873711a48a7b30c52b91e2ba3d2a0e3 | bc00e7f2a7d9354f7f621ec16d7595c6e2c2ba75 | feat: Gate collection set active version op with NAC | ## Relevant issue(s)
- Resolves #4076 (Part of #2640)
- Built on top of #4074 (so that should merge first)
## Description
- Cherry pick the previous schema set active version and update to current collection set active version
- Ignore all the commits before this commit: `PR(CHERRY-PICK): Gate - Set Active Colle... | diff --git a/acp/types/types.go b/acp/types/types.go
index 9a3768588e..8115f47606 100644
--- a/acp/types/types.go
+++ b/acp/types/types.go
@@ -89,6 +89,8 @@ const (
NodeNACRelationAddPerm
NodeNACRelationDeletePerm
NodeCollectionPatchPerm
+ NodeCollectionGetPerm
+ NodeCollectionSetActiveVersionPerm
)
// Requir... | 1 | 1 | 1 | [{"id": "G0", "claim": "The `collection-set-active-version` permission should not exist; changing the active version should be covered by the `collection-patch` permission instead of a separate permission.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduced"}] | null |
sourcenetwork__defradb__4083 | sourcenetwork/defradb | 4,083 | defect | e0598ebda53c428468c68e9814918a24f8b13093 | 84fc61fe74783046c3b8de7556c3da8a073bfdd4 | feat: Gate DAC ops with NAC | ## Relevant issue(s)
Resolves #4082
## Description
These operations were gated and tested:
- AddDACPolicy
- AddDACActorRelationship
- DeleteDACActorRelationship
| diff --git a/internal/db/db.go b/internal/db/db.go
index 0797430424..eaec8d78d0 100644
--- a/internal/db/db.go
+++ b/internal/db/db.go
@@ -29,6 +29,7 @@ import (
"github.com/sourcenetwork/defradb/acp/dac"
"github.com/sourcenetwork/defradb/acp/identity"
+ acpTypes "github.com/sourcenetwork/defradb/acp/types"
"gi... | 1 | 1 | 0 | [{"id": "G0", "claim": "The typo \"loose\" in the setup comment should read \"lose\" (and the same fix applied everywhere else this comment is used).", "category": "documentation", "verdict": "supported", "priority": "P3", "scope": "introduced"}] | null |
sourcenetwork__defradb__4097 | sourcenetwork/defradb | 4,097 | defect | d7504d9018ab814ec80d79e0636a40f71875e5a8 | e69297f4692fc787eafe4796e494f63aa66b0701 | feat: Gate sec. index ops with NAC | ## Relevant issue(s)
Resolves #4096
## Description
- Gate Index ops with NAC
~~## TODO~~
~~- [x] After rebase some http tests give 404 error [fix it].~~
~~- [x] Mark todo to fix the C-binding issue in future #4091~~ | diff --git a/acp/types/types.go b/acp/types/types.go
index 9089ca28f7..45c6626aea 100644
--- a/acp/types/types.go
+++ b/acp/types/types.go
@@ -90,6 +90,9 @@ const (
NodeNACRelationDeletePerm
NodeCollectionPatchPerm
NodeCollectionGetPerm
+ NodeIndexListPerm
+ NodeIndexCreatePerm
+ NodeIndexDropPerm
)
// Requir... | 1 | 1 | 1 | [{"id": "G0", "claim": "The new checkNodeAccess permission check in GetAllIndexes (internal/db/store.go:102) is not covered by tests and should be specifically covered by a test.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}] | null |
sourcenetwork__defradb__4146 | sourcenetwork/defradb | 4,146 | defect | 48dbaa7bd50f9d4fea05b6f61d356922bbffc739 | 3b6b6935fec823954b29a3e64cd249a6c890740b | fix: Handle queries with _version prop and order param | ## Relevant issue(s)
Resolves #4144
## Description
Handle queries with `_version` property and order parameter instead of panicing.
I also had a look at #1709 - it is still failing, but for very similar reasons, however the fix is proving to be a bit more involved, so I'm sorting that out in another PR.
... | diff --git a/internal/planner/multi.go b/internal/planner/multi.go
index bd065870f6..f3e7a937fe 100644
--- a/internal/planner/multi.go
+++ b/internal/planner/multi.go
@@ -63,6 +63,7 @@ type parallelNode struct { // serialNode?
children []planNode
childIndexes []int
+ source planNode
multiscan *multiScanN... | 3 | 2 | 1 | [{"id": "G0", "claim": "The new test's name TestQuerySimpleWithVersionAndOrder doesn't follow the project's test-naming convention and should be renamed.", "category": "maintainability", "verdict": "opposed", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The schema and document field names in the new... | null |
sourcenetwork__defradb__4174 | sourcenetwork/defradb | 4,174 | defect | 1a70d47529be7e1f3549662f31c769c3a2d1e66c | 678a173eb01848f338a7b6174b3952ed0b0d2dbf | fix: Handle _version alongside type joins | ## Relevant issue(s)
Resolves #1709
## Description
Handles `_version` properties that exist alongside type joins. | diff --git a/internal/planner/lens.go b/internal/planner/lens.go
index 817b628410..b6bd7b0b05 100644
--- a/internal/planner/lens.go
+++ b/internal/planner/lens.go
@@ -204,7 +204,7 @@ func (e *nodeEnumerable) Next() (bool, error) {
func (e *nodeEnumerable) Value() (map[string]any, error) {
doc := e.src.Value()
- le... | 2 | 2 | 0 | [{"id": "G0", "claim": "The child-ordering block in parallelNode.Init is not self-explanatory and would be clearer with an example case comment and/or by extracting it into a descriptively named function like orderChildrenExecution.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "in... | null |
sourcenetwork__defradb__4175 | sourcenetwork/defradb | 4,175 | defect | 4a37aab68754853b068eb09e9e3dc50f4134cb19 | 3852b291460e54b1a3e57d251486df682e342f48 | fix: Introspection error and badly formatted GQL types | ## Relevant issue(s)
Resolves #4132
## Description
Fixes the introspection issue. Theres room for discussion with the solution. Specifically the new `ScalarAggregateNumericBlock` type. Which includes a "noop" field `_`, since the `gql.InputObject` type requires at least one field to be defined.
This wasn't... | diff --git a/internal/request/graphql/schema/generate.go b/internal/request/graphql/schema/generate.go
index 233bfe8105..8282928418 100644
--- a/internal/request/graphql/schema/generate.go
+++ b/internal/request/graphql/schema/generate.go
@@ -43,8 +43,10 @@ const (
// Generator creates all the necessary typed schema d... | 1 | 1 | 0 | [{"id": "G0", "claim": "The commented-out debug print statements should be removed before merging.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}] | null |
sourcenetwork__defradb__4187 | sourcenetwork/defradb | 4,187 | defect | 9e539feba634e9c75fef2295ab3bddaa7294cb71 | 98cce92c47a40ed60ced4ed6c97c7900d9920f88 | fix: Mutation of branchable collection | ## Relevant issue(s)
Resolves #4185
## Description
This fix makes it possible to mutate branchable collections | diff --git a/internal/db/definition_validation.go b/internal/db/definition_validation.go
index 662bd92311..5b9a3f7b85 100644
--- a/internal/db/definition_validation.go
+++ b/internal/db/definition_validation.go
@@ -1138,7 +1138,10 @@ func validateCollectionIsBranchableNotMutated(
) error {
var errs []error
for _, ... | 1 | 1 | 0 | [{"id": "G0", "claim": "The branchable add-field test should be simplified before merge by dropping the create-document actions and query in favour of a direct GetCollections check.", "category": "testing", "verdict": "supported", "priority": "P2", "scope": "introduced"}] | null |
sourcenetwork__defradb__4210 | sourcenetwork/defradb | 4,210 | defect | 1bb7896b41e4edad72f960acdae19ea928035b35 | 6a014036ef61e1935dc54fadada33fbb793151f4 | feat: Support UTC_NOW as a DateTime value | ## Relevant issue(s)
Resolves #4152
## Description
This allows the use of a literal value, `UTC_NOW` to be used as a value for `DateTime` objects. For example, users will be able to do the following:
```
defradb client schema add '
type ObjectWithTimestamp {
timestamp: DateTime
}
'
defradb cli... | diff --git a/go.mod b/go.mod
index 12789c306f..8598f82412 100644
--- a/go.mod
+++ b/go.mod
@@ -48,7 +48,7 @@ require (
github.com/sourcenetwork/corelog v0.0.8
github.com/sourcenetwork/go-p2p v0.1.4
github.com/sourcenetwork/goji v0.0.8
- github.com/sourcenetwork/graphql-go v0.7.10-0.20241003221550-224346887b4a
+ g... | 3 | 1 | 1 | [{"id": "G0", "claim": "UTC_NOW will not work as a @default directive value: the default is cached at collection creation via scalar.ParseLiteral, so documents get the collection-creation time instead of the time of the mutation; jsimnz considers this a blocker and asks for either an easy fix or prohibiting and documen... | null |
sourcenetwork__defradb__4214 | sourcenetwork/defradb | 4,214 | defect | 1bb7896b41e4edad72f960acdae19ea928035b35 | 27b04e73d673855a76ebf15b46f403c62b0555e3 | refactor: KMS sync ordering | ## Relevant issue(s)
Resolves #4213
## Description
This PR makes a change to the p2p and KMS sync process that fixes an issue I ran into when working on the LevelDB store. It is also organizationally a little better since all of the p2p fetching logic now resides in the p2p package.
## Tasks
- [x] I made... | diff --git a/event/event.go b/event/event.go
index b261aea461..34bc2a319b 100644
--- a/event/event.go
+++ b/event/event.go
@@ -120,9 +120,6 @@ type Merge struct {
type MergeComplete struct {
// Merge is the merge that was completed.
Merge Merge
-
- // Decrypted specifies if the merge payload was decrypted.
- Decry... | 1 | 1 | 0 | [{"id": "G0", "claim": "The `expectedDecrypted` tracking in `waitForMergeEvents` is no longer needed now that merge events no longer carry a Decrypted flag, and would be nice to remove.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}] | null |
sourcenetwork__defradb__4247 | sourcenetwork/defradb | 4,247 | defect | e32a6644731722e1593df1e947da7787560fbf73 | daf3f17cf659dcab4d44409ca22007fba0e898d2 | feat: Push topic peer events to event bus | ## Relevant issue(s)
Resolves #4246 #4208
## Description
Make all topic that the node subscribed to handle peer event and push them to event bus.
Add integration tests for TopicPeerEvent published to the event bus when peers join/leave pubsub topics.
| diff --git a/Makefile b/Makefile
index 107b6457ce..372c5c746e 100644
--- a/Makefile
+++ b/Makefile
@@ -445,7 +445,7 @@ fix:
@$(MAKE) mocks
@$(MAKE) docs
-.PHONY build-c-shared-linux:
+.PHONY build-c-shared-linux:
build-c-shared-linux:
@tools/scripts/build-c-shared-linux.sh $(BUILD_FLAGS)
diff --git a/client... | 3 | 2 | 0 | [{"id": "G0", "claim": "The doc comment on peerEventHandlingHost is cut short mid-sentence (\"from e\") and should be completed.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The reviewer asks why the wait loop uses time.NewTimer instead of time.... | null |
sourcenetwork__defradb__4254 | sourcenetwork/defradb | 4,254 | defect | 4571357557b920d5b59b0b10797247d9bdc4a0cd | 6c45f7dea9e3c08e334dc5d2a9512a0623408080 | fix: Migrations with filtering | ## Relevant issue(s)
Resolves #4119
## Description
Originally the work was supposed to be done migration between old collection version, but during the development few other bigger problems were spotted.
First, the migrations would work incorrectly if filter is present. The problem was that filter is applie... | diff --git a/internal/lens/lens.go b/internal/lens/lens.go
index ded61b1d9e..2f0b73c8e2 100644
--- a/internal/lens/lens.go
+++ b/internal/lens/lens.go
@@ -178,30 +178,47 @@ func (l *lens) Next() (bool, error) {
}
if historyLocation.Next().HasValue() {
- // Acquire a lens migration from the registry, using ... | 2 | 2 | 2 | [{"id": "G0", "claim": "The test added for migration between old versions seems to pass unchanged on develop, and the production guard looks like a no-op since calls to l.store.Transform with empty and unknown IDs already return the input slice, so the reviewer is not sure anything was changed and asks that the scenari... | null |
sourcenetwork__defradb__4283 | sourcenetwork/defradb | 4,283 | defect | 3ee4d090cd6d7c1bf35d75a77c8aa775e9814f45 | 1886aed954e1d88d609e47e6009417fe60249e80 | fix: Remove duplicate filter on update/upsert operations | ## Relevant issue(s)
Resolves #4279
## Description
Previously, filters would be re-run during update and upsert (on update conditions) nodes. Producing empty result sets for queries that *shouldve* returned values (see linked issue for examples).
Fixed by caching all the docs that are being updated into an ... | diff --git a/internal/core/doc.go b/internal/core/doc.go
index 520d7efd87..bbfae69ebf 100644
--- a/internal/core/doc.go
+++ b/internal/core/doc.go
@@ -310,3 +310,28 @@ func (m *DocumentMapping) TryToFindIndexFromRenderKey(key string) (int, bool) {
}
return -1, false
}
+
+// DocFromDocument creates a core.Doc from ... | 6 | 3 | 1 | [{"id": "G0", "claim": "Caching every updated document in memory for an unordered update is unreasonable and swapping plan nodes inside an executing node is confusing, so the PR should implement a better fix that does not add the filter to the original parent scan and instead yields documents as they are iterated.", "c... | null |
sourcenetwork__defradb__4293 | sourcenetwork/defradb | 4,293 | defect | a77472a1b50beee6d603246a3b019cffc6fbbf7d | ffbd29d85b25fc75c50a343c0b505a346803bb5b | feat: Add support for `_eq` and `_neq` to inline scalar arrays | ## Relevant issue(s)
Resolves #4280
## Description
Adds support for `_eq` and `_ne` to inline arrays and nonnull inline arrays.
## Tasks
- [x] I made sure the code is well commented, particularly hard-to-understand areas.
- [x] I made sure the pull request title adheres to the conventional commit style... | diff --git a/internal/connor/eq.go b/internal/connor/eq.go
index d6944573dd..bee2b251fb 100644
--- a/internal/connor/eq.go
+++ b/internal/connor/eq.go
@@ -73,6 +73,13 @@ func eq(condition, data any, propExists bool) (bool, error) {
case time.Time:
return ctime.Equal(cn, data), nil
+ case []any:
+ equal, err := ... | 9 | 6 | 3 | [{"id": "G0", "claim": "Remove (or explain the plan for) the commented-out EqualG1 code in internal/connor/numbers/equality.go.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "[]time.Time and []immutable.Option[time.Time] slices are compared with... | null |
sourcenetwork__defradb__4338 | sourcenetwork/defradb | 4,338 | defect | df1dcb5d27d54c71d734b691a2f3a7b1e42737e9 | b81f6bcd70d4fe4356a854956231d2059d34c07d | fix: Null json index panic | ## Relevant issue(s)
Resolves #4337
## Description
This PR fixes an issue where null JSON value indexes would cause a panic.
## Tasks
- [x] I made sure the code is well commented, particularly hard-to-understand areas.
- [x] I made sure the repository-held documentation is changed accordingly.
- [x] I ... | diff --git a/internal/db/index.go b/internal/db/index.go
index f8bb2355ad..9be7ffb429 100644
--- a/internal/db/index.go
+++ b/internal/db/index.go
@@ -127,6 +127,13 @@ type JSONFieldGenerator struct{}
func (g *JSONFieldGenerator) Generate(value client.NormalValue, f func(client.NormalValue) error) error {
json, _ ... | 5 | 2 | 0 | [{"id": "G0", "claim": "Marking a field `JSON!` might let the field be skipped via the new `if json == nil` guard, and the reviewer asks where that validation would happen.", "category": "correctness", "verdict": "opposed", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "Add a short comment explaining ... | null |
sourcenetwork__defradb__4342 | sourcenetwork/defradb | 4,342 | defect | 30a8bcfdc06d538377cb324c3a70f3a3b37c6537 | 1f21803a0efff06b63cbdc39c4beb9887e3b5116 | fix: Index-based order for nested queries | ## Relevant issue(s)
Resolves #4321
## Description
Now secondary indexes are used for sub queries with `order` command.
## Tasks
- [x] I made sure the code is well commented, particularly hard-to-understand areas.
- [x] I made sure the repository-held documentation is changed accordingly.
- [x] I made ... | diff --git a/internal/planner/type_join.go b/internal/planner/type_join.go
index e4fd93352d..76b97e9a00 100644
--- a/internal/planner/type_join.go
+++ b/internal/planner/type_join.go
@@ -17,6 +17,7 @@ import (
"github.com/sourcenetwork/defradb/client/request"
"github.com/sourcenetwork/defradb/internal/connor"
"gi... | 4 | 4 | 0 | [{"id": "G0", "claim": "Please document why the index is being fetched 8 times when returning 4 indexed documents.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Please document why `r.primaryScan.ordering` is being explicitly set to nil.", "categ... | null |
sourcenetwork__defradb__4379 | sourcenetwork/defradb | 4,379 | defect | 20c389fdf2dea47cb7a17c9faab652f42a4e4c5f | 74e071eb9670ebc3a02c10d0c2842a04485d7f3d | feat: Refresh materialized views on create | ## Relevant issue(s)
Resolves #4161
## Description
Refresh materialized views on create.
Also reworks the view-type multiplier, as it was only working when the test did not already declare the `@materialized` directive - and thanks to a change a while ago which flipped the defaults, most of our tests were e... | diff --git a/internal/db/view.go b/internal/db/view.go
index 7f071702c0..46773af367 100644
--- a/internal/db/view.go
+++ b/internal/db/view.go
@@ -95,6 +95,17 @@ func (db *DB) addView(
return nil, err
}
+ for _, view := range returnDescriptions {
+ if view.Query.HasValue() && view.IsMaterialized {
+ err := db... | 7 | 4 | 1 | [{"id": "G0", "claim": "Refreshing materialized views synchronously inside addView could be a long-running operation and should perhaps run as a background process instead of blocking view creation.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The expl... | null |
sourcenetwork__defradb__4391 | sourcenetwork/defradb | 4,391 | defect | dcce9ba397716b95cc24aa8c506ab19ebb394f70 | 7fc61ebe06f1845f7df3b6753a8c4e91d3c64f4f | fix(i): Delete entire block dag on truncate | ## Relevant issue(s)
Resolves #4377
## Description
Deletes the entire block dag on truncate, instead of just the head blocks.
## How has this been tested?
As was in the PR that introduced this bug and deleted the head blocks, this is a performance change with no other user-visible behaviour and is untest... | diff --git a/internal/db/collection_truncate.go b/internal/db/collection_truncate.go
index 2d53c70038..b5cdd912ae 100644
--- a/internal/db/collection_truncate.go
+++ b/internal/db/collection_truncate.go
@@ -13,9 +13,13 @@ package db
import (
"context"
+ "github.com/ipfs/go-cid"
+ ipld "github.com/ipfs/go-ipld-form... | 9 | 6 | 4 | [{"id": "G0", "claim": "The deleteBlocks traversal does more work than necessary; it should only fetch the heads and directly delete the links, walking only the composites (and for branchable, both heads and links), saving much of the work before approval.", "category": "performance", "verdict": "supported", "priority"... | null |
sourcenetwork__defradb__4406 | sourcenetwork/defradb | 4,406 | defect | 7b48741c3878eb18e3034022f0b327836a324110 | a83b403d3917e6dcb346cf326a9180864ca31bcb | fix: Filter on top-level indexed JSON field | ## Relevant issue(s)
Resolves #4396
## Description
Fix filtering on top-level indexed JSON field | diff --git a/internal/db/fetcher/indexer_iterators.go b/internal/db/fetcher/indexer_iterators.go
index 42fed3b7a5..e4be0769af 100644
--- a/internal/db/fetcher/indexer_iterators.go
+++ b/internal/db/fetcher/indexer_iterators.go
@@ -800,8 +800,10 @@ func (f *indexFetcher) determineFieldFilterConditions() ([]fieldFilterCo... | 1 | 1 | 0 | [{"id": "G0", "claim": "Documentation should be added to the nuanced JSON-filter condition in makeFieldFilterCondition (jsonPath/nil handling), because it is hard to figure out why the if is so nuanced.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}] | null |
sourcenetwork__defradb__4409 | sourcenetwork/defradb | 4,409 | defect | f791a2751221c27008bed46d025bbd0a5c4d867d | c02b28ef245b5ad7d90285eae816e21f5b7d95d0 | fix: Grouping by indexed field | ## Relevant issue(s)
Resolves #4397
## Description
Fix out-of-range panic when using `_group` filter on relation with indexed field.
Fix `GroupBy` field value returned as `nil` when using `_group` filter on indexed relation. | diff --git a/internal/planner/arbitrary_join.go b/internal/planner/arbitrary_join.go
index 802b215527..60f8be39dc 100644
--- a/internal/planner/arbitrary_join.go
+++ b/internal/planner/arbitrary_join.go
@@ -274,6 +274,14 @@ func (m *orderedMap) appendChild(key string, childIndex int, value core.Doc, map
index = len(... | 2 | 2 | 0 | [{"id": "G0", "claim": "The new test file's copyright header says 2025 and should be 2026 (todo: 2026 :) ).", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "In extractRelatedSubFilter, if ok is true it is likely impossible for len(indexes) to be 0... | null |
sourcenetwork__defradb__4420 | sourcenetwork/defradb | 4,420 | defect | 8f0c9955e68473df82c11cab38f01d96ace32d7e | f2de935acb9bed117495cef87627e573c2f914f1 | test: Add truncate parallel test | ## Relevant issue(s)
Resolves #4325
## Description
Adds a truncate parallel test, making sure that all previously existing documents are deleted.
## How has this been tested?
Executed locally (Linux), and re-running the CI a couple of times.
| diff --git a/tests/action/parallel.go b/tests/action/parallel.go
new file mode 100644
index 0000000000..019575c76a
--- /dev/null
+++ b/tests/action/parallel.go
@@ -0,0 +1,67 @@
+// Copyright 2026 Democratized Data Foundation
+//
+// Use of this software is governed by the Business Source License
+// included in the fil... | 7 | 3 | 2 | [{"id": "G0", "claim": "The comment \"make sure that `John` and `Islam` dont not exist\" contains a double negative and should read \"do not exist\".", "category": "documentation", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "Composites reads and writes in tests/integration/e... | null |
sourcenetwork__defradb__4429 | sourcenetwork/defradb | 4,429 | defect | 38d0766692633817e0658f8548bd8fd13f4b71e2 | 8de7188004c05954bc2ca9b9339239d815a1d595 | fix: Test matcher subscription bug | ## Relevant issue(s)
Resolves #4428
## Description
This PR fixes a bug with test matchers in subscriptions.
## Tasks
- [x] I made sure the code is well commented, particularly hard-to-understand areas.
- [x] I made sure the repository-held documentation is changed accordingly.
- [x] I made sure the pul... | diff --git a/tests/integration/subscription/with_commit_test.go b/tests/integration/subscription/with_commit_test.go
index be30bd840c..d064f4aee3 100644
--- a/tests/integration/subscription/with_commit_test.go
+++ b/tests/integration/subscription/with_commit_test.go
@@ -194,6 +194,14 @@ func TestCommitSubscription_With... | 2 | 2 | 0 | [{"id": "G0", "claim": "The commit subscription with a DocID filter also returns the commit for the create even though the subscription was initiated after the create call (the select is not filtered by DocID), so the test's result set contains an unexpected second commit.", "category": "correctness", "verdict": "suppo... | null |
sourcenetwork__defradb__4457 | sourcenetwork/defradb | 4,457 | defect | 90aecf63d04b391fd96f0260f2953e596650eeeb | c297b6196931c02e7900e3037969928844402389 | fix: Field short ID retrieval | ## Relevant issue(s)
Resolves #4456
## Description
This PR fixes an bug that occurred when more than 9 collections were added to DefraDB. Having 10+ collections caused the field short ID retrieval to mishandle the fieldID assignments which then caused some fields to be ignore even when present in the input ob... | diff --git a/internal/db/id/field.go b/internal/db/id/field.go
index 87ba8b975b..57bd2fd466 100644
--- a/internal/db/id/field.go
+++ b/internal/db/id/field.go
@@ -58,7 +58,7 @@ func GetShortFieldID(
break
}
- key, err := keys.NewFieldIDFromString(string(iter.Key()))
+ key, err := keys.NewFieldIDFromBytes(ite... | 2 | 2 | 1 | [{"id": "G0", "claim": "Handle the FIELD_SHORT_ID-only key so round-tripping with FieldID{}.Bytes() does not fail: NewFieldIDFromBytes fails on the empty input left after the slash-requiring TrimPrefix, which can crash the datastore's key iteration path.", "category": "correctness", "verdict": "supported", "priority": ... | null |
sourcenetwork__defradb__4466 | sourcenetwork/defradb | 4,466 | defect | e90fe3808e5550c9f26d37307fb27e7996d23cf0 | 88e6c5c2400dc1354ec4617708ef6581693bdef7 | fix(i): Document decode int types changes | ## Relevant issue(s)
Resolves #4465
## Description
This PR add documentation that was missed in a previous PR and increases the surface area to all Int types decode functions.
## Tasks
- [x] I made sure the code is well commented, particularly hard-to-understand areas.
- [x] I made sure the repository-... | diff --git a/internal/encoding/int.go b/internal/encoding/int.go
index 3c4fdae61a..050e2fc5dc 100644
--- a/internal/encoding/int.go
+++ b/internal/encoding/int.go
@@ -35,7 +35,10 @@ func EncodeUint32Descending(b []byte, v uint32) []byte {
// the input as a big-endian 4 byte uint32 representation. The remainder
// of ... | 1 | 1 | 1 | [{"id": "G0", "claim": "The test's invalid key is too short, so DecodeUint32/64 fail on length checks before the new '/' sentinel branch; add a key with length >= 8 to exercise that guard path.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}] | null |
sourcenetwork__defradb__4491 | sourcenetwork/defradb | 4,491 | defect | 9cfff08d508ca3204b046b5c7d8cd16198de41d7 | 3537858d0d824a90773467d7f3eb237d16f5db83 | feat: Gate lens list op with NAC | ## Relevant issue(s)
Resolves #4486
## Description
Gates lens list op with NAC | diff --git a/acp/types/types.go b/acp/types/types.go
index 1751814cf9..c9d9d72e3f 100644
--- a/acp/types/types.go
+++ b/acp/types/types.go
@@ -109,6 +109,7 @@ const (
NodeP2PDocumentDeletePerm
NodeP2PDocumentListPerm
NodeSignatureVerifyPerm
+ NodeLensListPerm
)
// RequiredResourcePermissionsForNode lists all ... | 1 | 1 | 1 | [{"id": "G0", "claim": "In tests/action/list_lenses.go Execute, the `return` when ExpectedError is set (and the `return` when ExpectedLenses is nil) exits after the first node instead of continuing, so remaining nodes are not validated; use `continue` instead.", "category": "correctness", "verdict": "supported", "prior... | null |
sourcenetwork__defradb__4492 | sourcenetwork/defradb | 4,492 | defect | 9cfff08d508ca3204b046b5c7d8cd16198de41d7 | 48d34b0d04bbf001c8a1186a505b1836788dbaa2 | feat: Gate lens add op with NAC | ## Relevant issue(s)
Resolves #4485
## Description
Gates lens add op with NAC
- Fix transaction issue where private methods were being used | diff --git a/acp/types/types.go b/acp/types/types.go
index 1751814cf9..4d0a8b95ed 100644
--- a/acp/types/types.go
+++ b/acp/types/types.go
@@ -109,6 +109,7 @@ const (
NodeP2PDocumentDeletePerm
NodeP2PDocumentListPerm
NodeSignatureVerifyPerm
+ NodeLensAddPerm
)
// RequiredResourcePermissionsForNode lists all v... | 1 | 1 | 1 | [{"id": "G0", "claim": "When ExpectedError is set, the `return` added inside the node loop exits AddLens.Execute after the first node, so with NodeID unset the remaining nodes are never validated, and the lensID of the failed operation is still appended to LensIDs, which can pollute the list and break downstream code t... | null |
sourcenetwork__defradb__4507 | sourcenetwork/defradb | 4,507 | defect | 76418193230d6c7b68281fc88444027084ccbc28 | dbe11f7a9c2548b8f7e1e73e8197c42ee229ea90 | feat: Gate sync collection versions op with NAC | ## Relevant issue(s)
Resolves #4506
## Description
- Gate sync collection versions op with NAC | diff --git a/acp/types/types.go b/acp/types/types.go
index bf39972780..036bef7284 100644
--- a/acp/types/types.go
+++ b/acp/types/types.go
@@ -112,6 +112,7 @@ const (
NodeSignatureVerifyPerm
NodeLensCreatePerm
NodeLensListPerm
+ NodeP2PSyncCollectionVersionsPerm
)
// RequiredResourcePermissionsForNode lists a... | 9 | 6 | 3 | [{"id": "G0", "claim": "Tests 2 and 3 omit SupportedClientTypes while test 1 restricts it, and if the omission is intentional a brief comment explaining why should be added.", "category": "documentation", "verdict": "uncertain", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "Confirm there is no prior ... | null |
sourcenetwork__defradb__4522 | sourcenetwork/defradb | 4,522 | defect | b4717032876d86b9e2938a1ac352804493ef9fa1 | b81b861e76bdfcfadfa67451f080ccfdb696cd1b | feat: Gate SyncBranchableCollection with NAC | ## Relevant issue(s)
Resolves #4517
## Description
Gates SyncBranchableCollection operation with NAC.
Not all of this PR is boilerplate - the node identity is being fetched and passed on to `GetCollections` in a few places in the `db/p2p` package. | diff --git a/acp/types/types.go b/acp/types/types.go
index 81f8f7b4b3..d7757d37c2 100644
--- a/acp/types/types.go
+++ b/acp/types/types.go
@@ -110,6 +110,7 @@ const (
NodeP2PDocumentDeletePerm
NodeP2PDocumentListPerm
NodeP2PSyncCollectionVersionsPerm
+ NodeP2PSyncBranchableCollectionPerm
NodeSignatureVerifyPerm... | 5 | 2 | 2 | [{"id": "G0", "claim": "Txn.SyncBranchableCollection accepts opts but does not forward them to txn.db.SyncBranchableCollection, so the identity is lost when the sync is called via a transaction and the NAC check always sees no identity.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "in... | null |
sourcenetwork__defradb__4528 | sourcenetwork/defradb | 4,528 | defect | b4717032876d86b9e2938a1ac352804493ef9fa1 | f954193ce95e226ad63d4fa6c807694da8e6eed9 | feat: Gate sync documents op with NAC | ## Relevant issue(s)
Resolves #4525
## Description
- Gate sync documents op with NAC
| diff --git a/acp/types/types.go b/acp/types/types.go
index 81f8f7b4b3..e5b7b8ef95 100644
--- a/acp/types/types.go
+++ b/acp/types/types.go
@@ -115,6 +115,7 @@ const (
NodeLensListPerm
NodeViewRefreshPerm
NodeViewAddPerm
+ NodeP2PSyncDocumentsPerm
)
// RequiredResourcePermissionsForNode lists all valid resourc... | 9 | 3 | 3 | [{"id": "G0", "claim": "Returning ErrTimeoutDocSync when there are zero active peers may have been a bug rather than intentional - right after a node restart there would be 0 active peers and sync would otherwise keep timing out - and the author asks whether the code should reconnect instead of erroring.", "category": ... | null |
sourcenetwork__defradb__4532 | sourcenetwork/defradb | 4,532 | defect | 7ec48b4cebbd014189c126c369293e3e310bf6c2 | 10fe23802ebbda488adcf2a4b92b620694bfb403 | feat: Gate encrypted index create op with NAC | ## Relevant issue(s)
Resolves #4531
## Description
feat: Gate encrypted index create op with NAC | diff --git a/acp/types/types.go b/acp/types/types.go
index d7757d37c2..d059d20743 100644
--- a/acp/types/types.go
+++ b/acp/types/types.go
@@ -116,6 +116,7 @@ const (
NodeLensListPerm
NodeViewRefreshPerm
NodeViewAddPerm
+ NodeEncryptedIndexCreatePerm
)
// RequiredResourcePermissionsForNode lists all valid res... | 6 | 1 | 1 | [{"id": "G0", "claim": "options.Lister is undefined and breaks the build; replace it with options.Enumerable in CreateEncryptedIndex signatures across client/collection.go and all implementations (http, internal/db, cbindings, mocks, js/cli test wrappers).", "category": "correctness", "verdict": "supported", "priority"... | null |
sourcenetwork__defradb__4534 | sourcenetwork/defradb | 4,534 | defect | b4717032876d86b9e2938a1ac352804493ef9fa1 | 1cc91f29fa8122129b797346c23e12d25d185420 | feat: Gate encrypted index delete op with NAC | ## Relevant issue(s)
Resolves #4533
## Description
- feat: Gate encrypted index delete op with NAC
## For Reviewers
- The encrypted index create op gate should merge first | diff --git a/acp/types/types.go b/acp/types/types.go
index 81f8f7b4b3..ca27393068 100644
--- a/acp/types/types.go
+++ b/acp/types/types.go
@@ -115,6 +115,7 @@ const (
NodeLensListPerm
NodeViewRefreshPerm
NodeViewAddPerm
+ NodeEncryptedIndexDeletePerm
)
// RequiredResourcePermissionsForNode lists all valid res... | 7 | 1 | 1 | [{"id": "G0", "claim": "The authorized test restricts SupportedClientTypes to HTTP/CLI/Go/C without the TODO comment referencing issue #4383 that the NoIdentity and WrongIdentity tests carry, and should include the same comment explaining why the JS client is excluded, for consistency across the three test variants.", ... | null |
sourcenetwork__defradb__4560 | sourcenetwork/defradb | 4,560 | defect | 4b8993f808b6b7ee47a7e807241eee9a6730016c | c076e37f35bf0ca8e9c09e39379e8883fd19e812 | refactor: Rename keyring commands | ## Relevant issue(s)
Resolves #4559
## Description
Renames the keyring commands.
`export` => `get`
`generate` => `new`
`import` => `add`
`list` => `list`
Find and replace, no coding. | diff --git a/cli/cli.go b/cli/cli.go
index a31eb0050f..0feda9df63 100644
--- a/cli/cli.go
+++ b/cli/cli.go
@@ -188,9 +188,9 @@ func NewDefraCommand(ctx context.Context) *cobra.Command {
keyring := MakeKeyringCommand(ctx)
keyring.AddCommand(
- MakeKeyringGenerateCommand(ctx),
- MakeKeyringImportCommand(ctx),
- ... | 7 | 2 | 0 | [{"id": "G0", "claim": "Stale references to the removed export, generate, and import keyring subcommands remain in README.md, the defradb_keyring.md synopsis, and the cli/keyring.go Long description, and those files should be updated to the new command names.", "category": "documentation", "verdict": "uncertain", "prio... | null |
sourcenetwork__defradb__4578 | sourcenetwork/defradb | 4,578 | defect | 05f064f7dab9d033aed3db4c4a3fca2ef6c49e1b | 01ab8f576fbb15c0febbc72c75709758884dadc3 | feat: Change GQL commits.docId param to list | ## Relevant issue(s)
Resolves #4567
## Description
Change GQL commits.docId param to list type. Does not implement the handling of more than one. | diff --git a/client/request/commit.go b/client/request/commit.go
index 70d7484817..0724618918 100644
--- a/client/request/commit.go
+++ b/client/request/commit.go
@@ -26,6 +26,7 @@ type CommitSelect struct {
ChildSelect
CIDFilter
+ DocIDsFilter
Limitable
Offsetable
@@ -33,10 +34,6 @@ type CommitSelect struc... | 6 | 3 | 2 | [{"id": "G0", "claim": "Querying with multiple docIDs returns the misleading error ErrMultipleCidsNotSupported (\"querying by multiple cids is not yet supported\"), so a separate ErrMultipleDocIDsNotSupported or a generalized message should be introduced.", "category": "correctness", "verdict": "supported", "priority":... | null |
sourcenetwork__defradb__4582 | sourcenetwork/defradb | 4,582 | defect | e74607275d61a41081fadccd245afe2c04641e3c | 8458de3ca48620b9bc694cb39b5afcaf48613eb0 | test: Enable marking tests as flaky | Resoves #4308
Add `FlakeRetries` field to `TestCase` that signals to testing framework should retry the test multiple times.
Also uncomment current branchable-collection tests and mark the mas flaky.
## Tasks
- [x] I made sure the code is well commented, particularly hard-to-understand areas.
- [x] I made... | diff --git a/tests/integration/flake_retry.go b/tests/integration/flake_retry.go
new file mode 100644
index 0000000000..45c4971a3f
--- /dev/null
+++ b/tests/integration/flake_retry.go
@@ -0,0 +1,100 @@
+// Copyright 2026 Democratized Data Foundation
+//
+// Use of this software is governed by the Business Source Licens... | 5 | 4 | 1 | [{"id": "G0", "claim": "hasFailed is a plain bool susceptible to a data race if run spawns goroutines that call back into the capture's Fail/Error methods concurrently.", "category": "correctness", "verdict": "opposed", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "cancel() must be deferred inside th... | null |
sourcenetwork__defradb__4631 | sourcenetwork/defradb | 4,631 | defect | 150204c3a741559bd6fd85e4690aecf6af7d8b10 | 04ea900a3deb8abe7ca358ce7102bf245fc6927e | fix: Introspection test bug | ## Relevant issue(s)
Resolves #1502
## Description
This PR fixes an issue with the introspection test utils that caused us to mark a test as failing.
## Tasks
- [x] I made sure the code is well commented, particularly hard-to-understand areas.
- [x] I made sure the repository-held documentation is chang... | diff --git a/tests/integration/collection_version/client_introspection/one_many_test.go b/tests/integration/collection_version/client_introspection/one_many_test.go
index 68dbb82833..5abbdf4d94 100644
--- a/tests/integration/collection_version/client_introspection/one_many_test.go
+++ b/tests/integration/collection_ver... | 2 | 1 | 1 | [{"id": "G0", "claim": "The added `else if len(errs) > 0` branch in AssertErrors does not change any behavior, so the change accomplishes nothing.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "When several errors are returned, AssertErrors calls re... | null |
sourcenetwork__defradb__4642 | sourcenetwork/defradb | 4,642 | defect | 4480bfd94331eebb0365e9e21ca95105dbf179ad | a056a48ad47bded80a310ea0ae932e86e388e76c | fix: Bump api version to v1 | ## Relevant issue(s)
Resolves #4640
Resolves #4641
## Description
This PR bumps the API version to v1. It also adds a default version redirect so that `/api/` can be used in place of `/api/v1` for the latest version.
## Tasks
- [x] I made sure the code is well commented, particularly hard-to-understan... | diff --git a/README.md b/README.md
index c2eda53a06..03d764dc7c 100644
--- a/README.md
+++ b/README.md
@@ -153,7 +153,7 @@ In this document, we use the default configuration, which has the following beha
- `~/.defradb/` is DefraDB's configuration and data directory
- `client` command interacts with the locally runn... | 7 | 6 | 2 | [{"id": "G0", "claim": "docs/website/getting-started.md should use the version-agnostic /api/graphql path instead of the explicitly versioned /api/v1/graphql, for consistency with README.md and the logged endpoint.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "... | null |
sourcenetwork__defradb__4661 | sourcenetwork/defradb | 4,661 | defect | aac9b5aacb182b2e52c8f3348647caf974792e69 | fc6f004135f817d8643a081a2440076c2361f90c | chore: Improve HTTP error status codes and response format | ## Relevant issue(s)
Resolves #4163
## Description
The HTTP API was returning 400 Bad Request for almost every error, regardless of what actually went wrong. This made it hard for clients to handle errors properly — a duplicate document, a missing collection, and a malformed request all looked the same.
This PR add... | diff --git a/http/errors.go b/http/errors.go
index f4cc7ab4a0..07bf4ca1f0 100644
--- a/http/errors.go
+++ b/http/errors.go
@@ -13,9 +13,15 @@ package http
import (
"encoding/json"
"fmt"
+ "net/http"
+ "github.com/sourcenetwork/corekv"
+
+ "github.com/sourcenetwork/defradb/acp"
"github.com/sourcenetwork/defradb... | 12 | 9 | 5 | [{"id": "G0", "claim": "db.ErrMissingPermission (returned on ACP denials during VerifySignature) is not handled by httpStatusFromError, so http/handler_block.go still returns 400 for that authorization failure instead of 403.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"},... | null |
sourcenetwork__defradb__4675 | sourcenetwork/defradb | 4,675 | defect | 10b2616223ddf3f4fb9574faad6f12d8ec67e783 | 5fccd72087682c696efaf96ae85b721a1781ad89 | fix: Ensure list p2p replicator nac gate works | ## Relevant issue(s)
Resolves #4109
## Description
- Test list p2p replicator with NAC | diff --git a/tests/action/list_replicators.go b/tests/action/list_replicators.go
new file mode 100644
index 0000000000..290ee59236
--- /dev/null
+++ b/tests/action/list_replicators.go
@@ -0,0 +1,95 @@
+// Copyright 2026 Democratized Data Foundation
+//
+// This file is part of the DefraDB test suite.
+//
+// The DefraD... | 5 | 2 | 1 | [{"id": "G0", "claim": "Fix the 'beggining' -> 'beginning' typo in comments on lines 36, 74, 112 of tests/integration/acp/nac/list_p2p_replicator_test.go and line 36 of tests/integration/acp/nac/relation_admin/list_p2p_replicator_test.go.", "category": "documentation", "verdict": "uncertain", "priority": "P2", "scope":... | null |
sourcenetwork__defradb__4692 | sourcenetwork/defradb | 4,692 | defect | aec4717b89dbbff6ecbe316b6d32079ff71e2384 | bc7304d85828d09b08443a1d568cf089556f2451 | fix: Remove 'concurrent' transaction concept | ## Relevant issue(s)
Resolves #4690
## Description
**Semver breaking change.**
All transactions are now concurrent, at least once https://github.com/sourcenetwork/defradb/issues/4626 is resolved. The current implementation at least guards against concurrent writes to the same store keys.
`ConcurrentTxn`... | diff --git a/cbindings/txn.go b/cbindings/txn.go
index 659d79398b..1a9b0e4691 100644
--- a/cbindings/txn.go
+++ b/cbindings/txn.go
@@ -28,13 +28,7 @@ func CreateTransaction(nodePtr C.uintptr_t, isConcurrent C.int, isReadOnly C.int
h := cgo.Handle(nodePtr)
n := h.Value().(*node.Node) //nolint:forcetypeassert
- var... | 2 | 1 | 0 | [{"id": "G0", "claim": "Storing the raw rootTxn in BasicTxn.underlyingTxn while building the Multistore on the rootConcurentTxn wrapper splits the concurrent path in two, so code reaching the txn directly (via Txn(), Commit(), Discard()) can bypass the mutex that serializes store ops; keep the same wrapped txn on both ... | null |
sourcenetwork__defradb__4709 | sourcenetwork/defradb | 4,709 | defect | 679701904965f13b5dbafeb4c511a6d453ec4ab1 | 3c6592c105000ed1aac6171b2e8297850280b4b9 | fix: Patching of new fields on cols with sec. relations | ## Relevant issue(s)
Resolves #4707
## Description
Fixes the patching of new fields on collections with existing secondary relations.
Previously they were being created without a CRDT unless one was explicitly provided, causing subsequent document creation to fail.
Bug found by Kyle. | diff --git a/docs/data_format_changes/i4707-sec-rel-field-patches.md b/docs/data_format_changes/i4707-sec-rel-field-patches.md
new file mode 100644
index 0000000000..db2cfb48e3
--- /dev/null
+++ b/docs/data_format_changes/i4707-sec-rel-field-patches.md
@@ -0,0 +1,3 @@
+# PatchCollection fails to set CRDT if secondary r... | 3 | 3 | 1 | [{"id": "G0", "claim": "Fix the typo in the new test's comment: \"occured\" should be \"occurred\".", "category": "documentation", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "Reword the new data-format-change note so it does not read like an active bug or a regression caused... | null |
sozu-proxy__sozu__1002 | sozu-proxy/sozu | 1,002 | defect | 9301048af9ec64517bf06a7d2f38181fbf1eeae8 | b9be971350d94a9d1146bb9bda1730d88ff3e28b | Fix TrideNode wildcard and regexp management | Add unit test and e2e test for wildcard behavior.
Fix the TrieNode (is_empty, insert, remove, lookup_mut)
Documenting comments and variable renaming in the router module. | diff --git a/e2e/src/tests/tests.rs b/e2e/src/tests/tests.rs
index 284caf5e8e..993118d75e 100644
--- a/e2e/src/tests/tests.rs
+++ b/e2e/src/tests/tests.rs
@@ -1409,6 +1409,131 @@ pub fn try_head() -> State {
State::Success
}
+fn try_wildcard() -> State {
+ use sozu_command_lib::proto::command::{PathRule, Rul... | 1 | 1 | 1 | [{"id": "G0", "claim": "The change as first implemented does not work and should not be merged as is.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}] | null |
spaceandtimefdn__blitzar__60 | spaceandtimefdn/blitzar | 60 | defect | 4abec0ee5bad0f3050b5f118cc370c78a52d012b | 857ab742a1a32e4c5ac660ee156f049233786e02 | feat: use multiple GPUs for inner product proof (PROOF-716) | # Rationale for this change
Use multiple GPUs to compute inner product.
Note: the format check is failing because I think because of a difference between clang-format in the nix environment and the docker image.
# What changes are included in this PR?
* Rewrote inner product GPU driver to use transform algo... | diff --git a/sxt/proof/inner_product/BUILD b/sxt/proof/inner_product/BUILD
index 284bd097..74ffb77f 100644
--- a/sxt/proof/inner_product/BUILD
+++ b/sxt/proof/inner_product/BUILD
@@ -5,42 +5,15 @@ load(
sxt_cc_component(
name = "workspace",
- with_test = False,
- deps = [
- "//sxt/execution/async:f... | 4 | 4 | 0 | [{"id": "G0", "claim": "A comment should be added noting that the generator fold kernel's chunk options are untested best guesses that would need benchmarking to optimize.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "A comment should be added no... | null |
spaceandtimefdn__sxt-proof-of-sql__1051 | spaceandtimefdn/sxt-proof-of-sql | 1,051 | defect | 1d0f2fdc1c6c84348e5264d9b6c2eab0eff9dccb | ecbeeb8e5bfe1db9e47b20ff59a18e5b5b969767 | feat: add support for `LogicalPlan::Filter` in the planner | # Rationale for this change
Add support for `LogicalPlan::Filter` in the planner.
Depends on #1047 and #1048. | diff --git a/crates/proof-of-sql-planner/src/plan.rs b/crates/proof-of-sql-planner/src/plan.rs
index 472caac8d7..0e97eb9a43 100644
--- a/crates/proof-of-sql-planner/src/plan.rs
+++ b/crates/proof-of-sql-planner/src/plan.rs
@@ -6,7 +6,8 @@ use alloc::vec::Vec;
use datafusion::{
common::{DFSchema, JoinConstraint, J... | 3 | 1 | 1 | [{"id": "G0", "claim": "The documentation typo \"constratin\" in the zero-sum notation note of GeneralizedFilterExec.presl should be corrected to \"constraint\".", "category": "documentation", "verdict": "uncertain", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The @notice line saying the function \... | null |
spaceandtimefdn__sxt-proof-of-sql__1068 | spaceandtimefdn/sxt-proof-of-sql | 1,068 | defect | 06dbd4a2a0adc0e47c85c3a9b451fd238a636325 | dfdccc4725a57b787dc3d6303fc44986af66c6f2 | feat: support `count(*)` in the planner | # Rationale for this change
Split out of #1060. This should improve user experience by supporting `count(*)`. | diff --git a/crates/proof-of-sql-planner/src/aggregate.rs b/crates/proof-of-sql-planner/src/aggregate.rs
index fe789c9760..8153e7b1a2 100644
--- a/crates/proof-of-sql-planner/src/aggregate.rs
+++ b/crates/proof-of-sql-planner/src/aggregate.rs
@@ -1,10 +1,16 @@
use super::{PlannerError, PlannerResult};
use crate::expr... | 1 | 1 | 0 | [{"id": "G0", "claim": "Move the COUNT(*) wildcard handling into the preceding match block so each value is matched at most once, instead of a separate if/else after the match.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}] | null |
spaceandtimefdn__sxt-proof-of-sql__186 | spaceandtimefdn/sxt-proof-of-sql | 186 | defect | e40362a2865fb9c95ea5bdfb9bbc48471500cb33 | 03edb11d2bffbc72103683a747051ade90b722fd | refactor!: replace `compute_commitment_for_testing` with `RistrettoPoint::compute_commitments` | # Rationale for this change
Mentioned in #168
# What changes are included in this PR?
Replaced the `compute_commitment_for_testing` to `RistrettoPoint::compute_commitments`,in the test case that was being used
Fixes #168
/claim #168
| diff --git a/crates/proof-of-sql/src/base/database/owned_table_test_accessor_test.rs b/crates/proof-of-sql/src/base/database/owned_table_test_accessor_test.rs
index 306a6bc409..48e0380971 100644
--- a/crates/proof-of-sql/src/base/database/owned_table_test_accessor_test.rs
+++ b/crates/proof-of-sql/src/base/database/own... | 3 | 3 | 1 | [{"id": "G0", "claim": "Please remove the superfluous deletion of the blank line between the imports and the doc comment in verifiable_query_result_test_utility.rs.", "category": "maintainability", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The test should use the existing ... | null |
spaceandtimefdn__sxt-proof-of-sql__346 | spaceandtimefdn/sxt-proof-of-sql | 346 | defect | 883384baf06186ba88eaaff6714dd138321a033f | 2886332c3346d877447102a26ad372c8c8d960ba | feat: add `TableExec` | Please be sure to look over the pull request guidelines here: https://github.com/spaceandtimelabs/sxt-proof-of-sql/blob/main/CONTRIBUTING.md#submit-pr.
# Please go through the following checklist
- [x] The PR title and commit messages adhere to guidelines here: https://github.com/spaceandtimelabs/sxt-proof-of-sql/b... | diff --git a/crates/proof-of-sql/src/sql/proof_plans/dyn_proof_plan.rs b/crates/proof-of-sql/src/sql/proof_plans/dyn_proof_plan.rs
index 490867ecb7..3875d9936d 100644
--- a/crates/proof-of-sql/src/sql/proof_plans/dyn_proof_plan.rs
+++ b/crates/proof-of-sql/src/sql/proof_plans/dyn_proof_plan.rs
@@ -1,4 +1,4 @@
-use supe... | 3 | 3 | 1 | [{"id": "G0", "claim": "get_table_references should build the set with the indexset! macro instead of core::iter::once(self.table_ref).collect().", "category": "maintainability", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "final_round_evaluate should use table.iter().for_eac... | null |
spaceandtimefdn__sxt-proof-of-sql__361 | spaceandtimefdn/sxt-proof-of-sql | 361 | defect | 107fa10adc2b916dcd81b6b49239f2517c4651d6 | ac881cbde0c1daeef29a5053fd14e6da0e29c664 | feat!: compute min and max of indices for multi-table queries && remove `get_offset` and `get_length` from `ProofPlan` | Please be sure to look over the pull request guidelines here: https://github.com/spaceandtimelabs/sxt-proof-of-sql/blob/main/CONTRIBUTING.md#submit-pr.
# Please go through the following checklist
- [x] The PR title and commit messages adhere to guidelines here: https://github.com/spaceandtimelabs/sxt-proof-of-sql/b... | diff --git a/crates/proof-of-sql/src/base/database/mod.rs b/crates/proof-of-sql/src/base/database/mod.rs
index 234d077ecc..5516fb61bd 100644
--- a/crates/proof-of-sql/src/base/database/mod.rs
+++ b/crates/proof-of-sql/src/base/database/mod.rs
@@ -66,6 +66,7 @@ pub use expression_evaluation_error::{ExpressionEvaluationE... | 5 | 5 | 1 | [{"id": "G0", "claim": "When no tables are referenced, get_index_range should not fall back to the incorrect default (usize::MAX, 0); the reviewer would rather see the output be optional.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "get_index_rang... | null |
spaceandtimefdn__sxt-proof-of-sql__367 | spaceandtimefdn/sxt-proof-of-sql | 367 | defect | a0ffccbfe4c007efbb1d9b1e468ecf751c0abd39 | c1356616b3fe6d0434db7193bfc6381cafcec4ba | fix!: address NITs in PR #361 | Please be sure to look over the pull request guidelines here: https://github.com/spaceandtimelabs/sxt-proof-of-sql/blob/main/CONTRIBUTING.md#submit-pr.
# Please go through the following checklist
- [x] The PR title and commit messages adhere to guidelines here: https://github.com/spaceandtimelabs/sxt-proof-of-sql/b... | diff --git a/crates/proof-of-sql/src/base/database/mod.rs b/crates/proof-of-sql/src/base/database/mod.rs
index 5516fb61bd..99a6bdd178 100644
--- a/crates/proof-of-sql/src/base/database/mod.rs
+++ b/crates/proof-of-sql/src/base/database/mod.rs
@@ -65,9 +65,6 @@ pub use expression_evaluation_error::{ExpressionEvaluationE... | 1 | 1 | 0 | [{"id": "G0", "claim": "You could consume `table_refs` (via `.into_iter()`) instead of iterating over references to its elements in the empty-case checks in verifiable_query_result.rs.", "category": "maintainability", "verdict": "supported", "priority": "P3", "scope": "introduced"}] | null |
spaceandtimefdn__sxt-proof-of-sql__371 | spaceandtimefdn/sxt-proof-of-sql | 371 | defect | 36a8eba2692600082d4c7fda54c09442180e5632 | 3b06fec01a3282b6f102cd306234127877d36985 | refactor!: replace output of `result_evaluate` and `final_round_evaluate` of `ProofPlan` with `Table` | Please be sure to look over the pull request guidelines here: https://github.com/spaceandtimelabs/sxt-proof-of-sql/blob/main/CONTRIBUTING.md#submit-pr.
# Please go through the following checklist
- [x] The PR title and commit messages adhere to guidelines here: https://github.com/spaceandtimelabs/sxt-proof-of-sql/b... | diff --git a/crates/proof-of-sql/src/base/database/table.rs b/crates/proof-of-sql/src/base/database/table.rs
index 29aebaf36a..6137661a7d 100644
--- a/crates/proof-of-sql/src/base/database/table.rs
+++ b/crates/proof-of-sql/src/base/database/table.rs
@@ -102,6 +102,10 @@ impl<'a, S: Scalar> Table<'a, S> {
pub fn c... | 7 | 6 | 1 | [{"id": "G0", "claim": "Consider deriving Clone for Table and passing it by value instead of by reference, and having Table implement IntoIterator so the columns can be built with `Vec::from_iter(table)`.", "category": "design", "verdict": "uncertain", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Us... | null |
spaceandtimefdn__sxt-proof-of-sql__379 | spaceandtimefdn/sxt-proof-of-sql | 379 | defect | 709b93a75585cad3ffac6a9375c0969ad16003c0 | 6115de0e4358523c2d7e372182444129728aedc7 | feat: add `SliceExec` | Please be sure to look over the pull request guidelines here: https://github.com/spaceandtimelabs/sxt-proof-of-sql/blob/main/CONTRIBUTING.md#submit-pr.
# Please go through the following checklist
- [x] The PR title and commit messages adhere to guidelines here: https://github.com/spaceandtimelabs/sxt-proof-of-sql/b... | diff --git a/crates/proof-of-sql/src/sql/proof_plans/dyn_proof_plan.rs b/crates/proof-of-sql/src/sql/proof_plans/dyn_proof_plan.rs
index e117ed8d3e..dc988b9da2 100644
--- a/crates/proof-of-sql/src/sql/proof_plans/dyn_proof_plan.rs
+++ b/crates/proof-of-sql/src/sql/proof_plans/dyn_proof_plan.rs
@@ -1,4 +1,4 @@
-use supe... | 6 | 5 | 2 | [{"id": "G0", "claim": "The visibility of verify_filter should be pub(super) rather than the pub(crate) the PR gave it.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "get_slice_select should be rewritten as the suggested itertools repeat_n/chain/take exp... | null |
spaceandtimefdn__sxt-proof-of-sql__384 | spaceandtimefdn/sxt-proof-of-sql | 384 | defect | fc7d500ceea55cfae9adef1a13e1646bf076b549 | 668ace0eff8944e05533902d7625cc2d80206ea3 | feat!: allow `ProjectionExec` to take general inputs | Please be sure to look over the pull request guidelines here: https://github.com/spaceandtimelabs/sxt-proof-of-sql/blob/main/CONTRIBUTING.md#submit-pr.
# Please go through the following checklist
- [x] The PR title and commit messages adhere to guidelines here: https://github.com/spaceandtimelabs/sxt-proof-of-sql/b... | diff --git a/crates/proof-of-sql/src/sql/proof_exprs/column_expr_test.rs b/crates/proof-of-sql/src/sql/proof_exprs/column_expr_test.rs
index b7e97e83dc..2998f5c055 100644
--- a/crates/proof-of-sql/src/sql/proof_exprs/column_expr_test.rs
+++ b/crates/proof-of-sql/src/sql/proof_exprs/column_expr_test.rs
@@ -1,7 +1,7 @@
... | 2 | 2 | 1 | [{"id": "G0", "claim": "ProjectionExec::get_column_references should return all of the input's column references (projection outputs are input columns), not just the references of the aliased result expressions.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", ... | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.