Skip to content

Commit 1e7c0e5

Browse files
author
SentienceDEV
committed
ghost error fix
1 parent a89fe1c commit 1e7c0e5

File tree

1 file changed

+37
-2
lines changed

1 file changed

+37
-2
lines changed

.github/workflows/test.yml

Lines changed: 37 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -290,16 +290,51 @@ jobs:
290290
python << 'PYEOF'
291291
import sys
292292
import inspect
293+
import os
293294
294295
# Set UTF-8 encoding for Windows compatibility
295296
if sys.platform == 'win32':
296297
import io
297298
sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding='utf-8', errors='replace')
298299
sys.stderr = io.TextIOWrapper(sys.stderr.buffer, encoding='utf-8', errors='replace')
299300
300-
import sentience.agent_runtime
301-
302301
print("=== Final Pre-Test Verification ===")
302+
303+
# First, verify the source file directly
304+
source_file = 'sentience/agent_runtime.py'
305+
print(f"=== Checking source file: {source_file} ===")
306+
if not os.path.exists(source_file):
307+
print(f"ERROR: Source file {source_file} not found!")
308+
sys.exit(1)
309+
310+
with open(source_file, 'r', encoding='utf-8') as f:
311+
source_content = f.read()
312+
313+
if 'self.assertTrue(' in source_content:
314+
print('ERROR: Source file still contains self.assertTrue(!')
315+
print('This should have been fixed by the auto-fix step above.')
316+
sys.exit(1)
317+
elif 'self.assert_(' in source_content:
318+
print('OK: Source file uses self.assert_( correctly')
319+
else:
320+
print('WARNING: Could not find assert_ method in source file')
321+
322+
# Now check the installed package
323+
print("\n=== Checking installed package ===")
324+
import sentience.agent_runtime
325+
326+
# Verify it's using local source (editable install)
327+
import sentience
328+
pkg_path = os.path.abspath(sentience.__file__)
329+
cwd = os.getcwd()
330+
if not pkg_path.startswith(cwd):
331+
print(f'WARNING: Package is not from local source!')
332+
print(f' Package path: {pkg_path}')
333+
print(f' Current dir: {cwd}')
334+
print(f' This might be using PyPI package instead of local source!')
335+
else:
336+
print(f'OK: Package is from local source: {pkg_path}')
337+
303338
src = inspect.getsource(sentience.agent_runtime.AgentRuntime.assert_done)
304339
305340
print("assert_done method source:")

0 commit comments

Comments
 (0)