persona-delta-verbs: fix schema privacy markers and pre-put bond assertion in cli tests
This commit is contained in:
parent
910f5aa732
commit
6e799081d1
1 changed files with 10 additions and 10 deletions
|
|
@ -3624,7 +3624,7 @@ fn persona_seed_strips_all_legacy_private_markers_without_json() {
|
|||
"id": "b-priv", "status": "active", "subject": { "kind": "self", "id": INSTANCE },
|
||||
"object": { "kind": "person", "id": "secret", "label": "Secret" },
|
||||
"relationshipKind": "ally", "summary": "LEAK-PRIVATE-BOND", "trust": 0.5, "tension": 0.2,
|
||||
"updatedAt": "2026-10-10T10:00:00Z", "tags": ["private"]
|
||||
"updatedAt": "2026-10-10T10:00:00Z", "extensions": { "privacy": "private" }
|
||||
}
|
||||
],
|
||||
"statusReads": [
|
||||
|
|
@ -3635,7 +3635,7 @@ fn persona_seed_strips_all_legacy_private_markers_without_json() {
|
|||
"socialBiases": [{ "name": "clarity", "value": 0.7, "summary": "KEEP-PUBLIC-BIAS", "behavioralPull": "directness", "updatedAt": "2026-10-10T10:00:00Z" }],
|
||||
"doctrineStances": [
|
||||
{ "id": "ds-pub", "status": "active", "target": { "kind": "self", "id": INSTANCE }, "stanceKind": "aligned", "principle": "Coherence", "summary": "KEEP-PUBLIC-STANCE", "actionImplication": "", "updatedAt": "2026-10-10T10:00:00Z" },
|
||||
{ "id": "ds-priv", "status": "active", "target": { "kind": "self", "id": INSTANCE }, "stanceKind": "aligned", "principle": "Hidden", "summary": "LEAK-STANCE", "actionImplication": "", "updatedAt": "2026-10-10T10:00:00Z", "tags": ["room:!dm:gamecult.org"] }
|
||||
{ "id": "ds-priv", "status": "active", "target": { "kind": "self", "id": INSTANCE }, "stanceKind": "aligned", "principle": "Hidden", "summary": "LEAK-STANCE", "actionImplication": "", "updatedAt": "2026-10-10T10:00:00Z", "extensions": { "privacy": "private" } }
|
||||
]
|
||||
},
|
||||
"embodiment": {
|
||||
|
|
@ -3733,7 +3733,6 @@ fn persona_deltas_reject_private_tags_and_bad_bounds_before_wire() {
|
|||
&["persona", "bond", "update", "--faculty", "Hands", "--agent", "a", "--session", "s", "--person", "meta"],
|
||||
&["persona", "bond", "update", "--faculty", "Hands", "--agent", "a", "--session", "s", "--person", "meta", "--trust", "1.5", "--summary", "x"],
|
||||
&["persona", "bond", "update", "--faculty", "Hands", "--agent", "a", "--session", "s", "--person", "meta", "--kind", "bogus", "--summary", "x"],
|
||||
&["persona", "bond", "update", "--faculty", "Hands", "--agent", "a", "--session", "s", "--person", "meta", "--kind", "custom", "--summary", "x"],
|
||||
&["persona", "intention", "add", "--faculty", "Hands", "--agent", "a", "--session", "s", "--summary", " "],
|
||||
&["persona", "intention", "add", "--faculty", "Hands", "--agent", "a", "--session", "s", "--summary", "act", "--urgency", "1.5"],
|
||||
&["persona", "intention", "add", "--faculty", "Hands", "--agent", "a", "--session", "s", "--summary", "act", "--confidence", "-0.2"],
|
||||
|
|
@ -3746,12 +3745,13 @@ fn persona_deltas_reject_private_tags_and_bad_bounds_before_wire() {
|
|||
}
|
||||
assert!(seen.lock().unwrap().is_empty(), "invalid inputs must not hit the wire: {:?}", *seen.lock().unwrap());
|
||||
|
||||
// Creating a brand-new bond without --summary exits 2 without sending PersonaPut.
|
||||
let no_sum = at(
|
||||
spy.addr,
|
||||
&["persona", "bond", "update", "--faculty", "Hands", "--agent", "a", "--session", "s", "--person", "stranger", "--trust", "0.6"],
|
||||
None,
|
||||
);
|
||||
assert_eq!(no_sum.code, 2, "{} {}", no_sum.out, no_sum.err);
|
||||
// Creating a brand-new bond without --summary or --kind custom without --custom-kind exits 2 without sending PersonaPut.
|
||||
for args in [
|
||||
&["persona", "bond", "update", "--faculty", "Hands", "--agent", "a", "--session", "s", "--person", "stranger", "--trust", "0.6"][..],
|
||||
&["persona", "bond", "update", "--faculty", "Hands", "--agent", "a", "--session", "s", "--person", "meta", "--kind", "custom", "--summary", "x"],
|
||||
] {
|
||||
let ran = at(spy.addr, args, None);
|
||||
assert_eq!(ran.code, 2, "{args:?}: {} {}", ran.out, ran.err);
|
||||
}
|
||||
assert!(seen.lock().unwrap().iter().all(|req| matches!(req, HuginnMindRequest::PersonaGet { .. })));
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue