@@ -178,7 +178,8 @@ if (!recordPath || !configPath || !stateDir) {
178178const record = (value) => fs.appendFileSync(recordPath, JSON.stringify(value) + "\\n");
179179const fail = async (code, message) => {
180180 await new Promise((resolve) => process.stderr.write(
181- message + "\\ncontext retained\\n" + "diagnostic ".repeat(400), resolve));
181+ message + "\\ncontext retained\\n" + "diagnostic ".repeat(400) +
182+ "\\nterminal failure: Authorization: Bearer fixture-tail-secret", resolve));
182183 process.exit(code);
183184};
184185const authDbPath = path.join(stateDir, "agents", "qa", "agent", "openclaw-agent.sqlite");
@@ -1734,6 +1735,7 @@ describe("buildQaRuntimeEnv", () => {
17341735 expect ( error . message ) . toContain ( `${ prefix } ${ detail } \ncontext retained\n` ) ;
17351736 expect ( error . cause . message . length ) . toBeLessThanOrEqual ( prefix . length + 2_048 ) ;
17361737 expect ( error . cause . message ) . not . toContain ( "diagnostic " . repeat ( 400 ) ) ;
1738+ expect ( error . cause . message ) . toContain ( "terminal failure: Authorization: Bearer <redacted>" ) ;
17371739 expect ( error . cause ) . not . toHaveProperty ( "cause" ) ;
17381740 const records = await readJsonLines ( recordPath ) ;
17391741 expect ( records . map ( ( record ) => record . kind ) ) . toEqual (
@@ -1757,6 +1759,7 @@ describe("buildQaRuntimeEnv", () => {
17571759 expect ( diagnostic ) . not . toContain ( submittedKey ) ;
17581760 }
17591761 expect ( diagnostic ) . not . toContain ( "fixture-plugin-secret" ) ;
1762+ expect ( diagnostic ) . not . toContain ( "fixture-tail-secret" ) ;
17601763 const tempRoots = await readdir ( tempParentDir ) ;
17611764 expect ( tempRoots ) . toHaveLength ( 1 ) ;
17621765 for ( const stream of [ "stdout" , "stderr" ] ) {
0 commit comments