Skip to content

Infer DynamoDB attribute formats from enhanced schemas and constrain insertion genes - #1945

Open
aschenzle wants to merge 3 commits into
feat/ddb-collections-corefrom
fix/ddb-attribute-format-conversions
Open

aschenzle wants to merge 3 commits into
feat/ddb-collections-corefrom
fix/ddb-attribute-format-conversions

Conversation

@aschenzle

Copy link
Copy Markdown
Collaborator

Improves DynamoDB seed/insertion gene generation for failed read queries by propagating semantic attribute formats from AWS SDK Enhanced Client table schemas through the controller DTOs to core avoiding insertions with the wrong formatting.

Changes

  1. Schema format extraction (client-java/instrumentation)

    • Extended DynamoDbAttributeFormat with INT8, INT16, INT32, INT64, and INTEGER alongside DATE_TIME, LOCAL_DATE_TIME, DATE, LOCAL_TIME, and UUID.
    • Updated DynamoDbSchemaRegistry and DynamoDbReflectionHelper to safely inspect enhanced-client converters (including delegating/nullable/nested converters and JDK java.sql.* / AtomicInteger / AtomicLong types) without hard AWS SDK compile dependencies.
  2. DTO & number normalization (client-java/controller-api, client-java/controller)

    • Added primaryKeyFormats and primaryKeyValueExamples to DynamoDbFailedQuery so core receives converter formats and observed key examples.
    • Updated DynamoDbDtoUtils to serialize BigDecimal using toPlainString() and reject non-finite Double/Float values (NaN, Infinity).
    • Populated format metadata and observed key examples in DynamoDbHandler, and refactored registerFailedQuery and evaluateCommand into smaller helpers.
  3. Constrained gene generation (core)

    • Updated DynamoDbInsertBuilder to build DateTimeGene (RFC 3339 / ISO local, with nanosecond truncation and year-range fallback), DateGene, TimeGene, UUIDGene, and whole-number/bounded BigDecimalGene instances (int8–int64, integer, and unknown-format missing number keys capped to DynamoDB's 38-digit precision).
    • Added TODO notes documenting that DynamoDbAttributeFormat would need to move to evomaster-client-java-instrumentation-shared to be shared directly with core.

@aschenzle
aschenzle requested a review from jgaleotti November 20, 2026 07:23
@aschenzle aschenzle changed the title Infer DynamoDB attribute formats from enhanced schemas and constrain insertion genes [requires previous stack, leave for last] Infer DynamoDB attribute formats from enhanced schemas and constrain insertion genes Nov 24, 2026
@aschenzle
aschenzle force-pushed the fix/ddb-attribute-format-conversions branch from fc6cadd to 8e99bfb Compare November 28, 2026 02:20
@aschenzle
aschenzle added this pull request to stack #1966 November 28, 2026 16:47
@aschenzle
aschenzle removed this pull request from stack #1966 December 2, 2026 06:50
@aschenzle
aschenzle force-pushed the fix/ddb-attribute-format-conversions branch from 8e99bfb to 8bead65 Compare December 2, 2026 06:56
@aschenzle
aschenzle added this pull request to stack #1960 December 2, 2026 07:00
@aschenzle aschenzle changed the title [requires previous stack, leave for last] Infer DynamoDB attribute formats from enhanced schemas and constrain insertion genes Infer DynamoDB attribute formats from enhanced schemas and constrain insertion genes Dec 2, 2026
@aschenzle
aschenzle requested a review from jgaleotti December 2, 2026 21:16
@jgaleotti
jgaleotti requested a review from arcuri82 December 3, 2026 12:45
@aschenzle
aschenzle force-pushed the fix/ddb-attribute-format-conversions branch from 9744ab9 to 2072f8c Compare December 4, 2026 04:45
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