Repository navigation
UpdateExpression ADD creates no missing map on its path - #596
Conversation
Amazon DynamoDB applies `ADD #m.#a :n` only when every element above the
leaf exists and is the container the next element needs; otherwise it
answers `The document path provided in the update expression is invalid
for update` and writes nothing (measured 2026-10-26 at 02:38 and 02:54
UTC, each case twice). ExtendDB created each missing map, so
`ADD #z.#a :one` on an item without `z` stored `z: {a: 1}`, and on a
missing key created the item.
`apply_add` now reaches the leaf's parent through
`navigate_to_existing_parent_map`, which refuses a missing or wrong-type
element, and an index past the end of a list, with the service's text.
REMOVE and DELETE through a missing parent are unchanged: the service
accepts them when the key holds no item and refuses them otherwise, and
the evaluator does not know which case it is in.
Dual-target wire tests from the 2026-10-26 measurements: a missing top-level attribute, a missing map below an existing one, a parent of the wrong type for a name or an index, an index past the end of a list, a missing key, the request's other actions left unapplied, a failing and a passing condition, and the TransactWriteItems cancellation reason; and the applied cases, a member of an existing map and of a map inside a list.
An index past the end of a list was refused in the tests only where the
list held a number, which a parent of the wrong type refuses too, so an
index clamped to the last element passed them. The new rows put a map in
the list: `ADD #m.#l[3].#a :one` with `m: {l: [{}]}` and `ADD #l[0].#a
:one` with `l: []`, both refused by the service (measured 2026-10-26 at
03:33 UTC, twice), and the matching unit test.
…#812) - Narrow scope to DELETE targeting list element sets (e.g. DELETE l[0] :v). - Exclude ADD changes to eliminate architectural overlap with open PR ExtendDB#596 (which refactors missing-parent navigation in apply_add). - Implement DeleteTarget container supporting Map and List leaf targets. - Add strict unit tests for String, Number, and Binary sets in list elements, nested list/map paths, operand type mismatches, and pre-existing no-op paths.
demohan
left a comment
There was a problem hiding this comment.
ADD answers as the service does on every path this PR covers. Each of 185 request shapes was sent twice to the service in us-east-1 and to builds of this head on SQLite and PostgreSQL, of main 89fc971, and of this head merged with main (for PartiQL). It covered N, SS, NS and BS under missing, partly missing and wrong-type parents, and on a missing key. With SET, REMOVE, DELETE, conditions, ReturnValues, ReturnValuesOnConditionCheckFailure and TransactWriteItems, the error class and sentence, whether anything was written, the returned attributes and the cancellation reasons in order all match. So do PartiQL set_add through ExecuteStatement, ExecuteTransaction and BatchExecuteStatement on the merged build. Maps nested in lists, lists in lists, indexes past the end, NULL and set parents, and dotted names through ExpressionAttributeNames match too, and SQLite, PostgreSQL and MongoDB give identical answers. Main creates the missing maps, including on a missing key, and stored 33 and 40 level items from one nested ADD that this head refuses. Every backend goes through this evaluator: the MongoDB fast path skips multi-element paths (data_engine.rs:1644), and the Cassandra commit step re-runs the same function on the locked item the prepare step already checked.
fmt and clippy are clean, 1,772 workspace tests pass, core passes on the 1.88 MSRV, the new file passes 23 tests twice on SQLite, PostgreSQL and the service and fails 15 on main, CI is green on 34 checks, and six negative controls each fail the unit and wire tests.
Approving. The items below are small and can land in this PR or a follow-up.
| list.get_mut(*idx).ok_or_else(invalid)? | ||
| } | ||
| } | ||
| _ => return Err(invalid()), |
There was a problem hiding this comment.
No test reaches the wrong-type check in the middle of a path: every wrong-type case is the leaf's parent or a missing element. With this arm changed to return a different error, the 5 unit tests and 23 wire tests pass. The code is right: ADD #s.#a.#b with s a string and ADD #m[0].#a with m a map, among 7 shapes sent twice, are refused with the service's text and leave the item unchanged here and on the service. Two rows would hold it.
| _update(dynamodb_client, table, key, expr, values) | ||
| assert _stored(dynamodb_client, table, key)[name] == after | ||
|
|
||
|
|
There was a problem hiding this comment.
The applied cases check only the attribute they change, and the failing condition test at :128 does not check the item is unchanged. Comparing the whole stored item in both would catch a write to a sibling attribute.
| maps: &ExpressionMaps, | ||
| ) -> Result<(), DynamoDbError> { | ||
| let target = navigate_to_parent_map_or_create(item, path, maps)?; | ||
| let target = navigate_to_existing_parent_map(item, path, maps)?; |
There was a problem hiding this comment.
With a missing parent and a wrong operand type, the answer changes from main's An operand in the update expression has an incorrect data type to the path sentence; the service answers Invalid UpdateExpression: Incorrect operand type ... operator: ADD/DELETE. The body lists the ADD cases against #399. DELETE #ss :n ADD #z.#a :one is the same change, with the ADD refusal now answering ahead of the DELETE type error, and the body can list it.
Merges main at b0d1c64, three commits past 018715e: - #1280: the MongoDB lease test ends the killed holder's lease by data - #1009: the WebAssembly browser build - #596: UpdateExpression ADD creates no missing map on its path One conflict, in the checks before authentication in crates/server/src/handler.rs. #1009 moved the operation name check and the body parse into extenddb_engine::parse_request, and the point-in-time refusal into ParsedRequest::admit. This branch replaced that parse with a depth scan and a parse before authentication. For a deep body it runs a syntax walk instead, and parses the body after authentication. Kept: this branch's sequence. The handler checks the operation name and scans the depth. Then it parses the body or walks a deep body's syntax. Then it authenticates the caller, parses a deep body, and applies the point-in-time refusal. The handler calls is_known_operation and refuse_point_in_time_recovery again, so its hunk for admit goes too. The next commit makes the handler call the engine's steps again around its own parse. Auto-merged: crates/server/Cargo.toml keeps main's default feature on the engine dependency and this branch's unbounded_depth feature on serde_json.
Merges 1a9efd7 of fix/request-nesting-depth. That brings its merge of main at b0d1c64 (#1280, #1009 and #596). It also brings the commit that makes the handler call extenddb_engine::check_operation before its body checks, and with_body(input).admit() after authentication. No conflicts. crates/server/src/handler.rs auto-merged. The two hunks of the other branch are the name check and the point-in-time refusal. This branch's one-argument check_request_syntax call sits between them. request_parse.rs and the two test files are as on this branch. One edit to the merge result is in README.md. #1009's item on the PartiQL operations gives a server's answer to a body that does not parse. That answer has the message "Start of structure or map found where not expected: …". This branch answers such a body with no message, so the item now says that.
Merges 654fef3 of fix/1195-syntax-fault-message, its merge of fix/request-nesting-depth at 1a9efd7. That brings main at b0d1c64 (#1280, #1009 and #596). It also brings the commit that makes the handler call extenddb_engine::check_operation and with_body(input).admit() around the server's parse. The README item on the PartiQL operations now says that a server answers a body that does not parse with no message. No conflicts. None of these commits changes a file of this branch.
Merges 654fef3 of fix/1195-syntax-fault-message, its merge of fix/request-nesting-depth at 1a9efd7. That brings main at b0d1c64 (#1280, #1009 and #596). It also brings the commit that makes the handler call extenddb_engine::check_operation and with_body(input).admit() around the server's parse. The README item on the PartiQL operations now says that a server answers a body that does not parse with no message. No conflicts. crates/server/src/handler.rs auto-merged. The two hunks of the other branch are the name check and the point-in-time refusal. This branch's empty body branch, before the parse and the syntax check, sits between them. So the handler checks the operation name and scans the depth, and it leaves an empty body for later. Then it authenticates the caller, parses the body and calls admit.
Merges 61eee55 of fix/1257-leading-zero-numbers, its merge of fix/1195-syntax-fault-message at 654fef3. That brings main at b0d1c64 (#1280, #1009 and #596). It also brings the commit that makes the handler call extenddb_engine::check_operation and with_body(input).admit() around the server's parse. The README item on the PartiQL operations now says that a server answers a body that does not parse with no message. No conflicts. None of these commits changes a file of this branch.
#596 rewrote the ADD path walk as `navigate_to_existing_parent_map`, which answers an index past the end with the document path text. The merge takes main's function, so this branch keeps only its SET change in `set_nested`.
#596 merged first with `update_add_parent_tests.rs`, which sends `ADD l[5].a :one` and expects the document path text. The ADD row of `a_path_through_a_list_index_past_the_end` sent the same shape, so it goes, and the test keeps the SET rows that this PR changes.
Main is at a417b2f, two commits after the last merge (#596 and #1173). No file conflicted. Main and this branch change one common file, crates/storage-cassandra/tests/common/mod.rs, in different hunks. #1173 reads the account keyspaces through a workers helper, and this branch adds creation_date_time to the test tables.
Main is at 80490c6, eight commits after the last merge (#596, #1173, #398, #428, #544, #567, #584 and #588). One file conflicted: crates/engine/src/query.rs. #544 moves the Limit check and the parameter mix check of Query into validate_query_request_body, which reads the raw body before deserialization. This branch moves the same two checks to the start of the handler, after deserialization. The merge keeps the checks of #544 and drops the copies of this branch, which no request can reach. It keeps has_cond_op for the ConditionalOperator check. The conflict hunks in handle_query: - At the old Limit check, both sides remove the check. The merge keeps the comment of #544. - Next, this branch keeps the variables of the mix check, and main keeps the index key schema. The merge keeps the key schema where this branch has it. It drops the mix check variables, which nothing reads now, and keeps the comment of #544 and has_cond_op. - Before the ExclusiveStartKey check, this branch removes the filter operand checks, because its semantic pass runs them at parse time. #544 adds validate_key_condition_types there. The merge keeps the type check and drops the filter checks. #544 refuses a begins_with value that is not an S or a B ahead of an unused value (rows q5 and p4 of tests/test_query_key_value_types.py, measured 2026-11-06). This branch checks unused values before the table lookup, so the merged code gave the unused value message for those two rows. The merge calls refuse_begins_with_on_number after the key condition parse and removes the later call. The values of legacy KeyConditions pass validate_legacy_conditions before that point. Git merged four other files that both sides change, with no overlap: crates/core/src/expression/key_condition.rs, crates/engine/src/lib.rs, crates/storage-cassandra/tests/common/mod.rs and docs/differences-from-dynamodb.md.
Main is at 14ade59. This branch last had main at 018715e, through fix/query-key-value-types. Since then, these eleven commits merged into main: #1280, #1009, #596, #1173, #398, #428, #544, #567, #584, #588 and #864. #544 is the squash of fix/query-key-value-types, which was the base branch of this PR. This branch already holds the last head of that branch, 31c5f3d. Main has the same version of each conflicted file as 31c5f3d. So each conflict hunk has the lines of #544 on one side. The other side has the change of this branch to the same lines. The merge keeps the version of this branch in each file: - crates/engine/src/query_key_values.rs: this branch makes two constants and four functions pub(crate) for the Scan checks, and re-exports three functions of unreadable.rs. It reads a number in Segment and TotalSegments as it reads one in Limit, with the dates in the doc comment of shape_fault_first. It passes validate_no_parameter_mix to unreadable_value_checks. - crates/engine/src/query_key_values/unreadable.rs: this branch makes three functions pub(crate). unreadable_value_checks takes the parameter mix check as a parameter, so this branch deletes the import of validate_no_parameter_mix. - crates/server/src/request_helpers.rs: this branch runs the Scan request checks before the IAM decision, as main does for Query. - tests/test_query_leading_keys_values.py: this branch moves the setup of TestLeadingKeysWithAnInvalidKeyValue to the base class ManagementPrincipals, which tests/test_scan_checks_before_authorization.py imports. Git merged crates/engine/src/lib.rs with no conflict. Main compiles three modules only off wasm32 (backup, import_export_io and private_fs), and adds the modules backup_requests and pre_dispatch. This branch adds the module scan_request and changes the doc comment of validate_enum_fields.
Main is at 14ade59. This branch last had main at 018715e, through fix/query-key-value-types. Since then, these eleven commits merged into main: #1280, #1009, #596, #1173, #398, #428, #544, #567, #584, #588 and #864. #544 is the squash of fix/query-key-value-types, which was the base branch of this PR. This branch already holds the last head of that branch, 31c5f3d. Main has the same version of each conflicted file as 31c5f3d. So each conflict hunk has the lines of #544 on one side. The other side has the change of this branch to the same lines. The merge keeps the version of this branch in each file: - crates/engine/src/query_key_values.rs: the dates and the order in the module and function doc comments, the call of validate_condition_value_numbers, and the two functions validate_condition_value_numbers and refuse_first_fault. - crates/engine/src/query_key_values/request_order_tests.rs: the import of Value and the test legacy_condition_values_get_the_number_check. - tests/test_query_key_value_types.py: the dates in the docstring, the nn_table fixture and the helpers eq, N1, KC_ABC and QF_BOB. The merge also keeps the rows k1 to k16, and nn_table in the tables fixture and the control test. Git merged crates/engine/src/lib.rs with no conflict. This branch changes that file only through the commits of #544, so the merged file is the file of main.
Main is at 14ade59. This branch last had main at 018715e, through fix/query-key-value-types. Since then, these eleven commits merged into main: #1280, #1009, #596, #1173, #398, #428, #544, #567, #584, #588 and #864. #544 is the squash of fix/query-key-value-types, which was the base branch of this PR. This branch already holds the last head of that branch, 31c5f3d. Main has the same version of each conflicted file as 31c5f3d. So each conflict hunk has the lines of #544 on one side. The other side has the change of this branch to the same lines. The merge keeps the version of this branch in each file: - crates/core/src/partiql/params.rs: this branch deletes the two base64 imports, because decode_base64 replaces check_base64. - crates/core/src/types/attribute_value.rs: this branch adds BASE64_TEXTS, decode_base64 and is_base64_refusal after the two constants that #544 makes public. - crates/core/src/types/mod.rs: this branch adds decode_base64 and is_base64_refusal to the names that #544 re-exports. - tests/test_query_leading_keys_values.py and tests/test_query_value_shapes.py: this branch moves _raw_query to tests/raw_signed_request.py as client_post, and calls client_post in its place. No other test file on main calls _raw_query. Git merged crates/engine/src/lib.rs with no conflict. Main compiles three modules only off wasm32 (backup, import_export_io and private_fs), and adds the modules backup_requests and pre_dispatch. This branch adds serialization_exception and calls it from deserialize_error.
The base merges main at 14ade59. That brings #544 as a squash and ten other commits: #1280, #1009, #596, #1173, #398, #428, #567, #584, #588 and #864. One file conflicted: crates/engine/src/import_export.rs. #1009 moves the body of handle_import_table to import_table in the new file crates/engine/src/import_export/files.rs. The wasm32 build replaces that file with a stand-in that refuses the operation. handle_import_table keeps the enabled check and calls files::import_table. This branch changes the body that #1009 moves. When read_items finds a line that it cannot read, the import keeps the items before that line. It counts the line as one error and reads no more of the file. The merge keeps the code of main in import_export.rs, with the doc comment of this branch on handle_import_table. It makes the three changes of this branch to the body in files.rs: - The variable read holds the result of read_items: the items and the line that the reader cannot read. - The loop takes the items, then that line. At that line it logs the line number and the fault, counts one error and ends the import. - The comment over the FAILED status adds the date 2026-11-22, for the lines that the import cannot read. The body of import_table in files.rs is now the same as the body of handle_import_table at the head of this branch. Git merged docs/manuals/07-upgrade-manual.md with no conflict. #398 adds its v1.1.0 entry at the top of "Behavior Changes by Release". This branch adds its v1.1.0 entry at the end of that section.
The base merges main at 14ade59. That brings #544 as a squash and ten other commits: #1280, #1009, #596, #1173, #398, #428, #567, #584, #588 and #864. The merge has no conflict. Git merged crates/engine/src/lib.rs, the one file with changes on both sides. Main compiles three modules only off wasm32 (backup, import_export_io and private_fs), and adds the modules backup_requests and pre_dispatch. This branch adds single_write_refusal after deserialize_error.
Moves the workspace version from 1.0.0 to 1.1.0 on every surface that carries it: the root Cargo.toml version and its 13 exact pins, the 15 workspace entries in Cargo.lock (no third-party entry changes), packaging/npm/package.json (the version and the five platform pins), the four license-notice files (regenerated with cargo-about 0.9.0), and the sample `extenddb version` and `serve` output in docs/getting-started.md and docs/manuals/04-quickstart-setup-guide.md. This is a minor release. Since v1.0.0, main has two features (#468, #1009) and changes that make ExtendDB answer as DynamoDB does, which docs/versioning.md ships in a minor release. It adds no catalog migration (RELEASED_THROUGH stays 12, the last id), no configuration key and no backup format version. Upgrade manual, Behavior Changes by Release: v1.1.0 entries for #468 (AT_TIMESTAMP, and the GetShardIterator answers it changes), #503, #544, #567, #765 and #774, #588, #596, #690, #1144, #1173 and #1194, next to the existing entries for #398 and #526. The #526 entry now gives the old TransactWriteItems mismatch message, and the entries are in PR order. Current Status, the General Upgrade Procedure and the Rollback Procedure cover 1.0.0 to 1.1.0: no migrate step, and a rollback runs the 1.0.0 binary on the same catalog, with the two limits the manual names (#526 tokens, and 1.0.0's catalog-check --fix). The rollback note of the KEK-file switch says that 1.0.0 serves a switched catalog. docs/manuals/11-deployment-guide.md: a sentence about the release before the one that carries #398 is gone. Signed-off-by: Scott Robinson <robinnsc@amazon.com>
Moves the workspace version from 1.0.0 to 1.1.0 on every surface that carries it: the root Cargo.toml version and its 13 exact pins, the 15 workspace entries in Cargo.lock (no third-party entry changes), packaging/npm/package.json (the version and the five platform pins), the four license-notice files (regenerated with cargo-about 0.9.0), and the sample `extenddb version` and `serve` output in docs/getting-started.md and docs/manuals/04-quickstart-setup-guide.md. This is a minor release. Since v1.0.0, main has two features (#468, #1009) and changes that make ExtendDB answer as DynamoDB does, which docs/versioning.md ships in a minor release. It adds no catalog migration (RELEASED_THROUGH stays 12, the last id), no configuration key and no backup format version. Upgrade manual, Behavior Changes by Release: v1.1.0 entries for #468 (AT_TIMESTAMP, and the GetShardIterator answers it changes), #486, #503, #544, #567, #765 and #774, #588, #596, #690, #963, #1144, #1173, #1194 and #1375, next to the existing entries for #398, #526 and #1166. The #526 entry now gives the old TransactWriteItems mismatch message, and the entries are in PR order. Current Status, the General Upgrade Procedure and the Rollback Procedure cover 1.0.0 to 1.1.0: no migrate step, the #1166 checks before a PostgreSQL upgrade, and a rollback runs the 1.0.0 binary on the same catalog, with the two limits the manual names (#526 tokens, and 1.0.0's catalog-check --fix). The rollback note of the KEK-file switch says that 1.0.0 serves a switched catalog. docs/manuals/11-deployment-guide.md: a sentence about the release before the one that carries #398 is gone.
Moves the workspace version from 1.0.0 to 1.1.0 on every surface that carries it: the root Cargo.toml version and its 13 exact pins, the 15 workspace entries in Cargo.lock (no third-party entry changes), packaging/npm/package.json (the version and the five platform pins), the four license-notice files (regenerated with cargo-about 0.9.0), and the sample `extenddb version` and `serve` output in docs/getting-started.md and docs/manuals/04-quickstart-setup-guide.md. This is a minor release. Since v1.0.0, main has three features (#468, #1009, #1449) and changes that make ExtendDB answer as DynamoDB does, which docs/versioning.md ships in a minor release. It adds no catalog migration (RELEASED_THROUGH stays 12, the last id), no configuration key and no backup format version. Upgrade manual, Behavior Changes by Release: v1.1.0 entries for #468 (AT_TIMESTAMP, and the GetShardIterator answers it changes), #486, #503, #544, #567, #765 and #774, #588, #596, #690, #963, #1144, #1173, #1194, #1375 and #1522, next to the existing entries for #398, #526, #1166, #1449 and #1523. The #526 entry now gives the old TransactWriteItems mismatch message, the #1523 heading takes the v1.1.0: prefix, and the entries are in PR order. Current Status, the General Upgrade Procedure and the Rollback Procedure cover 1.0.0 to 1.1.0: no migrate step, the #1166 checks before a PostgreSQL upgrade, and a rollback runs the 1.0.0 binary on the same catalog, with the two limits the manual names (#526 tokens, and 1.0.0's catalog-check --fix). The rollback note of the KEK-file switch says that 1.0.0 serves a switched catalog. docs/manuals/11-deployment-guide.md: a sentence about the release before the one that carries #398 is gone.
Moves the workspace version from 1.0.0 to 1.1.0 on every surface that carries it: the root Cargo.toml version and its 13 exact pins, the 15 workspace entries in Cargo.lock (no third-party entry changes), packaging/npm/package.json (the version and the five platform pins), the four license-notice files (regenerated with cargo-about 0.9.0), and the sample `extenddb version` and `serve` output in docs/getting-started.md and docs/manuals/04-quickstart-setup-guide.md. This is a minor release. Since v1.0.0, main has three features (#468, #1009, #1449) and changes that make ExtendDB answer as DynamoDB does, which docs/versioning.md ships in a minor release. It adds no catalog migration (RELEASED_THROUGH stays 12, the last id), no configuration key and no backup format version. Upgrade manual, Behavior Changes by Release: v1.1.0 entries for #468 (AT_TIMESTAMP, and the GetShardIterator answers it changes), #486, #503, #544, #567, #765 and #774, #588, #596, #690, #963, #1144, #1173, #1194, #1375 and #1522, next to the existing entries for #398, #526, #1166, #1449 and #1523. The #526 entry now gives the old TransactWriteItems mismatch message, the #1523 heading takes the v1.1.0: prefix, and the entries are in PR order. Current Status, the General Upgrade Procedure and the Rollback Procedure cover 1.0.0 to 1.1.0: no migrate step, the #1166 checks before a PostgreSQL upgrade, and a rollback runs the 1.0.0 binary on the same catalog, with the two limits the manual names (#526 tokens, and 1.0.0's catalog-check --fix). The rollback note of the KEK-file switch says that 1.0.0 serves a switched catalog. docs/manuals/11-deployment-guide.md: a sentence about the release before the one that carries #398 is gone. docs/troubleshooting.md: the bus error entry names 1.0.0 as the release that has the bug, so its line carries a version-literal-ok marker.
* chore(release): bump version to 1.1.0 Moves the workspace version from 1.0.0 to 1.1.0 on every surface that carries it: the root Cargo.toml version and its 13 exact pins, the 15 workspace entries in Cargo.lock (no third-party entry changes), packaging/npm/package.json (the version and the five platform pins), the four license-notice files (regenerated with cargo-about 0.9.0), and the sample `extenddb version` and `serve` output in docs/getting-started.md and docs/manuals/04-quickstart-setup-guide.md. This is a minor release. Since v1.0.0, main has three features (#468, #1009, #1449) and changes that make ExtendDB answer as DynamoDB does, which docs/versioning.md ships in a minor release. It adds no catalog migration (RELEASED_THROUGH stays 12, the last id), no configuration key and no backup format version. Upgrade manual, Behavior Changes by Release: v1.1.0 entries for #468 (AT_TIMESTAMP, and the GetShardIterator answers it changes), #486, #503, #544, #567, #765 and #774, #588, #596, #690, #963, #1144, #1173, #1194, #1375 and #1522, next to the existing entries for #398, #526, #1166, #1449 and #1523. The #526 entry now gives the old TransactWriteItems mismatch message, the #1523 heading takes the v1.1.0: prefix, and the entries are in PR order. Current Status, the General Upgrade Procedure and the Rollback Procedure cover 1.0.0 to 1.1.0: no migrate step, the #1166 checks before a PostgreSQL upgrade, and a rollback runs the 1.0.0 binary on the same catalog, with the two limits the manual names (#526 tokens, and 1.0.0's catalog-check --fix). The rollback note of the KEK-file switch says that 1.0.0 serves a switched catalog. docs/manuals/11-deployment-guide.md: a sentence about the release before the one that carries #398 is gone. docs/troubleshooting.md: the bus error entry names 1.0.0 as the release that has the bug, so its line carries a version-literal-ok marker. * docs(upgrade): add the v1.1.0 entry of #1290, put #1349's in order #1290 merged after this branch was rebased. It changes the answer to a request with no Authorization header, so it gets a v1.1.0 entry. The merge of main put the #1349 entry after the #1523 entry. It moves to the place of its number, beside the new #1290 entry. --------- Co-authored-by: Lee Hannigan <29015211+LeeroyHannigan@users.noreply.github.com>
This adds a PR title check, the `conventional` job of the PR title workflow, which fails when a PR title is not a conventional commit subject. It changes nothing else. It relies on merge settings that the admin applies when this merges (last paragraph). The release automation tracked in #1395 will build the changelog from the commit subjects on main. Most subjects on main have the conventional shape, but nothing checks it; for example #596's (b0d1c64) does not. In the 0.1.15 cycle two squash-merged PR titles did not have it, and seven merge commits brought 24 more subjects to main that do not have it. devtools/check-pr-title accepts `type(scope)!: summary`, with the scope and the `!` optional. The type is one of the eleven of commitlint's config-conventional: build, chore, ci, docs, feat, fix, perf, refactor, revert, style and test. A scope is lowercase letters, digits, `.`, `_`, `/` and `-`. A refusal names the rule that failed: the shape, the type, the scope or the space after the colon. The PR title workflow runs it on opened, edited, reopened and synchronize events. The title reaches the script through the environment. The job checks out devtools/ (in cone mode, also the files at the repository root) from the default branch, so a PR that edits the checker is checked by main's version, and an older or stacked PR whose base has no checker still gets main's. The workflow file itself runs from the PR's merge ref, as every pull_request workflow does, so a change to it is protected by review only. The job fails on this PR, because main has no checker yet. A merge queue run has no title, so the job is skipped there, which counts as passing if the check is made required. CONTRIBUTING.md says how to title a PR and a revert. Settings to apply when this merges: allow squash merging only, in the repository settings, the main ruleset's allowed merge methods and the merge queue's merge method. Under "Allow squash merging", set the default commit message to "Pull request title and description" (API: squash_merge_commit_title PR_TITLE, squash_merge_commit_message PR_BODY). A squash commit then takes the PR title as its subject and the PR description as its message. With the current "Default message", a single-commit PR's squash subject is the commit's subject, which this check does not see. Then add `conventional` (GitHub Actions) to main's required status checks. Merge this before the release-please change of #1395 (#1467), which builds on its CONTRIBUTING.md text. Signed-off-by: Scott Robinson <robinnsc@amazon.com>
This adds a PR title check, the `conventional` job of the PR title workflow, which fails when a PR title is not a conventional commit subject. It changes nothing else. It relies on merge settings that the admin applies when this merges (last paragraph). The release automation tracked in #1395 will build the changelog from the commit subjects on main. Most subjects on main have the conventional shape, but nothing checks it; for example #596's (b0d1c64) does not. In the 0.1.15 cycle two squash-merged PR titles did not have it, and seven merge commits brought 24 more subjects to main that do not have it. devtools/check-pr-title accepts `type(scope)!: summary`, with the scope and the `!` optional. The type is one of the eleven of commitlint's config-conventional: build, chore, ci, docs, feat, fix, perf, refactor, revert, style and test. A scope is lowercase letters, digits, `.`, `_`, `/` and `-`. A refusal names the rule that failed: the shape, the type, the scope or the space after the colon. The PR title workflow runs it on opened, edited, reopened and synchronize events. The title reaches the script through the environment. The job checks out devtools/ (in cone mode, also the files at the repository root) from the default branch, so a PR that edits the checker is checked by main's version, and an older or stacked PR whose base has no checker still gets main's. The workflow file itself runs from the PR's merge ref, as every pull_request workflow does, so a change to it is protected by review only. Until main has a checker, on this PR and the PRs stacked on it, the job uses the PR's own copy. A merge queue run has no title, so the job is skipped there, which counts as passing if the check is made required. CONTRIBUTING.md says how to title a PR and a revert. Settings to apply when this merges: allow squash merging only, in the repository settings, the main ruleset's allowed merge methods and the merge queue's merge method. Under "Allow squash merging", set the default commit message to "Pull request title and description" (API: squash_merge_commit_title PR_TITLE, squash_merge_commit_message PR_BODY). A squash commit then takes the PR title as its subject and the PR description as its message. With the current "Default message", a single-commit PR's squash subject is the commit's subject, which this check does not see. Then add `conventional` (GitHub Actions) to main's required status checks. Merge this before the release-please change of #1395 (#1467), which builds on its CONTRIBUTING.md text. Signed-off-by: Scott Robinson <robinnsc@amazon.com>
) This adds a PR title check, the `conventional` job of the PR title workflow, which fails when a PR title is not a conventional commit subject. It changes nothing else. It relies on merge settings that the admin applies when this merges (last paragraph). The release automation tracked in ExtendDB#1395 will build the changelog from the commit subjects on main. Most subjects on main have the conventional shape, but nothing checks it; for example ExtendDB#596's (b0d1c64) does not. In the 0.1.15 cycle two squash-merged PR titles did not have it, and seven merge commits brought 24 more subjects to main that do not have it. devtools/check-pr-title accepts `type(scope)!: summary`, with the scope and the `!` optional. The type is one of the eleven of commitlint's config-conventional: build, chore, ci, docs, feat, fix, perf, refactor, revert, style and test. A scope is lowercase letters, digits, `.`, `_`, `/` and `-`. A refusal names the rule that failed: the shape, the type, the scope or the space after the colon. The PR title workflow runs it on opened, edited, reopened and synchronize events. The title reaches the script through the environment. The job checks out devtools/ (in cone mode, also the files at the repository root) from the default branch, so a PR that edits the checker is checked by main's version, and an older or stacked PR whose base has no checker still gets main's. The workflow file itself runs from the PR's merge ref, as every pull_request workflow does, so a change to it is protected by review only. Until main has a checker, on this PR and the PRs stacked on it, the job uses the PR's own copy. A merge queue run has no title, so the job is skipped there, which counts as passing if the check is made required. CONTRIBUTING.md says how to title a PR and a revert. Settings to apply when this merges: allow squash merging only, in the repository settings, the main ruleset's allowed merge methods and the merge queue's merge method. Under "Allow squash merging", set the default commit message to "Pull request title and description" (API: squash_merge_commit_title PR_TITLE, squash_merge_commit_message PR_BODY). A squash commit then takes the PR title as its subject and the PR description as its message. With the current "Default message", a single-commit PR's squash subject is the commit's subject, which this check does not see. Then add `conventional` (GitHub Actions) to main's required status checks. Merge this before the release-please change of ExtendDB#1395 (ExtendDB#1467), which builds on its CONTRIBUTING.md text. Signed-off-by: Scott Robinson <robinnsc@amazon.com>
An UpdateExpression
ADDon a nested path now needs every element above the leaf to exist, as DynamoDB requires. Before, ExtendDB created each missing map on the way, soADD #z.#a :oneon an item withoutzstoredz: {a: 1}, and on a missing key it created the item with that map.What the service answers
Measured on 2026-10-26 at 02:38, 02:54, 03:33 and 03:41 UTC in us-east-1, each case twice with the same answer.
ADD #m.#a :onewithman empty map is applied (m: {a: 1}), with a number or a set. So isADD #l[0].#a :onewithla list holding an empty map.The document path provided in the update expression is invalid for updateand writes nothing, the request's other actions included. That covers a missing top-level attribute, a missing map below an existing one, a string, number or list where a map is needed, a map or a string where a list is needed, and an index past the end of a list.ADD #z.#a :oneanswers the same and creates no item.ValidationErrorreason carrying the same text.The change
crates/core/src/expression/update_evaluator.rs:apply_addreaches the leaf's parent through the newnavigate_to_existing_parent_map, which refuses a missing or wrong-type element with the service's text, in place ofnavigate_to_parent_map_or_create. An index past the end of a list above the leaf was answered withThe provided expression refers to an attribute that does not exist in the item; it now has the service's text too. The file goes from 642 to 628 lines, and the new unit tests are in a file of their own. Every backend applies nestedADDthrough this function: the MongoDB native update path takes only one-element paths.What is not changed here
REMOVEandDELETEthrough a missing or wrong-type parent. The service refuses them on an existing item with the same text and, when the key holds no item, answers OK and stores nothing (measured at 02:54 UTC). ExtendDB treats the action as a no-op in both cases; on a missing key it then stores an item with only the key, which fix(update): write nothing for a removal-only UpdateItem on a missing key #508 addresses. Telling the two cases apart needs the evaluator to know whether the item existed, which is a separate change.ADDinto a list element (ADD #l[0] :one). The service adds to the element, or appends when the index is past the end; ExtendDB refuses it, before and after this change, now with the service's refusal text for a map parent.ADDpath against the item as it was before the update. ExtendDB applies SET and REMOVE first, soSET #l[5] = :m ADD #l[1].#a :oneonl: [1]is refused by the service and applied by ExtendDB, andREMOVE #l[0] ADD #l[1].#a :oneis applied by the service to the element that was at index 1 and by ExtendDB to the next one or refused.SET #z = :m ADD #z.#a :oneandREMOVE #m ADD #m.#a :oneanswer the service's overlapping paths error; ExtendDB has no overlap check on UpdateExpression (fix(expressions): validate in the service's order, with its messages #399 adds one).ADDof a string or a list answers the service's operand type error before the path is looked at; ExtendDB answers its own operand text where the parent exists and the path text where it does not (fix(expressions): validate in the service's order, with its messages #399 adds the service's operand check).Tests
crates/core/src/expression/update_add_parent_tests.rs(new): a member of an existing map, a missing parent, a parent of the wrong type, an index past the end of a list of maps, a map inside a list.tests/test_update_add_missing_parent.py: 23 dual-target wire tests from the measurements.Run locally against SQLite on 2026-10-26:
main: 15 failed, 8 passed. The 8 that pass onmainare the applied cases, the failing condition, and the four refusals wheremainalready refused a parent that is not a map (a string, a number, a list, or an index into a string).tests/whose test names matchupdate,add,transact,nested,item_operations,conditionalorset: 461 passed, 7 skipped, with the new file at 21 tests; onmainthe same 448 pass and the new file's 13 fail.tests/pythonfiles matchingupdate,add,transact,nestedorset: 73 passed.cargo +1.97.0 fmt --all -- --check,cargo +1.97.0 clippy --all-targets -- -D warnings,cargo test --workspace --exclude extenddb-storage-cassandraon stable and on 1.88.0 (1,772 passed each), andcargo test -p extenddb-storage-cassandra --lib(61 passed). The 21-test version of the new file passed on PostgreSQL 16, MongoDB 7 and Cassandra 4.1 as well; on PostgreSQL and MongoDB the related files fail the same tests at the head as onmain, apart from the new file's.CI runs the new file in
run-integration,run-integration-sqlite,mongodb-pytestandcassandra-pytest.Merging
git merge-tree --write-treeis clean against #590, the one open PR that changesupdate_evaluator.rs, and the merged tree passes both PRs' wire files. #590 checks the nesting depth of ADD targets because ADD created missing maps; after this change its testADD path(29).#a.#b.#c :oneis refused for the missingabefore the depth check, and #590's comment on ADD needs updating in whichever PR merges second. Its depth check on ADD still covers an item stored deeper than the limit before the check existed.