@@ -56,7 +56,7 @@ it("keeps structured ACP exit details through cause wrappers without reading arb
5656 assert . equal ( failure . code , "23" ) ;
5757 assert . equal (
5858 failure . message ,
59- "ACP process exited with code 23\nSynthetic configuration failed.\napi_key= [REDACTED]" ,
59+ "ACP process exited with code 23\nSynthetic configuration failed.\n [REDACTED credential diagnostic ]" ,
6060 ) ;
6161 }
6262 assert . equal (
@@ -82,7 +82,8 @@ it("keeps structured ACP exit details through cause wrappers without reading arb
8282
8383it ( "redacts prefixed credential fields and escaped quoted values in ACP stderr" , ( ) => {
8484 const stderr = [
85- "Synthetic failure: MISTRAL_API_KEY=FixtureOnly0123456789abcdefABCDEF" ,
85+ "Synthetic configuration failed." ,
86+ "MISTRAL_API_KEY=FixtureOnly0123456789abcdefABCDEF" ,
8687 "GEMINI_API_KEY=AIzaFixtureOnly0123456789" ,
8788 JSON . stringify ( {
8889 refresh_token : "fixture-refresh-value" ,
@@ -94,7 +95,7 @@ it("redacts prefixed credential fields and escaped quoted values in ACP stderr",
9495 const failure = makeProviderFailure ( {
9596 cause : { _tag : "AcpProcessExitedError" , code : 23 , stderr } ,
9697 } ) ;
97- assert . include ( failure . message , "Synthetic failure: " ) ;
98+ assert . include ( failure . message , "Synthetic configuration failed. " ) ;
9899 for ( const value of [
99100 "FixtureOnly" ,
100101 "AIzaFixture" ,
@@ -107,6 +108,33 @@ it("redacts prefixed credential fields and escaped quoted values in ACP stderr",
107108 }
108109} ) ;
109110
111+ it ( "withholds whole ACP stderr lines containing credential markers" , ( ) => {
112+ for ( const line of [
113+ "AWS_SECRET_ACCESS_KEY=FixtureOnlyValue0123" ,
114+ "SECRET_KEY=FixtureOnlyValue0123" ,
115+ "STRIPE_SECRET_KEY=FixtureOnlyValue0123" ,
116+ JSON . stringify ( { clientSecret : "fixture-client-value" , refreshToken : "fixture-refresh-value" } ) ,
117+ "secretAccessKey: FixtureOnlyValue" ,
118+ "Authorization: token FixtureOnlyValue" ,
119+ "Diagnostic only mentions a password; no value is present." ,
120+ "CLIENTSECRET=FixtureOnlyValue" ,
121+ "GOOGLE_KEY=FixtureOnlyValue" ,
122+ "Unknown configuration key; no credential is present." ,
123+ ] ) {
124+ const failure = makeProviderFailure ( {
125+ cause : {
126+ _tag : "AcpProcessExitedError" ,
127+ code : 23 ,
128+ stderr : `Synthetic configuration failed.\n${ line } \nFinal diagnostic.` ,
129+ } ,
130+ } ) ;
131+ assert . equal (
132+ failure . message ,
133+ "ACP process exited with code 23\nSynthetic configuration failed.\n[REDACTED credential diagnostic]\nFinal diagnostic." ,
134+ ) ;
135+ }
136+ } ) ;
137+
110138it ( "redacts standalone service tokens in ACP exit diagnostics" , ( ) => {
111139 const failure = makeProviderFailure ( {
112140 cause : {
0 commit comments