Skip to content

fix(tests + readme): audit-log test pollution + Phase 3 README refresh#26

Merged
AVADSA25 merged 1 commit intomainfrom
fix/phase3-test-pollution-readme
May 3, 2026
Merged

fix(tests + readme): audit-log test pollution + Phase 3 README refresh#26
AVADSA25 merged 1 commit intomainfrom
fix/phase3-test-pollution-readme

Conversation

@AVADSA25
Copy link
Copy Markdown
Owner

@AVADSA25 AVADSA25 commented May 3, 2026

Summary

Two things bundled — a real safety fix found via health check + a README refresh.

1. Test pollution fix (safety)

Live ~/.codec/audit.log on the production machine showed agent_started / agent_aborted / agent_blocked_on_permission / agent_message_sent events with agent_id="test_agent" — proof that pytest runs were leaking into the real production log. Same pattern as the 2026-05-01 incident.

Root cause: the temp_codec_dir fixture in tests/test_agent_plan.py + tests/test_agent_runner.py + tests/test_agent_messaging.py monkeypatched codec_agent_plan paths but NOT codec_audit._AUDIT_LOG. So when _run_agent / approve_plan / post_message audit-emitted during tests, the events bypassed the redirect and hit the production log.

Fix: extend the 3 temp_codec_dir fixtures to also redirect codec_audit._AUDIT_LOGtmp_path / "audit.log". Verified clean — 91/91 Phase 3 tests still pass, full suite 930/20/73 baseline preserved.

2. README refresh

  • Badges updated:
    • tests 378 → 1023
    • skills 60 → 73
    • lines 33.9K → 53.3K
    • features 238 → 260+
    • engine v2.1 → v2.3
  • §4 CODEC Chat rewritten to mention Project mode + drop-a-project autonomy, with anchor examples (Marbella property bot, EUR/USD vol monitor)
  • §"What's Coming" split into "Phase 3.5 (in progress)" and "Beyond Phase 3":
    • Anchor example end-to-end run
    • Proactive intelligence overlay
    • blocked_on_qwen dedicated status (Step 9 review C2)
    • Read-paths runtime enforcement (Step 9 review M4)
    • Multi-channel notifications

Test plan

  • 🧪 Phase 3 tests (test_agent_plan.py + test_agent_runner.py + test_agent_messaging.py + test_chat_escalation.py) → 91/91 passed
  • 🧪 Full suite — 930 passed / 20 failed / 73 skipped (same 20/73 baseline as main)
  • Audit log will no longer accumulate agent_id="test_agent" events from pytest runs going forward
  • Post-merge: no deploy needed — pure test/docs change

🤖 Generated with Claude Code

…e refresh

## Test pollution fix

Live audit.log on production machine showed agent_started, agent_aborted,
agent_blocked_on_permission, agent_message_sent events with
agent_id="test_agent" — proof that pytest runs were emitting into the
real ~/.codec/audit.log. Same pattern as 2026-05-01 incident.

Root cause: temp_codec_dir fixture in test_agent_plan.py,
test_agent_runner.py, test_agent_messaging.py monkeypatched
codec_agent_plan paths but NOT codec_audit._AUDIT_LOG. So when
_run_agent / approve_plan / post_message audit-emitted during tests,
the events bypassed the redirect and hit the production log.

Fix: extend the 3 temp_codec_dir fixtures to also
monkeypatch codec_audit._AUDIT_LOG → tmp_path / "audit.log".

Verified: 91/91 Phase 3 tests pass, full suite 930/20/73 baseline
preserved.

## README refresh

- Badges: tests 378→1023, skills 60→73, lines 33.9K→53.3K,
  features 238→260+, engine v2.1→v2.3
- §4 CODEC Chat: rewrote to mention Project mode + drop-a-project
  autonomy, with anchor examples (Marbella property bot, EUR/USD vol)
- §"What's Coming": split into "Phase 3.5 (in progress)" and
  "Beyond Phase 3" sections; lists the 5 remaining Phase 3.5 items
  (anchor example, proactive overlay, blocked_on_qwen, read_paths
  enforcement, multi-channel notifications)
@AVADSA25 AVADSA25 merged commit 5baf245 into main May 3, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants