Skip to content

fix: pre-PR review fixes for post-merge findings#183

Merged
Aureliolo merged 3 commits intomainfrom
fix/post-merge-review-findings
Mar 9, 2026
Merged

fix: pre-PR review fixes for post-merge findings#183
Aureliolo merged 3 commits intomainfrom
fix/post-merge-review-findings

Conversation

@Aureliolo
Copy link
Copy Markdown
Owner

Summary

  • Fix documentation drift across DESIGN_SPEC.md, CLAUDE.md, ADR-001, and README
    • MemoryBackend.backend_name return type strNotBlankStr in specs/ADR
    • Add missing events/classification.py to §15.3 Project Structure
    • Fix persistence section reference (§7.5 → §7.6) in CLAUDE.md
    • Remove stale "(Candidate)" label from §9.3 LiteLLM Integration
    • Update README section header to reflect M5 progress
  • Delete orphaned engine/validation.py (dead code, duplicate of _validation.py)
  • Align PersistenceBackend.backend_name to NotBlankStr (consistency with MemoryBackend)
  • Normalize turn_range to 0-based indexing throughout detectors (fix dual-semantics issue)
  • Fix inaccurate enforcer comment, add builtin MemoryError (OOM) clarifying comments
  • Replace real vendor names in integration test data (Stripe, Prometheus, Grafana)
  • Add tests: daily limit when monthly disabled, turn_range index assertions
  • Consolidate test helpers in test_enforcer.py

Test plan

  • All 4454 tests pass (0 failures)
  • Coverage: 96.29% (above 80% threshold)
  • ruff lint + format: clean
  • mypy strict: 0 errors
  • Pre-commit hooks: all pass
  • New tests verify daily limit fires independently of monthly budget
  • New tests verify turn_range uses 0-based indexing for error finish reasons

Review coverage

Pre-reviewed by 9 agents (code-reviewer, python-reviewer, pr-test-analyzer, silent-failure-hunter, comment-analyzer, type-design-analyzer, logging-audit, resilience-audit, docs-consistency). 16 findings addressed, 0 skipped.

🤖 Generated with Claude Code

- Fix pre-flight check_can_execute skipping daily limit when
  total_monthly <= 0 (enforcer.py)
- Replace module-level assert with RuntimeError for _ALERT_LEVEL_ORDER
  exhaustiveness check (enforcer.py)
- Simplify redundant except clause (DailyLimitExceededError is subclass
  of BudgetExhaustedError) (enforcer.py)
- Fix turn_range semantic inconsistency: use turn.turn_number for
  turn-based findings instead of raw enumerate index (detectors.py)
- Update ErrorFinding.turn_range docstring to clarify position semantics
  across detector types (models.py)
- Change MemoryBackend.backend_name return type to NotBlankStr (protocol.py)
- Add MemoryNotFoundError docstring clarifying protocol vs impl usage (errors.py)
- Add vector_store/history_store validation against known values (config.py)
- Fix DESIGN_SPEC TOC ordering (7.4 before 7.5)
- Fix ADR-001: add mem0ai to version table, fix Memari->Memary typo,
  fix YAML agents example (mapping->list), add RootConfig note
- Add test for ClassificationResult._validate_findings_match_categories
- Add Windows path traversal test cases for MemoryStorageConfig
- Fix misleading docstring in integration test file
…ests

Pre-reviewed by 9 agents, 16 findings addressed:
- Fix DESIGN_SPEC/ADR/CLAUDE.md documentation drift (backend_name type,
  section references, missing classification events, LiteLLM candidate label)
- Delete orphaned engine/validation.py (dead code, duplicate of _validation.py)
- Align PersistenceBackend.backend_name to NotBlankStr (consistency with
  MemoryBackend protocol)
- Normalize turn_range to 0-based indexing throughout detectors
- Fix inaccurate enforcer comment about daily limit independence
- Add builtin MemoryError (OOM) clarifying comments
- Replace real vendor names in integration test data
- Fix turn_range validator terminology (indices → positions)
- Add test: daily limit enforcement when monthly disabled
- Add test: turn_range index assertion for error finish reasons
- Update README section header to reflect M5 progress
- Consolidate test helpers in test_enforcer.py
Copilot AI review requested due to automatic review settings March 9, 2026 10:00
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 9, 2026

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 9, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: cab2154a-ed11-4c82-a757-64bfab87d8ea

📥 Commits

Reviewing files that changed from the base of the PR and between d5a7c62 and 571709f.

📒 Files selected for processing (8)
  • docs/decisions/ADR-001-memory-layer.md
  • src/ai_company/budget/enforcer.py
  • src/ai_company/persistence/__init__.py
  • src/ai_company/persistence/sqlite/__init__.py
  • src/ai_company/tools/sandbox/protocol.py
  • src/ai_company/tools/sandbox/subprocess_sandbox.py
  • tests/unit/budget/test_enforcer.py
  • tests/unit/tools/sandbox/test_protocol.py

📝 Walkthrough

Summary by CodeRabbit

  • New Features

    • Validation added for allowed memory storage backends
    • Public event taxonomy expanded with new classification constants
    • Several backend-type APIs narrowed to require non-blank identifiers
  • Bug Fixes

    • Daily budget limits enforced correctly even when monthly limits are disabled
  • Refactor

    • Pre-flight validation module removed from the execution engine
    • Coordination-failure detection implementation streamlined
  • Documentation

    • Capability roadmap and design references updated; memory defaults clarified
  • Tests

    • New and updated tests for memory config, budget enforcer, classification, and protocol typings

Walkthrough

Standardizes several backend/type APIs to use NotBlankStr, removes the engine pre-execution validation module, tightens budget enforcement logic, adds memory store-name validators, refactors classification detection, and updates docs/tests and small persistence/sandbox implementations accordingly.

Changes

