authorgravatar for julius0216@outlook.comJulius Marminge <julius0216@outlook.com> 2026-09-05 01:51:43-07:00
committergravatar for noreply@github.comGitHub <noreply@github.com> 2026-09-05 01:51:43-07:00
logbc24d98d1630104722abe6a4d839365d24e2aa27
tree4966358b32f0ce444ab99a6e637d834e4890b28d
parentd524eb96936090bd2b8a96449784155ad4af9591
signature Signed by PGP key B5690EEEBB952194

test(server): remove title prompt editorial snapshots (#10063)


1 files changed, 1 insertions(+), 40 deletions(-)

apps/server/src/textGeneration/TextGenerationPrompts.test.ts+1-40
......@@ -146,7 +146,7 @@ describe("buildBranchNamePrompt", () => {
146146});
147147
148148describe("buildThreadTitlePrompt", () => {
149 it("includes the user message and the title guidance rules", () => {
149 it("includes the user message without absent attachment metadata", () => {
150150 const result = buildThreadTitlePrompt({
151151 message: "Investigate reconnect regressions after session restore",
152152 });
......@@ -154,18 +154,6 @@ describe("buildThreadTitlePrompt", () => {
154154 expect(result.prompt).toContain("User message:");
155155 expect(result.prompt).toContain("Investigate reconnect regressions after session restore");
156156 expect(result.prompt).not.toContain("Attachment metadata:");
157 expect(result.prompt).toContain(
158 "Generate a title that will help the user recognize this T3 Code thread weeks later.",
159 );
160 expect(result.prompt).toContain(
161 "Title the subject and outcome. Discard incidental instructions.",
162 );
163 expect(result.prompt).toContain(
164 "Name the product change, not the mock, plan, report, branch, or PR used to produce it.",
165 );
166 expect(result.prompt).not.toContain(
167 "Title should summarize the user's request, not restate it verbatim.",
168 );
169157 });
170158
171159 it("includes attachment metadata when attachments are provided", () => {
......@@ -188,24 +176,6 @@ describe("buildThreadTitlePrompt", () => {
188176 expect(result.prompt).toContain("67890 bytes");
189177 });
190178
191 it.each([
192 { mode: "initial", previousTitle: undefined },
193 { mode: "regeneration", previousTitle: "Open Projects in Desktop App" },
194 ])(
195 "tells the $mode prompt not to title linked PRs from local git history",
196 ({ previousTitle }) => {
197 const result = buildThreadTitlePrompt({
198 message: "$takeover https://github.com/pingdotgg/t3code/pull/8588",
199 ...(previousTitle === undefined ? {} : { previousTitle }),
200 });
201
202 expect(result.prompt).toContain(
203 "Local git history is not evidence of what a linked PR or issue is about.",
204 );
205 expect(result.prompt).toContain('such as "Take Over PR 8588"');
206 },
207 );
208
209179 it("regenerates from recent thread contents and identifies the previous title", () => {
210180 const result = buildThreadTitlePrompt({
211181 message: `USER:\nInvestigate reconnect regressions\n\nASSISTANT:\nThe remaining issue is stale session state`,
......@@ -216,15 +186,6 @@ describe("buildThreadTitlePrompt", () => {
216186 "Regenerate the title for an existing T3 Code thread so the user can recognize it weeks later.",
217187 );
218188 expect(result.prompt).toContain('The previous title was "Investigate reconnect regressions".');
219 expect(result.prompt).toContain(
220 "Read the USER messages first. Identify the latest explicit durable goal.",
221 );
222 expect(result.prompt).toContain(
223 "Do not promote one assistant finding into the thread subject unless the user adopts it as a new goal.",
224 );
225 expect(result.prompt).toContain(
226 'A subagent-monitoring review that finds a Codex roster bug remains "Review Subagent Monitoring Risks,"',
227 );
228189 expect(result.prompt).toContain("Thread contents:");
229190 expect(result.prompt).toContain("The remaining issue is stale session state");
230191 });