Task
crates/dig-node-core/src/download.rs:170 -- resolve_backfill_on_miss fails open on a malformed configuration value: an unrecognised setting enables read-triggered backfill.
dig-sex's equivalent switch parser fails closed by design (discovery.rs:93-98), on the stated ground that a typo must never be able to enable a path that spends resources.
Nothing reconciles the two, and they are in the same ecosystem answering the same kind of question.
Why fail-closed is right here too
Backfill-on-miss makes a single content read pull an entire store. That is a large, disk- and bandwidth-consuming action, and a typo in a config file should not be able to turn it on. The general rule the ecosystem already applies to the recursion switch applies for the same reason: an unrecognised value means the operator's intent is unknown, and the safe reading of unknown intent is not "do the expensive thing".
Context
crates/dig-node-core/src/download.rs:163,170 -- the switch and its parser.
dig-sex discovery.rs:93-98 -- parse_enabled, the fail-closed reference implementation. Only explicitly affirmative values enable.
crates/dig-node-core/src/seams/capsule/capsule_store.rs:422-459 -- dig-node's inline backfill decision, which this switch gates.
Scope
Make the failure direction consistent, and say in the doc comment which direction it fails and why -- the current behaviour is not written down anywhere, which is how the divergence survived.
Evidence
A test that fails without the fix: a malformed value leaves backfill disabled. Today it enables it.
Parent
Orchestrator epic: https://github.com/DIG-Network/dig_ecosystem/issues/3138
Task
crates/dig-node-core/src/download.rs:170--resolve_backfill_on_missfails open on a malformed configuration value: an unrecognised setting enables read-triggered backfill.dig-sex's equivalent switch parser fails closed by design (discovery.rs:93-98), on the stated ground that a typo must never be able to enable a path that spends resources.Nothing reconciles the two, and they are in the same ecosystem answering the same kind of question.
Why fail-closed is right here too
Backfill-on-miss makes a single content read pull an entire store. That is a large, disk- and bandwidth-consuming action, and a typo in a config file should not be able to turn it on. The general rule the ecosystem already applies to the recursion switch applies for the same reason: an unrecognised value means the operator's intent is unknown, and the safe reading of unknown intent is not "do the expensive thing".
Context
crates/dig-node-core/src/download.rs:163,170-- the switch and its parser.dig-sexdiscovery.rs:93-98--parse_enabled, the fail-closed reference implementation. Only explicitly affirmative values enable.crates/dig-node-core/src/seams/capsule/capsule_store.rs:422-459-- dig-node's inline backfill decision, which this switch gates.Scope
Make the failure direction consistent, and say in the doc comment which direction it fails and why -- the current behaviour is not written down anywhere, which is how the divergence survived.
Evidence
A test that fails without the fix: a malformed value leaves backfill disabled. Today it enables it.
Parent
Orchestrator epic: https://github.com/DIG-Network/dig_ecosystem/issues/3138