Cohort / File(s) Summary
Type System: backend_name / backend type
src/ai_company/memory/protocol.py, src/ai_company/persistence/protocol.py, src/ai_company/persistence/sqlite/backend.py, src/ai_company/tools/sandbox/protocol.py, src/ai_company/tools/sandbox/subprocess_sandbox.py, tests/unit/memory/test_protocol.py, tests/unit/persistence/test_protocol.py, tests/unit/tools/sandbox/test_protocol.py, DESIGN_SPEC.md, docs/decisions/ADR-001-memory-layer.md
Changed return types from str to NotBlankStr for backend-name/type APIs across memory, persistence, and sandbox protocols/implementations; updated tests and design docs to match.
Engine validation removal
src/ai_company/engine/validation.py
Removed the entire pre-flight validation module and its public functions/constants/logging (validate_run_inputs, validate_agent, validate_task, EXECUTABLE_STATUSES, EXECUTION_ENGINE_INVALID_INPUT).
Budget enforcement
src/ai_company/budget/enforcer.py, tests/unit/budget/test_enforcer.py
Adjusted monthly hard-stop gating to if cfg.total_monthly > 0, narrowed exception handling, added runtime validation for alert-level ordering/uniqueness, and updated/refactored tests including daily-limit behavior when monthly is disabled.
Memory configuration validation
src/ai_company/memory/config.py, tests/unit/memory/test_config.py
Added allowed-store class constants and an after-model validator _validate_store_names to enforce permitted vector_store and history_store values; added tests for allowed/rejected values and path traversal variants.
Classification detectors & models
src/ai_company/engine/classification/detectors.py, src/ai_company/engine/classification/models.py, tests/unit/engine/test_classification_detectors.py, tests/unit/engine/test_classification_models.py
Refactored coordination-failure detection to use a generator for findings, simplified evidence text and clarified 0-based turn_range semantics; updated/added tests verifying turn indices and category-check validation.
Memory errors docstring
src/ai_company/memory/errors.py
Expanded MemoryNotFoundError docstring to clarify when the exception is used vs. get() returning None.
Persistence module docs
src/ai_company/persistence/__init__.py, src/ai_company/persistence/sqlite/__init__.py, CLAUDE.md, README.md, docs/decisions/ADR-001-memory-layer.md, tests/integration/engine/test_error_taxonomy_integration.py
Documentation updates: design section references from §7.5→§7.6, README capability heading change, ADR/ADR-001 edits, and minor narrative updates in an integration test.
Misc tests
tests/unit/... (various updated tests referenced above)
Test updates to reflect type changes, new validators, refactored budget tests, and classification-model assertions.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 60.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly refers to the main change: fixing post-merge review findings across documentation, code, and tests.
Description check ✅ Passed The description is well-related to the changeset, detailing specific fixes across documentation, code removal, type changes, and test additions.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/post-merge-review-findings
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch fix/post-merge-review-findings

Comment @coderabbitai help to get the list of available commands and usage tips.

@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request focuses on enhancing the robustness, consistency, and clarity of the codebase and its documentation. It addresses several findings from a pre-PR review, including correcting documentation drift, aligning type definitions across core protocols, and removing obsolete code. Furthermore, it improves the budget enforcement mechanism, refines error classification logic, and strengthens configuration validation, all while expanding the test suite to cover these critical updates.

Highlights

  • Documentation Drift Fixes: Addressed inconsistencies across DESIGN_SPEC.md, CLAUDE.md, ADR-001, and README, including updating section references, adding missing file mentions, and removing stale labels.
  • Type System Alignment: Standardized the backend_name return type to NotBlankStr for both MemoryBackend and PersistenceBackend protocols, ensuring type consistency.
  • Code Cleanup: Deleted the orphaned engine/validation.py file, which was identified as dead code and duplicated functionality.
  • Budget Enforcer Refinements: Modified the budget enforcer to ensure daily limits are checked independently of monthly budgets and added clarifying comments for MemoryError exceptions.
  • Error Classification Indexing: Normalized turn_range to 0-based indexing across error detectors and updated related model descriptions and validation.
  • Configuration Validation: Implemented new validation checks for MemoryStorageConfig to ensure vector_store and history_store use recognized backend names.
  • Test Data Generalization: Replaced specific vendor names (e.g., Stripe, Prometheus, Grafana) with generic terms in integration test data for broader applicability.
  • Test Suite Enhancements: Added new tests to verify daily limit behavior and turn_range indexing, and consolidated test helper functions.
Changelog
  • CLAUDE.md
    • Updated persistence section reference from §7.5 to §7.6.
  • DESIGN_SPEC.md
    • Reordered memory and persistence sections in the table of contents.
    • Changed MemoryBackend.backend_name return type from str to NotBlankStr.
    • Added a note about RootConfig.memory implementation status.
    • Updated agent configuration example to use a list of agent objects.
    • Added mem0ai to the list of memory backend dependencies.
    • Corrected a typo from 'Memari' to 'Memary'.
  • README.md
    • Updated the 'Implemented' section header to reflect M5 progress.
  • docs/decisions/ADR-001-memory-layer.md
    • Added a note about RootConfig.memory implementation status.
    • Updated agent configuration example to use a list of agent objects.
    • Changed MemoryBackend.backend_name return type from str to NotBlankStr.
    • Added mem0ai to the list of memory backend dependencies.
    • Corrected a typo from 'Memari' to 'Memary'.
  • src/ai_company/budget/enforcer.py
    • Refactored monthly budget check to only run if total_monthly > 0.
    • Added clarifying comment for MemoryError (OOM) in check_can_execute.
    • Added clarifying comment for MemoryError (OOM) in resolve_model.
    • Removed a redundant comment regarding budget enforcement.
    • Added clarifying comment for MemoryError (OOM) in _compute_baselines_safe.
    • Replaced assert with if/raise RuntimeError for _ALERT_LEVEL_ORDER validation.
  • src/ai_company/engine/classification/detectors.py
    • Refactored error finish reason detection to use a more concise generator expression and findings.extend.
  • src/ai_company/engine/classification/models.py
    • Updated ErrorFinding.turn_range description to clarify 0-based indexing and context.
    • Changed turn_range validation message from 'indices' to 'positions'.
  • src/ai_company/engine/validation.py
    • Deleted engine/validation.py as it was identified as dead code and duplicated functionality.
  • src/ai_company/memory/config.py
    • Added class variables for valid vector and history store names.
    • Implemented _validate_store_names to enforce recognized values for vector_store and history_store.
  • src/ai_company/memory/errors.py
    • Added a detailed docstring to MemoryNotFoundError to clarify its intended use.
  • src/ai_company/memory/protocol.py
    • Changed MemoryBackend.backend_name return type from str to NotBlankStr for type consistency.
  • src/ai_company/persistence/protocol.py
    • Imported NotBlankStr type.
    • Changed PersistenceBackend.backend_name return type from str to NotBlankStr.
  • src/ai_company/persistence/sqlite/backend.py
    • Imported NotBlankStr type.
    • Updated backend_name property to return NotBlankStr('sqlite').
  • tests/integration/engine/test_error_taxonomy_integration.py
    • Updated the docstring to be more general about error categories.
    • Replaced specific vendor names (Stripe, PostgreSQL, Prometheus, Grafana) with generic terms in integration test data.
  • tests/unit/budget/test_enforcer.py
    • Consolidated test helper functions for patching billing and daily periods.
    • Added a new test case test_daily_limit_enforced_when_monthly_disabled to verify daily limits fire independently.
  • tests/unit/engine/test_classification_detectors.py
    • Added a new test test_error_finish_reason_uses_turn_index to confirm turn_range uses 0-based indexing.
  • tests/unit/engine/test_classification_models.py
    • Added tests to ensure ClassificationResult rejects findings with categories not explicitly checked.
    • Added tests to ensure ClassificationResult accepts findings with categories that are explicitly checked.
  • tests/unit/memory/test_config.py
    • Added Windows-style path traversal variants to existing rejection tests.
    • Added new tests to validate accepted and rejected values for vector_store and history_store configurations.
  • tests/unit/memory/test_protocol.py
    • Imported NotBlankStr type.
    • Updated FakeMemoryBackend.backend_name property to return NotBlankStr('fake').
  • tests/unit/persistence/test_protocol.py
    • Imported NotBlankStr type.
    • Updated FakePersistenceBackend.backend_name property to return NotBlankStr('fake').
