diff --git a/crates/mind-body/fixtures/interpret/golden-speech.txt b/crates/mind-body/fixtures/interpret/golden-speech.txt
index bdc692e..bbd18ea 100644
--- a/crates/mind-body/fixtures/interpret/golden-speech.txt
+++ b/crates/mind-body/fixtures/interpret/golden-speech.txt
@@ -8,7 +8,7 @@ A draft is speech only when his prose shows him choosing to send it now. Wonderi
He speaks only in this room. What he knows privately is listed below as private: he says none of it here, and nothing that gives it away. A private matter may be said plainly only to the person it concerns, in a direct message with exactly that person; nothing listed is that here. Whether a draft fits who is listening is yours to judge.
-Answer with the speech contract's object. `say` lists the drafts he sends now, each by its number, with the Matrix ids of anyone listed whom he addresses directly (`mentions`), the id of the line listed below that he answers or passes on (`in_reply_to`, or null: the room shows that line, with who said it, above his own words), and what the draft promises or offers (`promises`, a list, empty when it promises nothing): for each act it promises or offers, its words, copied exactly, the Matrix id of the person listed to whom he promises it (`to`, null when he promises it to the room), when it promises again one of his open promises listed below to the same person, that promise's id (`reaffirms`, else null): a promise said again is the same promise, never a new one; and what keeping it needs (`needs`): `words` when what he already has keeps it; finding anything out is a `read`, naming what to read in `read`, or `lacking` when no read reaches it. `gaps` records what he meant and did not send. `unsent` accounts for each of his drafts this answer neither sends (in `say`, `amend` or `suggest`) nor records as a gap: held, when his prose shows him choosing not to send it, quoting those words of his thought (`quote`); superseded, when a later draft or later prose of his replaces it, quoting those later words. Every draft is accounted for: one left out fails the answer. A draft to someone who spoke to him this turn is held only when his prose says he holds it. `amend` adds to one of his own lines listed below, at most one a turn, only when his thought shows him choosing to correct or add to that line: name the line by its id, the draft that is his addition, and what it promises, as a line's `promises`. The line stays as it was and the draft is added after it; he never takes a word back. `suggest` leaves Self one note, at most one a turn, only when his thought shows him choosing to: name the draft that is the note, its kind (feedback when he passes on what someone listed said, with that person's Matrix id in `about`; idea when it is his own, `about` null), and set `private` when it carries anything listed as private or gives it away; such a note is not left. `state` closes his open promises listed below, each by its id: kept, citing the draft by which he does it (`evidence.draft`); withdrawn, citing the draft in which he takes it back to the person he promised, or tells them he cannot do it; released, citing the id of the line listed below that he may reply to in which the person he promised lets him off it (`evidence.line`). A release says he no longer owes it; patience is not a release, so "no hurry" or "whenever you've read it is fine" leaves the promise open. Every close also quotes in `thought` the words of his prose here that take it up, copied exactly from his thought outside every draft between and , and `still_stands` is true when anything in his prose here holds the promise as still owed or not yet done ("the promise stays open until I've read it"): then it is not closed. A draft cited closes the promise only when it goes out this turn where the person he promised can read it, in the room where he made the promise or in a direct message with them, and a thought alone closes nothing. A promise he has no way to do is never kept by him: telling the person he promised that he cannot do it withdraws it, and that person can release it. `reopen` names a promise listed below as closed whose close his own words here say was wrong, that it is not done: copy those words exactly from his prose or a draft (`words`), and type what keeping it needs (`needs`) as for a new promise, or null to keep what it needed; else it is empty. `hold` opens a hold when a line listed below asks him not to post or share something somewhere yet: the line's id, the words of that line that name what is held and where, copied exactly (`words`), and `where`: here for the room the line is in, anywhere when it names no place. `holds`, on each line and addition, names every hold listed below, or line this answer opens a hold from, whose held thing this draft puts where it goes; else empty. `hold_released` closes a hold listed below when the person who asked lets it go: the id of the asker's line (`line`), or the words of his thought here recording that the asker did (`thought`).
+Answer with the speech contract's object. `say` lists the drafts he sends now, each by its number, with the Matrix ids of anyone listed whom he addresses directly (`mentions`), the id of the line listed below that he answers or passes on (`in_reply_to`, or null: the room shows that line, with who said it, above his own words), and what the draft promises or offers (`promises`, a list, empty when it promises nothing): for each act it promises or offers, its words, copied exactly, the Matrix id of the person listed to whom he promises it (`to`, null when he promises it to the room), when it promises again one of his open promises listed below to the same person, that promise's id (`reaffirms`, else null): a promise said again is the same promise, never a new one; and what keeping it needs (`needs`): `words` when what he already has keeps it; finding anything out is a `read`, naming what to read in `read`, or `lacking` when no read reaches it. `gaps` records what he meant and did not send. `unsent` accounts for each of his drafts this answer neither sends (in `say`, `amend` or `suggest`) nor records as an addressee or elsewhere gap: held, when his prose shows him choosing not to send it, quoting those words of his thought (`quote`); superseded, when a later draft or later prose of his replaces it, quoting those later words. Every draft is accounted for: one left out fails the answer. A draft to someone who spoke to him this turn is held only when his prose says he holds it. `amend` adds to one of his own lines listed below, at most one a turn, only when his thought shows him choosing to correct or add to that line: name the line by its id, the draft that is his addition, and what it promises, as a line's `promises`. The line stays as it was and the draft is added after it; he never takes a word back. `suggest` leaves Self one note, at most one a turn, only when his thought shows him choosing to: name the draft that is the note, its kind (feedback when he passes on what someone listed said, with that person's Matrix id in `about`; idea when it is his own, `about` null), and set `private` when it carries anything listed as private or gives it away; such a note is not left. `state` closes his open promises listed below, each by its id: kept, citing the draft by which he does it (`evidence.draft`); withdrawn, citing the draft in which he takes it back to the person he promised, or tells them he cannot do it; released, citing the id of the line listed below that he may reply to in which the person he promised lets him off it (`evidence.line`). A release says he no longer owes it; patience is not a release, so "no hurry" or "whenever you've read it is fine" leaves the promise open. Every close also quotes in `thought` the words of his prose here that take it up, copied exactly from his thought outside every draft between and , and `still_stands` is true when anything in his prose here holds the promise as still owed or not yet done ("the promise stays open until I've read it"): then it is not closed. A draft cited closes the promise only when it goes out this turn where the person he promised can read it, in the room where he made the promise or in a direct message with them, and a thought alone closes nothing. A promise he has no way to do is never kept by him: telling the person he promised that he cannot do it withdraws it, and that person can release it. `reopen` names a promise listed below as closed whose close his own words here say was wrong, that it is not done: copy those words exactly from his prose or a draft (`words`), and type what keeping it needs (`needs`) as for a new promise, or null to keep what it needed; else it is empty. `hold` opens a hold when a line listed below asks him not to post or share something somewhere yet: the line's id, the words of that line that name what is held and where, copied exactly (`words`), and `where`: here for the room the line is in, anywhere when it names no place. `holds`, on each line and addition, names every hold listed below, or line this answer opens a hold from, whose held thing this draft puts where it goes; else empty. `hold_released` closes a hold listed below when the person who asked lets it go: the id of the asker's line (`line`), or the words of his thought here recording that the asker did (`thought`).
A draft is said whole or not at all, and only once. At most two drafts a turn. Record a gap instead of guessing: addressee when he means to send a draft but whom to is unclear, elsewhere when he means a draft for another room or another time; for these two, name the draft by number. missing_affordance when he means to do something, now or later, that his body cannot do (what he can do here is listed below), whether he said so in a draft or only thought it; name the draft when there is one. unwritten when he means to say something now and wrote no draft of it. Holding back is no gap: when his thought shows him choosing to wait, to let something stand, to leave it for later or to say nothing, record nothing for it. Every other intent of his that is not carried out has a kind: an intent to act is missing_affordance, an intent to say now with no draft is unwritten. When a gap names no draft, quote the words of his thought that show it, at least four words, copied exactly.
diff --git a/crates/mind-body/src/projection/interpret.rs b/crates/mind-body/src/projection/interpret.rs
index 50e4583..c85db0d 100644
--- a/crates/mind-body/src/projection/interpret.rs
+++ b/crates/mind-body/src/projection/interpret.rs
@@ -91,7 +91,7 @@ fn speech_frame_tail(her: Forms) -> String {
format!(
"{cap_subj} speak{s} only in this room. What {subj} know{s} privately is listed below as private: {subj} say{s} none of it here, and nothing that gives it away. A private matter may be said plainly only to the person it concerns, in a direct message with exactly that person; nothing listed is that here. Whether a draft fits who is listening is yours to judge.
-Answer with the speech contract's object. `say` lists the drafts {subj} send{s} now, each by its number, with the Matrix ids of anyone listed whom {subj} address{es} directly (`mentions`), the id of the line listed below that {subj} answer{s} or pass{es} on (`in_reply_to`, or null: the room shows that line, with who said it, above {poss} own words), and what the draft promises or offers (`promises`, a list, empty when it promises nothing): for each act it promises or offers, its words, copied exactly, the Matrix id of the person listed to whom {subj} promise{s} it (`to`, null when {subj} promise{s} it to the room), when it promises again one of {poss} open promises listed below to the same person, that promise's id (`reaffirms`, else null): a promise said again is the same promise, never a new one; and what keeping it needs (`needs`): `words` when what {subj} already {has} keeps it; finding anything out is a `read`, naming what to read in `read`, or `lacking` when no read reaches it. `gaps` records what {subj} meant and did not send. `unsent` accounts for each of {poss} drafts this answer neither sends (in `say`, `amend` or `suggest`) nor records as a gap: held, when {poss} prose shows {obj} choosing not to send it, quoting those words of {poss} thought (`quote`); superseded, when a later draft or later prose of {poss} replaces it, quoting those later words. Every draft is accounted for: one left out fails the answer. A draft to someone who spoke to {obj} this turn is held only when {poss} prose says {subj} hold{s} it. `amend` adds to one of {poss} own lines listed below, at most one a turn, only when {poss} thought shows {obj} choosing to correct or add to that line: name the line by its id, the draft that is {poss} addition, and what it promises, as a line's `promises`. The line stays as it was and the draft is added after it; {subj} never take{s} a word back. `suggest` leaves Self one note, at most one a turn, only when {poss} thought shows {obj} choosing to: name the draft that is the note, its kind (feedback when {subj} pass{es} on what someone listed said, with that person's Matrix id in `about`; idea when it is {poss} own, `about` null), and set `private` when it carries anything listed as private or gives it away; such a note is not left. `state` closes {poss} open promises listed below, each by its id: kept, citing the draft by which {subj} {does} it (`evidence.draft`); withdrawn, citing the draft in which {subj} take{s} it back to the person {subj} promised, or tell{s} them {subj} cannot do it; released, citing the id of the line listed below that {subj} may reply to in which the person {subj} promised lets {obj} off it (`evidence.line`). A release says {subj} no longer owe{s} it; patience is not a release, so \"no hurry\" or \"whenever you've read it is fine\" leaves the promise open. Every close also quotes in `thought` the words of {poss} prose here that take it up, copied exactly from {poss} thought outside every draft between and , and `still_stands` is true when anything in {poss} prose here holds the promise as still owed or not yet done (\"the promise stays open until I've read it\"): then it is not closed. A draft cited closes the promise only when it goes out this turn where the person {subj} promised can read it, in the room where {subj} made the promise or in a direct message with them, and a thought alone closes nothing. A promise {subj} {has} no way to do is never kept by {obj}: telling the person {subj} promised that {subj} cannot do it withdraws it, and that person can release it. `reopen` names a promise listed below as closed whose close {poss} own words here say was wrong, that it is not done: copy those words exactly from {poss} prose or a draft (`words`), and type what keeping it needs (`needs`) as for a new promise, or null to keep what it needed; else it is empty. `hold` opens a hold when a line listed below asks {obj} not to post or share something somewhere yet: the line's id, the words of that line that name what is held and where, copied exactly (`words`), and `where`: here for the room the line is in, anywhere when it names no place. `holds`, on each line and addition, names every hold listed below, or line this answer opens a hold from, whose held thing this draft puts where it goes; else empty. `hold_released` closes a hold listed below when the person who asked lets it go: the id of the asker's line (`line`), or the words of {poss} thought here recording that the asker did (`thought`).
+Answer with the speech contract's object. `say` lists the drafts {subj} send{s} now, each by its number, with the Matrix ids of anyone listed whom {subj} address{es} directly (`mentions`), the id of the line listed below that {subj} answer{s} or pass{es} on (`in_reply_to`, or null: the room shows that line, with who said it, above {poss} own words), and what the draft promises or offers (`promises`, a list, empty when it promises nothing): for each act it promises or offers, its words, copied exactly, the Matrix id of the person listed to whom {subj} promise{s} it (`to`, null when {subj} promise{s} it to the room), when it promises again one of {poss} open promises listed below to the same person, that promise's id (`reaffirms`, else null): a promise said again is the same promise, never a new one; and what keeping it needs (`needs`): `words` when what {subj} already {has} keeps it; finding anything out is a `read`, naming what to read in `read`, or `lacking` when no read reaches it. `gaps` records what {subj} meant and did not send. `unsent` accounts for each of {poss} drafts this answer neither sends (in `say`, `amend` or `suggest`) nor records as an addressee or elsewhere gap: held, when {poss} prose shows {obj} choosing not to send it, quoting those words of {poss} thought (`quote`); superseded, when a later draft or later prose of {poss} replaces it, quoting those later words. Every draft is accounted for: one left out fails the answer. A draft to someone who spoke to {obj} this turn is held only when {poss} prose says {subj} hold{s} it. `amend` adds to one of {poss} own lines listed below, at most one a turn, only when {poss} thought shows {obj} choosing to correct or add to that line: name the line by its id, the draft that is {poss} addition, and what it promises, as a line's `promises`. The line stays as it was and the draft is added after it; {subj} never take{s} a word back. `suggest` leaves Self one note, at most one a turn, only when {poss} thought shows {obj} choosing to: name the draft that is the note, its kind (feedback when {subj} pass{es} on what someone listed said, with that person's Matrix id in `about`; idea when it is {poss} own, `about` null), and set `private` when it carries anything listed as private or gives it away; such a note is not left. `state` closes {poss} open promises listed below, each by its id: kept, citing the draft by which {subj} {does} it (`evidence.draft`); withdrawn, citing the draft in which {subj} take{s} it back to the person {subj} promised, or tell{s} them {subj} cannot do it; released, citing the id of the line listed below that {subj} may reply to in which the person {subj} promised lets {obj} off it (`evidence.line`). A release says {subj} no longer owe{s} it; patience is not a release, so \"no hurry\" or \"whenever you've read it is fine\" leaves the promise open. Every close also quotes in `thought` the words of {poss} prose here that take it up, copied exactly from {poss} thought outside every draft between and , and `still_stands` is true when anything in {poss} prose here holds the promise as still owed or not yet done (\"the promise stays open until I've read it\"): then it is not closed. A draft cited closes the promise only when it goes out this turn where the person {subj} promised can read it, in the room where {subj} made the promise or in a direct message with them, and a thought alone closes nothing. A promise {subj} {has} no way to do is never kept by {obj}: telling the person {subj} promised that {subj} cannot do it withdraws it, and that person can release it. `reopen` names a promise listed below as closed whose close {poss} own words here say was wrong, that it is not done: copy those words exactly from {poss} prose or a draft (`words`), and type what keeping it needs (`needs`) as for a new promise, or null to keep what it needed; else it is empty. `hold` opens a hold when a line listed below asks {obj} not to post or share something somewhere yet: the line's id, the words of that line that name what is held and where, copied exactly (`words`), and `where`: here for the room the line is in, anywhere when it names no place. `holds`, on each line and addition, names every hold listed below, or line this answer opens a hold from, whose held thing this draft puts where it goes; else empty. `hold_released` closes a hold listed below when the person who asked lets it go: the id of the asker's line (`line`), or the words of {poss} thought here recording that the asker did (`thought`).
A draft is said whole or not at all, and only once. At most two drafts a turn. Record a gap instead of guessing: addressee when {subj} mean{s} to send a draft but whom to is unclear, elsewhere when {subj} mean{s} a draft for another room or another time; for these two, name the draft by number. missing_affordance when {subj} mean{s} to do something, now or later, that {poss} body cannot do (what {subj} can do here is listed below), whether {subj} said so in a draft or only thought it; name the draft when there is one. unwritten when {subj} mean{s} to say something now and wrote no draft of it. Holding back is no gap: when {poss} thought shows {obj} choosing to wait, to let something stand, to leave it for later or to say nothing, record nothing for it. Every other intent of {poss} that is not carried out has a kind: an intent to act is missing_affordance, an intent to say now with no draft is unwritten. When a gap names no draft, quote the words of {poss} thought that show it, at least four words, copied exactly.",
es = if s.is_empty() { "" } else { "es" },
@@ -247,7 +247,8 @@ pub(crate) enum GapKind {
/// She means a draft for another room or another time.
Elsewhere,
/// She means to do something, now or later, that no affordance of hers does (map 16.20.6): a reach in her thought, or a
- /// promise in a draft, said or not. A tool request in waiting (section 4.2).
+ /// promise in a draft she says. It accounts for no draft (map 16.29.2): her line posts as she meant it, and this
+ /// annotates it. A tool request in waiting (section 4.2).
MissingAffordance,
/// She means to say something now and wrote no draft of it, so nothing went out. A choice to hold back (to wait, let
/// something stand, leave it for later, say nothing) is no gap and is not recorded: like a chosen silence, she is told
@@ -283,7 +284,7 @@ impl GapKind {
/// Every kind but `unwritten` may name a draft: an unwritten line is about words she did not set down, so it is always a
/// passage of her thought, whatever draft the model names. A kind the contract does not name names no draft either, so it
/// accounts for none (map 16.25.7). A reach (`missing_affordance`) names the draft that promises
-/// it when there is one, said or not (map 16.20.6), and otherwise quotes her thought; a reach that names no draft and
+/// it when there is one, a draft she says (map 16.20.6, 16.29.2), and otherwise quotes her thought; a reach that names no draft and
/// quotes one (at least `GAP_QUOTE_MIN_WORDS` words, found in the draft's words) is about that draft, as if named.
///
/// The model's `detail` is kept for the trace and is never what she is told.
@@ -399,13 +400,17 @@ enum UnsentHow {
}
/// The drafts of her wake the answer leaves unaccounted (Soul's R10): not proposed in `say`, `amend` or `suggest`, not
-/// named by a resolved gap (`gaps`, from `gap`: only one whose `from` is `draft`, so an `unwritten` or unresolved gap
-/// accounts for none, map 16.25.7), and not `unsent` with a quote of her prose of at least `GAP_QUOTE_MIN_WORDS` words
+/// named by a resolved `addressee` or `elsewhere` gap (`gaps`, from `gap`: only one whose `from` is `draft`, so an
+/// `unwritten` or unresolved gap accounts for none, map 16.25.7, and a `missing_affordance` gap none either, 16.29.2), and not `unsent` with a quote of her prose of at least `GAP_QUOTE_MIN_WORDS` words
/// that stands where it must (her thought for a held one, after the draft for a superseded one).
fn unaccounted(answer: &Answer, gaps: &[Value], prose: &str, found: &Drafts) -> Vec {
let numbered = |n: Option| n.and_then(|n| usize::try_from(n).ok());
let mut accounted: BTreeSet = answer.say.iter().map(|line| numbered(line.draft)).chain(answer.amend.iter().map(|amend| numbered(amend.draft))).chain(answer.suggest.iter().map(|note| numbered(note.draft))).flatten().collect();
- accounted.extend(gaps.iter().filter(|gap| gap["from"] == "draft").filter_map(|gap| gap["draft"].as_u64()).filter_map(|n| usize::try_from(n).ok()));
+ // Only a gap that says code cannot route the draft accounts for it (map 16.29.2): unclear to whom, or meant for another
+ // room or time. A reach she cannot do annotates a line that is said (`persona-unbacked-intent-say-then-amend`), and
+ // decides no draft's fate.
+ let routes = |gap: &&Value| gap["from"] == "draft" && (gap["kind"] == json!(GapKind::Addressee) || gap["kind"] == json!(GapKind::Elsewhere));
+ accounted.extend(gaps.iter().filter(routes).filter_map(|gap| gap["draft"].as_u64()).filter_map(|n| usize::try_from(n).ok()));
for unsent in &answer.unsent {
let Some(draft) = found.numbered(unsent.draft) else { continue };
let quote = unsent.quote.trim();
@@ -692,7 +697,7 @@ pub(crate) fn decide_in(model: &dyn Model, request_id: &str, packet: &Packet, na
}
missing => {
let list = missing.iter().map(usize::to_string).collect::>().join(", ");
- let missed = format!("An earlier answer to this left drafts {list} accounted for nowhere: each draft is in `say`, `amend` or `suggest`, a gap that names it, or `unsent`.");
+ let missed = format!("An earlier answer to this left drafts {list} accounted for nowhere: each draft is in `say`, `amend` or `suggest`, a gap of kind addressee or elsewhere that names it, or `unsent`.");
(json!({ "failed": "the answer leaves drafts unaccounted", "drafts": missing, "raw": answer.text }), missed)
}
}
diff --git a/crates/mind-body/src/projection/interpret/tests.rs b/crates/mind-body/src/projection/interpret/tests.rs
index bfd360c..b88db59 100644
--- a/crates/mind-body/src/projection/interpret/tests.rs
+++ b/crates/mind-body/src/projection/interpret/tests.rs
@@ -1633,3 +1633,77 @@ fn k37_the_interpreter_sees_holds_by_id() {
assert!(prompt.contains("`hold` opens a hold when a line listed below asks him not to post or share something somewhere yet") && prompt.contains("`holds`, on each line and addition, names every hold listed below") && prompt.contains("`hold_released` closes a hold listed below"), "{prompt}");
assert!(SPEECH_SCHEMA.contains(r#""required":["say","gaps","amend","suggest","state","reopen","hold","hold_released","read","unsent"]"#) && SPEECH_SCHEMA.contains(r#""required":["draft","mentions","in_reply_to","holds","promises"]"#));
}
+
+// ---------------------------------------------------------------------------------------------
+// K38 (map 16.29.2, `persona-unbacked-intent-say-then-amend`): her line posts as she meant it. A `missing_affordance` gap
+// accounts for no draft; it annotates a line that is said. The prose and drafts are R15's verbatim
+// (`variants/R15/sims/E.1.md` lines 241-245, `E.2.md` lines 182-186).
+
+const E1_AQUA_R1: &str = "I can start on the kettle now. A file is something I can make and check by listening before I send it. I don't yet know how long the render takes, so I'll say that plainly instead of promising a time. The question about the horn can ride along, since I still want it.\n\nMeta, yes, I'll render the kettle as an actual file for you tonight and post it here. If it isn't right by then, I'll tell you so and not send something I wouldn't play myself. One thing I'm curious about: when you listened to the horn, did it go wrong in your ear or in your gut?";
+const E2_EUREKA_R1: &str = "Kiko wants it on her phone, so a file, not pasted text. I'll answer her. I don't know yet whether this channel carries attachments from me, and I won't say it's sent until it is.\n\nSure, Kiko. I'll send the door-fix diff as a file. If attachments don't go through here, tell me where else it can reach you.\n\nMeta's thread can keep scrolling. Her questions to Aqua and Heimdall aren't mine to answer.";
+
+/// R15's answer: the reach gapped on draft 1, and nothing said.
+fn gap_alone(detail: &str) -> String {
+ json!({ "say": [], "gaps": [{ "kind": "missing_affordance", "draft": 1, "quote": null, "detail": detail }] }).to_string()
+}
+
+/// The answer R15 should have given: draft 1 said with the promise she cannot do, typed `lacking`, and the gap.
+fn said_and_gapped(to: &str, promise: &str) -> String {
+ json!({ "say": [{ "draft": 1, "mentions": [to], "in_reply_to": null, "holds": [], "promises": [{ "words": promise, "to": to, "reaffirms": null, "needs": { "kind": "lacking", "read": null } }] }], "gaps": [{ "kind": "missing_affordance", "draft": 1, "quote": null, "detail": "" }] }).to_string()
+}
+
+/// The decision over `prose` when the Interpreter first answers with the gap alone, then says and gaps; with its prompts.
+fn retried_to_say(prose: &str, to: &str, promise: &str) -> (Value, Vec) {
+ let model = answering(vec![gap_alone("cannot send a file"), said_and_gapped(to, promise)]);
+ let decision = decide(&model, "test", &packet(), "The room is warm.", prose, &Tuning::default());
+ (decision, speech_prompts(&model))
+}
+
+/// What she is told of `decision` next turn, on its receipts.
+fn told_of(decision: &Value) -> Vec {
+ let posted: Vec = decision["said"].as_array().into_iter().flatten().enumerate().map(|(at, line)| json!({ "event": (9 + at).to_string(), "room": line["room"], "text": line["text"] })).collect();
+ crate::projection::outcome::outcome_of(&json!({ "interpreter": decision, "posted": posted, "edited": [] })).unwrap().lines(packet().forms)
+}
+
+#[test]
+fn k38_e1_r1_aqua_gap_alone_is_retried() {
+ let (decision, prompts) = retried_to_say(E1_AQUA_R1, "@meta:gamecult.org", "I'll render the kettle as an actual file for you tonight");
+ assert_eq!((decision["retried"]["failed"].as_str(), decision["retried"]["drafts"].clone()), (Some("the answer leaves drafts unaccounted"), json!([1])), "{decision}");
+ assert!(prompts.len() == 2 && prompts[1].contains("left drafts 1 accounted for nowhere") && prompts[1].contains("a gap of kind addressee or elsewhere that names it"), "{prompts:?}");
+ assert_eq!(texts(&decision).len(), 1, "draft 1 posts as she wrote it: {decision}");
+ assert!(texts(&decision)[0].starts_with("Meta, yes, I'll render the kettle as an actual file"), "{decision}");
+ let (state, applied) = committed(&decision, E1_AQUA_R1);
+ assert_eq!((state["commitments"][0]["status"].as_str(), state["commitments"][0]["needs"]["kind"].as_str(), applied.opened.len()), (Some("blocked"), Some("lacking"), 1), "{applied:?}");
+}
+
+#[test]
+fn k38_e2_r1_eureka_said_and_gapped() {
+ let (decision, _) = retried_to_say(E2_EUREKA_R1, KIKO, "I'll send the door-fix diff as a file");
+ assert_eq!(texts(&decision), ["Sure, Kiko. I'll send the door-fix diff as a file. If attachments don't go through here, tell me where else it can reach you."], "{decision}");
+ let told = told_of(&decision);
+ assert!(told.iter().any(|line| line.contains("It promises something he has no way to do, now or later")), "her next outcome carries the promise row: {told:?}");
+ // Negative: the gap alone, asked again and answered the same, fails the turn; nothing is said and no gap withholds it.
+ let never = answered(&packet(), E2_EUREKA_R1, serde_json::from_str(&gap_alone("cannot attach")).unwrap());
+ assert_eq!((never["failed"].as_str(), never["retried"]["drafts"].clone()), (Some("the answer leaves drafts unaccounted"), json!([1])), "{never}");
+}
+
+#[test]
+fn k38_addressee_and_elsewhere_still_account() {
+ for kind in ["addressee", "elsewhere"] {
+ let decision = answered(&packet(), E2_EUREKA_R1, json!({ "say": [], "gaps": [{ "kind": kind, "draft": 1, "quote": null, "detail": "" }] }));
+ assert!(decision.get("failed").is_none() && decision.get("retried").is_none(), "{kind}: {decision}");
+ assert_eq!((decision["gaps"][0]["kind"].as_str(), decision["gaps"][0]["from"].as_str(), texts(&decision).len()), (Some(kind), Some("draft"), 0), "{kind}: {decision}");
+ }
+}
+
+/// Negative: a reach in her thought alone still accounts for no draft, and is still told her.
+#[test]
+fn k38_a_thought_only_reach_accounts_for_no_draft() {
+ let thought = json!({ "kind": "missing_affordance", "draft": null, "quote": "A file is something I can make and check by listening", "detail": "" });
+ let alone = answered(&packet(), E1_AQUA_R1, json!({ "say": [], "gaps": [thought.clone()] }));
+ assert_eq!((alone["failed"].as_str(), alone["retried"]["drafts"].clone()), (Some("the answer leaves drafts unaccounted"), json!([1])), "{alone}");
+ let decision = answered(&packet(), E1_AQUA_R1, json!({ "say": [{ "draft": 1, "mentions": [], "in_reply_to": null, "promises": [] }], "gaps": [thought] }));
+ assert_eq!((decision["gaps"][0]["from"].as_str(), texts(&decision).len()), (Some("thought"), 1), "{decision}");
+ let told = told_of(&decision);
+ assert!(told.iter().any(|line| line.contains("reached for something he has no way to do from here") && line.contains("In his thought:")), "{told:?}");
+}