Skip to content

feat(dafny): Add bucket beacon support#1943

Open
ajewellamz wants to merge 161 commits into
mainfrom
ajewell/buckets
Open

feat(dafny): Add bucket beacon support#1943
ajewellamz wants to merge 161 commits into
mainfrom
ajewell/buckets

Conversation

@ajewellamz
Copy link
Copy Markdown
Contributor

Issue #, if available:

Description of changes:

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@ajewellamz ajewellamz requested a review from a team as a code owner June 19, 2025 18:56
@github-actions
Copy link
Copy Markdown

Detected changes to the release files or to the check-files action

@github-actions
Copy link
Copy Markdown

Changes to the release files or the check-files action requires 2 approvals from CODEOWNERS

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 8, 2026

Detected changes to the release files or to the check-files action

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 8, 2026

Changes to the release files or the check-files action requires 2 approvals from CODEOWNERS

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 8, 2026

Detected changes to the release files or to the check-files action

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 8, 2026

Changes to the release files or the check-files action requires 2 approvals from CODEOWNERS

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 8, 2026

Detected changes to the release files or to the check-files action

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 8, 2026

Changes to the release files or the check-files action requires 2 approvals from CODEOWNERS

@github-actions
Copy link
Copy Markdown

@ajewellamz and @josecorella, I noticed you are updating the smithy model files.
Does this update need new or updated javadoc trait documentation?
Are you adding constraints inside list, map or union? Do you know about this issue: smithy-lang/smithy-dafny#491?

Copy link
Copy Markdown
Contributor

@lucasmcdonald3 lucasmcdonald3 left a comment

Choose a reason for hiding this comment

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

Approving on Jose's behalf to unblock merge, I haven't reviewed these changes

@github-actions
Copy link
Copy Markdown

@ajewellamz and @lucasmcdonald3, I noticed you are updating the smithy model files.
Does this update need new or updated javadoc trait documentation?
Are you adding constraints inside list, map or union? Do you know about this issue: smithy-lang/smithy-dafny#491?

Copy link
Copy Markdown
Contributor

@josecorella josecorella left a comment

Choose a reason for hiding this comment

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

@mahnushm I also see that there are no rust examples, are we merging those after this PR lands but before launch?

Comment on lines +59 to +91
operation GetPartitionNumber {
input: GetPartitionNumberInput,
output: GetPartitionNumberOutput,
}

//= specification/searchable-encryption/search-config.md#partition-selector
//= type=implication
//# GetPartitionNumber MUST take as input
//#
//# - A DynamoDB Item (i.e an AttributeMap)
//# - The [number of partitions](#max-partitions) defined in the associated [beacon version](#beacon-version-initialization).
//# - The logical table name for this defined in the associated [table config](../dynamodb-encryption-client/ddb-table-encryption-config.md#structure).

structure GetPartitionNumberInput {
@required
item: AttributeMap,
@required
numberOfPartitions : PartitionCount,
@required
logicalTableName: String,
}

//= specification/searchable-encryption/search-config.md#partition-selector
//= type=implication
//# GetPartitionNumber MUST return
//#
//# - The number of the partition to use for this item

structure GetPartitionNumberOutput {
@required
partitionNumber: PartitionNumber
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

this operation and new structures have no javadocs annotations,should we add some @mahnushm?
(I also realize that the javadoc annotation is only supported in java afaik but it would be useful to add)

var keyId :- Filter.GetBeaconKeyId(search.value.curr(), req.KeyConditionExpression, req.FilterExpression, req.ExpressionAttributeValues, req.ExpressionAttributeNames);
var oldContext := Filter.ExprContext(req.KeyConditionExpression, req.FilterExpression, req.ExpressionAttributeValues, req.ExpressionAttributeNames);
var newContext :- Filter.Beaconize(search.value.curr(), oldContext, keyId);
var foo :- ExtractPartition(search.value.curr(), req.FilterExpression, req.KeyConditionExpression, req.ExpressionAttributeNames, req.ExpressionAttributeValues, actions);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@rishav-karanjit, did you resolve this? does it need to be addressed before merging?

for i : uint64 := 0 to |values| as uint64
invariant result <= bv.numPartitions
{
var partitions := values[i].0.getNumQueries(bv.numPartitions, values[0].1);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

did this get answered?

Comment on lines +88 to +99
structure GetNumberOfQueriesInput {
@required
input: QueryInput
}

//= specification/dynamodb-encryption-client/ddb-get-number-of-queries.md#input
//= type=implication
//# This operation MUST return the number of queries necessary.
structure GetNumberOfQueriesOutput {
@required
numberOfQueries: PartitionCount
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

these dont have javadocs

@github-actions
Copy link
Copy Markdown

@ajewellamz and @josecorella, I noticed you are updating the smithy model files.
Does this update need new or updated javadoc trait documentation?
Are you adding constraints inside list, map or union? Do you know about this issue: smithy-lang/smithy-dafny#491?

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.

7 participants