Compare commits
3 Commits
eb293f3c96
...
c35f372f52
| Author | SHA1 | Date | |
|---|---|---|---|
| c35f372f52 | |||
| e7879f45a6 | |||
| 57efca4f9b |
@@ -74,7 +74,6 @@ class ApiHookClient:
|
||||
|
||||
def get_session(self) -> dict | None:
|
||||
res = self._make_request('GET', '/api/session')
|
||||
print(f"RAW SESSION RESPONSE: {res}")
|
||||
return res
|
||||
|
||||
def get_mma_status(self) -> dict | None:
|
||||
|
||||
@@ -34,8 +34,10 @@ class HookHandler(BaseHTTPRequestHandler):
|
||||
self.send_response(200)
|
||||
self.send_header('Content-Type', 'application/json')
|
||||
self.end_headers()
|
||||
with app._disc_entries_lock:
|
||||
entries_snapshot = list(app.disc_entries)
|
||||
self.wfile.write(
|
||||
json.dumps({'session': {'entries': app.disc_entries}}).
|
||||
json.dumps({'session': {'entries': entries_snapshot}}).
|
||||
encode('utf-8'))
|
||||
elif self.path == '/api/performance':
|
||||
self.send_response(200)
|
||||
@@ -211,7 +213,8 @@ class HookHandler(BaseHTTPRequestHandler):
|
||||
self.send_response(500)
|
||||
self.end_headers()
|
||||
elif self.path == '/api/session':
|
||||
app.disc_entries = data.get('session', {}).get('entries', app.disc_entries)
|
||||
with app._disc_entries_lock:
|
||||
app.disc_entries = data.get('session', {}).get('entries', app.disc_entries)
|
||||
self.send_response(200)
|
||||
self.send_header('Content-Type', 'application/json')
|
||||
self.end_headers()
|
||||
|
||||
@@ -1,22 +1,32 @@
|
||||
# Project Tracks
|
||||
# Project Tracks
|
||||
|
||||
This file tracks all major tracks for the project. Each track has its own detailed plan in its respective folder.
|
||||
|
||||
---
|
||||
|
||||
- [x] **Track: Robust Live Simulation Verification**
|
||||
*Link: [./tracks/robust_live_simulation_verification/](./tracks/robust_live_simulation_verification/)*
|
||||
## Active
|
||||
|
||||
- [ ] **Track: Context & Token Visualization**
|
||||
*Link: [./tracks/context_token_viz_20260301/](./tracks/context_token_viz_20260301/)*
|
||||
|
||||
- [ ] **Track: UX Sim Test**
|
||||
*Link: [./tracks/ux_sim_test_20260301/](./tracks/ux_sim_test_20260301/)*
|
||||
|
||||
---
|
||||
|
||||
- [~] **Track: Comprehensive Conductor & MMA GUI UX**
|
||||
*Link: [./tracks/comprehensive_gui_ux_20260228/](./tracks/comprehensive_gui_ux_20260228/)*
|
||||
## Completed / Archived
|
||||
|
||||
- [x] **Track: Comprehensive Conductor & MMA GUI UX**
|
||||
*Link: [./archive/comprehensive_gui_ux_20260228/](./archive/comprehensive_gui_ux_20260228/)*
|
||||
|
||||
- [x] **Track: MMA Pipeline Fix & Worker Stream Verification**
|
||||
*Link: [./archive/mma_pipeline_fix_20260301/](./archive/mma_pipeline_fix_20260301/)*
|
||||
|
||||
---
|
||||
- [x] **Track: Simulation Hardening**
|
||||
*Link: [./archive/simulation_hardening_20260301/](./archive/simulation_hardening_20260301/)*
|
||||
|
||||
- [x] **Track: Deep Architectural Documentation Refresh**
|
||||
*Link: [./tracks/documentation_refresh_20260224/](./tracks/documentation_refresh_20260224/)*
|
||||
*Link: [./archive/documentation_refresh_20260224/](./archive/documentation_refresh_20260224/)*
|
||||
|
||||
- [x] **Track: Robust Live Simulation Verification**
|
||||
*Link: [./archive/robust_live_simulation_verification/](./archive/robust_live_simulation_verification/)*
|
||||
|
||||
2
gui_2.py
2
gui_2.py
@@ -792,7 +792,6 @@ class App:
|
||||
with self._disc_entries_lock:
|
||||
self.disc_entries = _parse_history_entries(disc_data.get("history", []), self.disc_roles)
|
||||
self.ai_status = f"discussion: {name}"
|
||||
sys.stderr.write(f'[DEBUG] Switched to {name}. disc_entries len: {len(self.disc_entries)}\n')
|
||||
|
||||
def _flush_disc_entries_to_project(self) -> None:
|
||||
history_strings = [project_manager.entry_to_str(e) for e in self.disc_entries]
|
||||
@@ -1069,7 +1068,6 @@ class App:
|
||||
disc_data["last_updated"] = project_manager.now_ts()
|
||||
with self._disc_entries_lock:
|
||||
self.disc_entries.append(item)
|
||||
print(f'[DEBUG] Added to disc_entries. Current len: {len(self.disc_entries)}')
|
||||
|
||||
def _handle_approve_script(self) -> None:
|
||||
"""Logic for approving a pending script via API hooks."""
|
||||
|
||||
@@ -14,7 +14,12 @@ def test_gemini_cli_context_bleed_prevention(live_gui: Any) -> None:
|
||||
"""
|
||||
client = ApiHookClient("http://127.0.0.1:8999")
|
||||
client.click("btn_reset")
|
||||
time.sleep(1.5)
|
||||
_start = time.time()
|
||||
while time.time() - _start < 8.0:
|
||||
s = client.get_session()
|
||||
if not s or not s.get('session', {}).get('entries'):
|
||||
break
|
||||
time.sleep(0.2)
|
||||
client.set_value("auto_add_history", True)
|
||||
# Create a specialized mock for context bleed
|
||||
bleed_mock = os.path.abspath("tests/mock_context_bleed.py")
|
||||
@@ -31,7 +36,12 @@ print(json.dumps({"type": "result", "stats": {"total_tokens": 10}}), flush=True)
|
||||
client.set_value("ai_input", "Test context bleed")
|
||||
client.click("btn_gen_send")
|
||||
# Wait for completion
|
||||
time.sleep(3)
|
||||
_start = time.time()
|
||||
while time.time() - _start < 15.0:
|
||||
s = client.get_session()
|
||||
if any(e.get('role') == 'AI' for e in s.get('session', {}).get('entries', [])):
|
||||
break
|
||||
time.sleep(0.3)
|
||||
session = client.get_session()
|
||||
entries = session.get("session", {}).get("entries", [])
|
||||
# Verify: We expect exactly one AI entry, and it must NOT contain the echoed user message
|
||||
|
||||
Reference in New Issue
Block a user