fix(explainer): scrub residual Pi branding + add regression QA
Oracle round-8 closure: 3 user-visible 'Pi' refs remaining in
Explainer.tsx ('ask Pi' in DEFINE step, 'Why an agent (Pi)?' card
title, 'Pi is a co-pilot' card body, 'Ask Pi instead' chip).
All replaced with 'the assistant' / 'Command Assistant'. New
no_pi_branding_in_user_facing_scenes QA gate sweeps landing +
explainer + agent for \bPi\b word boundary on the rendered DOM
text and fails if any scene leaks.
This commit is contained in:
@@ -197,6 +197,31 @@ const welcome = (await p.locator(".agent-turn-agent .agent-turn-body").first().t
|
||||
const honestyOk = !/\bai agent\b/i.test(welcome) || /command assistant/i.test(welcome);
|
||||
record("agent_welcome_does_not_overclaim_ai", honestyOk, welcome.slice(0, 80));
|
||||
|
||||
// 14b. NEGATIVE: no user-visible 'Pi' branding anywhere (deterministic router
|
||||
// should never read as the pi coding agent product). Sweep landing +
|
||||
// explainer + agent + chat scenes for the word boundary.
|
||||
async function scenePiLeak(scene) {
|
||||
if (scene === "landing") {
|
||||
await p.locator(".tab", { hasText: /Home/i }).first().click().catch(() => {});
|
||||
} else if (scene === "explainer") {
|
||||
await p.locator(".tab", { hasText: /Home/i }).first().click().catch(() => {});
|
||||
await p.waitForTimeout(400);
|
||||
await p.locator(".hub-chip", { hasText: /What is FlowMaster/ }).click();
|
||||
} else if (scene === "agent") {
|
||||
await p.locator(".tab", { hasText: /Home/i }).first().click().catch(() => {});
|
||||
await p.waitForTimeout(400);
|
||||
await p.locator(".hub-chip", { hasText: /Command Assistant/i }).click();
|
||||
}
|
||||
await p.waitForTimeout(800);
|
||||
const body = await p.locator("body").innerText();
|
||||
return /\bPi\b/.test(body);
|
||||
}
|
||||
const leaks = [];
|
||||
for (const sc of ["landing", "explainer", "agent"]) {
|
||||
if (await scenePiLeak(sc)) leaks.push(sc);
|
||||
}
|
||||
record("no_pi_branding_in_user_facing_scenes", leaks.length === 0, leaks.length ? `LEAKED in: ${leaks.join(", ")}` : "clean");
|
||||
|
||||
// 15. MEMORY VAULT: remember + recall round-trips, per-user isolation.
|
||||
// Assistant scene is already open from step 13.
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user