Activity
  • Pre-reviewed by 9 agents (code-reviewer, python-reviewer, pr-test-analyzer, silent-failure-hunter, comment-analyzer, type-design-analyzer, logging-audit, resilience-audit, docs-consistency).
  • 16 findings addressed, 0 skipped.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Aligns implementation, tests, and documentation after post-merge review findings—tightening type contracts (NotBlankStr), normalizing classification indices, improving budget enforcement behavior, and cleaning up drift across specs/docs.

Changes:

  • Update backend_name return types to NotBlankStr across memory/persistence protocols and implementations, and adjust corresponding tests.
  • Normalize/clarify turn_range semantics to 0-based indices (message index vs. turns tuple index), and add model + detector tests to enforce invariants.
  • Improve budget enforcement behavior (daily limit independent of monthly disablement), refactor test helpers, and update multiple docs/spec references.

Reviewed changes

Copilot reviewed 20 out of 20 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
tests/unit/persistence/test_protocol.py Updates fake persistence backend to return NotBlankStr for backend_name.
tests/unit/memory/test_protocol.py Updates fake memory backend to return NotBlankStr for backend_name.
tests/unit/memory/test_config.py Adds Windows traversal cases + validates accepted/rejected store backend names.
tests/unit/engine/test_classification_models.py Adds tests enforcing findings categories ⊆ categories_checked.
tests/unit/engine/test_classification_detectors.py Adds assertions/tests for 0-based turn_range for finish-reason findings.
tests/unit/budget/test_enforcer.py Refactors period patch helper; adds coverage for daily limit when monthly is disabled.
tests/integration/engine/test_error_taxonomy_integration.py Replaces real vendor names in test conversation data.
src/ai_company/persistence/sqlite/backend.py Returns NotBlankStr from backend_name.
src/ai_company/persistence/protocol.py Changes PersistenceBackend.backend_name type to NotBlankStr.
src/ai_company/memory/protocol.py Changes MemoryBackend.backend_name type to NotBlankStr.
src/ai_company/memory/errors.py Clarifies intended usage of MemoryNotFoundError vs protocol behavior.
src/ai_company/memory/config.py Adds explicit allowlists + validator for vector_store / history_store.
src/ai_company/engine/validation.py Deletes now-orphaned validation module.
src/ai_company/engine/classification/models.py Clarifies turn_range semantics + tweaks validation error message text.
src/ai_company/engine/classification/detectors.py Normalizes finish-reason finding generation and turn_range indexing.
src/ai_company/budget/enforcer.py Makes monthly preflight conditional; replaces assert with runtime check; adds OOM comments.
docs/decisions/ADR-001-memory-layer.md Fixes protocol type drift + YAML example corrections + minor doc updates.
README.md Updates capability snapshot header to reflect M5 progress.
DESIGN_SPEC.md Fixes spec drift (types, structure listing, headings).
CLAUDE.md Fixes persistence section reference pointer (§7.6).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

except BudgetExhaustedError:
raise
except MemoryError, RecursionError:
except MemoryError, RecursionError: # builtin MemoryError (OOM)
Copy link

Copilot AI Mar 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

except MemoryError, RecursionError: uses Python 2 exception syntax and is a SyntaxError on Python 3. Use tuple syntax (and optionally bind as exc) e.g. except (MemoryError, RecursionError): so the module can import and the handler works as intended.

Suggested change
except MemoryError, RecursionError: # builtin MemoryError (OOM)
except (MemoryError, RecursionError): # builtin MemoryError (OOM)

Copilot uses AI. Check for mistakes.
start=period_start,
)
except MemoryError, RecursionError:
except MemoryError, RecursionError: # builtin MemoryError (OOM)
Copy link

Copilot AI Mar 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

except MemoryError, RecursionError: is invalid syntax in Python 3 (this file targets Python 3). Switch to except (MemoryError, RecursionError): (optionally as exc) so resolve_model() doesn't break module import.

Suggested change
except MemoryError, RecursionError: # builtin MemoryError (OOM)
except (MemoryError, RecursionError): # builtin MemoryError (OOM)

Copilot uses AI. Check for mistakes.
agent_id,
)
except MemoryError, RecursionError:
except MemoryError, RecursionError: # builtin MemoryError (OOM)
Copy link

Copilot AI Mar 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

except MemoryError, RecursionError: is Python 2 syntax and will raise SyntaxError under Python 3. Replace with except (MemoryError, RecursionError): (optionally binding the exception) to keep _compute_baselines_safe() valid.

Suggested change
except MemoryError, RecursionError: # builtin MemoryError (OOM)
except (MemoryError, RecursionError): # builtin MemoryError (OOM)

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request delivers a comprehensive set of fixes and enhancements across documentation, application logic, and tests, including correcting documentation drift, standardizing on the NotBlankStr type, and improving the test suite. While it aims to fix a bug in budget enforcement, a critical security vulnerability was identified in the budget enforcer where Python 2-style exception handling is used. This could result in a syntax error in Python 3 and a potential logic flaw that bypasses budget enforcement. Additionally, a suggestion is included to further improve a startup validation check for greater robustness.

except BudgetExhaustedError:
raise
except MemoryError, RecursionError:
except MemoryError, RecursionError: # builtin MemoryError (OOM)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

security-high high

The use of a comma to catch multiple exceptions (e.g., except MemoryError, RecursionError:) is Python 2 syntax and results in a SyntaxError in Python 3. Furthermore, even if it were valid, it would catch MemoryError and assign it to the variable name RecursionError, failing to catch actual RecursionError exceptions. In this context, an uncaught RecursionError would be caught by the subsequent except Exception: block, which logs the error and allows execution to proceed, effectively bypassing the budget enforcement check. Use parentheses to correctly catch multiple exceptions in Python 3.

        except (MemoryError, RecursionError):  # builtin MemoryError (OOM)

start=period_start,
)
except MemoryError, RecursionError:
except MemoryError, RecursionError: # builtin MemoryError (OOM)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

security-high high

The use of a comma to catch multiple exceptions (e.g., except MemoryError, RecursionError:) is Python 2 syntax and results in a SyntaxError in Python 3. Furthermore, even if it were valid, it would catch MemoryError and assign it to the variable name RecursionError, failing to catch actual RecursionError exceptions. In this context, an uncaught RecursionError would be caught by the subsequent except Exception: block, which logs the error and allows execution to proceed, effectively bypassing the budget enforcement check. Use parentheses to correctly catch multiple exceptions in Python 3.

        except (MemoryError, RecursionError):  # builtin MemoryError (OOM)

agent_id,
)
except MemoryError, RecursionError:
except MemoryError, RecursionError: # builtin MemoryError (OOM)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

security-high high

The use of a comma to catch multiple exceptions (e.g., except MemoryError, RecursionError:) is Python 2 syntax and results in a SyntaxError in Python 3. Furthermore, even if it were valid, it would catch MemoryError and assign it to the variable name RecursionError, failing to catch actual RecursionError exceptions. In this context, an uncaught RecursionError would be caught by the subsequent except Exception: block, which logs the error and allows execution to proceed, effectively bypassing the budget enforcement check. Use parentheses to correctly catch multiple exceptions in Python 3.

Suggested change
except MemoryError, RecursionError: # builtin MemoryError (OOM)
except (MemoryError, RecursionError): # builtin MemoryError (OOM)

