Repository navigation
feat(duckfleet): publish immutable dataset artifacts for remote workers - #1153
Merged
Merged
Conversation
6 tasks done
7 tasks
athvin
force-pushed
the
issue/1131-duckfleet-artifacts
branch
from
November 21, 2026 05:14
e25309b to
aeb0d7d
Compare
athvin
marked this pull request as ready for review
November 21, 2026 05:15
Contributor
terraform plan
dev — 0 to add, 1 to changemodule.eks.data.aws_iam_policy_document.node_trust: Reading...
module.network.data.aws_region.current: Reading...
module.eks.data.aws_iam_policy_document.cluster_trust: Reading...
data.aws_rds_engine_version.aurora_pg: Reading...
module.eks.data.aws_iam_policy_document.node_trust: Read complete after 0s [id=2851119427]
module.network.data.aws_region.current: Read complete after 0s [id=us-east-2]
module.eks.data.aws_iam_policy_document.cluster_trust: Read complete after 0s [id=1029077455]
data.aws_caller_identity.current: Reading...
data.aws_iam_policy_document.eso_trust: Reading...
module.network.data.aws_availability_zones.available: Reading...
data.aws_iam_policy_document.efs_csi_trust: Reading...
data.aws_region.current: Reading...
data.aws_iam_policy_document.eso_trust: Read complete after 0s [id=819195744]
data.aws_region.current: Read complete after 0s [id=us-east-2]
data.aws_iam_policy_document.efs_csi_trust: Read complete after 0s [id=819195744]
data.aws_iam_policy_document.obs_pod_trust: Reading...
data.aws_iam_openid_connect_provider.github: Reading...
data.aws_iam_policy_document.obs_pod_trust: Read complete after 0s [id=819195744]
data.aws_iam_policy_document.eso: Reading...
data.aws_iam_policy_document.er_api_pod_trust: Reading...
data.aws_iam_policy_document.eso: Read complete after 0s [id=1725605485]
data.aws_iam_policy_document.er_api_pod_trust: Read complete after 0s [id=819195744]
data.aws_caller_identity.current: Read complete after 0s [id=797781631727]
module.lake.data.aws_iam_policy_document.lake_tls_only: Reading...
module.lake.data.aws_iam_policy_document.lake_tls_only: Read complete after 0s [id=3415312252]
data.aws_iam_policy_document.otel_collector: Reading...
data.aws_iam_policy_document.fluent_bit: Reading...
data.aws_iam_policy_document.fluent_bit: Read complete after 0s [id=4006586444]
data.aws_iam_policy_document.otel_collector: Read complete after 0s [id=3111493560]
data.aws_iam_policy_document.bedrock_invoke: Reading...
data.aws_iam_policy_document.bedrock_invoke: Read complete after 0s [id=3601248236]
data.aws_iam_policy_document.lake_access: Reading...
data.aws_iam_policy_document.lake_access: Read complete after 0s [id=2921565705]
data.aws_iam_openid_connect_provider.github: Read complete after 0s [id=arn:aws:iam::797781631727:oidc-provider/token.actions.githubusercontent.com]
data.aws_iam_policy_document.ci_deploy_dev_trust: Reading...
data.aws_iam_policy_document.ci_deploy_dev_trust: Read complete after 0s [id=4060172364]
module.network.data.aws_availability_zones.available: Read complete after 0s [id=us-east-2]
data.aws_rds_engine_version.aurora_pg: Read complete after 0s [id=17.9]
data.aws_iam_policy_document.ci_deploy_dev: Reading...
data.aws_iam_policy_document.ci_deploy_dev: Read complete after 0s [id=1754478413]
Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
~ update in-place
Terraform will perform the following actions:
# module.lake.aws_s3_bucket_policy.lake will be updated in-place
~ resource "aws_s3_bucket_policy" "lake" {
id = "er-dev-lake-797781631727"
~ policy = jsonencode(
~ {
~ Statement = [
+ {
+ Action = "s3:PutObject"
+ Condition = {
+ Null = {
+ "s3:if-none-match" = "true"
}
}
+ Effect = "Deny"
+ Principal = "*"
+ Resource = "arn:aws:s3:::er-dev-lake-797781631727/duckfleet/*/artifacts/immutable/*"
+ Sid = "RequireImmutableConditionalPublication"
},
+ {
+ Action = [
+ "s3:DeleteObjectVersion",
+ "s3:DeleteObject",
]
+ Effect = "Deny"
+ Principal = "*"
+ Resource = "arn:aws:s3:::er-dev-lake-797781631727/duckfleet/*/artifacts/immutable/*"
+ Sid = "RetainImmutableArtifacts"
},
{
Action = "s3:*"
Condition = {
Bool = {
"aws:SecureTransport" = "false"
}
}
Effect = "Deny"
Principal = {
AWS = "*"
}
Resource = [
"arn:aws:s3:::er-dev-lake-797781631727/*",
"arn:aws:s3:::er-dev-lake-797781631727",
]
Sid = "DenyInsecureTransport"
},
]
# (1 unchanged attribute hidden)
}
)
# (2 unchanged attributes hidden)
}
Plan: 0 to add, 1 to change, 0 to destroy.
prod — 0 to add, 1 to changemodule.eks.data.aws_iam_policy_document.cluster_trust: Reading...
module.network.data.aws_availability_zones.available: Reading...
module.eks.data.aws_iam_policy_document.node_trust: Reading...
module.network.data.aws_region.current: Reading...
data.aws_caller_identity.current: Reading...
module.network.data.aws_region.current: Read complete after 0s [id=us-east-2]
module.eks.data.aws_iam_policy_document.cluster_trust: Read complete after 0s [id=1029077455]
module.eks.data.aws_iam_policy_document.node_trust: Read complete after 0s [id=2851119427]
data.aws_rds_engine_version.aurora_pg: Reading...
data.aws_iam_policy_document.pod_trust: Reading...
module.ses.data.aws_region.current: Reading...
data.aws_iam_policy_document.pod_trust: Read complete after 0s [id=819195744]
module.ses.data.aws_region.current: Read complete after 0s [id=us-east-2]
data.aws_iam_openid_connect_provider.github: Reading...
data.aws_iam_policy_document.efs_csi_trust: Reading...
data.aws_iam_policy_document.efs_csi_trust: Read complete after 0s [id=819195744]
data.aws_iam_policy_document.eso_trust: Reading...
data.aws_iam_policy_document.eso_trust: Read complete after 0s [id=819195744]
data.aws_caller_identity.current: Read complete after 0s [id=797781631727]
data.aws_iam_policy_document.otel_collector: Reading...
module.lake.data.aws_iam_policy_document.lake_tls_only: Reading...
data.aws_iam_policy_document.fluent_bit: Reading...
data.aws_iam_policy_document.otel_collector: Read complete after 0s [id=1193716550]
module.lake.data.aws_iam_policy_document.lake_tls_only: Read complete after 0s [id=81696635]
data.aws_iam_policy_document.openobserve: Reading...
data.aws_iam_policy_document.fluent_bit: Read complete after 0s [id=2978074842]
data.aws_iam_policy_document.openobserve: Read complete after 0s [id=2652188337]
data.aws_iam_policy_document.eso: Reading...
data.aws_iam_policy_document.eso: Read complete after 0s [id=2178872705]
data.aws_iam_policy_document.lake_access: Reading...
data.aws_iam_policy_document.lake_access: Read complete after 0s [id=1033619361]
module.network.data.aws_availability_zones.available: Read complete after 0s [id=us-east-2]
module.ses.data.aws_iam_policy_document.send: Reading...
module.ses.data.aws_iam_policy_document.send: Read complete after 0s [id=3767633194]
data.aws_iam_openid_connect_provider.github: Read complete after 0s [id=arn:aws:iam::797781631727:oidc-provider/token.actions.githubusercontent.com]
data.aws_iam_policy_document.ci_deploy_prod_trust: Reading...
data.aws_rds_engine_version.aurora_pg: Read complete after 0s [id=17.9]
data.aws_iam_policy_document.ci_deploy_prod_trust: Read complete after 0s [id=4060172364]
data.aws_iam_policy_document.ci_deploy_prod: Reading...
data.aws_iam_policy_document.ci_deploy_prod: Read complete after 0s [id=2891227359]
Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
~ update in-place
Terraform will perform the following actions:
# module.lake.aws_s3_bucket_policy.lake will be updated in-place
~ resource "aws_s3_bucket_policy" "lake" {
id = "er-prod-lake-797781631727"
~ policy = jsonencode(
~ {
~ Statement = [
+ {
+ Action = "s3:PutObject"
+ Condition = {
+ Null = {
+ "s3:if-none-match" = "true"
}
}
+ Effect = "Deny"
+ Principal = "*"
+ Resource = "arn:aws:s3:::er-prod-lake-797781631727/duckfleet/*/artifacts/immutable/*"
+ Sid = "RequireImmutableConditionalPublication"
},
+ {
+ Action = [
+ "s3:DeleteObjectVersion",
+ "s3:DeleteObject",
]
+ Effect = "Deny"
+ Principal = "*"
+ Resource = "arn:aws:s3:::er-prod-lake-797781631727/duckfleet/*/artifacts/immutable/*"
+ Sid = "RetainImmutableArtifacts"
},
{
Action = "s3:*"
Condition = {
Bool = {
"aws:SecureTransport" = "false"
}
}
Effect = "Deny"
Principal = {
AWS = "*"
}
Resource = [
"arn:aws:s3:::er-prod-lake-797781631727/*",
"arn:aws:s3:::er-prod-lake-797781631727",
]
Sid = "DenyInsecureTransport"
},
]
# (1 unchanged attribute hidden)
}
)
# (2 unchanged attributes hidden)
}
Plan: 0 to add, 1 to change, 0 to destroy.
|
athvin
temporarily deployed
to
marketing-preview
November 21, 2026 05:21 — with
GitHub Actions
Inactive
6 tasks
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1131
What
Publish accepted delivery and auxiliary files as immutable, dataset-scoped objects. Workers write exports to staging; the control plane verifies and seals them before returning an artifact reference. Add storage policies that protect sealed artifacts and preserve retryable inputs and outputs.
Why
Remote workers cannot use the control plane's local files, and DuckFleet's SQL response limit cannot carry bulk data. This reuses
DeliveryPinand keeps file transfer separate from bounded typed query results.Proof
make check,make check-e2e(real Postgres and DuckLake),cargo deny check, feature-enabled proof clippy, and the complete Terraform validation/test script passed. The schema/span invariant suite passed all 21 tests; theer-duckfleetlibrary suite passed all 19 tests.The restricted-worker service proof ingested/exported 60,000 rows (27,408,901 bytes each way), preserved receipts and retry identity, refused same-size changed content and unauthorized access, and left no worker sessions. Interrupted/corrupt/oversized downloads and expired-token responses are tested separately.
Risk & rollback
Operator-only foundation; no dataset enrollment or pipeline backend switch. Immutable objects deliberately have no automatic current-version expiry; reference-aware garbage collection is future work. Disable/drain any later pilot before reverting transport or storage policy, preserving artifacts needed by outstanding reads and retries.
Post-merge ledger
Closed by: Codex · session
01a1fb62-5950-78d2-982c-5ecb2cd40d30onbrians-MacBook-Pro.local· 2026-11-21T05:52:03Zmainis green with this change on it — merge6e81a419f553c0275f164370b2e00ea865afcdc9; Rust 44870528131, frontend 44870528133, infra 44870528157, and devcontainer 44870528129 passed. The merged tree is byte-identical to validated PR headaeb0d7d5. No new main failure observed from 2026-11-21T05:21:44Z through 2026-11-21T05:52:03Z, completing the 30-minute watch. Current main6e81a419f553c0275f164370b2e00ea865afcdc9contains the merge.images— 44870528151 built the changed API image, digestsha256:1d90f65342036c16bfc1024d3f3fa595fba22af6cd0ba1ac014745aa64a88f11; the unchanged web image was correctly reused.deploy— 44871102574 succeeded in dev and prod. Devweb-api-blue-566bdb5d7c-pn22femitteder-server listeningat 2026-11-21T05:30:23.905014Z; prodweb-api-green-6c986556f9-f6xjlemitted it at 05:30:22.819004Z. Both ran the new API digest. Prod evidence is CloudWatch query8a7572f0-cb08-4c79-9b2d-c4c0e72216ac; dev evidence came from the running container log. Both preview smoke tests and cutovers passed.Donethrough automation.duckfleet-artifacts.mdandduckfleet-artifact-evidence.json, including the input inventory, restricted-worker proof, retention contract and AWS qualification limit.Specific to this change
module.lake.aws_s3_bucket_policy.lakein dev and prod (0 add / 1 change / 0 destroy each). Read-only S3 inspection confirmedRequireImmutableConditionalPublication,RetainImmutableArtifacts, and the preserved TLS deny in both buckets. This verifies applied policy configuration, not the live worker/publisher enforcement qualification owed in DuckFleet: qualify the full API workflow and decide production rollout #1134.Context — contract, evidence and boundaries
Implementation
publish_deliveryverifies the persistedDeliveryPin, source mapping and accepted bytes.publish_filerequires an accepted fingerprint for model/config/dictionary/TF inputs. Private bounded spools prevent a local-file change from changing the upload snapshot.If-None-Match: *; a 412 retry succeeds only after verifying stored bytes. Other failures remain failures. Worker exports are downloaded, hashed and sealed by the publisher; consumers receive a file only after validation. Files are capped at 256 MiB and network transfers at 300 seconds.Measured constraints
398ff60c7abe973514707be3e47248a610560ec9runs DuckDB v1.5.4 and rejects explicit S3?versionId=paths. Content-addressed keys plus storage immutability preserve accepted versions across retries and credential rotation.s3:if-none-matchpolicy condition. Terraform tests exercise the real policy-document function with every cloud resource overridden. Actual AWS policy and Pod Identity enforcement must be qualified in DuckFleet: qualify the full API workflow and decide production rollout #1134 before enrollment; the handoff is recorded in the qualification ticket.Boundaries
The input inventory and explicit local-path replacements are in
.claude/skills/ducklake-lakehouse/references/duckfleet-artifacts.md. Work-order/backend adoption is #1132; resilience and live rollout qualification follow in #1133/#1134. Public durable receipts, resumable uploads and bulk exports remain #1011/#1012/#521; no parallel customer API is added.