Context: In the Rust daemon, the cleanup_threshold for the Attractor Index is currently hardcoded to 3000. Different agents might need larger or smaller memory retention bounds, so this should be configurable by the user without modifying the source code.
Task:
- In the main() function, find where AttractorIndex::new(3000) and cleanup_threshold: 3000 are hardcoded (there are two places: one when restoring from disk, one for fresh generation).
- Use std::env::var("CLEANUP_THRESHOLD") to read the value from the environment.
- Parse the string into a usize, falling back to 3000 as the default if the variable isn't set or parsing fails.
- Pass that parsed variable into the AttractorIndex initializers instead of the hardcoded 3000.
Files to Touch: crates/nulld/src/main.rs`nSuccess Criteria: You should be able to run CLEANUP_THRESHOLD=5000 cargo run --bin nulld and the daemon should start successfully without panicking.
Context: In the Rust daemon, the cleanup_threshold for the Attractor Index is currently hardcoded to 3000. Different agents might need larger or smaller memory retention bounds, so this should be configurable by the user without modifying the source code.
Task:
Files to Touch: crates/nulld/src/main.rs`nSuccess Criteria: You should be able to run CLEANUP_THRESHOLD=5000 cargo run --bin nulld and the daemon should start successfully without panicking.