Comment on lines +453 to +458
if set(_ALERT_LEVEL_ORDER) != set(BudgetAlertLevel):
msg = (
f"_ALERT_LEVEL_ORDER keys {set(_ALERT_LEVEL_ORDER)} do not match "
f"BudgetAlertLevel members {set(BudgetAlertLevel)}"
)
raise RuntimeError(msg)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

While converting the assert to an if/raise is a good improvement for robustness, the check itself could be more comprehensive. It currently verifies that the keys of _ALERT_LEVEL_ORDER match the members of BudgetAlertLevel, but it doesn't validate the dictionary's values.

To prevent future bugs if _ALERT_LEVEL_ORDER is modified, consider also verifying that its values are unique and form a contiguous sequence from 0.

You could add something like this after the current check:

if len(set(_ALERT_LEVEL_ORDER.values())) != len(BudgetAlertLevel):
    msg = f"_ALERT_LEVEL_ORDER values must be unique, but got: {sorted(_ALERT_LEVEL_ORDER.values())}"
    raise RuntimeError(msg)

expected_values = set(range(len(BudgetAlertLevel)))
if set(_ALERT_LEVEL_ORDER.values()) != expected_values:
    msg = (
        f"_ALERT_LEVEL_ORDER values must be a permutation of {expected_values}, "
        f"but got: {set(_ALERT_LEVEL_ORDER.values())}"
    )
    raise RuntimeError(msg)

@greptile-apps
Copy link
Copy Markdown

greptile-apps bot commented Mar 9, 2026

Greptile Summary

This is a focused post-merge clean-up PR touching documentation, dead code removal, a logic bug fix in the budget enforcer, and type-system consistency improvements across protocols.

Key changes:

  • Budget enforcer fix: The most significant behavioral change — check_can_execute previously returned early when total_monthly <= 0, silently bypassing the daily per-agent limit. The fix correctly decouples the two checks: the monthly check is now gated on total_monthly > 0 while the daily check always runs. A new test (test_daily_limit_enforced_when_monthly_disabled) verifies this.
  • turn_range semantics: ErrorFinding.turn_range is now explicitly documented and implemented as 0-based indexing into the source tuple (conversation messages or turns). The refactored loop comprehension in detectors.py uses enumerate-derived indices, and new tests assert the correct index positions.
  • Dead code removal: engine/validation.py was an exact duplicate of engine/_validation.py with no remaining imports. Safe to delete.
  • Protocol type consistency: backend_name / get_backend_type narrowed from strNotBlankStr across MemoryBackend, PersistenceBackend, and SandboxBackend protocols and their concrete implementations.
  • MemoryStorageConfig validation: New model validator restricts vector_store and history_store to an explicit allowlist, consistent with the existing CompanyMemoryConfig._VALID_BACKENDS pattern. See inline comment on extensibility implications.
  • Documentation fixes: Section references (§7.5→§7.6), TOC ordering, YAML structure for per-agent overrides, and removal of "(Candidate)" label from §9.3 are all aligned across DESIGN_SPEC, CLAUDE.md, ADR-001, and README.

Outstanding items: The budget enforcer exception handler syntax (lines 96, 205, 311) uses Python 2 style comma-separated exceptions instead of parenthesized tuples and should be updated for Python 3 clarity.

Confidence Score: 4/5

  • Safe to merge with two code quality items to address: exception handler syntax needs parentheses in three locations, and allowlist validation design should be documented or revisited.
  • The PR's core logic changes are correct and well-tested. The budget enforcer decoupling of monthly vs. daily checks is sound. Type narrowing changes are safe (literal strings satisfy NotBlankStr). The main concerns are: (1) three except MemoryError, RecursionError: clauses without parentheses (Python 3 syntax issue that should be parenthesized for clarity and correctness), and (2) the hardcoded allowlist validator on a Protocol documented as extensible deserves clearer design intent documentation or a warn-only approach to preserve the extensibility contract.
  • src/ai_company/budget/enforcer.py (exception handler syntax) and src/ai_company/memory/config.py (allowlist design contract).

Important Files Changed

Filename Overview
src/ai_company/budget/enforcer.py Core logic fix: daily limits now enforced independently of monthly budget; assert replaced with RuntimeError. Three except MemoryError, RecursionError: clauses on lines 96, 205, 311 lack required parentheses for Python 3 multi-exception syntax — should be except (MemoryError, RecursionError):.
src/ai_company/memory/config.py New _validate_store_names model validator adds allowlist enforcement for vector_store and history_store; follows _VALID_BACKENDS pattern but locks extensibility at config-parse time. Design intent regarding custom backends should be clarified in docstring or validator logic.
src/ai_company/persistence/sqlite/backend.py Return type of backend_name narrowed from str to NotBlankStr; correct protocol implementation.
src/ai_company/engine/classification/detectors.py Loop refactored to list comprehension; turn_range now correctly stores 0-based index into the turns tuple; evidence string slightly simplified (index removed from text, stored in turn_range instead).
src/ai_company/engine/validation.py Deleted orphaned file confirmed to be an exact duplicate of engine/_validation.py; no imports remained so deletion is safe.
tests/unit/budget/test_enforcer.py Added test_daily_limit_enforced_when_monthly_disabled to verify the new decoupled enforcement; test helpers consolidated into a single @contextlib.contextmanager function.
tests/unit/engine/test_classification_detectors.py New test_error_finish_reason_uses_turn_index asserts that turn_range reflects 0-based position for a second-turn error; existing test extended with turn_range == (0, 0) assertion.
tests/integration/engine/test_error_taxonomy_integration.py Real vendor names (Stripe, PostgreSQL, Prometheus, Grafana) replaced with generic terms in test data to avoid accidental coupling to real service names.

Last reviewed commit: 571709f

- Fix ADR-001 stale note: RootConfig.memory already exists in schema.py
- Fix ADR-001 enum drift: level "full" → "persistent" to match MemoryLevel
- Fix persistence docstrings: §7.5 → §7.6 after DESIGN_SPEC ToC reorder
- Align SandboxBackend.get_backend_type() → NotBlankStr for cross-protocol consistency
- Fix test docstring: clarify monthly-disabled test semantics
- Clarify enforcer docstring: DailyLimitExceededError is subclass of BudgetExhaustedError
- Enhance _ALERT_LEVEL_ORDER validation: add value uniqueness check
@Aureliolo Aureliolo merged commit 26b3108 into main Mar 9, 2026
9 of 10 checks passed
@Aureliolo Aureliolo deleted the fix/post-merge-review-findings branch March 9, 2026 10:19
except BudgetExhaustedError:
raise
except MemoryError, RecursionError:
except MemoryError, RecursionError: # builtin MemoryError (OOM)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Parentheses required for multi-exception handling in Python 3.

except MemoryError, RecursionError: is Python 2 syntax. In Python 2, the comma meant "bind the exception instance to the name RecursionError", not "catch both". In Python 3, this is ambiguous and should be explicitly parenthesized.

The same pattern appears at lines 205 and 311. All three should use except (MemoryError, RecursionError): for clear, unambiguous semantics.

Suggested change
except MemoryError, RecursionError: # builtin MemoryError (OOM)
except (MemoryError, RecursionError): # builtin MemoryError (OOM)
Prompt To Fix With AI
This is a comment left during a code review.
Path: src/ai_company/budget/enforcer.py
Line: 96

