@@ -51,31 +51,48 @@ jobs:
5151 git log --oneline -1
5252 git branch --show-current || echo "Detached HEAD"
5353 echo ""
54- echo "=== Source file line 345 ==="
55- sed -n '345p' sentience/agent_runtime.py || python -c "with open(' sentience/agent_runtime.py', 'r') as f: lines = f.readlines() ; print(lines[344] if len(lines) > 344 else 'NOT FOUND ')"
54+ echo "=== Verify editable install (should point to local source) ==="
55+ python -c "import sentience; import os; fpath = sentience.__file__; print(f'Package location: {fpath}'); print(f'Is in current dir: {os.path.abspath(fpath).startswith(os.getcwd())}') ; print(f'Points to source: {os.path.exists(fpath)} ')"
5656 echo ""
57- echo "=== Installed sentience location ==="
58- python -c "import sentience; print(sentience.__file__ )"
57+ echo "=== Source file line 345 (from repo) ==="
58+ sed -n '345p' sentience/agent_runtime.py || python -c "with open(' sentience/agent_runtime.py', 'r') as f: lines = f.readlines() ; print(lines[344] if len(lines) > 344 else 'NOT FOUND' )"
5959 echo ""
60- echo "=== Check assert_done in installed package ==="
60+ echo "=== Installed package assert_done (from imported module) ==="
6161 python << 'PYEOF'
6262 import inspect
63+ import os
6364 from sentience.agent_runtime import AgentRuntime
65+
66+ # Verify it's using local source
67+ import sentience
68+ pkg_path = os.path.abspath(sentience.__file__)
69+ cwd = os.getcwd()
70+ if not pkg_path.startswith(cwd):
71+ print(f'WARNING: Package is not from local source!')
72+ print(f' Package path: {pkg_path}')
73+ print(f' Current dir: {cwd}')
74+ print(f' This might be using PyPI package instead of local source!')
75+ else:
76+ print(f'✓ Package is from local source: {pkg_path}')
77+
6478 source = inspect.getsource(AgentRuntime.assert_done)
65- print('assert_done method:')
79+ print('\nassert_done method source :')
6680 print(source)
6781 print('\n=== Analysis ===')
6882 if 'self.assertTrue(' in source:
6983 print('✗ ERROR: Found self.assertTrue( in installed package!')
7084 print('This means the source code on this branch still has the bug.')
85+ print('\nProblematic lines:')
7186 for i, line in enumerate(source.split('\n'), 1):
7287 if 'self.assertTrue(' in line:
7388 print(f' Line {i}: {line.strip()}')
89+ print('\nThe source file in the repo should be checked and fixed.')
7490 exit(1)
7591 elif 'self.assert_(' in source:
7692 print('✓ OK: assert_done uses self.assert_( correctly')
7793 else:
7894 print('? WARNING: Could not find assert_ method call')
95+ exit(1)
7996 PYEOF
8097
8198 - name : Verify source code
@@ -191,7 +208,35 @@ jobs:
191208 shell : bash
192209 run : |
193210 # Final verification before tests - ensure we're using the right code
194- python -c "import sentience.agent_runtime; import inspect; src = inspect.getsource(sentience.agent_runtime.AgentRuntime.assert_done); assert 'self.assert_(' in src, 'assert_done must use self.assert_(), not self.assertTrue()'; print('✓ Verified: assert_done uses self.assert_()')"
211+ python << 'PYEOF'
212+ import sentience.agent_runtime
213+ import inspect
214+
215+ print("=== Final Pre-Test Verification ===")
216+ src = inspect.getsource(sentience.agent_runtime.AgentRuntime.assert_done)
217+
218+ print("assert_done method source:")
219+ print(src)
220+ print("\n=== Analysis ===")
221+
222+ if 'self.assertTrue(' in src:
223+ print('✗ ERROR: Found self.assertTrue( in installed package!')
224+ print('The source code on this branch still has the bug.')
225+ print('\nProblematic lines:')
226+ for i, line in enumerate(src.split('\n'), 1):
227+ if 'self.assertTrue(' in line:
228+ print(f' Line {i}: {line.strip()}')
229+ print('\nThis branch needs to be updated with the fix.')
230+ print('The fix commit is: c7a43a9 or equivalent')
231+ print('Fix: Replace self.assertTrue( with self.assert_( in the code above')
232+ exit(1)
233+ elif 'self.assert_(' in src:
234+ print('✓ OK: assert_done uses self.assert_( correctly')
235+ print('Tests should pass.')
236+ else:
237+ print('? WARNING: Could not find assert_ method call in assert_done')
238+ exit(1)
239+ PYEOF
195240 pytest tests/ -v
196241 env :
197242 CI : true
0 commit comments