Repository navigation
feat: drive-foundation — Drive基盤 (Rust core) + 課金ポリシー土台 - #2
Merged
Merged
Conversation
- workspace Cargo.toml (resolver 2) + core crate with validated dep set - 7 sqlx migrations: folders/files/file_objects/admin_tokens/billing_rules/storage_usage/plan_assignments - frozen contracts: config (full env parsing), error (JSON error model), state, auth/billing/drive/storage stubs - flake.nix (rust-overlay devShell), justfile, root compose.yml (postgres16+minio+mc init) - main.rs: rustls aws-lc-rs provider install, migrations at startup, ensure_bucket, /healthz /readyz /openapi.json /swagger-ui - checked-in openapi.json artifact Refs: #1
…, admin token middleware
… disabled payment provider
…Ls, timeout-exempt upload route
turtton
added a commit
to ShuttlePub/host
that referenced
this pull request
Aug 30, 2026
… + nit follow-up issue#3
This was referenced Sep 6, 2026
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.
概要
Issue #1 の drive-foundation を実装: Rust core (axum) によるポリモーフィック owner Drive CRUD + Fluxer 課金ポリシー土台 + セルフホスト構成 + CI/E2E。
スコープ
core/): JWT/JWKS verify-only 認証 (RS256・iss ルーティング・kid ミス単一flightリフレッシュ)、オーナースコープ Drive CRUD (ストリーミング upload・受信バイト課金・limits 1GB/100MB/100rpm)、フラット folders (0..1 folder_id)、file_objects 派生物許容、S3 presigned GET (rewrite 対応)、公開共有 (推測不能 key + immutable cache)billing/): コード既定 plan + billing_rules DB オーバーライド (global/owner 層 + 式 UNIQUE index)、plan_assignments (everyone/mirror premium mode)、storage_usage 原子的 metering、payment provider 抽象化 (disabled 既定・実プロバイダは設定時に拒否)deploy/self-hosting/(compose + Caddy + Containerfile + .env.example)、OpenAPI 3.1 チェックイン (CI drift 検出)、compose E2E (S1-S4)、CI workflow (lint/test/openapi-drift/e2e/image、tag 時 ghcr ビルド)検証証跡 (全て実機)
cargo fmt --check/cargo check/cargo clippy --all-targets -- -D warnings: exit 0cargo test: 91 passed / 0 failed (12 ignored は PG/MinIO 実接続系)bash e2e/run-e2e.sh: exit 0 — S1 upload/meter/download (sha256一致)、S2 limits (413/507/429)、S3 publish/immutable-cache/unpublish/delete (usage 増減一致)、S4 admin token ライフサイクル + plan/rules 解決順deploy/self-hostingsmoke: Caddy 経由/readyz200・/docs200・/openapi.jsonバイト同一、コンテナ restart 後も同一応答コミット
T1-T13 の atomic commits (scaffold → auth/storage/billing → drive/admin/public → api wiring → e2e → deploy → ci)。
Closes #1