Comment:
Parentheses required for multi-exception handling in Python 3.

`except MemoryError, RecursionError:` is Python 2 syntax. In Python 2, the comma meant *"bind the exception instance to the name `RecursionError`"*, not "catch both". In Python 3, this is ambiguous and should be explicitly parenthesized.

The same pattern appears at lines 205 and 311. All three should use `except (MemoryError, RecursionError):` for clear, unambiguous semantics.

```suggestion
        except (MemoryError, RecursionError):  # builtin MemoryError (OOM)
```

How can I resolve this? If you propose a fix, please make it concise.

start=period_start,
)
except MemoryError, RecursionError:
except MemoryError, RecursionError: # builtin MemoryError (OOM)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
except MemoryError, RecursionError: # builtin MemoryError (OOM)
except (MemoryError, RecursionError): # builtin MemoryError (OOM)
Prompt To Fix With AI
This is a comment left during a code review.
Path: src/ai_company/budget/enforcer.py
Line: 205

Comment:
```suggestion
        except (MemoryError, RecursionError):  # builtin MemoryError (OOM)
```

How can I resolve this? If you propose a fix, please make it concise.

agent_id,
)
except MemoryError, RecursionError:
except MemoryError, RecursionError: # builtin MemoryError (OOM)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
except MemoryError, RecursionError: # builtin MemoryError (OOM)
except (MemoryError, RecursionError): # builtin MemoryError (OOM)
Prompt To Fix With AI
This is a comment left during a code review.
Path: src/ai_company/budget/enforcer.py
Line: 311

Comment:
```suggestion
        except (MemoryError, RecursionError):  # builtin MemoryError (OOM)
```

How can I resolve this? If you propose a fix, please make it concise.

Comment on lines +58 to +85
@model_validator(mode="after")
def _validate_store_names(self) -> Self:
"""Ensure vector_store and history_store are recognized values."""
if self.vector_store not in self._VALID_VECTOR_STORES:
msg = (
f"Unknown vector_store {self.vector_store!r}. "
f"Valid stores: {sorted(self._VALID_VECTOR_STORES)}"
)
logger.warning(
CONFIG_VALIDATION_FAILED,
field="vector_store",
value=self.vector_store,
reason=msg,
)
raise ValueError(msg)
if self.history_store not in self._VALID_HISTORY_STORES:
msg = (
f"Unknown history_store {self.history_store!r}. "
f"Valid stores: {sorted(self._VALID_HISTORY_STORES)}"
)
logger.warning(
CONFIG_VALIDATION_FAILED,
field="history_store",
value=self.history_store,
reason=msg,
)
raise ValueError(msg)
return self
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider design implications of hardcoded allowlist for an extensible protocol.

_VALID_VECTOR_STORES and _VALID_HISTORY_STORES are ClassVar constants baked into the model class — they cannot be overridden through configuration. Since MemoryBackend is a Protocol designed to support custom backends (per ADR-001 and module docstring), this validation approach creates a tight coupling:

  1. Users deploying custom backends (e.g., "chroma", "pgvector", "pinecone") will encounter hard ValidationError at config parse-time, before any code runs.
  2. Adding first-party stores requires updating this allowlist in addition to the backend implementation — easy to forget.

The pattern mirrors CompanyMemoryConfig._VALID_BACKENDS (line 149), which has the same constraint.

Suggestion: Either document clearly that new backends require a source code change here to register (update docstring), or consider a warn-only approach (log WARNING for unrecognized stores and continue) to preserve the extensibility contract of the Protocol design.

Prompt To Fix With AI
This is a comment left during a code review.
Path: src/ai_company/memory/config.py
Line: 58-85

Comment:
Consider design implications of hardcoded allowlist for an extensible protocol.

`_VALID_VECTOR_STORES` and `_VALID_HISTORY_STORES` are `ClassVar` constants baked into the model class — they cannot be overridden through configuration. Since `MemoryBackend` is a Protocol designed to support custom backends (per ADR-001 and module docstring), this validation approach creates a tight coupling:

1. Users deploying custom backends (e.g., `"chroma"`, `"pgvector"`, `"pinecone"`) will encounter hard `ValidationError` at config parse-time, before any code runs.
2. Adding first-party stores requires updating this allowlist in addition to the backend implementation — easy to forget.

The pattern mirrors `CompanyMemoryConfig._VALID_BACKENDS` (line 149), which has the same constraint.

**Suggestion**: Either document clearly that new backends *require* a source code change here to register (update docstring), or consider a warn-only approach (log WARNING for unrecognized stores and continue) to preserve the extensibility contract of the Protocol design.

How can I resolve this? If you propose a fix, please make it concise.

Aureliolo added a commit that referenced this pull request Mar 10, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.1.1](ai-company-v0.1.0...ai-company-v0.1.1)
(2026-03-10)


### Features

