feat(runtime): add tenant-scoped S3 artifact provider - #119
Conversation
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
XnLemon
left a comment
There was a problem hiding this comment.
Two focused inline findings on the S3 profile validation and artifact ID compatibility contracts; not LGTM yet.
XnLemon
left a comment
There was a problem hiding this comment.
One focused P1 inline finding remains on the exact PR head; not LGTM.
XnLemon
left a comment
There was a problem hiding this comment.
One focused P1 inline finding remains on the exact PR head; not LGTM.
XnLemon
left a comment
There was a problem hiding this comment.
Three focused P1 inline findings on the exact PR head; not LGTM.
XnLemon
left a comment
There was a problem hiding this comment.
Required CI remains non-green on this exact head; the two inline notes below are tied to the failing gocyclo findings in the required Format & Lint job.
# Conflicts: # trpcservice/bootstrap/environment.go
Closes #113
Summary
Add a tenant-scoped S3-compatible provider for durable runtime artifacts and objects. The provider uses the AWS SDK v2 API and supports AWS S3, MinIO, and S3-compatible OSS endpoints.
S3 remains opt-in: existing Session, Memory, Summary, Knowledge, Audit, and Vector providers are unchanged.
Issue Ledger
ArtifactStoreandObjectStorewith an owned S3 client.objectsandartifactsnamespaces.CreatedAton object replacement and keep artifact version/timestamp semantics stable.Implementation
trpcservice/runtime/storage/s3.s3, capability:artifact.SecretRef, andbucket; local HTTP requires explicitallow_insecure=true.max_bytesand operation deadlines. Content is buffered before the single PUT request, and SHA-256 metadata validates reads.CreatedAt; identical writes are idempotent.Validation
go test ./... -count=1go test -race ./trpcservice/runtime/storage/s3 ./trpcservice/bootstrap ./trpcservice/backend -count=1go vet ./...bash scripts/format.sh --checkC:\Users\16040\go\bin\golangci-lint.exe run ./...bash scripts/build.shdocker compose -f deploy/docker-compose.yml config --quietdocker compose --profile s3 --env-file deploy/example.env -f deploy/docker-compose.yml config --quietpython -m mkdocs build --strict -f docs/mkdocs.yml23d4ad3: Build/Test/Coverage, Race, Format/Lint, Vet-equivalent build gates, Docs, deployment validation, fault-injection E2E, WeCom/Telegram E2E, gitleaks, and Codecov patch all pass.The optional MinIO live conformance test is not run by default because it requires a reachable Docker/S3 environment and explicit
S3_RUNTIME_TEST_*variables. When configured, it verifies durable Artifact/Object recovery after provider recreation and the attachment reader path.Compatibility and Non-goals
origin/mainat117b411by merge commit23d4ad3; the mainline WeCom AI Bot changes are preserved.