From 04b369018b41dd07f9531fac1f13b7ef75700929 Mon Sep 17 00:00:00 2001 From: Eric Litman Date: Fri, 31 Jul 2026 19:21:01 -0400 Subject: [PATCH 1/2] fix: keep installer consent turn visible [BEAR-103] --- CHANGELOG.md | 4 ++++ INSTALL.md | 6 +++++- cmd/threadbear/site_contract_test.go | 27 +++++++++++++++++++++++++++ site/install | 6 +++++- 4 files changed, 41 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c272ecc..c44281b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ ## Unreleased +### Fixed + +- Kept the guided installer welcome, readiness result, complete recommendation, and consent question visible together after the first turn finishes. + ## v2.1.0 - 2026-07-31 ### Changed diff --git a/INSTALL.md b/INSTALL.md index 64d7116..d2daf96 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -18,6 +18,8 @@ Open with this complete orientation before running a command: > > I'll check this Mac, show you exactly what will change, and answer questions before installing anything. Then I'll prove the result in a genuinely fresh Codex task and update existing titles only after you consent. +Codex collapses commentary after a turn finishes. The welcome may appear there while checks run, but commentary copies do not satisfy this contract. The durable terminal final answer (`phase: final_answer`) for this first turn must be self-contained: include the complete orientation above, the readiness sentence, the full recommendation card, and the consent question. Do not end the turn with only the consent question. + Keep the tone warm, calm, capable, and lightly playful. Explain visible outcomes first. Show the complete recommendation before asking for consent. A clear yes to an unchanged complete recommendation is installation consent; ask again only if the effect changed, the answer was ambiguous, or a reinstall changes the recommendation. ## 1. Check this Mac @@ -55,7 +57,7 @@ Require a successful candidate self-test and a dry-run limited to the binary, on ## 2. Show the recommendation -Only after every check and the dry run succeeds, say: “This Mac and Codex are ready for ThreadBear.” Continue in the same response with the full card: +Only after every check and the dry run succeeds, compose one terminal final answer with no later tool call or commentary. Repeat the complete orientation, say “This Mac and Codex are ready for ThreadBear,” then continue with the full card: > ## Recommended setup > @@ -68,6 +70,8 @@ Only after every check and the dry run succeeds, say: “This Mac and Codex are > > Install ThreadBear with this recommended setup? +The welcome heading, orientation, readiness sentence, every recommendation bullet, and consent question must all be present in `phase: final_answer` when the completed task is read back. Do not send the card only as commentary and do not follow it with a question-only final answer. + Answer questions without inventing options or flags. A clear yes to this unchanged recommendation advances directly to installation. ## 3. Install after consent diff --git a/cmd/threadbear/site_contract_test.go b/cmd/threadbear/site_contract_test.go index 09fc17d..adb53a8 100644 --- a/cmd/threadbear/site_contract_test.go +++ b/cmd/threadbear/site_contract_test.go @@ -56,6 +56,33 @@ func TestPublishedInstallGuideMatchesCurrentCLI(t *testing.T) { } } +func TestPublishedInstallGuideKeepsFirstConsentTurnVisible(t *testing.T) { + data, err := os.ReadFile(filepath.Join("..", "..", "INSTALL.md")) + if err != nil { + t.Fatal(err) + } + guide := string(data) + + for _, required := range []string{ + "Codex collapses commentary after a turn finishes.", + "commentary copies do not satisfy this contract", + "durable terminal final answer (`phase: final_answer`)", + "include the complete orientation above, the readiness sentence, the full recommendation card, and the consent question", + "Do not end the turn with only the consent question.", + "compose one terminal final answer with no later tool call or commentary", + "every recommendation bullet, and consent question must all be present in `phase: final_answer`", + "do not follow it with a question-only final answer", + } { + if !strings.Contains(guide, required) { + t.Errorf("published install guide is missing visible consent-turn contract %q", required) + } + } + + if strings.Contains(guide, "Continue in the same response with the full card") { + t.Error("published install guide retains the ambiguous response-boundary rule") + } +} + func TestHomepageDoesNotPromiseRemovedCapabilities(t *testing.T) { data, err := os.ReadFile(filepath.Join("..", "..", "site", "index.html")) if err != nil { diff --git a/site/install b/site/install index 64d7116..d2daf96 100644 --- a/site/install +++ b/site/install @@ -18,6 +18,8 @@ Open with this complete orientation before running a command: > > I'll check this Mac, show you exactly what will change, and answer questions before installing anything. Then I'll prove the result in a genuinely fresh Codex task and update existing titles only after you consent. +Codex collapses commentary after a turn finishes. The welcome may appear there while checks run, but commentary copies do not satisfy this contract. The durable terminal final answer (`phase: final_answer`) for this first turn must be self-contained: include the complete orientation above, the readiness sentence, the full recommendation card, and the consent question. Do not end the turn with only the consent question. + Keep the tone warm, calm, capable, and lightly playful. Explain visible outcomes first. Show the complete recommendation before asking for consent. A clear yes to an unchanged complete recommendation is installation consent; ask again only if the effect changed, the answer was ambiguous, or a reinstall changes the recommendation. ## 1. Check this Mac @@ -55,7 +57,7 @@ Require a successful candidate self-test and a dry-run limited to the binary, on ## 2. Show the recommendation -Only after every check and the dry run succeeds, say: “This Mac and Codex are ready for ThreadBear.” Continue in the same response with the full card: +Only after every check and the dry run succeeds, compose one terminal final answer with no later tool call or commentary. Repeat the complete orientation, say “This Mac and Codex are ready for ThreadBear,” then continue with the full card: > ## Recommended setup > @@ -68,6 +70,8 @@ Only after every check and the dry run succeeds, say: “This Mac and Codex are > > Install ThreadBear with this recommended setup? +The welcome heading, orientation, readiness sentence, every recommendation bullet, and consent question must all be present in `phase: final_answer` when the completed task is read back. Do not send the card only as commentary and do not follow it with a question-only final answer. + Answer questions without inventing options or flags. A clear yes to this unchanged recommendation advances directly to installation. ## 3. Install after consent From e41b1630a454f473f5ab984c72ec10c09c51383f Mon Sep 17 00:00:00 2001 From: Eric Litman Date: Fri, 31 Jul 2026 19:27:35 -0400 Subject: [PATCH 2/2] fix: keep failed install checks truthful [BEAR-103] --- INSTALL.md | 2 +- cmd/threadbear/site_contract_test.go | 24 +++++++++++++++++++++--- site/install | 2 +- 3 files changed, 23 insertions(+), 5 deletions(-) diff --git a/INSTALL.md b/INSTALL.md index d2daf96..6bd17f8 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -18,7 +18,7 @@ Open with this complete orientation before running a command: > > I'll check this Mac, show you exactly what will change, and answer questions before installing anything. Then I'll prove the result in a genuinely fresh Codex task and update existing titles only after you consent. -Codex collapses commentary after a turn finishes. The welcome may appear there while checks run, but commentary copies do not satisfy this contract. The durable terminal final answer (`phase: final_answer`) for this first turn must be self-contained: include the complete orientation above, the readiness sentence, the full recommendation card, and the consent question. Do not end the turn with only the consent question. +Codex collapses commentary after a turn finishes. The welcome may appear there while checks run, but commentary copies do not satisfy this contract. Every terminal final answer in this first turn must be self-contained. If every check and the dry run succeeds, `phase: final_answer` must include the complete orientation above, the readiness sentence, the full recommendation card, and the consent question. Do not end a successful turn with only the consent question. If any check fails, keep the complete orientation and truthful failure visible in `phase: final_answer`; do not claim readiness, show the recommendation card, or ask for consent. Keep the tone warm, calm, capable, and lightly playful. Explain visible outcomes first. Show the complete recommendation before asking for consent. A clear yes to an unchanged complete recommendation is installation consent; ask again only if the effect changed, the answer was ambiguous, or a reinstall changes the recommendation. diff --git a/cmd/threadbear/site_contract_test.go b/cmd/threadbear/site_contract_test.go index adb53a8..727e1b7 100644 --- a/cmd/threadbear/site_contract_test.go +++ b/cmd/threadbear/site_contract_test.go @@ -66,9 +66,9 @@ func TestPublishedInstallGuideKeepsFirstConsentTurnVisible(t *testing.T) { for _, required := range []string{ "Codex collapses commentary after a turn finishes.", "commentary copies do not satisfy this contract", - "durable terminal final answer (`phase: final_answer`)", - "include the complete orientation above, the readiness sentence, the full recommendation card, and the consent question", - "Do not end the turn with only the consent question.", + "Every terminal final answer in this first turn must be self-contained.", + "If every check and the dry run succeeds, `phase: final_answer` must include the complete orientation above, the readiness sentence, the full recommendation card, and the consent question.", + "Do not end a successful turn with only the consent question.", "compose one terminal final answer with no later tool call or commentary", "every recommendation bullet, and consent question must all be present in `phase: final_answer`", "do not follow it with a question-only final answer", @@ -83,6 +83,24 @@ func TestPublishedInstallGuideKeepsFirstConsentTurnVisible(t *testing.T) { } } +func TestPublishedInstallGuideDoesNotRequestConsentAfterFailedChecks(t *testing.T) { + data, err := os.ReadFile(filepath.Join("..", "..", "INSTALL.md")) + if err != nil { + t.Fatal(err) + } + guide := string(data) + + for _, required := range []string{ + "If any check fails, keep the complete orientation and truthful failure visible in `phase: final_answer`", + "do not claim readiness, show the recommendation card, or ask for consent", + "Only after every check and the dry run succeeds, compose one terminal final answer", + } { + if !strings.Contains(guide, required) { + t.Errorf("published install guide is missing truthful failure-turn contract %q", required) + } + } +} + func TestHomepageDoesNotPromiseRemovedCapabilities(t *testing.T) { data, err := os.ReadFile(filepath.Join("..", "..", "site", "index.html")) if err != nil { diff --git a/site/install b/site/install index d2daf96..6bd17f8 100644 --- a/site/install +++ b/site/install @@ -18,7 +18,7 @@ Open with this complete orientation before running a command: > > I'll check this Mac, show you exactly what will change, and answer questions before installing anything. Then I'll prove the result in a genuinely fresh Codex task and update existing titles only after you consent. -Codex collapses commentary after a turn finishes. The welcome may appear there while checks run, but commentary copies do not satisfy this contract. The durable terminal final answer (`phase: final_answer`) for this first turn must be self-contained: include the complete orientation above, the readiness sentence, the full recommendation card, and the consent question. Do not end the turn with only the consent question. +Codex collapses commentary after a turn finishes. The welcome may appear there while checks run, but commentary copies do not satisfy this contract. Every terminal final answer in this first turn must be self-contained. If every check and the dry run succeeds, `phase: final_answer` must include the complete orientation above, the readiness sentence, the full recommendation card, and the consent question. Do not end a successful turn with only the consent question. If any check fails, keep the complete orientation and truthful failure visible in `phase: final_answer`; do not claim readiness, show the recommendation card, or ask for consent. Keep the tone warm, calm, capable, and lightly playful. Explain visible outcomes first. Show the complete recommendation before asking for consent. A clear yes to an unchanged complete recommendation is installation consent; ask again only if the effect changed, the answer was ambiguous, or a reinstall changes the recommendation.