* add autonomy levels and approval timeout policies
([#42](#42),
[#126](#126))
([#197](#197))
([eecc25a](eecc25a))
* add CFO cost optimization service with anomaly detection, reports, and
approval decisions
([#186](#186))
([a7fa00b](a7fa00b))
* add code quality toolchain (ruff, mypy, pre-commit, dependabot)
([#63](#63))
([36681a8](36681a8))
* add configurable cost tiers and subscription/quota-aware tracking
([#67](#67))
([#185](#185))
([9baedfa](9baedfa))
* add container packaging, Docker Compose, and CI pipeline
([#269](#269))
([435bdfe](435bdfe)),
closes [#267](#267)
* add coordination error taxonomy classification pipeline
([#146](#146))
([#181](#181))
([70c7480](70c7480))
* add cost-optimized, hierarchical, and auction assignment strategies
([#175](#175))
([ce924fa](ce924fa)),
closes [#173](#173)
* add design specification, license, and project setup
([8669a09](8669a09))
* add env var substitution and config file auto-discovery
([#77](#77))
([7f53832](7f53832))
* add FastestStrategy routing + vendor-agnostic cleanup
([#140](#140))
([09619cb](09619cb)),
closes [#139](#139)
* add HR engine and performance tracking
([#45](#45),
[#47](#47))
([#193](#193))
([2d091ea](2d091ea))
* add issue auto-search and resolution verification to PR review skill
([#119](#119))
([deecc39](deecc39))
* add memory retrieval, ranking, and context injection pipeline
([#41](#41))
([873b0aa](873b0aa))
* add pluggable MemoryBackend protocol with models, config, and events
([#180](#180))
([46cfdd4](46cfdd4))
* add pluggable MemoryBackend protocol with models, config, and events
([#32](#32))
([46cfdd4](46cfdd4))
* add pluggable PersistenceBackend protocol with SQLite implementation
([#36](#36))
([f753779](f753779))
* add progressive trust and promotion/demotion subsystems
([#43](#43),
[#49](#49))
([3a87c08](3a87c08))
* add retry handler, rate limiter, and provider resilience
([#100](#100))
([b890545](b890545))
* add SecOps security agent with rule engine, audit log, and ToolInvoker
integration ([#40](#40))
([83b7b6c](83b7b6c))
* add shared org memory and memory consolidation/archival
([#125](#125),
[#48](#48))
([4a0832b](4a0832b))
* design unified provider interface
([#86](#86))
([3e23d64](3e23d64))
* expand template presets, rosters, and add inheritance
([#80](#80),
[#81](#81),
[#84](#84))
([15a9134](15a9134))
* implement agent runtime state vs immutable config split
([#115](#115))
([4cb1ca5](4cb1ca5))
* implement AgentEngine core orchestrator
([#11](#11))
([#143](#143))
([f2eb73a](f2eb73a))
* implement basic tool system (registry, invocation, results)
([#15](#15))
([c51068b](c51068b))
* implement built-in file system tools
([#18](#18))
([325ef98](325ef98))
* implement communication foundation — message bus, dispatcher, and
messenger ([#157](#157))
([8e71bfd](8e71bfd))
* implement company template system with 7 built-in presets
([#85](#85))
([cbf1496](cbf1496))
* implement conflict resolution protocol
([#122](#122))
([#166](#166))
([e03f9f2](e03f9f2))
* implement core entity and role system models
([#69](#69))
([acf9801](acf9801))
* implement crash recovery with fail-and-reassign strategy
([#149](#149))
([e6e91ed](e6e91ed))
* implement engine extensions — Plan-and-Execute loop and call
categorization
([#134](#134),
[#135](#135))
([#159](#159))
([9b2699f](9b2699f))
* implement enterprise logging system with structlog
([#73](#73))
([2f787e5](2f787e5))
* implement graceful shutdown with cooperative timeout strategy
([#130](#130))
([6592515](6592515))
* implement hierarchical delegation and loop prevention
([#12](#12),
[#17](#17))
([6be60b6](6be60b6))
* implement LiteLLM driver and provider registry
([#88](#88))
([ae3f18b](ae3f18b)),
closes [#4](#4)
* implement LLM decomposition strategy and workspace isolation
([#174](#174))
([aa0eefe](aa0eefe))
* implement meeting protocol system
([#123](#123))
([ee7caca](ee7caca))
* implement message and communication domain models
([#74](#74))
([560a5d2](560a5d2))
* implement model routing engine
([#99](#99))
([d3c250b](d3c250b))
* implement parallel agent execution
([#22](#22))
([#161](#161))
([65940b3](65940b3))
* implement per-call cost tracking service
([#7](#7))
([#102](#102))
([c4f1f1c](c4f1f1c))
* implement personality injection and system prompt construction
([#105](#105))
([934dd85](934dd85))
* implement single-task execution lifecycle
([#21](#21))
([#144](#144))
([c7e64e4](c7e64e4))
* implement subprocess sandbox for tool execution isolation
([#131](#131))
([#153](#153))
([3c8394e](3c8394e))
* implement task assignment subsystem with pluggable strategies
([#172](#172))
([c7f1b26](c7f1b26)),
closes [#26](#26)
[#30](#30)
* implement task decomposition and routing engine
([#14](#14))
([9c7fb52](9c7fb52))
* implement Task, Project, Artifact, Budget, and Cost domain models
([#71](#71))
([81eabf1](81eabf1))
* implement tool permission checking
([#16](#16))
([833c190](833c190))
* implement YAML config loader with Pydantic validation
([#59](#59))
([ff3a2ba](ff3a2ba))
* implement YAML config loader with Pydantic validation
([#75](#75))
([ff3a2ba](ff3a2ba))
* initialize project with uv, hatchling, and src layout
([39005f9](39005f9))
* initialize project with uv, hatchling, and src layout
([#62](#62))
([39005f9](39005f9))
* Litestar REST API, WebSocket feed, and approval queue (M6)
([#189](#189))
([29fcd08](29fcd08))
* make TokenUsage.total_tokens a computed field
([#118](#118))
([c0bab18](c0bab18)),
closes [#109](#109)
* parallel tool execution in ToolInvoker.invoke_all
([#137](#137))
([58517ee](58517ee))
* testing framework, CI pipeline, and M0 gap fixes
([#64](#64))
([f581749](f581749))
* wire all modules into observability system
([#97](#97))
([f7a0617](f7a0617))


### Bug Fixes

* address Greptile post-merge review findings from PRs
[#170](https://github.com/Aureliolo/ai-company/issues/170)-[#175](https://github.com/Aureliolo/ai-company/issues/175)
([#176](#176))
([c5ca929](c5ca929))
* address post-merge review feedback from PRs
[#164](https://github.com/Aureliolo/ai-company/issues/164)-[#167](https://github.com/Aureliolo/ai-company/issues/167)
([#170](#170))
([3bf897a](3bf897a)),
closes [#169](#169)
* enforce strict mypy on test files
([#89](#89))
([aeeff8c](aeeff8c))
* harden Docker sandbox, MCP bridge, and code runner
([#50](#50),
[#53](#53))
([d5e1b6e](d5e1b6e))
* harden git tools security + code quality improvements
([#150](#150))
([000a325](000a325))
* harden subprocess cleanup, env filtering, and shutdown resilience
([#155](#155))
([d1fe1fb](d1fe1fb))
* incorporate post-merge feedback + pre-PR review fixes
([#164](#164))
([c02832a](c02832a))
* pre-PR review fixes for post-merge findings
([#183](#183))
([26b3108](26b3108))
* strengthen immutability for BaseTool schema and ToolInvoker boundaries
([#117](#117))
([7e5e861](7e5e861))


### Performance

* harden non-inferable principle implementation
([#195](#195))
([02b5f4e](02b5f4e)),
closes [#188](#188)


### Refactoring

* adopt NotBlankStr across all models
([#108](#108))
([#120](#120))
([ef89b90](ef89b90))
* extract _SpendingTotals base class from spending summary models
([#111](#111))
([2f39c1b](2f39c1b))
* harden BudgetEnforcer with error handling, validation extraction, and
review fixes
([#182](#182))
([c107bf9](c107bf9))
* harden personality profiles, department validation, and template
rendering ([#158](#158))
([10b2299](10b2299))
* pre-PR review improvements for ExecutionLoop + ReAct loop
([#124](#124))
([8dfb3c0](8dfb3c0))
* split events.py into per-domain event modules
([#136](#136))
([e9cba89](e9cba89))


### Documentation

* add ADR-001 memory layer evaluation and selection
([#178](#178))
([db3026f](db3026f)),
closes [#39](#39)
* add agent scaling research findings to DESIGN_SPEC
([#145](#145))
([57e487b](57e487b))
* add CLAUDE.md, contributing guide, and dev documentation
([#65](#65))
([55c1025](55c1025)),
closes [#54](#54)
* add crash recovery, sandboxing, analytics, and testing decisions
([#127](#127))
([5c11595](5c11595))
* address external review feedback with MVP scope and new protocols
([#128](#128))
([3b30b9a](3b30b9a))
* expand design spec with pluggable strategy protocols
([#121](#121))
([6832db6](6832db6))
* finalize 23 design decisions (ADR-002)
([#190](#190))
([8c39742](8c39742))
* update project docs for M2.5 conventions and add docs-consistency
review agent
([#114](#114))
([99766ee](99766ee))


### Tests

* add e2e single agent integration tests
([#24](#24))
([#156](#156))
([f566fb4](f566fb4))
* add provider adapter integration tests
([#90](#90))
([40a61f4](40a61f4))


### CI/CD

* add Release Please for automated versioning and GitHub Releases
([#278](#278))
([a488758](a488758))
* bump actions/checkout from 4 to 6
([#95](#95))
([1897247](1897247))
* bump actions/upload-artifact from 4 to 7
([#94](#94))
([27b1517](27b1517))
* harden CI/CD pipeline
([#92](#92))
([ce4693c](ce4693c))
* split vulnerability scans into critical-fail and high-warn tiers
([#277](#277))
([aba48af](aba48af))


### Maintenance

* add /worktree skill for parallel worktree management
([#171](#171))
([951e337](951e337))
* add design spec context loading to research-link skill
([8ef9685](8ef9685))
* add post-merge-cleanup skill
([#70](#70))
([f913705](f913705))
* add pre-pr-review skill and update CLAUDE.md
([#103](#103))
([92e9023](92e9023))
* add research-link skill and rename skill files to SKILL.md
([#101](#101))
([651c577](651c577))
* bump aiosqlite from 0.21.0 to 0.22.1
([#191](#191))
([3274a86](3274a86))
* bump pyyaml from 6.0.2 to 6.0.3 in the minor-and-patch group
([#96](#96))
([0338d0c](0338d0c))
* bump ruff from 0.15.4 to 0.15.5
([a49ee46](a49ee46))
* fix M0 audit items
([#66](#66))
([c7724b5](c7724b5))
* pin setup-uv action to full SHA
([#281](#281))
([4448002](4448002))
* post-audit cleanup — PEP 758, loggers, bug fixes, refactoring, tests,
hookify rules
([#148](#148))
([c57a6a9](c57a6a9))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
Aureliolo added a commit that referenced this pull request Mar 11, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.1.0](v0.0.0...v0.1.0)
(2026-03-11)


### Features

* add autonomy levels and approval timeout policies
([#42](#42),
[#126](#126))
([#197](#197))
([eecc25a](eecc25a))
* add CFO cost optimization service with anomaly detection, reports, and
approval decisions
([#186](#186))
([a7fa00b](a7fa00b))
* add code quality toolchain (ruff, mypy, pre-commit, dependabot)
([#63](#63))
([36681a8](36681a8))
* add configurable cost tiers and subscription/quota-aware tracking
([#67](#67))
([#185](#185))
([9baedfa](9baedfa))
* add container packaging, Docker Compose, and CI pipeline
([#269](#269))
([435bdfe](435bdfe)),
closes [#267](#267)
* add coordination error taxonomy classification pipeline
([#146](#146))
([#181](#181))
([70c7480](70c7480))
* add cost-optimized, hierarchical, and auction assignment strategies
([#175](#175))
([ce924fa](ce924fa)),
closes [#173](#173)
* add design specification, license, and project setup
([8669a09](8669a09))
* add env var substitution and config file auto-discovery
([#77](#77))
([7f53832](7f53832))
* add FastestStrategy routing + vendor-agnostic cleanup
([#140](#140))
([09619cb](09619cb)),
closes [#139](#139)
* add HR engine and performance tracking
([#45](#45),
[#47](#47))
([#193](#193))
([2d091ea](2d091ea))
* add issue auto-search and resolution verification to PR review skill
([#119](#119))
([deecc39](deecc39))
* add mandatory JWT + API key authentication
([#256](#256))
([c279cfe](c279cfe))
* add memory retrieval, ranking, and context injection pipeline
([#41](#41))
([873b0aa](873b0aa))
* add pluggable MemoryBackend protocol with models, config, and events
([#180](#180))
([46cfdd4](46cfdd4))
* add pluggable MemoryBackend protocol with models, config, and events
([#32](#32))
([46cfdd4](46cfdd4))
* add pluggable output scan response policies
([#263](#263))
([b9907e8](b9907e8))
* add pluggable PersistenceBackend protocol with SQLite implementation
([#36](#36))
([f753779](f753779))
* add progressive trust and promotion/demotion subsystems
([#43](#43),
[#49](#49))
([3a87c08](3a87c08))
* add retry handler, rate limiter, and provider resilience
([#100](#100))
([b890545](b890545))
* add SecOps security agent with rule engine, audit log, and ToolInvoker
integration ([#40](#40))
([83b7b6c](83b7b6c))
* add shared org memory and memory consolidation/archival
([#125](#125),
[#48](#48))
([4a0832b](4a0832b))
* design unified provider interface
([#86](#86))
([3e23d64](3e23d64))
* expand template presets, rosters, and add inheritance
([#80](#80),
[#81](#81),
[#84](#84))
([15a9134](15a9134))
* implement agent runtime state vs immutable config split
([#115](#115))
([4cb1ca5](4cb1ca5))
* implement AgentEngine core orchestrator
([#11](#11))
([#143](#143))
([f2eb73a](f2eb73a))
* implement AuditRepository for security audit log persistence
([#279](#279))
([94bc29f](94bc29f))
* implement basic tool system (registry, invocation, results)
([#15](#15))
([c51068b](c51068b))
* implement built-in file system tools
([#18](#18))
([325ef98](325ef98))
* implement communication foundation — message bus, dispatcher, and
messenger ([#157](#157))
([8e71bfd](8e71bfd))
* implement company template system with 7 built-in presets
([#85](#85))
([cbf1496](cbf1496))
* implement conflict resolution protocol
([#122](#122))
([#166](#166))
([e03f9f2](e03f9f2))
* implement core entity and role system models
([#69](#69))
([acf9801](acf9801))
* implement crash recovery with fail-and-reassign strategy
([#149](#149))
([e6e91ed](e6e91ed))
* implement engine extensions — Plan-and-Execute loop and call
categorization
([#134](#134),
[#135](#135))
([#159](#159))
([9b2699f](9b2699f))
* implement enterprise logging system with structlog
([#73](#73))
([2f787e5](2f787e5))
* implement graceful shutdown with cooperative timeout strategy
([#130](#130))
([6592515](6592515))
* implement hierarchical delegation and loop prevention
([#12](#12),
[#17](#17))
([6be60b6](6be60b6))
* implement LiteLLM driver and provider registry
([#88](#88))
([ae3f18b](ae3f18b)),
closes [#4](#4)
* implement LLM decomposition strategy and workspace isolation
([#174](#174))
([aa0eefe](aa0eefe))
* implement meeting protocol system
([#123](#123))
([ee7caca](ee7caca))
* implement message and communication domain models
([#74](#74))
([560a5d2](560a5d2))
* implement model routing engine
([#99](#99))
([d3c250b](d3c250b))
* implement parallel agent execution
([#22](#22))
([#161](#161))
([65940b3](65940b3))
* implement per-call cost tracking service
([#7](#7))
([#102](#102))
([c4f1f1c](c4f1f1c))
* implement personality injection and system prompt construction
([#105](#105))
([934dd85](934dd85))
* implement single-task execution lifecycle
([#21](#21))
([#144](#144))
([c7e64e4](c7e64e4))
* implement subprocess sandbox for tool execution isolation
([#131](#131))
([#153](#153))
([3c8394e](3c8394e))
* implement task assignment subsystem with pluggable strategies
([#172](#172))
([c7f1b26](c7f1b26)),
closes [#26](#26)
[#30](#30)
* implement task decomposition and routing engine
([#14](#14))
([9c7fb52](9c7fb52))
* implement Task, Project, Artifact, Budget, and Cost domain models
([#71](#71))
([81eabf1](81eabf1))
* implement tool permission checking
([#16](#16))
([833c190](833c190))
* implement YAML config loader with Pydantic validation
([#59](#59))
([ff3a2ba](ff3a2ba))
* implement YAML config loader with Pydantic validation
([#75](#75))
([ff3a2ba](ff3a2ba))
* initialize project with uv, hatchling, and src layout
([39005f9](39005f9))
* initialize project with uv, hatchling, and src layout
([#62](#62))
([39005f9](39005f9))
* Litestar REST API, WebSocket feed, and approval queue (M6)
([#189](#189))
([29fcd08](29fcd08))
* make TokenUsage.total_tokens a computed field
([#118](#118))
([c0bab18](c0bab18)),
closes [#109](#109)
* parallel tool execution in ToolInvoker.invoke_all
([#137](#137))
([58517ee](58517ee))
* testing framework, CI pipeline, and M0 gap fixes
([#64](#64))
([f581749](f581749))
* wire all modules into observability system
([#97](#97))
([f7a0617](f7a0617))


### Bug Fixes

* address Greptile post-merge review findings from PRs
[#170](https://github.com/Aureliolo/ai-company/issues/170)-[#175](https://github.com/Aureliolo/ai-company/issues/175)
([#176](#176))
([c5ca929](c5ca929))
* address post-merge review feedback from PRs
[#164](https://github.com/Aureliolo/ai-company/issues/164)-[#167](https://github.com/Aureliolo/ai-company/issues/167)
([#170](#170))
([3bf897a](3bf897a)),
closes [#169](#169)
* enforce strict mypy on test files
([#89](#89))
([aeeff8c](aeeff8c))
* harden Docker sandbox, MCP bridge, and code runner
([#50](#50),
[#53](#53))
([d5e1b6e](d5e1b6e))
* harden git tools security + code quality improvements
([#150](#150))
([000a325](000a325))
* harden subprocess cleanup, env filtering, and shutdown resilience
([#155](#155))
([d1fe1fb](d1fe1fb))
* incorporate post-merge feedback + pre-PR review fixes
([#164](#164))
([c02832a](c02832a))
* pre-PR review fixes for post-merge findings
([#183](#183))
([26b3108](26b3108))
* resolve circular imports, bump litellm, fix release tag format
([#286](#286))
([a6659b5](a6659b5))
* strengthen immutability for BaseTool schema and ToolInvoker boundaries
([#117](#117))
([7e5e861](7e5e861))


### Performance

* harden non-inferable principle implementation
([#195](#195))
([02b5f4e](02b5f4e)),
closes [#188](#188)


### Refactoring

* adopt NotBlankStr across all models
([#108](#108))
([#120](#120))
([ef89b90](ef89b90))
* extract _SpendingTotals base class from spending summary models
([#111](#111))
([2f39c1b](2f39c1b))
* harden BudgetEnforcer with error handling, validation extraction, and
review fixes
([#182](#182))
([c107bf9](c107bf9))
* harden personality profiles, department validation, and template
rendering ([#158](#158))
([10b2299](10b2299))
* pre-PR review improvements for ExecutionLoop + ReAct loop
([#124](#124))
([8dfb3c0](8dfb3c0))
* split events.py into per-domain event modules
([#136](#136))
([e9cba89](e9cba89))


### Documentation

* add ADR-001 memory layer evaluation and selection
([#178](#178))
([db3026f](db3026f)),
closes [#39](#39)
* add agent scaling research findings to DESIGN_SPEC
([#145](#145))
([57e487b](57e487b))
* add CLAUDE.md, contributing guide, and dev documentation
([#65](#65))
([55c1025](55c1025)),
closes [#54](#54)
* add crash recovery, sandboxing, analytics, and testing decisions
([#127](#127))
([5c11595](5c11595))
* address external review feedback with MVP scope and new protocols
([#128](#128))
([3b30b9a](3b30b9a))
* expand design spec with pluggable strategy protocols
([#121](#121))
([6832db6](6832db6))
* finalize 23 design decisions (ADR-002)
([#190](#190))
([8c39742](8c39742))
* update project docs for M2.5 conventions and add docs-consistency
review agent
([#114](#114))
([99766ee](99766ee))


### Tests

* add e2e single agent integration tests
([#24](#24))
([#156](#156))
([f566fb4](f566fb4))
* add provider adapter integration tests
([#90](#90))
([40a61f4](40a61f4))


### CI/CD

* add Release Please for automated versioning and GitHub Releases
([#278](#278))
([a488758](a488758))
* bump actions/checkout from 4 to 6
([#95](#95))
([1897247](1897247))
* bump actions/upload-artifact from 4 to 7
([#94](#94))
([27b1517](27b1517))
* bump anchore/scan-action from 6.5.1 to 7.3.2
([#271](#271))
([80a1c15](80a1c15))
* bump docker/build-push-action from 6.19.2 to 7.0.0
([#273](#273))
([dd0219e](dd0219e))
* bump docker/login-action from 3.7.0 to 4.0.0
([#272](#272))
([33d6238](33d6238))
* bump docker/metadata-action from 5.10.0 to 6.0.0
([#270](#270))
([baee04e](baee04e))
* bump docker/setup-buildx-action from 3.12.0 to 4.0.0
([#274](#274))
([5fc06f7](5fc06f7))
* bump sigstore/cosign-installer from 3.9.1 to 4.1.0
([#275](#275))
([29dd16c](29dd16c))
* harden CI/CD pipeline
([#92](#92))
([ce4693c](ce4693c))
* split vulnerability scans into critical-fail and high-warn tiers
([#277](#277))
([aba48af](aba48af))


### Maintenance

* add /worktree skill for parallel worktree management
([#171](#171))
([951e337](951e337))
* add design spec context loading to research-link skill
([8ef9685](8ef9685))
* add post-merge-cleanup skill
([#70](#70))
([f913705](f913705))
* add pre-pr-review skill and update CLAUDE.md
([#103](#103))
([92e9023](92e9023))
* add research-link skill and rename skill files to SKILL.md
([#101](#101))
([651c577](651c577))
* bump aiosqlite from 0.21.0 to 0.22.1
([#191](#191))
([3274a86](3274a86))
* bump pyyaml from 6.0.2 to 6.0.3 in the minor-and-patch group
([#96](#96))
([0338d0c](0338d0c))
* bump ruff from 0.15.4 to 0.15.5
([a49ee46](a49ee46))
* fix M0 audit items
([#66](#66))
([c7724b5](c7724b5))
* **main:** release ai-company 0.1.1
([#282](#282))
([2f4703d](2f4703d))
* pin setup-uv action to full SHA
([#281](#281))
([4448002](4448002))
* post-audit cleanup — PEP 758, loggers, bug fixes, refactoring, tests,
hookify rules
([#148](#148))
([c57a6a9](c57a6a9))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

---------

Signed-off-by: Aurelio <19254254+Aureliolo@users.noreply.github.com>
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