Skip to content

✨ feat(infra): add 5 Local Secondary Indexes to DynamoDB table (ADR-123)#419

Merged
sodre merged 5 commits intomainfrom
docs/adr-123-local-secondary-indexes
Feb 28, 2026
Merged

✨ feat(infra): add 5 Local Secondary Indexes to DynamoDB table (ADR-123)#419
sodre merged 5 commits intomainfrom
docs/adr-123-local-secondary-indexes

Conversation

@sodre
Copy link
Member

@sodre sodre commented Feb 28, 2026

Summary

  • Add ADR-123 defining the decision to reserve all 5 DynamoDB Local Secondary Index slots before the v1.0 schema freeze
  • Add LSI1-LSI5 to the CloudFormation template and get_table_definition() in schema.py, with alternating projections (odd=ALL, even=KEYS_ONLY)
  • Add LSI name constants (LSI1_NAME-LSI5_NAME) to schema.py
  • Add no-op migration m_0_10_0_lsi (LSIs can only be added at table creation time)
  • Bump CURRENT_SCHEMA_VERSION to 0.10.0
  • Add unit tests for LSI definitions in get_table_definition()

Test plan

  • Unit tests verify all 5 LSIs present with correct sort keys, projections, and hash key
  • Existing GSI tests still pass (no regression)
  • Schema version and migration tests updated for 0.10.0
  • CloudFormation linter passes
  • 100% diff coverage

🤖 Generated with Claude Code

sodre and others added 4 commits February 28, 2026 01:01
Define all 5 DynamoDB LSI slots before v1.0 since they cannot be added
to existing tables. Uses overloaded sort keys and alternating projection
pattern (odd=ALL, even=KEYS_ONLY) to maximize flexibility at zero cost
for unpopulated slots.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Define all 5 LSI slots before v1.0 since they cannot be added to existing
tables. Sort keys LSI1SK–LSI5SK use overloaded single-table pattern with
alternating projections (odd=ALL, even=KEYS_ONLY). Bump schema version
to 0.10.0 with no-op migration stub since LSIs require table recreation.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Use enforceable "must" language per ADR-000 format standard and
transition status from Proposed to Accepted after consistency check
against all existing accepted ADRs found no conflicts.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Update test_deploy_default_parameters to expect schema version 0.10.0
and test_migrations_for_upgrade to expect the 0.10.0 LSI migration.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@sodre sodre added this to the v1.0.0 milestone Feb 28, 2026
@sodre sodre added the area/infra CloudFormation, IAM, infrastructure label Feb 28, 2026
@codecov
Copy link

codecov bot commented Feb 28, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.22%. Comparing base (57c9c03) to head (7a12410).
⚠️ Report is 6 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #419      +/-   ##
==========================================
+ Coverage   92.21%   92.22%   +0.01%     
==========================================
  Files          36       37       +1     
  Lines        7831     7842      +11     
==========================================
+ Hits         7221     7232      +11     
  Misses        610      610              
Flag Coverage Δ
doctest 29.13% <100.00%> (+0.09%) ⬆️
e2e 42.37% <50.00%> (-0.01%) ⬇️
integration 50.66% <100.00%> (+0.06%) ⬆️
unit 92.01% <100.00%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

The E2E test hardcoded "0.9.0" for the schema version assertion,
which broke when the schema was bumped to 0.10.0 for ADR-123 LSIs.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.40.

Benchmark suite Current: 7a12410 Previous: 57c9c03 Ratio
tests/benchmark/test_operations.py::TestOptimizationComparison::test_stored_limits_cache_disabled 119.61070438604357 iter/sec (stddev: 0.035217121173790625) 211.97354454412243 iter/sec (stddev: 0.00013399993316756976) 1.77

This comment was automatically generated by workflow using github-action-benchmark.

@sodre sodre marked this pull request as ready for review February 28, 2026 10:18
@sodre sodre merged commit 2cf072a into main Feb 28, 2026
25 checks passed
@sodre sodre deleted the docs/adr-123-local-secondary-indexes branch February 28, 2026 10:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/infra CloudFormation, IAM, infrastructure

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant