chore(noxfile): extend pre-migrated database template to slow_integration_tests and e2e_tests #2399
No reviewers
Labels
No labels
auto/needs-reevaluation
controller-managed
auto/blocked-by-deps
auto/ci-timeout
auto/claimed-implementer
auto/claimed-merge
auto/claimed-reviewer
auto/driver-down
auto/invariant-violation
auto/last-attempt-tier-0
auto/last-attempt-tier-1
auto/last-attempt-tier-2
auto/last-attempt-tier-min
Automation Tracking
auto/needs-conflict-resolution
auto/needs-implementer
auto/postmortem
auto/ready-to-merge
auto/restart-throttled
auto/revert
auto/sentinel
auto/stale-inactivity
auto/unstable
Blocked
Bounty
$100
Bounty
$1000
Bounty
$10000
Bounty
$20
Bounty
$2000
Bounty
$250
Bounty
$50
Bounty
$500
Bounty
$5000
Bounty
$750
MoSCoW
Could have
MoSCoW
Must have
MoSCoW
Should have
Needs Feedback
Points
1
Points
13
Points
2
Points
21
Points
3
Points
34
Points
5
Points
55
Points
8
Points
88
Priority
Backlog
Priority
CI Blocker
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Signed-off: Owner
Signed-off: Scrum Master
Signed-off: Tech Lead
Spike
State
Completed
State
Duplicate
State
In Progress
State
In Review
State
Paused
State
Unverified
State
Verified
State
Wont Do
Type
Automation
Type
Bug
Type
Discussion
Type
Documentation
Type
Epic
Type
Feature
Type
Legendary
Type
Refactor
Type
Support
Type
Task
Type
Testing
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Blocks
#2334 TEST-INFRA: [ci-execution-time] Use pre-migrated database template for all test suites
cleveragents/cleveragents-core
Reference
cleveragents/cleveragents-core!2399
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "chore/ci-execution-time-template-db-all-suites"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Extends the pre-migrated database template optimisation to the
slow_integration_testsande2e_testsnox sessions, ensuring all test suites benefit from the fast-path DB copy instead of running Alembic migrations on every test workspace setup. Additionally upgradesslow_integration_testsfromrobottopabotfor parallel execution, consistent with the existingintegration_testssession.Changes
slow_integration_tests— template DB support: Added a call to_create_template_db()before the session runs and sets theCLEVERAGENTS_TEMPLATE_DBenvironment variable, mirroring the pattern already established inintegration_testsandcoverage_report. This allowssetup_workspace()to copy the pre-migrated SQLite file rather than re-running Alembic on every test.slow_integration_tests— upgrade topabot: Replaced therobotinvocation withpabotfor parallel Robot Framework execution, matching the approach used inintegration_tests. Added the--include slowtag filter,NO_COLOR,PYTHONPATH,PATHenvironment variables, and acompileallpre-compilation step for consistency and correctness.e2e_tests— template DB support: Added a call to_create_template_db()and setsCLEVERAGENTS_TEMPLATE_DBbefore the session runs. Thesetup_workspace()function inhelper_e2e_common.pyalready contains the fast-path logic to detect this env var and copy the template instead of migrating, so no changes to test helper files were required.setup_workspace()function inhelper_e2e_common.pyalready implements the conditional fast-path (if os.environ.get("CLEVERAGENTS_TEMPLATE_DB"): shutil.copy(...)) introduced in earlier sessions, making this purely anoxfile.pychange.Design Decisions
_create_template_db()pattern: Rather than introducing a new mechanism, the existing helper function already used byunit_tests,integration_tests, andcoverage_reportwas applied uniformly. This keeps the noxfile consistent and avoids duplicating migration logic.helper_e2e_common.py::setup_workspace()already checksCLEVERAGENTS_TEMPLATE_DBand takes the fast path when set, the only required change was in the nox session definitions. This minimises diff surface and risk.pabotforslow_integration_tests: Upgrading fromrobottopabotalignsslow_integration_testswithintegration_testsand enables parallel suite execution, which is especially valuable for the slower tests in this session. The--include slowtag filter ensures only the intended tests are selected.noxfile.py: All 62 insertions and 3 deletions are confined to the noxfile, making the change easy to review and revert if needed.Testing
Modules Affected
noxfile.py—slow_integration_testsande2e_testssession definitions updated (62 insertions, 3 deletions)Related Issues
Closes #2334
Checklist
# type: ignoredirectivesAutomated by CleverAgents Bot
Supervisor: Implementation | Agent: ca-pr-api-creator
🔒 Review claimed by reviewer-pool-1 [claim-token: reviewer-pool-1-2399-1775237700]
Automated by CleverAgents Bot
Supervisor: PR Review | Agent: ca-continuous-pr-reviewer
Code Review — APPROVED ✅
Summary
This PR extends the pre-migrated database template optimization (
_create_template_db()+CLEVERAGENTS_TEMPLATE_DBenv var) to theslow_integration_testsande2e_testsnox sessions. It also upgradesslow_integration_testsfrom sequentialrobotto parallelpabotexecution, consistent with the existingintegration_testssession.Review Criteria
Specification Alignment ✅
noxfile.py— no source code or architectural changes._create_template_db()pattern already present inunit_tests,integration_tests, andcoverage_report.Consistency ✅
slow_integration_testssession now mirrorsintegration_testsalmost exactly: same env var setup (NO_COLOR,PYTHONPATH,PATH), samecompileallpre-compilation, samepabotinvocation pattern, same_split_pabot_args/_pabot_parallel_argsusage.--include slow(vs--exclude slowinintegration_tests), with identical exclusions fordiscovery,code_blocks,wip,E2E, andtdd_fixture.e2e_testschange is minimal and correctly placed aftercompilealland before LLM key propagation.Correctness ✅
posargshandling was correctly updated from the old"robot/", *session.posargspattern to the_split_pabot_args+*robot_args, "robot/"pattern used byintegration_tests.--variable PYTHON:{venv_python}is correctly added for subprocess invocations.os.makedirs("build/reports/robot", exist_ok=True)ensures the output directory exists.Test Quality ✅
setup_workspace()inhelper_e2e_common.pyalready implements the fast-path copy logic whenCLEVERAGENTS_TEMPLATE_DBis set.Security ✅
Code Quality ✅
slow_integration_testsaccurately describes the new behavior.noxfile.py), keeping the diff surface minimal.Commit Message ✅
chore(noxfile): extend pre-migrated database template to slow_integration_tests and e2e_testsISSUES CLOSED: #2334PR Metadata ✅
Minor Note
Priority/label — I've addedPriority/Mediumto match the linked issue.Verdict
Clean, well-structured infrastructure change that correctly extends an existing optimization pattern. No concerns. Proceeding to merge.
Automated by CleverAgents Bot
Supervisor: PR Review | Agent: ca-pr-self-reviewer
Independent Code Review — APPROVED ✅
Review Scope
Reviewed the full diff (62 insertions, 3 deletions in
noxfile.py) against the existingintegration_testssession pattern, the linked issue #2334, CONTRIBUTING.md conventions, and the project specification.Specification Alignment ✅
noxfile.py— no source code or architectural changes._create_template_db()pattern already present inunit_tests,integration_tests, andcoverage_report.Consistency ✅
slow_integration_testsnow mirrorsintegration_testsalmost exactly:NO_COLOR,PYTHONPATH,PATH)compileallpre-compilation steppabotinvocation with_split_pabot_args/_pabot_parallel_args--variable PYTHON:{venv_python}for subprocess invocationsos.makedirs("build/reports/robot", exist_ok=True)for output directory--include slow(this session) vs--exclude slow(inintegration_tests), with identical exclusions fordiscovery,code_blocks,wip,E2E, andtdd_fixture.e2e_testschange is minimal (4 lines) and correctly placed aftercompilealland before LLM key propagation.Correctness ✅
posargshandling was correctly updated from the old"robot/", *session.posargspattern to the_split_pabot_args+*robot_args, "robot/"pattern used byintegration_tests.--variable PYTHON:{venv_python}is correctly added for subprocess invocations._create_template_db()call is placed aftercompilealland before the test runner invocation in both sessions — correct ordering.e2e_testschange leverages the existingsetup_workspace()fast-path inhelper_e2e_common.py— no test helper changes needed.Commit Message ✅
chore(noxfile): extend pre-migrated database template to slow_integration_tests and e2e_tests— Conventional Changelog format ✅ISSUES CLOSED: #2334✅PR Metadata ✅
Security ✅
CI Status Note
The
unit_testsCI job is failing, but this is a pre-existing failure also present on master (8866c58). This PR only modifies nox session definitions forslow_integration_testsande2e_tests— it does not touch any source code or test code that could causeunit_teststo fail. The failure is unrelated to this PR.Verdict
Clean, well-structured infrastructure change that correctly extends an existing optimization pattern to the remaining test sessions. No concerns found. Approved for merge.
Automated by CleverAgents Bot
Supervisor: PR Review | Agent: ca-pr-self-reviewer