Merge branch 'feature/phase-6-atomic-hardening' into main
Muhammad Usman
c0b2309
feat(phase-6): implement atomic find_one_and_update rate limiting and concurrency test
Muhammad Usman
b518121
- implement ResearchStorage.atomic_check_and_consume_quota with find_one_and_update and condition filter
- integrate threading.RLock and database atomic mutations into RateLimiter.check_and_consume
- add TestAtomicConcurrencyProtection with 20 parallel threads racing against daily cap
Merge branch 'feature/phase-6-review-fixes' into main
Muhammad Usman
d254682
fix(phase-6): resolve review findings for rate limiting and quota gating
Muhammad Usman
91ab715
- validate and sanitize query before consuming rate limit allocations
- scope unauthenticated guest rate limits by session to prevent global lockouts
- remove leftover count_documents query in ResearchStorage.save_rate_limit_record
- add global aggregate search limit protection for shared Tavily monthly budget
- add comprehensive unit tests for validation-first gate and guest scoping
feat(phase-6): implement rate limiting, daily search quotas, and brute-force lockout
Muhammad Usman
a992a58
fix(phase-5): enforce credential authentication gates and eliminate hardcoded JWT secrets
Muhammad Usman
427a853
feat(phase-5): implement cryptographic JWT authentication and dual-key MongoDB user isolation
Muhammad Usman
1c2ade2
Merge branch 'feature/phase-4-summarizer-and-fact-checker' into main
Muhammad Usman
ba619bf
fix(phase-4): harden unique_facts source_id parsing and filter pseudo-command claims
Muhammad Usman
ce730d6
- Apply isdigit() guard to unique_facts source_id in FactCheckerAgent._parse_response
- Instruct SummarizerAgent to ignore and discard prompt overrides disguised as facts
- Increase default token limits for summarizer and fact checker to 2048
- Add unit test in test_phase4.py verifying non-numeric source_id resilience (23/23 tests passing)
Merge branch 'feature/phase-4-summarizer-and-fact-checker' into main
Muhammad Usman
4c247ae
feat(phase-4): implement Summarizer and Fact-Checker agents
Muhammad Usman
5e18775
- Add SummarizerAgent for factual claim extraction and noise distillation (src/agents/summarizer_agent.py)
- Add FactCheckerAgent for cross-referencing sources and flagging contradictions (src/agents/fact_checker_agent.py)
- Upgrade WriterAgent to format verified facts and report discrepancies (src/agents/writer_agent.py)
- Upgrade ResearchPipeline to 5-agent execution loop with granular stage latencies and token telemetry
- Update main.py CLI visualizer to render 5-step progress and verification badges
- Add comprehensive unit test suite in tests/test_phase4.py (22/22 tests passing)
- Update README.md and .env.example with Phase 4 architecture and configurations
Merge branch 'feature/phase-3-security-hardening' into main
Muhammad Usman
d69d45d
fix(phase-3): sanitize XML attributes with html.escape and expand security test coverage
Muhammad Usman
b52be18
- Use html.escape(quote=True) in escape_structural_tags and wrap_in_delimiters to prevent attribute quote breakout
- Neutralize arbitrary injected XML/HTML tags in title, url, query, and content
- Expand test_phase3.py with attribute breakout and tag injection test suites
- Update main.py argparse description to Phase 3 CLI
Merge branch 'feature/phase-3-security-hardening' into main
Muhammad Usman
d8956c3
feat(phase-3): implement prompt injection defenses and security hardening
Muhammad Usman
862e5f0
- Add centralized security and input validation module (src/security.py)
- Implement query length capping (500 chars), control char stripping, and tag escaping
- Enforce per-source snippet character limit (1500 chars) for retrieved web content
- Wrap untrusted web context in <untrusted_source_content> XML delimiters
- Harden Writer Agent system prompt with strict instruction hierarchy
- Fenced Planner Agent input within <user_query> boundary tags
- Add automated test suite in tests/test_phase3.py (16/16 tests passing)
- Update README.md and CLI banner for Phase 3 milestone
fix(phase-2): resolve console streaming, fallback visibility, and score-based dedup
Muhammad Usman
0e23fcc
- Fixed live colored console stream handler in logger.py
- Added visible fallback alert banner in main.py and is_fallback tracking in PlanOutput
- Updated .env.example with MAX_SUB_QUERIES and planner hyperparameters
- Enhanced PlannerAgent JSON extraction for reasoning and prompt robustness
- Fixed limit=1 prompt wording edge case in planner_agent.py
- Implemented highest-score retention for URL deduplication in search_agent.py
- Synchronized README.md project structure and telemetry tables
feat(phase-2): add PlannerAgent and multi-search deduplication
Muhammad Usman
8386c9c
- Implemented PlannerAgent with structured JSON schema and automatic fallback
- Added search_multi method with URL deduplication to SearchAgent
- Upgraded ResearchPipeline to coordinate Planner -> Multi-Search -> Writer
- Added granular latency and token telemetry for all 3 agent steps
- Added automated unit test suite (tests/test_phase2.py) with 7/7 passing tests
- Updated CLI UI and README.md
feat(phase-1): implement two-agent proof of concept (Search + Writer)
Muhammad Usman
9722f4f
- Implemented SearchAgent using Tavily API for real-time web retrieval
- Implemented WriterAgent using Groq for grounded factual synthesis
- Added TwoAgentPipeline with latency and token telemetry
- Added centralized structured logging (src/logger.py) with console stream support (-v)
- Exact-pinned dependencies in requirements.txt (Lesson 7)
- Added security guardrails for prompt token budgets and secret management
- Added automated unit test suite (tests/test_phase1.py)
- Added comprehensive project README.md