host/observer: tag the live prop-recovery row with the real wire value
Verification-round follow-up to 1b01847. The phase-3r live row proves
carrier 1 survives the bind, which is the property F1 destroyed — but
it tagged its fixture sink with `peerspeak.owned=true`, not the `1`
the contract pins and peerspeak actually emits. It would have passed
even if the real literal did not.
Adds PEERSPEAK_OWNED_VALUE so the fixture can name the producer's
value, and asserts it against the shared contract file alongside the
other two literals. The sink's name still deliberately avoids the
`peerspeak_owned_` prefix, so carrier 2 cannot stand in for carrier 1
in that row.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -898,7 +898,15 @@ mod tests {
|
|||||||
"module-null-sink",
|
"module-null-sink",
|
||||||
&[
|
&[
|
||||||
format!("sink_name={unique}"),
|
format!("sink_name={unique}"),
|
||||||
"sink_properties=peerspeak.owned=true node.passthrough=true".to_string(),
|
// The value peerspeak actually emits, not merely a truthy one:
|
||||||
|
// this row is the live proof that carrier 1 survives the bind,
|
||||||
|
// and the sink's name deliberately does *not* carry the
|
||||||
|
// `peerspeak_owned_` prefix, so carrier 2 cannot stand in for
|
||||||
|
// it here.
|
||||||
|
format!(
|
||||||
|
"sink_properties={PEERSPEAK_OWNED_PROP}={} node.passthrough=true",
|
||||||
|
crate::host::taint::PEERSPEAK_OWNED_VALUE
|
||||||
|
),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
let null_sink_id = null_sink.id.expect("null-sink module must have an id");
|
let null_sink_id = null_sink.id.expect("null-sink module must have an id");
|
||||||
|
|||||||
@@ -136,6 +136,15 @@ pub const ECHO_CANCEL_GROUP_PREFIX: &str = "echo-cancel-";
|
|||||||
/// change that invalidates the phase 5 matrix.
|
/// change that invalidates the phase 5 matrix.
|
||||||
pub const PEERSPEAK_OWNED_PROP: &str = "peerspeak.owned";
|
pub const PEERSPEAK_OWNED_PROP: &str = "peerspeak.owned";
|
||||||
|
|
||||||
|
/// The value peerspeak emits for [`PEERSPEAK_OWNED_PROP`].
|
||||||
|
///
|
||||||
|
/// The consumer deliberately accepts **any** truthy value, not just this one
|
||||||
|
/// (see the observer's `truthy`) — treating an unexpected value as "owned" is
|
||||||
|
/// the fail-closed direction. This constant exists so live tests can tag a
|
||||||
|
/// node with exactly what the producer sends, rather than something merely
|
||||||
|
/// truthy that would pass even if the real literal did not.
|
||||||
|
pub const PEERSPEAK_OWNED_VALUE: &str = "1";
|
||||||
|
|
||||||
/// Ownership carrier 2: a `node.name` prefix (v3.5 §5.1, round 8).
|
/// Ownership carrier 2: a `node.name` prefix (v3.5 §5.1, round 8).
|
||||||
///
|
///
|
||||||
/// Matched as a **union** with [`PEERSPEAK_OWNED_PROP`] — either one makes a
|
/// Matched as a **union** with [`PEERSPEAK_OWNED_PROP`] — either one makes a
|
||||||
|
|||||||
@@ -251,10 +251,11 @@ fn ownership_carriers_match_the_cross_repo_fixture() {
|
|||||||
|
|
||||||
assert_eq!(super::PEERSPEAK_OWNED_PROP, get("prop_key"));
|
assert_eq!(super::PEERSPEAK_OWNED_PROP, get("prop_key"));
|
||||||
assert_eq!(super::PEERSPEAK_OWNED_NODE_PREFIX, get("node_name_prefix"));
|
assert_eq!(super::PEERSPEAK_OWNED_NODE_PREFIX, get("node_name_prefix"));
|
||||||
|
assert_eq!(super::PEERSPEAK_OWNED_VALUE, get("prop_value"));
|
||||||
|
|
||||||
// The value the producer pins must be one this consumer reads as truthy.
|
// …and that value must be one this consumer reads as truthy. `truthy`
|
||||||
// `truthy` lives at the observer boundary; assert the property of it that
|
// lives at the observer boundary; assert the property of it that matters
|
||||||
// matters here rather than reaching across modules for the function.
|
// here rather than reaching across modules for the function.
|
||||||
let value = get("prop_value");
|
let value = get("prop_value");
|
||||||
assert!(
|
assert!(
|
||||||
value != "false" && value != "0",
|
value != "false" && value != "0",
|
||||||
|
|||||||
Reference in New Issue
Block a user