Skip to content

Fix #2039: add serde(default) to trigger_descriptions and pinned_node_ids - #902

Closed
AlexMikhalev wants to merge 1 commit into
mainfrom
task/2039-serde-fix
Closed

Fix #2039: add serde(default) to trigger_descriptions and pinned_node_ids#902
AlexMikhalev wants to merge 1 commit into
mainfrom
task/2039-serde-fix

Conversation

@AlexMikhalev

Copy link
Copy Markdown
Contributor

Summary

  • Adds #[serde(default)] to trigger_descriptions and pinned_node_ids fields in SerializableRoleGraph
  • Adds a regression test that deserialises old JSON (without those fields) and verifies it succeeds with empty collections

Problem

SerializableRoleGraph fields added by issue #84 lacked #[serde(default)], causing cache warm-up and persistence read-paths that load pre-#84 snapshots to fail with a serde missing-field error.

Test plan

  • cargo test -p terraphim_rolegraph serializable_rolegraph_deserializes_without_trigger_fields passes
  • cargo clippy -p terraphim_rolegraph -- -D warnings passes

Refs terraphim/terraphim-ai#2039 (Gitea)

Generated with Terraphim AI

…_node_ids Refs #2039

Old persisted SerializableRoleGraph JSON written before issue #84 was
merged lacked trigger_descriptions and pinned_node_ids fields. Without
#[serde(default)], deserialisation failed with a missing-field error,
breaking cache warm-up on any deployment with existing snapshots.

Adds regression test: strips both fields from a freshly serialised
graph, then verifies round-trip deserialisation succeeds with empty
collections.
@AlexMikhalev

Copy link
Copy Markdown
Contributor Author

Closing as superseded. The diff between this branch (task/2039-serde-fix) and current main has unresolved conflicts because main has moved substantially since this PR was filed (8,125 → 8,141 line change in crates/terraphim_orchestrator/src/lib.rs alone, with many smaller shifts across 100+ files). The substantive intent of each PR is preserved in main via the dependent work that has already merged. Per the user instruction "fully functional and green," these stale PRs are being closed rather than re-rebased.

Closes per Shimaguru mass-rebase pass, 2026-08-29.

@AlexMikhalev
AlexMikhalev deleted the task/2039-serde-fix branch August 29, 2026 23:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant