Skip to content

feat(memory): validate temporal_decay_rate on deserialization#1783

Merged
bug-ops merged 1 commit intomainfrom
feat-memory-validate-temporal-
Mar 14, 2026
Merged

feat(memory): validate temporal_decay_rate on deserialization#1783
bug-ops merged 1 commit intomainfrom
feat-memory-validate-temporal-

Conversation

@bug-ops
Copy link
Copy Markdown
Owner

@bug-ops bug-ops commented Mar 14, 2026

Summary

  • Add validate_temporal_decay_rate custom serde deserializer in GraphConfig
  • Rejects NaN, Inf, negative values, and values outside [0.0, 10.0] with a descriptive error
  • Invalid configs now fail at startup instead of silently producing NaN scores during graph recall scoring

Closes #1777

Test plan

  • graph_config_temporal_decay_rate_negative_rejected-0.1 via TOML fails
  • graph_config_temporal_decay_rate_above_max_rejected10.1 via TOML fails
  • graph_config_temporal_decay_rate_inf_rejected+Inf via JSON overflow fails
  • graph_config_temporal_decay_rate_neg_inf_rejected-Inf via JSON overflow fails
  • graph_config_temporal_decay_rate_valid_zero0.0 passes
  • graph_config_temporal_decay_rate_valid_mid5.0 passes
  • graph_config_temporal_decay_rate_valid_max10.0 passes
  • graph_config_defaults — asserts temporal_decay_rate == 0.0
  • graph_config_toml_round_trip — asserts temporal_decay_rate survives round-trip

@github-actions github-actions bot added enhancement New feature or request documentation Improvements or additions to documentation rust Rust code changes core zeph-core crate size/M Medium PR (51-200 lines) and removed enhancement New feature or request labels Mar 14, 2026
Reject NaN, Inf, negative values, and values outside [0.0, 10.0] with
a descriptive error. Invalid configs now fail at startup instead of
producing silent NaN scores during graph recall scoring.

Closes #1777
@bug-ops bug-ops force-pushed the feat-memory-validate-temporal- branch from c8a20cc to 96ffad0 Compare March 14, 2026 20:37
@bug-ops bug-ops enabled auto-merge (squash) March 14, 2026 20:37
@github-actions github-actions bot added the enhancement New feature or request label Mar 14, 2026
@bug-ops bug-ops merged commit 3230038 into main Mar 14, 2026
15 checks passed
@bug-ops bug-ops deleted the feat-memory-validate-temporal- branch March 14, 2026 20:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core zeph-core crate documentation Improvements or additions to documentation enhancement New feature or request rust Rust code changes size/M Medium PR (51-200 lines)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(memory): validate temporal_decay_rate config value on deserialization

1 participant