Review: a path is read as a path in the whole words, which an ask's own message alone shows (issue 383)
mesh/merge-gate pass: builds claude-code, messenger, telegram → ace, g14, novox, shanks; no bus step; every machine composes with the change as it did with…
mesh/repo-check pass: its merge-check.sh passed, each part in its toolchain: merge-check.sh (go), merge-check-typescript.sh (typescript)
mesh/delivery-group group fix/383-a-proposal-reads-whole-on-the-phone ready: every member ready, and composed together they pass
mesh/delivery superseded: a newer head of the same pull request

The review of 2026-10-10: a mixed-case path with a digit ("/mnt/Photos_2024/Jochen") read as a
random string and was withheld from the whole words, the symptom again; the whole was judged on
the kind's issued capabilities instead of the controller's fresh word (Promises); a condition's
record could have taken an ask's whole words in place of its own; and a short instruction text
with a path line was said to be cut where it was shown whole.
This commit is contained in:
jochen
2026-10-10 15:46:54 +02:00
parent 96ba664cb4
commit 545e4319f9
5 changed files with 72 additions and 16 deletions
@@ -172,7 +172,7 @@ func (p Proposal) Act(option string) asks.Act {
func (p Proposal) Ask() asks.Ask {
verb := map[string]string{ActionAdd: "Add", ActionReplace: "Replace", ActionRemove: "Remove"}[p.Action]
shown, whole := excerpt(p.Text, shownLine, "a path, an address or a long word")
wholeShown, _ := excerpt(p.Text, wholeLine, "a long word or a secret's shape")
wholeShown, wholeIsAll := excerpt(p.Text, wholeLine, "a long word or a secret's shape")
part := ""
if p.Action != ActionRemove && !whole {
part = " Part shown"
@@ -181,7 +181,7 @@ func (p Proposal) Ask() asks.Ask {
if len([]rune(headline)) > asks.HeadlineLength {
headline = verb + " Claude instructions?" + part
}
compose := func(text string) string {
compose := func(text string, whole bool) string {
var b strings.Builder
switch p.Action {
case ActionAdd:
@@ -214,12 +214,14 @@ func (p Proposal) Ask() asks.Ask {
if p.Action == ActionRemove {
does = "the instructions are removed from those sessions"
}
a := asks.Ask{ID: p.ID, Headline: headline, Explanation: compose(shown), Who: asks.Operator,
a := asks.Ask{ID: p.ID, Headline: headline, Explanation: compose(shown, whole), Who: asks.Operator,
Expires: p.At.Add(ProposalLasts), OnExpiry: "the proposal is discarded; nothing changes",
About: "instructions." + p.Scope + "." + strings.Join(p.Nodes, "+") + "." + p.Name,
Details: d.String()}
if p.Action != ActionRemove && wholeShown != shown {
a.Whole = compose(wholeShown)
// Cut only when it is: a short text with a path line is whole here (the review of 2026-10-10). The
// headline's "Part shown" is one for every channel and follows the explanation.
a.Whole = compose(wholeShown, wholeIsAll)
}
if len(p.Nodes) == 0 {
a.About = "instructions." + p.Scope + "." + p.Name
@@ -442,6 +442,17 @@ func TestALongTextIsShownInPartAndReadWholeAtTheTerminal(t *testing.T) {
strings.Contains(a.Whole, "not shown here") {
t.Errorf("the whole words: %q", a.Whole)
}
// A short text with one path line: shown whole where the sender is proven, and said to be whole there.
short := "See /etc/claude-code for the managed files.\nA plain line of the hand-over.\n"
out, err = Propose(p, ProposeInput{Scope: ScopeMesh, Name: "short", Text: short}, store, r, t0.Add(time.Minute))
if err != nil {
t.Fatal(err)
}
sa := r.published[out["proposed"].(string)]
if !strings.Contains(sa.Explanation, "NOT SHOWN IN FULL") || !strings.Contains(sa.Explanation, "[1 line(s) not shown here") ||
strings.Contains(sa.Whole, "NOT SHOWN IN FULL") || !strings.Contains(sa.Whole, "?\n\n"+strings.TrimRight(short, "\n")+"\n\nProposed by") {
t.Errorf("the short text:\n%s\n--\n%s", sa.Explanation, sa.Whole)
}
// The whole words keep back what might be a secret's shape (Propose refuses such a text before it is asked;
// this holds the ask's own composition to it), and nothing else.
for line, may := range map[string]bool{