Skip to content

fix(core): read a B value with "=" or another character inside - #1355

Open
LeeroyHannigan wants to merge 16 commits into
fix/1258-unpadded-base64from
fix/1307-base64-inner-characters
Open

LeeroyHannigan wants to merge 16 commits into
fix/1258-unpadded-base64from
fix/1307-base64-inner-characters

Conversation

@LeeroyHannigan

@LeeroyHannigan LeeroyHannigan commented Nov 21, 2026 •

Copy link
Copy Markdown
Collaborator

Changes since the last review

The message of 731520b says that decode_with calls one function for these steps "when the standard decoder refuses a value, for decode_base64 and decode_padded_base64". That function is second_reading, and decode_base64 tries the decoder that reads a value without its padding first, as the What section below says. The history stays as the reviewers saw it. Whoever merges: please use the What section of this body as the squash message.

What

ExtendDB now reads and refuses a B value with = or another byte inside, as DynamoDB does. Before this change, a value such as Y=Q= or =YQ= got a SerializationException with no message, and DynamoDB stores bytes for it.

When the standard decoder refuses a B value or a BS member, DynamoDB reads the value a second time. The new function second_reading in crates/core/src/types/attribute_value.rs does the same steps:

  1. A byte length that is not a multiple of 4 gets Base64 encoded length is expected a multiple of 4 bytes but found: <n>.
  2. Up to two = at the end are the padding. A value without padding, or with = or another byte outside the alphabet in a group of four ahead of the last group, gets no message.
  3. In the last group, a byte from ( to DEL outside the alphabet reads as -1, with all bits set. Any other byte there gets no message.
  4. The bytes come from the values with a sign-extending shift. So Y=Q= is FF F4 and =YQ= is FD 84.
  5. A last character before the padding with bits past the last byte gets Invalid last non-pad Base64 character dectected. A -1 there always gets it.

decode_base64 and decode_padded_base64 each call second_reading when their own decoder refuses a value: the decoder that reads a value without its padding for decode_base64, the standard decoder for decode_padded_base64. It gives the bytes or the refusal text, and it replaces the match that picked the text. A value that the standard decoder reads takes the same path as before. #1260's two special cases stay: a value of one byte gets Buffer is too short for base64 encoding, and == gets no message.

The decoded bytes also change these answers:

  • The BS duplicate text gives each member as the base64 of its bytes. ["Y=Q=", "//Q="] gets Input collection [//Q=, //Q=]of type BS contains duplicates.
  • The echo of a BatchExecuteStatement or ExecuteTransaction list past its limit decodes a B parameter with decode_padded_base64, as the parameter check does. It prints Y=Q= as java.nio.HeapByteBuffer[pos=0 lim=2 cap=2]. Before, it used the standard decoder and printed b=null.

The first commit moves the test module of attribute_value.rs to attribute_value/tests.rs with no other change. At #1313's head 6512dcd the file has 891 lines. After this PR it has 427 lines, and attribute_value/tests.rs has 646.

The base of this PR is #1313.

Why

Fixes #1307

These are DynamoDB's answers, measured in us-east-1 on 21 November 2026 with signed requests. Each request went out twice and got the same answer both times. The PutItem and GetItem rows used an on-demand table, which the measurement created and deleted.

  • LEN is Base64 encoded length is expected a multiple of 4 bytes but found: <n>.
  • LAST is Invalid last non-pad Base64 character dectected.
  • NONE is a SerializationException with no message.
B value DynamoDB ExtendDB on #1313 ExtendDB with this PR
Y=Q=, A=Q=, ==Q=, or Y?Q= for any byte ? from ( to DEL outside the alphabet stored as //Q= NONE stored as //Q=
=YQ=, ,YQ= stored as /YQ= NONE stored as /YQ=
YWJj=YQ=, YWJjY-Q= stored as YWJj/YQ= and YWJj//Q= NONE the same as DynamoDB
A=B=, Y=R=, =Y==, Y,==, YQ,= LAST NONE LAST
YQ======, Y======= NONE LAST NONE
Y=QA, YQ=A, Y-QAYWJj, Y!Q=, Y Q= NONE NONE NONE
=YQ, YWJjY= LEN 3, LEN 6 LEN 3, LEN 6 LEN 3, LEN 6

The table shows a sample. The measurement holds these rows:

  • 108 PutItem values with = or another byte at each place of a group.
  • 7 values that end in four to seven =.
  • 3 BS sets.
  • The echo of YQ==, Y=Q= and =YQ= in a BatchExecuteStatement list of 26 statements and an ExecuteTransaction list of 101.

The committed rows are in these places:

  • tests/test_binary_base64.py: 102 new rows. 100 are PutItem values, and the 7 values that end in four to seven = are among them. One row is a Query and one an ExecuteStatement. The file has no new BS row. It also has test_update_and_insert_store_y_q_as_ff_f4, which runs against ExtendDB only (see "Changes since the last review").
  • a_value_that_is_not_base64_gets_the_service_text in crates/core/src/types/attribute_value/tests.rs: the 100 new decoder rows, and the 3 BS sets at lines 626 to 640.
  • tests/test_partiql_requests.py: the echo rows.

The rows also went to a table that does not exist. Each value got the same refusal there, and a value that DynamoDB stores got ResourceNotFoundException. The Python rows send their PutItem that way. #1313 gives DynamoDB's answer to 58 of the 119 rows on a table that exists, and this PR gives it to all of them.

Other paths and #1312

This PR changes the ExtendDB column of #1312. For ["Yg==", "Yg"], ExtendDB now gives Input collection [Yg==, Yg==] in place of [Yg==, Yg]. DynamoDB's 1 validation error detected: start and its quoted members are still #1312.

ImportTable with the DYNAMODB_JSON format does not take the second reading of a B value. DynamoDB's import refuses Y=Q= and the other values of this issue, measured on 22 November 2026. #1313 keeps ExtendDB's import on the standard decoder, and this branch merges that commit.

BatchWriteItem reads a B value with the decoder that requires the padding, through the check that #1313 adds. With this PR that decoder takes the second reading. So BatchWriteItem stores Y=Q= as //Q=, as DynamoDB does, measured on 22 November 2026. The commit 7b97b2a adds this row to the padding test of #1313.

Conflicts

git merge-tree shows no conflict with main or with #1313 and #1260. The change in the imports of crates/engine/src/partiql/request_checks/echo.rs adds one conflict hunk with #781. The resolution keeps #781's two lines, use extenddb_core::map_order::hash_map_order; and use serde_json::Value;, without the two base64 lines.

The v1.2.0 entry of this PR sits at the top of "Behavior Changes by Release" in docs/manuals/07-upgrade-manual.md. Only the two entries of main that #1446 and #1531 add are above it. Other open PRs add their entries at the top too, so a merge with any of them conflicts there. #1110, #1114 and #1126 add theirs below the entry of #1260, and conflict there. Whichever PR merges second keeps both entries.

This PR also adds a conflict in crates/core/src/types/attribute_value.rs with #1377 and the three PRs stacked on it: #1381, #1418 and #1437. #1377 and #1418 change tests in the module that this PR moves to attribute_value/tests.rs. On a rebase, apply their test changes in tests.rs.

Not in this PR

Testing done

All runs below are on f8489dc, before the merges of #1313's new heads, unless a line names another tree. "Changes since the last review" gives the runs on the commits since the last review.

  • cargo +1.97.0 test -p extenddb-core --lib: 1147 passed, 1 ignored. cargo +1.97.0 test -p extenddb-engine --lib: 930 passed.
  • cargo +1.97.0 clippy -p extenddb-core -p extenddb-engine --all-targets -- -D warnings, the same for extenddb-engine with --features extenddb-engine/backup-test-hooks, the same for extenddb-core with --no-default-features, cargo +1.91.1 check -p extenddb-core -p extenddb-engine --all-targets and cargo +1.97.0 fmt --all -- --check are clean.
  • The base of this PR did not have main's WebAssembly workflow then. On a merge of f8489dc with main, its clippy step, cargo +1.97.0 clippy --locked -p extenddb-wasm-adapter --lib --release --target wasm32-unknown-unknown -- -D warnings, is clean.
  • A control ran the tests of f8489dc on the production code of fix(core): read a B value with its padding left out or cut short #1313's head e030be2. 52 of the 100 new decoder rows failed, and so did the 3 new set rows. The other 48 new rows record answers that fix(core): read a B value with its padding left out or cut short #1313 already gives.
  • With the standard decoder put back in the echo, a_binary_is_echoed_as_the_buffer_of_its_bytes fails: its first new row gets b=null.
  • With the duplicate text printed from the request's members in place of their decoded bytes, a_value_that_is_not_base64_gets_the_service_text fails at the set ["Y=Q=", "//Q="].
  • 387,008 values went through decode_base64 and decode_padded_base64 of f8489dc and of fix(core): read a B value with its padding left out or cut short #1313's head. A reference written from the steps above gave the same answer as f8489dc to every value. fix(core): read a B value with its padding left out or cut short #1313 differed from it on 24,309 values for each decoder. The values were these:
    • every string of 1 to 4 characters over a set of 15 characters, 54,240 values
    • 32,768 values of 8 characters: 8 fixed groups of 4, each followed by every group of 4 over a set of 8 characters
    • 300,000 random values of 1 to 16 characters
  • A SQLite server built from f8489dc answered every measured row, 259 rows in total with ExtendDB refuses a B value whose base64 has no padding or a padding character inside, which DynamoDB reads #1258's 22, as DynamoDB does except one. The exception is ["Yg==", "Yg"], the duplicate text of A BS with two spellings of one value gets another duplicates text than DynamoDB's #1312. Each row went out twice with the same answer both times.
  • Against the same server, tests/test_binary_base64.py, tests/test_partiql_requests.py and the Python files with other B rows (tests/test_attribute_value_validation.py, tests/test_query_value_shapes.py, tests/test_item_operations.py, tests/test_partiql_write.py, tests/test_partiql_batch.py) passed 1104 tests. tests/test_query_leading_keys_values.py passed 2.

Line counts, with the test files and the lines after #[cfg(test)] counted as tests:

Checklist

  • I have read CONTRIBUTING.md
  • All tests pass (cargo test --workspace)
  • Code is formatted (cargo fmt --check)
  • Clippy is clean (cargo clippy -- -W clippy::pedantic)
  • I have added or updated tests for new functionality
  • I have updated documentation if behavior changed
  • Breaking changes are noted below (if any)
  • If this changes the wire protocol, Storage trait, auth model, on-disk
    format, or public CLI surface, an RFC has been accepted or is linked
    below. Otherwise, an ADR captures the decision (link below).

ADR / RFC: n/a

Breaking changes

ExtendDB now stores bytes for a B value with = or another byte inside, as DynamoDB does, where it answered a SerializationException with no message before. Some values get another refusal text, as the table in Why shows. The BS duplicate text and the echo of a long BatchExecuteStatement or ExecuteTransaction list give the decoded bytes. The stored data does not change. The v1.2.0 entry of docs/manuals/07-upgrade-manual.md gives these changes.


By submitting this pull request, I confirm that my contribution is made under
the terms of the Apache License 2.0 and I agree to the Developer Certificate of
Origin (DCO). See CONTRIBUTING.md for details.

The test module of attribute_value.rs moves to attribute_value/tests.rs
as it is, four spaces less indented, under the file header. No code or
test changes.
ExtendDB refused a B value or a BS member with "=" or another byte
outside the base64 alphabet ahead of its padding, such as Y=Q= or =YQ=,
with a SerializationException and no message. It also gave no message to
values such as A=B=, Y=R=, =Y== and Y,==. It gave "Invalid last non-pad
Base64 character dectected" to a value of 8 bytes or more that ends in
five or more "=", such as YQ======, where DynamoDB gives no message.

DynamoDB reads a value a second time when the standard decoder refuses
it. A length that is not a multiple of 4 bytes gets the text that names
the length. Up to two "=" at the end are the padding. A value without
padding, or with "=" or another byte outside the alphabet in a group of
four ahead of the last group, gets no message. In the last group, a byte
from "(" to DEL outside the alphabet reads as -1, all bits set, and the
bytes are built from it with a sign-extending shift: Y=Q= is FF F4 and
=YQ= is FD 84. Any other byte there gets no message. A last character
ahead of the padding with bits past the last byte, which -1 always has,
gets "Invalid last non-pad Base64 character dectected". DynamoDB reads
these values in an item, in an expression attribute value and in a
PartiQL parameter. Its BS duplicate text gives each member as the base64
of its bytes: ["Y=Q=", "//Q="] gets "Input collection [//Q=, //Q=]".
The echo of a BatchExecuteStatement or ExecuteTransaction list past its
limit prints such a parameter as the buffer of its bytes,
java.nio.HeapByteBuffer[pos=0 lim=2 cap=2] for Y=Q=. Measured in
us-east-1 on 21 Nov 2026.

decode_with now calls one function for these steps when the standard
decoder refuses a value, for decode_base64 and decode_padded_base64. The
function gives the bytes or the text, and replaces the match that picked
the text. A value the standard decoder reads takes the same path as
before. The BS duplicate text gives each member as the base64 of its
bytes. The echo now decodes a B as the PartiQL parameter check does,
with decode_padded_base64. It used the standard decoder, and printed
b=null for such a value.

Fixes #1307.
DynamoDB's BatchWriteItem reads the B value Y=Q= in a PutRequest item
and stores it as //Q=. Measured in us-east-1 on 2026-11-22, each request
twice: the write answered 200 and a GetItem gave the B value //Q=. The
decoder that requires the padding takes the second reading on this
branch, so the operation gives the same answer here. The row joins the
table of the padding test, which the fix of #1258 added without it.

Refs #1307.
The base adds the rows "//==" and "++==" to the decoder tests, with
their date, and merges #544's branch through #1260. This branch moves
the test module of crates/core/src/types/attribute_value.rs to
attribute_value/tests.rs, so the base's change to that module conflicts.
The merge keeps this branch's attribute_value.rs. It makes the base's
three changes in tests.rs: the dates in the doc comment of
a_value_that_is_not_base64_gets_the_service_text, its row count (now
156), and the two rows.

The docstring of tests/test_binary_base64.py conflicts too. The merge
keeps this branch's docstring and adds the date 2026-11-25.
binary_set decoded each member of a set to find duplicates, then decoded
each member a second time to print the duplicate text. The second decode
could not fail, because the first decode read every member. binary_set
now keeps the decoded members, prints the duplicate text from them and
builds the set from them. The answers do not change.
LeeroyHannigan added a commit that referenced this pull request Nov 25, 2026
…descriptor

set_fault reads an ExpressionAttributeValues value that has a second
type descriptor. For an SS or a BS that holds a member twice, it gave
the text of the AttributeValue deserializer. An earlier commit of this
branch changes that text to a sorted list with quotes, which PutItem
gives. On this path the service lists the members as sent. Measured on
2026-11-25, each body twice, with :z as the key condition value:

    {"SS": ["b", "a", "b"], "N": "1"}
    ... Input collection [b, a, b] contains duplicates. for key :z

    {"BS": [the base64 of b, a and b], "N": "1"}
    ... Input collection [Yg==, YQ==, Yg==]of type BS contains
    duplicates. for key :z

After the merge with #1355's branch, ExtendDB gave the sorted text, and
a_number_fault_in_a_value_with_several_types_is_named_ahead_of_the_several_types_text
and six rows of tests/test_query_value_shapes.py failed.

set_fault now takes the text of duplicates_as_sent, as BatchWriteItem
does. It lists the members of an SS or a BS as sent. Its NS text is the
text that set_fault gave before. The deserializer still gives the text
for an empty set.
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. No file has changes on both
sides.

@navareamol navareamol left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found no code defect in this PR. Two description points and one CI point:

  1. The description says the rows are in tests/test_binary_base64.py: "108 PutItem values with = or another byte at each place of a group", "7 values that end in four to seven =" and "3 BS sets". I count +102 rows in that file against #1313's head: 100 put(...) rows (the 7 trailing = rows among them), one query row and one statement row. The file has no new BS row. The three sets are in attribute_value/tests.rs (lines 626 to 640). Could the description say where each group is and how many rows are committed?

  2. The new Python rows send each value to a table that does not exist and expect ResourceNotFoundException, so they check that the value is read, not what is stored. The bytes FF F4 are checked by the unit rows and by the BatchWriteItem row w3. I sent Y=Q= over the wire to a SQLite build of this head: PutItem, BatchWriteItem, TransactWriteItems Put, UpdateItem SET and UpdateItem AttributeUpdates all store and return //Q=, and the keys Y=Q= and //Q= are one item. Would you add one wire row that writes Y=Q= and reads //Q= back?

  3. The wasm check on this head fails with E0308 at crates/core/src/metrics/collector.rs:60, the error main had before #1482. The Test run is on attempt 3: attempt 1 failed in extenddb-auth (secmem::init_refuses_under_a_low_memlock_limit_then_starts_unlocked) and attempt 2 in extenddb-cache (tests::refresh_dropped_when_hard_miss_races), and neither test is in this diff. The head merges with current main (92155f3) with no conflict, and on that merge cargo check --workspace --all-targets, clippy on core and engine, fmt, and the core (1243) and engine (980) lib tests pass. Could you merge main so CI runs on it?

Behaviour I checked and found right: the five steps in the description against 3209 random values over the wire (3208 agree, the one difference was my model), 2201 probes in every position that reads a B (item, key, expression value, ExclusiveStartKey, Expected, KeyConditions, QueryFilter, ScanFilter, AttributeUpdates, transactions, BatchWriteItem, PartiQL) with no 5xx, and six reverted fixes that each make a PR test fail.

Has anyone sent Y=Q= to BatchWriteItem, UpdateItem and a PartiQL INSERT parameter on the real service?

I will approve once the description names where the rows are and CI has run on a branch with current main.

The base merges main at 01556cf, 27 commits past 14ade59, through
#1260, and checks only the items and keys of BatchWriteItem for
padding. The merge has no conflict.

Git merged two files with changes on both sides:

- crates/core/src/types/attribute_value.rs: the base changes
  check_binaries, and this branch adds second_reading and moves the
  test module to attribute_value/tests.rs.
- crates/engine/src/batch_write_item/padding_tests.rs: the base adds
  the test of the items and keys and the helpers tables and answer.
  This branch adds the row w3 and a sentence of the module comment.
The base merges main at e8b5f10 through #1260, which brings #481,
#1137 and #1403. The merge has no conflict. No file has changes on
both sides.
@LeeroyHannigan

Copy link
Copy Markdown
Collaborator Author

@navareamol

  1. Your count is right. The description now says where each group is and how many rows each file holds. tests/test_binary_base64.py has 102 new rows: 100 PutItem values, the 7 values that end in four to seven = among them, one Query row and one ExecuteStatement row. The 108 PutItem values are the measured set, and the file has no new BS row. The 3 BS sets are in a_value_that_is_not_base64_gets_the_service_text in crates/core/src/types/attribute_value/tests.rs, lines 626 to 640. The echo rows are in tests/test_partiql_requests.py.
  2. The wire rows stay as they are. The row w3 of batch_write_item_alone_reads_a_binary_only_with_its_padding in crates/engine/src/batch_write_item/padding_tests.rs writes Y=Q= through BatchWriteItem and reads //Q= back with GetItem, on a SQLite engine. The unit rows check the bytes FF F4 for every path that decodes a B value.
  3. The branch merges main at e8b5f10 through fix(core): read a B value with its padding left out or cut short #1313 and fix(core): send DynamoDB's text for a B value that does not decode #1260 (5ab515c), with fix(core): read the latency segment clock through web_time #1482 in it.

Your question about the service: on 22 November 2026, BatchWriteItem stored Y=Q= as //Q= on a table that existed then, the source of row w3. On 2 December 2026, Y=Q= went to a table that does not exist in BatchWriteItem, in UpdateItem with SET b = :v and as the parameter of an ExecuteStatement INSERT. Each request answered ResourceNotFoundException, twice each. So the service reads the value on those three paths. The stored bytes were not measured for UpdateItem and the INSERT, because that needs a table.

The base brings main at c8e66fb through #1260, with #1465, #1515 and
#1411, and adds the v1.2.0 entry of #1313 to
docs/manuals/07-upgrade-manual.md. The merge has no conflict, and no
file has changes on both sides.
Add a v1.2.0 entry at the top of "Behavior Changes by Release" in
docs/manuals/07-upgrade-manual.md, above the entry of #1313. It gives
the values with "=" or another character inside that 1.1.0 refused and
this branch stores. It also gives the texts of the values that DynamoDB
refuses, the BS duplicates text and the echo of a long PartiQL list.
LeeroyHannigan added a commit that referenced this pull request Dec 3, 2026
The base brings main at c8e66fb through #1260, with #1465, #1515 and
#1411, and adds the v1.2.0 entries of #1313 and #1355 to
docs/manuals/07-upgrade-manual.md. The merge has no conflict, and no
file has changes on both sides.
LeeroyHannigan added a commit that referenced this pull request Dec 3, 2026
Add a v1.2.0 entry at the top of "Behavior Changes by Release" in
docs/manuals/07-upgrade-manual.md, above the entry of #1355. It gives
the 1.1.0 text and the texts of DynamoDB for an SS, a BS and an NS. It
also names the operations that add the prefix, and gives the texts of
BatchWriteItem.
@navareamol

Copy link
Copy Markdown
Collaborator

Row w3 does not send a request over HTTP. It calls the engine's dispatch function on a SQLite engine, so it covers BatchWriteItem only. No committed row stores Y=Q= through UpdateItem SET, TransactWriteItems or a PartiQL INSERT and reads //Q= back. The Python rows send Y=Q= to a table that does not exist and expect ResourceNotFoundException, and the unit rows check the decoder and the BS duplicate text. I would add one Python row in tests/test_binary_base64.py that creates a table, writes Y=Q= through UpdateItem SET and through an ExecuteStatement INSERT, and reads //Q= back with GetItem. I will not hold the approval on it, because the behaviour is right (below).

I built 5ab515c with SQLite and sent Y=Q= over the wire to a real table. PutItem, BatchWriteItem, UpdateItem SET, UpdateItem AttributeUpdates, TransactWriteItems Put, ExecuteStatement INSERT, BatchExecuteStatement INSERT and ExecuteTransaction INSERT all answer 200, and GetItem returns //Q= each time. On #1313's head 6512dcd the same eight requests answer SerializationException and store nothing. The seven files of this PR are identical on 5c724e5, so this holds for the current head.

Your counts match the diff: 102 new rows in tests/test_binary_base64.py (100 put, one query, one statement), 7 of the puts with four to seven "=", the 3 BS sets at lines 626 to 640 of attribute_value/tests.rs, and the echo rows in tests/test_partiql_requests.py. The description now says where each group is.

BatchWriteItem members that #1313 skips behave as before. A B or BS member beside Item or Key, and an attribute named B or BS, give the same status, code and message on 5ab515c and on 6512dcd for ordinary values. Where the two builds differ, the value is Y=Q= or =YQ=, which 6512dcd cannot read, and the head answers as PutItem does.

I also ran my own probes (about 3200 values through PutItem and 2200 probes across the operations that read a B) on the head: no 5xx. One value, BA=, answers 200 where my model expected a length error. I think my model is wrong there, since #1313 reads it as unpadded. I checked the wording of the new upgrade manual entry against the wire (YQ====== and Y=======, A=B= and Y=R=, the BS duplicate text) and it matches.

You wrote that the live DynamoDB rows for BatchWriteItem (22 November), and the ResourceNotFoundException answers of 2 December for BatchWriteItem, UpdateItem SET and ExecuteStatement INSERT, are your measurements. I have not repeated them. The stored bytes for UpdateItem and INSERT on the real service are not measured. Has anyone created a table and read them back?

On CI, main c8e66fb is in the head now, and wasm, clippy, fmt, run-tests (stable and 1.94.0) and the wire jobs pass. The integration, cassandra, mongodb and postgres storage jobs were still queued or running when I looked, and none had failed.

I will approve once the remaining CI jobs on 5c724e5 finish green.

The base brings a new BatchWriteItem check. It reads a fault ahead of a
B in request order, also inside a value. The base also adds a sentence
to its v1.2.0 entry. The merge has no conflict. Git merged two files
with changes on both sides at other lines:

- padding_tests.rs: the new rows and comment of the base, and row w3 of
  this branch.
- the upgrade manual: the new sentence in the entry of #1313, and the
  entry of this branch above it.
The new test in tests/test_binary_base64.py creates a table on the
server under test. It writes Y=Q= with UpdateItem SET and with an
ExecuteStatement INSERT, then reads //Q=, the bytes FF F4, back with
GetItem. Row w3 of padding_tests.rs covers BatchWriteItem only, through
the engine's dispatch function.

pytest skips the test against DynamoDB. There, both writes read Y=Q=
(ResourceNotFoundException on a table that does not exist, measured
2026-12-02). No one created a table there to read the stored bytes
back.
The base changes one sentence of its v1.2.0 entry. It now says that
1.1.0 answered such a BatchWriteItem request with the text of the other
fault. The merge has no conflict.
LeeroyHannigan added a commit that referenced this pull request Dec 3, 2026
The base brings the BatchWriteItem check of #1313 that reads a fault
ahead of a B in request order, also inside a value. It also brings the
new sentence of the v1.2.0 entry of #1313 and the new Python test of
#1355.

One file conflicted: crates/engine/src/batch_write_item.rs, in the
import list. The base drops AttributeValue, check_binaries and
decode_padded_base64 and adds is_base64_refusal. The resolution also
keeps first_duplicates_as_sent and is_listed_duplicates of this branch.
Git merged padding_tests.rs, query_key_values.rs and the upgrade manual
at other lines.
@LeeroyHannigan

Copy link
Copy Markdown
Collaborator Author

@navareamol

No. No one created a table on the service to read back the bytes that UpdateItem SET or an INSERT stores for Y=Q=. The rows of 2 December show only that the service reads Y=Q= in both requests: each got ResourceNotFoundException on a table that does not exist. We send these measurements only to tables that do not exist, so the stored bytes of those two writes stay unmeasured.

874a372 adds the row you suggest to tests/test_binary_base64.py as test_update_and_insert_store_y_q_as_ff_f4. It creates a table on the server under test, writes Y=Q= with UpdateItem SET and with an ExecuteStatement INSERT, and reads //Q= back with GetItem after each. For the reason above, pytest skips it against DynamoDB. It passes on a SQLite build of the head. Against a SQLite build of #1313's head, its UpdateItem gets SerializationException.

ac0e139 merges #1313's head 6825c8e, which changes the BatchWriteItem check inside a value (see the answer there). 72c5f60 merges #1313's head 835b5ae, which changes one sentence of its entry. The new head is 72c5f60.

@navareamol

Copy link
Copy Markdown
Collaborator

The row for UpdateItem SET and ExecuteStatement INSERT is in, and it runs. test_update_and_insert_store_y_q_as_ff_f4 writes Y=Q= with each, reads //Q= back with GetItem, and skips against DynamoDB because the stored bytes there are not measured, as you say. It passed in CI on this head in run-integration (2) and in run-integration-sqlite (2). Your statement that the service read Y=Q= in both requests on a table that does not exist is the author's measurement, and I did not repeat it.

The 1313 commits merged into this head are the ones I checked in #1313. The manual sentence about 1.1.0 matches a build of tag v1.1.0 (details on #1313).

Three checks are still pending on 72c5f60: integration, cassandra-pytest (1) and mongodb-integration. None has failed. mongodb-rust passes here. The same job failed on #1313 in key_conformance.rs:95, which neither PR touches.

A merge of current main (c057660) conflicts in docs/manuals/07-upgrade-manual.md, because #1446 added an entry just above the one this stack edits. This shows when the stack lands.

I will approve once the three pending checks finish green.

The base brings main at b6c8595 through #1260, with #1446, #1531 and
#1466. It also brings the 15 new rows of #1260 in
tests/test_binary_base64.py.

One file conflicted: docs/manuals/07-upgrade-manual.md. #1446 and #1531
add two v1.2.0 entries at the top of "Behavior Changes by Release",
where this branch adds its entry. The merge keeps the two entries of
main first, then the entry of this branch, then the entry of #1313.
Git merged tests/test_binary_base64.py at other lines. No other file
has changes on both sides.
LeeroyHannigan added a commit that referenced this pull request Dec 3, 2026
The base brings main at b6c8595 through #1260 and #1313, with #1446,
#1531 and #1466. It also brings the 15 new rows of #1260 in
tests/test_binary_base64.py.

One file conflicted: docs/manuals/07-upgrade-manual.md. #1446 and #1531
add two v1.2.0 entries at the top of "Behavior Changes by Release",
where this branch adds its entry. The merge keeps the two entries of
main first, then the entry of this branch, then the entry of #1355.
No other file has changes on both sides.

@navareamol navareamol left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

b87dc2e is a merge of #1313's new head. Compared with 72c5f60, the only file under crates or tests that differs is tests/test_binary_base64.py, which gains the 15 rows of #1260. The code and tests of this PR did not change, and the rest of the diff is main.

On a SQLite build of this head, 5707 wire tests passed and 2 failed. Both failures are my own comparison tests, each on the one value BA=, where my model expects a length error and the server answers 200. I think my model is wrong there, since #1313 reads an unpadded value, and I see no defect in this PR. The file now has 171 rows, and the 15 new ones pass on this head.

Main moved to 5826e1b (#1087), and docs/manuals/07-upgrade-manual.md conflicts with it at the top of the release list. It does not hold this PR, and the stack can fix it when it lands.

All 70 checks pass on b87dc2e, so I approve.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants