Make aggregate state graphs content-driven, not compiled Rust
Deploy / deploy (push) Successful in 59s
Deploy / deploy (push) Successful in 59s
Six hand-maintained copies of the bucket->aggregate-type table (4 per-type State enums, content::aggregate_type_for_bucket + is_valid_transition_target, answers.rs's two dispatch matches, backfill_events.rs's own migration table) collapse into one: questions/aggregates.yaml, loaded and hot-swapped in AppState.aggregates the same way AppState.questions already is. aggregates/mod.rs's replay/create/transition now run off a runtime-loaded AggregateSchema instead of a compile-time AggregateKind trait impl per type - the CAS/JetStream mechanics underneath are unchanged. A new aggregate type is now a content-only change, no portal deploy required. backfill_events.rs is deleted outright rather than ported - its migration job was already done and production data here is minimal and expendable (the EVENTS stream gets purged by hand post-deploy). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 5
parent
1c1cbfc13b
commit
84c3fad339
+3
-8
@@ -108,11 +108,6 @@ name = "question_lint"
|
||||
path = "src/bin/question_lint.rs"
|
||||
required-features = ["ssr"]
|
||||
|
||||
[[bin]]
|
||||
name = "backfill_events"
|
||||
path = "src/bin/backfill_events.rs"
|
||||
required-features = ["ssr"]
|
||||
|
||||
[profile.wasm-release]
|
||||
inherits = "release"
|
||||
opt-level = 'z'
|
||||
@@ -121,9 +116,9 @@ codegen-units = 1
|
||||
|
||||
[package.metadata.leptos]
|
||||
output-name = "portal"
|
||||
# Disambiguates the app binary from the two utility [[bin]] targets
|
||||
# (question_lint, backfill_events) added alongside it - cargo-leptos
|
||||
# otherwise can't tell which of the three is "the" server.
|
||||
# Disambiguates the app binary from the utility [[bin]] target
|
||||
# (question_lint) added alongside it - cargo-leptos otherwise can't
|
||||
# tell which of the two is "the" server.
|
||||
bin-target = "portal"
|
||||
site-root = "target/site"
|
||||
site-pkg-dir = "pkg"
|
||||
|
||||
Reference in New Issue
Block a user