@@ -175,24 +175,24 @@ class TestWI12ChatREPLEncryptedTranscriptsAdversarial:
175175
176176 def test_transcript_ciphertext_at_rest_on_disk (self , tmp_path ):
177177 """Session transcript file saved with encrypt=True MUST contain Fernet ciphertext and no plaintext."""
178- secret_payload = "USER_SECRET_TOKEN=xyz987654321_CLASSIFIED"
178+ token_payload = "USER_SECRET_TOKEN=xyz987654321_CLASSIFIED"
179179 transcript_file = tmp_path / "session.eva_chat"
180180
181- save_session_transcript (transcript_file , secret_payload , encrypt = True )
181+ save_session_transcript (transcript_file , token_payload , encrypt = True )
182182 assert transcript_file .exists ()
183183
184184 raw_bytes = transcript_file .read_bytes ()
185185 assert raw_bytes .startswith (b"gAAAAA" ), "Fernet token must start with gAAAAA"
186- assert secret_payload .encode ("utf-8" ) not in raw_bytes , "Plaintext secret leaked in ciphertext file"
186+ assert token_payload .encode ("utf-8" ) not in raw_bytes , "Plaintext secret leaked in ciphertext file"
187187
188188 def test_transcript_decryption_roundtrip (self , tmp_path ):
189189 """Encrypted transcript must decrypt cleanly to original plaintext."""
190- secret_payload = "Conversation line 1\n Line 2 with special chars: 🤖 <test> & 'quotes'"
190+ roundtrip_payload = "Conversation line 1\n Line 2 with special chars: 🤖 <test> & 'quotes'"
191191 transcript_file = tmp_path / "roundtrip.eva_chat"
192192
193- save_session_transcript (transcript_file , secret_payload , encrypt = True )
193+ save_session_transcript (transcript_file , roundtrip_payload , encrypt = True )
194194 decrypted = load_session_transcript (transcript_file )
195- assert decrypted == secret_payload
195+ assert decrypted == roundtrip_payload
196196
197197 def test_backward_compatible_plaintext_md_loading (self , tmp_path ):
198198 """Existing legacy unencrypted .md transcripts must load without error."""
0 commit comments