feat(core): add v3 lifecycle models, automation levels, subplan support, and security hardening #42

Merged
CoreRasurae merged 6 commits from feat/luis-A5-A6-E1-SEC1 into master 2026-02-12 20:27:21 +00:00
Member
No description provided.
CoreRasurae force-pushed feat/luis-A5-A6-E1-SEC1 from cf7a2ea001 to 015f9240d2 2026-02-10 23:02:44 +00:00 Compare
Member

Here are the review findings from GPT-5.1 Codex:

Review Findings

  1. Plan rules: implementation_plan.md was updated and checklist kept last, but required tests are missing for new persistence/CLI work (ActionRepository CRUD paths and plan automation CLI flags), violating the “Unit + integration testing mandate.”
  2. Persistence bug: src/cleveragents/infrastructure/database/models.py:521-579 hardcodes action_id="" and automation_level="manual" in LifecyclePlanModel.from_domain, dropping real values and breaking FK/automation data on save.
  3. Style: ruff will fail due to unused imports (e.g., PlanPhase in features/steps/automation_levels_steps.py:19, os in features/steps/no_sandbox_coverage_steps.py:16; likely more in new step files).
  4. Coverage: No evidence the new code maintains >80% coverage (plan requires >85%); coverage not reported and untested areas make threshold doubtful.
  5. Typing: Pyright wasn’t run here; new repository/CLI additions need a strict pyright pass to confirm compliance.

UPDATE:

For 3) and 4), I've checked ruff check, ruff format, and pyright -- everything that's missed is a comment.

The biggest problem that I found was that one file is missing tests.

Here are the review findings from GPT-5.1 Codex: Review Findings 1) Plan rules: implementation_plan.md was updated and checklist kept last, but required tests are missing for new persistence/CLI work (ActionRepository CRUD paths and plan automation CLI flags), violating the “Unit + integration testing mandate.” 2) Persistence bug: src/cleveragents/infrastructure/database/models.py:521-579 hardcodes action_id="" and automation_level="manual" in LifecyclePlanModel.from_domain, dropping real values and breaking FK/automation data on save. 3) Style: ruff will fail due to unused imports (e.g., PlanPhase in features/steps/automation_levels_steps.py:19, os in features/steps/no_sandbox_coverage_steps.py:16; likely more in new step files). 4) Coverage: No evidence the new code maintains >80% coverage (plan requires >85%); coverage not reported and untested areas make threshold doubtful. 5) Typing: Pyright wasn’t run here; new repository/CLI additions need a strict pyright pass to confirm compliance. UPDATE: For 3) and 4), I've checked `ruff check`, `ruff format`, and `pyright` -- everything that's missed is a comment. The biggest problem that I found was that one file is missing tests.
brent.edwards left a comment

If this were by a human, I would praise the care of the code.

I mostly ran automated checks for this. Let me know if I should try reading through the 9,000 lines of code.

