Repository navigation
Fail closed when safety hydration fails - #7
navigotechsolutions-labs wants to merge 4 commits into
Conversation
Added a test to ensure that safety hydration failure is marked without dropping the candidate.
Pitchfork-and-Torch
left a comment
There was a problem hiding this comment.
Review (COMMENT, not approve)
The fail-closed rule on failed author or social-graph hydration is the right serving default. Empty/default features on those paths currently look like a healthy user with no blocks, which is fail-open.
Gap still open after this PR: safety_labels still default to an empty map when hydration misses (unwrap_or_default in assemble). That remains fail-open for restriction labels. Pair with PR 12 (expiry at serve) rather than treating empty labels as no restrictions.
FilteredReason::UnspecifiedReason will be opaque in Under the Hood / debug. A dedicated reason would make the drop inspectable.
Tests for both home surfaces and the healthy-candidate still-Allow case are the right shape. Public dump still has no standalone Cargo target for this crate, so I did not rerun rustc.
Verdict: support-with-gap. I would take this, then fail-close or explicitly metric safety-label hydration misses.
Summary
The visibility-filtering hydration layer converts author and viewer-relationship backend failures into default or empty metadata. Downstream rules can then evaluate the candidate as ordinary content and return
Allow, even though safety-critical metadata was unavailable.Fix
Tests
git diff --checkpasses.The repository checkout does not expose a Cargo manifest for
visibility-filtering, and the environment lackscargo,rustc, andrustfmt, so native Rust tests and formatting could not be run locally. Source-level call-site and struct-literal audits were completed.