fix(simulation): address PR #89 review — version comment, settings contract, docs, dead process recovery

Must-fix: protocol version comment now references PROTOCOL_VERSION
(no hardcoded number), settings delete is idempotent no-op.

Suggestions addressed: BehaviorModifier dedup claim dropped, hash
collision safety documented, FK pragma in test store, columns_to_value
consolidated, modifier_hint mismatch logging, OffDuty test coverage,
batching tradeoff documented, unknown value_type warning, occluded
text risk documented, dead child respawn in voice worker, INJECT
block ambiguity documented.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-13 09:34:33 +01:00
co-authored by Claude Opus 4.6
parent b37583ddfc
commit 51414b0b63
7 changed files with 146 additions and 38 deletions
+6 -6
View File
@@ -139,6 +139,9 @@ pub fn process_settings_commands(
};
// Process all commands, last response wins (same tick batching).
// If multiple settings commands arrive in one tick, only the final response
// reaches the client. This is acceptable: the client sends one action per tick
// in normal use, and batch changes via RequestAll after bulk updates.
for cmd in commands {
match cmd {
SettingsCommand::Change { ref key, ref value } => {
@@ -171,16 +174,13 @@ pub fn process_settings_commands(
});
}
SettingsCommand::Delete { ref key } => {
let deleted = store.delete(key);
// Idempotent: deleting a non-existent key is a silent no-op.
let _deleted = store.delete(key);
snapshot_buffer.pending_settings_response = Some(SettingsResponseWire {
success: true,
kind: "ack".into(),
settings: vec![],
error: if deleted {
None
} else {
Some(format!("setting not found: {}", key))
},
error: None,
});
}
}