If this were by a human, I would praise the care of the code. I mostly ran automated checks for this. Let me know if I should try reading through the 9,000 lines of code.
@ -4,15 +4,21 @@ Based on ADR-007 (Repository Pattern).
Now includes retry patterns for database operations based on ADR-033.
"""
from __future__ import annotations
Member

According to nox coverage, this file has only 74% code coverage.

src/cleveragents/infrastructure/database/repositories.py                        410    107     72      2    74%   145->exit, 215->256, 711-712, 719-724, 739, 743, 760-774, 783-794, 805-812, 833-841, 855-865, 885-925, 941-952, 971-998
According to nox coverage, this file has only 74% code coverage. ``` src/cleveragents/infrastructure/database/repositories.py 410 107 72 2 74% 145->exit, 215->256, 711-712, 719-724, 739, 743, 760-774, 783-794, 805-812, 833-841, 855-865, 885-925, 941-952, 971-998 ```
Author
Member

Thanks! That should now have been addressed.

Thanks! That should now have been addressed.
brent.edwards marked this conversation as resolved
@ -10,3 +13,3 @@
from sqlalchemy.exc import DatabaseError as SQLAlchemyDatabaseError
from sqlalchemy.exc import OperationalError
from sqlalchemy.exc import IntegrityError, OperationalError
Member

When I run pyright on its own, I get the message:

  /app/src/cleveragents/infrastructure/database/repositories.py:15:6 - error: Import "sqlalchemy.exc" could not be resolved

(This is likely nothing.)

When I run `pyright` on its own, I get the message: ``` /app/src/cleveragents/infrastructure/database/repositories.py:15:6 - error: Import "sqlalchemy.exc" could not be resolved ``` (This is likely nothing.)
Author
Member

I think these are bogus, since it should checked via nox. However there are other linting issues in the codebase that should be addressed separately as they are not related to changes made in this PR.

I think these are bogus, since it should checked via nox. However there are other linting issues in the codebase that should be addressed separately as they are not related to changes made in this PR.
brent.edwards marked this conversation as resolved
@ -0,0 +12,4 @@
import logging
from datetime import datetime
from ulid import ULID
Member

When I run pylint on its own, I get the error:

  /app/src/cleveragents/infrastructure/sandbox/no_sandbox.py:15:6 - error: Import "ulid" could not be resolved (reportMissingImports)

(This is probably nothing.)

When I run `pylint` on its own, I get the error: ``` /app/src/cleveragents/infrastructure/sandbox/no_sandbox.py:15:6 - error: Import "ulid" could not be resolved (reportMissingImports) ``` (This is probably nothing.)
Author
Member

Thanks for reporting this, again i think it is because of running outside nox.

Thanks for reporting this, again i think it is because of running outside nox.
brent.edwards marked this conversation as resolved
CoreRasurae force-pushed feat/luis-A5-A6-E1-SEC1 from 015f9240d2 to 67a7226f05 2026-02-11 14:12:52 +00:00 Compare
CoreRasurae force-pushed feat/luis-A5-A6-E1-SEC1 from 67a7226f05 to 89f5e205f4 2026-02-11 19:46:37 +00:00 Compare
CoreRasurae force-pushed feat/luis-A5-A6-E1-SEC1 from 89f5e205f4 to 23ae6def89 2026-02-11 22:04:47 +00:00 Compare
Member

Everything here seems great. Good work!

I know that you'll hate having to make another merge. When all of the problems with the current master are cleaned up, there will be a new version of master to merge in.

I will let you know when that is ready.

Everything here seems great. Good work! I know that you'll hate having to make another merge. When all of the problems with the current master are cleaned up, there will be a new version of `master` to merge in. I will let you know when that is ready.
brent.edwards left a comment

Approve, but don't merge yet.

Approve, but don't merge yet.
CoreRasurae force-pushed feat/luis-A5-A6-E1-SEC1 from 23ae6def89 to 2e47851592
Some checks failed
CI / lint (pull_request) Failing after 15s
CI / typecheck (pull_request) Successful in 25s
CI / coverage (pull_request) Has been skipped
CI / security (pull_request) Failing after 16s
CI / quality (pull_request) Successful in 15s
CI / build (pull_request) Successful in 12s
CI / behave (3.13) (pull_request) Failing after 4m9s
CI / docker (pull_request) Has been skipped
2026-02-12 14:29:58 +00:00
Compare
CoreRasurae force-pushed feat/luis-A5-A6-E1-SEC1 from 2e47851592
Some checks failed
CI / lint (pull_request) Failing after 15s
CI / typecheck (pull_request) Successful in 25s
CI / coverage (pull_request) Has been skipped
CI / security (pull_request) Failing after 16s
CI / quality (pull_request) Successful in 15s
CI / build (pull_request) Successful in 12s
CI / behave (3.13) (pull_request) Failing after 4m9s
CI / docker (pull_request) Has been skipped
to 379497f476
Some checks failed
CI / lint (pull_request) Failing after 15s
CI / typecheck (pull_request) Successful in 24s
CI / coverage (pull_request) Has been skipped
CI / security (pull_request) Failing after 16s
CI / quality (pull_request) Successful in 15s
CI / build (pull_request) Successful in 12s
CI / behave (3.13) (pull_request) Failing after 4m12s
CI / docker (pull_request) Has been skipped
2026-02-12 14:56:06 +00:00
Compare
CoreRasurae force-pushed feat/luis-A5-A6-E1-SEC1 from 379497f476
Some checks failed
CI / lint (pull_request) Failing after 15s
CI / typecheck (pull_request) Successful in 24s
CI / coverage (pull_request) Has been skipped
CI / security (pull_request) Failing after 16s
CI / quality (pull_request) Successful in 15s
CI / build (pull_request) Successful in 12s
CI / behave (3.13) (pull_request) Failing after 4m12s
CI / docker (pull_request) Has been skipped
to 6ebe70dbdd
Some checks failed
CI / lint (pull_request) Failing after 16s
CI / typecheck (pull_request) Successful in 26s
CI / coverage (pull_request) Has been skipped
CI / security (pull_request) Failing after 17s
CI / quality (pull_request) Successful in 14s
CI / build (pull_request) Successful in 13s
CI / behave (3.13) (pull_request) Failing after 4m22s
CI / docker (pull_request) Has been skipped
2026-02-12 16:15:27 +00:00
Compare
CoreRasurae force-pushed feat/luis-A5-A6-E1-SEC1 from 6ebe70dbdd
Some checks failed
CI / lint (pull_request) Failing after 16s
CI / typecheck (pull_request) Successful in 26s
CI / coverage (pull_request) Has been skipped
CI / security (pull_request) Failing after 17s
CI / quality (pull_request) Successful in 14s
CI / build (pull_request) Successful in 13s
CI / behave (3.13) (pull_request) Failing after 4m22s
CI / docker (pull_request) Has been skipped
to 95e7a7b002
Some checks failed
CI / lint (pull_request) Failing after 16s
CI / typecheck (pull_request) Successful in 27s
CI / coverage (pull_request) Has been skipped
CI / security (pull_request) Failing after 16s
CI / quality (pull_request) Successful in 14s
CI / build (pull_request) Successful in 12s
CI / behave (3.13) (pull_request) Failing after 4m22s
CI / docker (pull_request) Has been skipped
2026-02-12 16:32:18 +00:00
Compare
CoreRasurae force-pushed feat/luis-A5-A6-E1-SEC1 from 95e7a7b002
Some checks failed
CI / lint (pull_request) Failing after 16s
CI / typecheck (pull_request) Successful in 27s
CI / coverage (pull_request) Has been skipped
CI / security (pull_request) Failing after 16s
CI / quality (pull_request) Successful in 14s
CI / build (pull_request) Successful in 12s
CI / behave (3.13) (pull_request) Failing after 4m22s
CI / docker (pull_request) Has been skipped
to 90b48edc36
Some checks failed
CI / lint (pull_request) Successful in 17s
CI / typecheck (pull_request) Successful in 25s
CI / security (pull_request) Failing after 17s
CI / quality (pull_request) Successful in 15s
CI / build (pull_request) Successful in 12s
CI / behave (3.13) (pull_request) Failing after 4m21s
CI / docker (pull_request) Has been skipped
CI / coverage (pull_request) Failing after 4m56s
2026-02-12 16:43:46 +00:00
Compare
CoreRasurae force-pushed feat/luis-A5-A6-E1-SEC1 from 7e5a0bb4ae
Some checks failed
CI / lint (pull_request) Failing after 17s
CI / typecheck (pull_request) Successful in 28s
CI / coverage (pull_request) Has been skipped
CI / security (pull_request) Successful in 17s
CI / quality (pull_request) Successful in 15s
CI / build (pull_request) Successful in 13s
CI / behave (3.13) (pull_request) Failing after 4m28s
CI / docker (pull_request) Has been skipped
to 367e233461
Some checks failed
CI / lint (pull_request) Successful in 16s
CI / typecheck (pull_request) Successful in 25s
CI / security (pull_request) Successful in 16s
CI / quality (pull_request) Successful in 14s
CI / build (pull_request) Successful in 13s
CI / behave (3.13) (pull_request) Failing after 4m29s
CI / docker (pull_request) Has been skipped
CI / coverage (pull_request) Failing after 4m59s
2026-02-12 17:16:55 +00:00
Compare
CoreRasurae force-pushed feat/luis-A5-A6-E1-SEC1 from 367e233461
Some checks failed
CI / lint (pull_request) Successful in 16s
CI / typecheck (pull_request) Successful in 25s
CI / security (pull_request) Successful in 16s
CI / quality (pull_request) Successful in 14s
CI / build (pull_request) Successful in 13s
CI / behave (3.13) (pull_request) Failing after 4m29s
CI / docker (pull_request) Has been skipped
CI / coverage (pull_request) Failing after 4m59s
to f3eae6d1ee
Some checks failed
CI / lint (pull_request) Successful in 16s
CI / typecheck (pull_request) Successful in 26s
CI / security (pull_request) Successful in 17s
CI / quality (pull_request) Successful in 15s
CI / build (pull_request) Successful in 13s
CI / behave (3.13) (pull_request) Successful in 4m34s
CI / docker (pull_request) Successful in 41s
CI / coverage (pull_request) Failing after 4m59s
2026-02-12 17:38:39 +00:00
Compare
CoreRasurae force-pushed feat/luis-A5-A6-E1-SEC1 from f3eae6d1ee
Some checks failed
CI / lint (pull_request) Successful in 16s
CI / typecheck (pull_request) Successful in 26s
CI / security (pull_request) Successful in 17s
CI / quality (pull_request) Successful in 15s
CI / build (pull_request) Successful in 13s
CI / behave (3.13) (pull_request) Successful in 4m34s
CI / docker (pull_request) Successful in 41s
CI / coverage (pull_request) Failing after 4m59s
to 7ce4001a96
All checks were successful
CI / lint (pull_request) Successful in 16s
CI / typecheck (pull_request) Successful in 25s
CI / security (pull_request) Successful in 17s
CI / quality (pull_request) Successful in 16s
CI / build (pull_request) Successful in 11s
CI / behave (3.13) (pull_request) Successful in 4m34s
CI / docker (pull_request) Successful in 39s
CI / coverage (pull_request) Successful in 5m11s
2026-02-12 18:25:17 +00:00
Compare
CoreRasurae force-pushed feat/luis-A5-A6-E1-SEC1 from 7ce4001a96
All checks were successful
CI / lint (pull_request) Successful in 16s
CI / typecheck (pull_request) Successful in 25s
CI / security (pull_request) Successful in 17s
CI / quality (pull_request) Successful in 16s
CI / build (pull_request) Successful in 11s
CI / behave (3.13) (pull_request) Successful in 4m34s
CI / docker (pull_request) Successful in 39s
CI / coverage (pull_request) Successful in 5m11s
to ac81f59791
All checks were successful
CI / lint (pull_request) Successful in 17s
CI / typecheck (pull_request) Successful in 27s
CI / security (pull_request) Successful in 17s
CI / quality (pull_request) Successful in 14s
CI / build (pull_request) Successful in 12s
CI / behave (3.13) (pull_request) Successful in 4m33s
CI / docker (pull_request) Successful in 9s
CI / coverage (pull_request) Successful in 5m5s
2026-02-12 19:14:48 +00:00
Compare
CoreRasurae force-pushed feat/luis-A5-A6-E1-SEC1 from ac81f59791
All checks were successful
CI / lint (pull_request) Successful in 17s
CI / typecheck (pull_request) Successful in 27s
CI / security (pull_request) Successful in 17s
CI / quality (pull_request) Successful in 14s
CI / build (pull_request) Successful in 12s
CI / behave (3.13) (pull_request) Successful in 4m33s
CI / docker (pull_request) Successful in 9s
CI / coverage (pull_request) Successful in 5m5s
to f40e8c3bf3
All checks were successful
CI / lint (pull_request) Successful in 15s
CI / typecheck (pull_request) Successful in 25s
CI / security (pull_request) Successful in 17s
CI / quality (pull_request) Successful in 15s
CI / build (pull_request) Successful in 13s
CI / behave (3.13) (pull_request) Successful in 4m33s
CI / docker (pull_request) Successful in 8s
CI / coverage (pull_request) Successful in 5m12s
2026-02-12 20:02:10 +00:00
Compare
CoreRasurae force-pushed feat/luis-A5-A6-E1-SEC1 from f40e8c3bf3
All checks were successful
CI / lint (pull_request) Successful in 15s
CI / typecheck (pull_request) Successful in 25s
CI / security (pull_request) Successful in 17s
CI / quality (pull_request) Successful in 15s
CI / build (pull_request) Successful in 13s
CI / behave (3.13) (pull_request) Successful in 4m33s
CI / docker (pull_request) Successful in 8s
CI / coverage (pull_request) Successful in 5m12s
to 5d1825fb60
All checks were successful
CI / lint (pull_request) Successful in 16s
CI / typecheck (pull_request) Successful in 28s
CI / security (pull_request) Successful in 16s
CI / quality (pull_request) Successful in 17s
CI / build (pull_request) Successful in 12s
CI / behave (3.13) (pull_request) Successful in 4m26s
CI / docker (pull_request) Successful in 8s
CI / coverage (pull_request) Successful in 5m14s
CI / lint (push) Successful in 15s
CI / typecheck (push) Successful in 25s
CI / security (push) Successful in 17s
CI / quality (push) Successful in 14s
CI / build (push) Successful in 12s
CI / behave (3.13) (push) Successful in 4m32s
CI / docker (push) Successful in 8s
CI / coverage (push) Successful in 5m7s
2026-02-12 20:20:10 +00:00
Compare
CoreRasurae deleted branch feat/luis-A5-A6-E1-SEC1 2026-02-12 20:27:21 +00:00
freemo added this to the v3.0.0 milestone 2026-02-23 17:24:53 +00:00
Owner

Closes #307

Closes #307
Owner

Implementation Attempt — Tier 0: qwen — Success

The issue (#42) is already closed and its pull request has been merged.
No further implementation is required.


Automated by CleverAgents Bot
Supervisor: Implementation | Agent: task-implementor

**Implementation Attempt** — Tier 0: qwen — Success The issue (#42) is already closed and its pull request has been merged. No further implementation is required. --- Automated by CleverAgents Bot Supervisor: Implementation | Agent: task-implementor
Owner

Implementation Attempt — Tier 2: codex — Success

The issue (#42) "feat(core): add v3 lifecycle models, automation levels, subplan support, and security hardening" was already closed and its pull request had been merged (merged at 2026-02-12).

The related issue #307 (subplan domain feature) is also completed and closed. All subtasks are checked off:

  • ExecutionMode, SubplanMergeStrategy enums added
  • SubplanConfig, SubplanStatus, SubplanAttempt models defined
  • Plan model extended with subplan support
  • Documentation and tests (Behave, Robot Framework, ASV) completed
  • Coverage verified >=97%

No further implementation work is needed. The feature is fully integrated into master.


Automated by CleverAgents Bot
Supervisor: Implementation | Agent: task-implementor

**Implementation Attempt** — Tier 2: codex — Success The issue (#42) "feat(core): add v3 lifecycle models, automation levels, subplan support, and security hardening" was already closed and its pull request had been merged (merged at 2026-02-12). The related issue #307 (subplan domain feature) is also completed and closed. All subtasks are checked off: - ExecutionMode, SubplanMergeStrategy enums added - SubplanConfig, SubplanStatus, SubplanAttempt models defined - Plan model extended with subplan support - Documentation and tests (Behave, Robot Framework, ASV) completed - Coverage verified >=97% No further implementation work is needed. The feature is fully integrated into master. --- Automated by CleverAgents Bot Supervisor: Implementation | Agent: task-implementor
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
4 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
cleveragents/cleveragents-core!42
No description provided.