Skip to content

test: probe dynamoxy itself on DynamoDB, MiniStack, LocalStack and the in-memory backend - #154

Merged
kalaspuff merged 9 commits into
mainfrom
parity-stack/8-probe
Oct 31, 2026
Merged

kalaspuff merged 9 commits into
mainfrom
parity-stack/8-probe

Conversation

@fctl-sh

@fctl-sh fctl-sh Bot commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Adds scripts/probe_backends.py, which checks dynamoxy itself against DynamoDB, as fanferro's probe does for its brokers. The AWS CLI probes compare the emulators with DynamoDB but never run the in-memory backend. This script runs about thirty scenarios through dynamoxy on a target (memory, ministack, localstack or aws): models and versions, unique values and conditions, transactions, index reads, expression limits, size limits and transaction payloads, table updates, PartiQL, Time to Live, item collection metrics and capacity. It writes the facts to JSON: outcomes, exception classes, error codes and messages, cancellation reasons, sizes and counts, without the run's table prefix, version tokens, account ids or request ids. compare lists every fact that differs between two runs, iam-policy prints what a run on AWS needs, and cleanup deletes the tables an interrupted run left.

The runs of DynamoDB (eu-north-1, Carl Oscar's test account, three runs), the in-memory backend, MiniStack 1.5.33 and LocalStack 2026.3.0 are kept in docs/parity. The first two runs stopped the sizes and tables scenarios early (on-demand throttling of large writes, an index backfill longer than the wait), so the probe now retries longer on AWS and waits up to 25 minutes, and the third run completed them. Together they hold every fact the probe asks, and the in-memory backend answers every one of them as DynamoDB does, after the fixes the runs led to in this stack (DescribeTimeToLive of a table being created, ensure_tables waiting before it, and conditions, deletes and checks in transaction payloads). MiniStack differs from DynamoDB in 57 of the facts and LocalStack in 53, each an emulator difference the CLI probes had found.

Verified by running the probe on all three local targets and comparing them, with a unit test that runs two scenarios on the in-memory backend and compares the run with itself; make check passes.

fctl session


Note

Low risk. It adds a standalone probe script, its stored measurements, a unit test and doc lines, and changes no library code, so only the script's own users and the docs can be affected.

What it does. Adds scripts/probe_backends.py, which runs nine scenarios through dynamoxy itself (models and versions, unique values, transactions, index reads, expression and size limits, table changes, PartiQL, Time to Live and capacity) on memory, ministack, localstack or aws, and writes what happened as facts in JSON without table prefixes, tokens or ids. Its compare command lists the facts that differ between two runs, iam-policy prints what a run on AWS needs, and cleanup deletes tables an interrupted run left. The pull request stores one run for each local target in docs/parity, plus a second DynamoDB run next to the two already there, and the README counts how each differs from DynamoDB: 57 facts for MiniStack, 53 for LocalStack and none for the in-memory backend.

Stored DynamoDB runs. The README's comparison takes DynamoDB's first run for most scenarios and its third run for sizes and tables, because the first two stopped those early; recomputing the counts from the stored files gives the 57, 53 and 0 the README states.

fctl review's first look at ef3c2e8 · 9 files, +2273 −2 · Review agent settings

@fctl-sh

fctl-sh Bot commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor Author

Stack of 8 pull requests, merged in this order with "Squash and merge":

  1. docs(parity): keep DynamoDB's measured answers and the probes that ask them #147 docs(parity): keep DynamoDB's measured answers and the probes that ask them (merged)
  2. fix(indexes): reads refuse filters and projections of attributes an index does not hold #148 fix(indexes): reads refuse filters and projections of attributes an index does not hold (merged)
  3. fix(tables): the in-memory backend refuses table changes DynamoDB refuses #149 fix(tables): the in-memory backend refuses table changes DynamoDB refuses
  4. fix(versions)!: version() fields hold a random token, so a stale instance never matches again #150 fix(versions)!: version() fields hold a random token, so a stale instance never matches again
  5. fix(expressions): the in-memory backend refuses placeholders, names and operands DynamoDB refuses #151 fix(expressions): the in-memory backend refuses placeholders, names and operands DynamoDB refuses
  6. fix(limits): local index entries count toward the 400 KB of an item, and transactions keep to 4 MB #152 fix(limits): local index entries count toward the 400 KB of an item, and transactions keep to 4 MB
  7. fix(errors): LocalStack's DuplicateItem code raises DuplicateItemError, and the e2e tests pass on LocalStack #153 fix(errors): LocalStack's DuplicateItem code raises DuplicateItemError, and the e2e tests pass on LocalStack
  8. test: probe dynamoxy itself on DynamoDB, MiniStack, LocalStack and the in-memory backend #154 test: probe dynamoxy itself on DynamoDB, MiniStack, LocalStack and the in-memory backend ← this pull request

@fctl-review

This comment has been minimized.

Comment thread scripts/probe_backends.py Resolved
Comment thread scripts/probe_backends.py Resolved
@fctl-review

This comment has been minimized.

Comment thread scripts/probe_backends.py Resolved
@fctl-review

This comment has been minimized.

Comment thread scripts/probe_backends.py Resolved
Comment thread docs/parity/README.md Resolved
@fctl-review

This comment has been minimized.

Comment thread docs/parity/README.md Resolved
@fctl-review

This comment has been minimized.

Comment thread scripts/probe_backends.py Resolved
@kalaspuff
kalaspuff added this pull request to stack #155 October 31, 2026 18:18
Base automatically changed from parity-stack/7-localstack to main October 31, 2026 18:36
fctl-sh Bot and others added 9 commits October 31, 2026 19:36
…e in-memory backend

scripts/probe_backends.py runs about thirty scenarios through dynamoxy on
a target and writes the facts (outcomes, exception classes, codes,
messages, cancellation reasons, sizes) to JSON; compare lists what
differs between two runs. The runs of the in-memory backend, MiniStack
and LocalStack are kept in docs/parity.

Co-authored-by: Carl Oscar Aaro <[email protected]>
…d cleanup keeps the facts

Co-authored-by: Carl Oscar Aaro <[email protected]>
…s, and ask about every condition form

The run on AWS matches the in-memory backend in every fact it holds. It
stopped two scenarios early (on-demand throttling of large writes, a
backfill over the 300-second wait): the probe now retries longer on AWS
and waits up to 25 minutes. The sizes scenario asks how the other
condition forms count toward a transaction's payload.

Co-authored-by: Carl Oscar Aaro <[email protected]>
…nts only facts both runs hold

Co-authored-by: Carl Oscar Aaro <[email protected]>
…s DynamoDB's second run

Co-authored-by: Carl Oscar Aaro <[email protected]>
…rios, and the in-memory backend matches every fact

Co-authored-by: Carl Oscar Aaro <[email protected]>
@kalaspuff
kalaspuff force-pushed the parity-stack/8-probe branch from 5a7f190 to ef3c2e8 Compare October 31, 2026 18:36
@kalaspuff
kalaspuff merged commit b044924 into main Oct 31, 2026
19 of 20 checks passed
@kalaspuff
kalaspuff deleted the parity-stack/8-probe branch October 31, 2026 18:36
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.

1 participant