3 Commits

Author SHA1 Message Date
813ff52059 Merge pull request 'fix(ci): rustfmt sidecar to unblock the release workflow' (#8) from fix/sidecar-rustfmt into main
All checks were successful
Release sidecar / release (push) Successful in 9m8s
Reviewed-on: UOM/link#8
Reviewed-by: Colby Whitlock <whitlocktech@gmail.com>
2026-07-17 16:43:07 +00:00
ed8d24bb1d style(sidecar): rustfmt-wrap wide signatures/calls
The release workflow's `cargo fmt --check` gate failed on the Protocol 2.0
additions: upsert_guild/upsert_house signatures and their call sites in
main.rs exceeded rustfmt's default width. Reformatted with `cargo fmt` — no
behavioral change. `cargo fmt --check`, `cargo check`, and `cargo test` all
clean.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-17 11:41:37 -05:00
484bc33706 Merge pull request 'Protocol 2.0 + 2.1 — account provisioning, world-state streams, Town Cryer news' (#7) from feat/protocol2-account-provisioning into main
Some checks failed
Release sidecar / release (push) Failing after 2m18s
Reviewed-on: UOM/link#7
Reviewed-by: Colby Whitlock <whitlocktech@gmail.com>
2026-07-17 16:37:27 +00:00
2 changed files with 26 additions and 4 deletions

View File

@@ -142,7 +142,12 @@ async fn main() -> anyhow::Result<()> {
"guild.update" => {
if let Some(id) = ev.value.get("id").and_then(|v| v.as_i64()) {
if let Err(e) = event_store
.upsert_guild(id, ev.value.get("name").and_then(|n| n.as_str()), &text, t)
.upsert_guild(
id,
ev.value.get("name").and_then(|n| n.as_str()),
&text,
t,
)
.await
{
tracing::warn!(error = %e, "failed to upsert guild board");
@@ -170,7 +175,12 @@ async fn main() -> anyhow::Result<()> {
"house.update" => {
if let Some(serial) = ev.value.get("serial").and_then(|s| s.as_str()) {
if let Err(e) = event_store
.upsert_house(serial, ev.value.get("name").and_then(|n| n.as_str()), &text, t)
.upsert_house(
serial,
ev.value.get("name").and_then(|n| n.as_str()),
&text,
t,
)
.await
{
tracing::warn!(error = %e, "failed to upsert house registry");

View File

@@ -192,7 +192,13 @@ impl Store {
/// Upserts one guild's latest state, keyed by guild id. Fed from `guild.update`; one row per
/// guild, always the most recent snapshot. This is the board the website reads on load.
pub async fn upsert_guild(&self, id: i64, name: Option<&str>, json: &str, t: i64) -> anyhow::Result<()> {
pub async fn upsert_guild(
&self,
id: i64,
name: Option<&str>,
json: &str,
t: i64,
) -> anyhow::Result<()> {
sqlx::query(
"INSERT INTO guilds (id, name, json, updated_t) VALUES (?, ?, ?, ?)
ON CONFLICT(id) DO UPDATE SET name = excluded.name, json = excluded.json, updated_t = excluded.updated_t",
@@ -250,7 +256,13 @@ impl Store {
// ---- house registry (Protocol 2.0) ----
/// Upserts one house's latest state, keyed by serial. Fed from `house.update`.
pub async fn upsert_house(&self, serial: &str, name: Option<&str>, json: &str, t: i64) -> anyhow::Result<()> {
pub async fn upsert_house(
&self,
serial: &str,
name: Option<&str>,
json: &str,
t: i64,
) -> anyhow::Result<()> {
sqlx::query(
"INSERT INTO houses (serial, name, json, updated_t) VALUES (?, ?, ?, ?)
ON CONFLICT(serial) DO UPDATE SET name = excluded.name, json = excluded.json, updated_t = excluded.updated_t",