ace-git-copilot 0.2.5__tar.gz → 0.2.7__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {ace_git_copilot-0.2.5 → ace_git_copilot-0.2.7}/.agents/AGENTS.md +2 -2
- ace_git_copilot-0.2.7/.agents/BRIEFING.md +35 -0
- ace_git_copilot-0.2.7/.agents/ORIGINAL_REQUEST.md +44 -0
- ace_git_copilot-0.2.7/.agents/e2e_testing_track/BRIEFING.md +69 -0
- ace_git_copilot-0.2.7/.agents/e2e_testing_track/ORIGINAL_REQUEST.md +12 -0
- ace_git_copilot-0.2.7/.agents/e2e_testing_track/SCOPE.md +21 -0
- ace_git_copilot-0.2.7/.agents/e2e_testing_track/progress.md +11 -0
- ace_git_copilot-0.2.7/.agents/explorer_init/BRIEFING.md +54 -0
- ace_git_copilot-0.2.7/.agents/explorer_init/ORIGINAL_REQUEST.md +7 -0
- ace_git_copilot-0.2.7/.agents/explorer_init/emojis_list.txt +52 -0
- ace_git_copilot-0.2.7/.agents/explorer_init/find_unused_modules.py +51 -0
- ace_git_copilot-0.2.7/.agents/explorer_init/handoff.md +62 -0
- ace_git_copilot-0.2.7/.agents/explorer_init/measure_lazy_startup.py +17 -0
- ace_git_copilot-0.2.7/.agents/explorer_init/measure_startup.py +5 -0
- ace_git_copilot-0.2.7/.agents/explorer_init/profile_imports.py +55 -0
- ace_git_copilot-0.2.7/.agents/explorer_init/progress.md +12 -0
- ace_git_copilot-0.2.7/.agents/explorer_init/run_importtime.py +41 -0
- ace_git_copilot-0.2.7/.agents/explorer_init/search_banner.py +4 -0
- ace_git_copilot-0.2.7/.agents/explorer_init/search_emojis.py +28 -0
- ace_git_copilot-0.2.7/.agents/explorer_init/search_git_usages.py +4 -0
- ace_git_copilot-0.2.7/.agents/explorer_init/search_usages.py +9 -0
- ace_git_copilot-0.2.7/.agents/explorer_init/test_import_profiler.py +38 -0
- ace_git_copilot-0.2.7/.agents/explorer_init/test_mocked_sys.py +31 -0
- ace_git_copilot-0.2.7/.agents/handoff.md +19 -0
- ace_git_copilot-0.2.7/.agents/implementation_track/BRIEFING.md +65 -0
- ace_git_copilot-0.2.7/.agents/implementation_track/ORIGINAL_REQUEST.md +13 -0
- ace_git_copilot-0.2.7/.agents/implementation_track/explorer_initial_report.md +156 -0
- ace_git_copilot-0.2.7/.agents/implementation_track/progress.md +28 -0
- ace_git_copilot-0.2.7/.agents/orchestrator/.gitkeep +1 -0
- ace_git_copilot-0.2.7/.agents/orchestrator/BRIEFING.md +73 -0
- ace_git_copilot-0.2.7/.agents/orchestrator/ORIGINAL_REQUEST.md +12 -0
- ace_git_copilot-0.2.7/.agents/orchestrator/PROJECT.md +35 -0
- ace_git_copilot-0.2.7/.agents/orchestrator/progress.md +16 -0
- ace_git_copilot-0.2.7/.agents/teamwork_preview_explorer_e2e_explore/BRIEFING.md +36 -0
- ace_git_copilot-0.2.7/.agents/teamwork_preview_explorer_e2e_explore/ORIGINAL_REQUEST.md +10 -0
- ace_git_copilot-0.2.7/.agents/teamwork_preview_explorer_e2e_explore/handoff.md +121 -0
- ace_git_copilot-0.2.7/.agents/teamwork_preview_explorer_e2e_explore/progress.md +10 -0
- ace_git_copilot-0.2.7/.agents/worker_e2e_testing/BRIEFING.md +33 -0
- ace_git_copilot-0.2.7/.agents/worker_e2e_testing/ORIGINAL_REQUEST.md +46 -0
- ace_git_copilot-0.2.7/.agents/worker_e2e_testing/progress.md +15 -0
- ace_git_copilot-0.2.7/.agents/worker_m1_startup/BRIEFING.md +34 -0
- ace_git_copilot-0.2.7/.agents/worker_m1_startup/ORIGINAL_REQUEST.md +18 -0
- ace_git_copilot-0.2.7/.agents/worker_m1_startup/progress.md +11 -0
- {ace_git_copilot-0.2.5 → ace_git_copilot-0.2.7}/.gitignore +6 -0
- ace_git_copilot-0.2.7/CODE_OF_CONDUCT.md +47 -0
- ace_git_copilot-0.2.7/CONTRIBUTING.md +137 -0
- ace_git_copilot-0.2.7/LICENSE +21 -0
- {ace_git_copilot-0.2.5 → ace_git_copilot-0.2.7}/PKG-INFO +2 -1
- ace_git_copilot-0.2.7/PROJECT.md +21 -0
- ace_git_copilot-0.2.7/SECURITY.md +30 -0
- ace_git_copilot-0.2.7/SUPPORT.md +31 -0
- ace_git_copilot-0.2.7/TEST_INFRA.md +36 -0
- ace_git_copilot-0.2.7/TEST_READY.md +52 -0
- {ace_git_copilot-0.2.5 → ace_git_copilot-0.2.7}/ace/cli.py +69 -10
- {ace_git_copilot-0.2.5 → ace_git_copilot-0.2.7}/ace/ui/dashboard.py +41 -2
- {ace_git_copilot-0.2.5 → ace_git_copilot-0.2.7}/ace/ui/display.py +13 -8
- ace_git_copilot-0.2.7/importtime.txt +0 -0
- ace_git_copilot-0.2.7/importtime_optimized.txt +0 -0
- {ace_git_copilot-0.2.5 → ace_git_copilot-0.2.7}/pyproject.toml +1 -1
- ace_git_copilot-0.2.7/tests/e2e/conftest.py +261 -0
- ace_git_copilot-0.2.7/tests/e2e/test_tier1_features.py +377 -0
- ace_git_copilot-0.2.7/tests/e2e/test_tier2_boundaries.py +392 -0
- ace_git_copilot-0.2.7/tests/e2e/test_tier3_combinations.py +99 -0
- ace_git_copilot-0.2.7/tests/e2e/test_tier4_workloads.py +160 -0
- {ace_git_copilot-0.2.5 → ace_git_copilot-0.2.7}/.env.example +0 -0
- {ace_git_copilot-0.2.5 → ace_git_copilot-0.2.7}/.github/workflows/tests.yml +0 -0
- {ace_git_copilot-0.2.5 → ace_git_copilot-0.2.7}/README.md +0 -0
- {ace_git_copilot-0.2.5 → ace_git_copilot-0.2.7}/ace/__init__.py +0 -0
- {ace_git_copilot-0.2.5 → ace_git_copilot-0.2.7}/ace/__main__.py +0 -0
- {ace_git_copilot-0.2.5 → ace_git_copilot-0.2.7}/ace/ai/changelog_generator.py +0 -0
- {ace_git_copilot-0.2.5 → ace_git_copilot-0.2.7}/ace/ai/code_reviewer.py +0 -0
- {ace_git_copilot-0.2.5 → ace_git_copilot-0.2.7}/ace/ai/commit_generator.py +0 -0
- {ace_git_copilot-0.2.5 → ace_git_copilot-0.2.7}/ace/ai/conflict_resolver.py +0 -0
- {ace_git_copilot-0.2.5 → ace_git_copilot-0.2.7}/ace/ai/gitignore_generator.py +0 -0
- {ace_git_copilot-0.2.5 → ace_git_copilot-0.2.7}/ace/ai/history_analyzer.py +0 -0
- {ace_git_copilot-0.2.5 → ace_git_copilot-0.2.7}/ace/ai/intent_parser.py +0 -0
- {ace_git_copilot-0.2.5 → ace_git_copilot-0.2.7}/ace/ai/llm_factory.py +0 -0
- {ace_git_copilot-0.2.5 → ace_git_copilot-0.2.7}/ace/ai/pr_drafter.py +0 -0
- {ace_git_copilot-0.2.5 → ace_git_copilot-0.2.7}/ace/ai/prompts/changelog.py +0 -0
- {ace_git_copilot-0.2.5 → ace_git_copilot-0.2.7}/ace/ai/prompts/commit.py +0 -0
- {ace_git_copilot-0.2.5 → ace_git_copilot-0.2.7}/ace/ai/prompts/conflict.py +0 -0
- {ace_git_copilot-0.2.5 → ace_git_copilot-0.2.7}/ace/ai/prompts/doctor.py +0 -0
- {ace_git_copilot-0.2.5 → ace_git_copilot-0.2.7}/ace/ai/prompts/explain.py +0 -0
- {ace_git_copilot-0.2.5 → ace_git_copilot-0.2.7}/ace/ai/prompts/ignore.py +0 -0
- {ace_git_copilot-0.2.5 → ace_git_copilot-0.2.7}/ace/ai/prompts/intent.py +0 -0
- {ace_git_copilot-0.2.5 → ace_git_copilot-0.2.7}/ace/ai/prompts/pr.py +0 -0
- {ace_git_copilot-0.2.5 → ace_git_copilot-0.2.7}/ace/ai/prompts/rebase.py +0 -0
- {ace_git_copilot-0.2.5 → ace_git_copilot-0.2.7}/ace/ai/prompts/review.py +0 -0
- {ace_git_copilot-0.2.5 → ace_git_copilot-0.2.7}/ace/ai/prompts/search.py +0 -0
- {ace_git_copilot-0.2.5 → ace_git_copilot-0.2.7}/ace/ai/prompts/undo.py +0 -0
- {ace_git_copilot-0.2.5 → ace_git_copilot-0.2.7}/ace/ai/rebase_helper.py +0 -0
- {ace_git_copilot-0.2.5 → ace_git_copilot-0.2.7}/ace/core/config.py +0 -0
- {ace_git_copilot-0.2.5 → ace_git_copilot-0.2.7}/ace/core/context.py +0 -0
- {ace_git_copilot-0.2.5 → ace_git_copilot-0.2.7}/ace/core/diagnostics.py +0 -0
- {ace_git_copilot-0.2.5 → ace_git_copilot-0.2.7}/ace/core/git_ops.py +0 -0
- {ace_git_copilot-0.2.5 → ace_git_copilot-0.2.7}/ace/core/hooks.py +0 -0
- {ace_git_copilot-0.2.5 → ace_git_copilot-0.2.7}/ace/core/safety.py +0 -0
- {ace_git_copilot-0.2.5 → ace_git_copilot-0.2.7}/ace/ui/banner.py +0 -0
- {ace_git_copilot-0.2.5 → ace_git_copilot-0.2.7}/ace/ui/prompts.py +0 -0
- {ace_git_copilot-0.2.5 → ace_git_copilot-0.2.7}/ace/ui/themes.py +0 -0
- {ace_git_copilot-0.2.5 → ace_git_copilot-0.2.7}/ace/utils/conflict_parser.py +0 -0
- {ace_git_copilot-0.2.5 → ace_git_copilot-0.2.7}/ace/utils/diff_parser.py +0 -0
- {ace_git_copilot-0.2.5 → ace_git_copilot-0.2.7}/ace/utils/json_utils.py +0 -0
- {ace_git_copilot-0.2.5 → ace_git_copilot-0.2.7}/tests/conftest.py +0 -0
- {ace_git_copilot-0.2.5 → ace_git_copilot-0.2.7}/tests/test_changelog_generator.py +0 -0
- {ace_git_copilot-0.2.5 → ace_git_copilot-0.2.7}/tests/test_code_reviewer.py +0 -0
- {ace_git_copilot-0.2.5 → ace_git_copilot-0.2.7}/tests/test_conflict_resolver.py +0 -0
- {ace_git_copilot-0.2.5 → ace_git_copilot-0.2.7}/tests/test_diagnostics.py +0 -0
- {ace_git_copilot-0.2.5 → ace_git_copilot-0.2.7}/tests/test_diff_trimmer.py +0 -0
- {ace_git_copilot-0.2.5 → ace_git_copilot-0.2.7}/tests/test_git_ops.py +0 -0
- {ace_git_copilot-0.2.5 → ace_git_copilot-0.2.7}/tests/test_help.py +0 -0
- {ace_git_copilot-0.2.5 → ace_git_copilot-0.2.7}/tests/test_history_analyzer.py +0 -0
- {ace_git_copilot-0.2.5 → ace_git_copilot-0.2.7}/tests/test_hooks.py +0 -0
- {ace_git_copilot-0.2.5 → ace_git_copilot-0.2.7}/tests/test_ignore.py +0 -0
- {ace_git_copilot-0.2.5 → ace_git_copilot-0.2.7}/tests/test_intent_parser.py +0 -0
- {ace_git_copilot-0.2.5 → ace_git_copilot-0.2.7}/tests/test_llm_factory.py +0 -0
- {ace_git_copilot-0.2.5 → ace_git_copilot-0.2.7}/tests/test_pr_drafter.py +0 -0
- {ace_git_copilot-0.2.5 → ace_git_copilot-0.2.7}/tests/test_rebase_helper.py +0 -0
- {ace_git_copilot-0.2.5 → ace_git_copilot-0.2.7}/tests/test_safety.py +0 -0
- {ace_git_copilot-0.2.5 → ace_git_copilot-0.2.7}/tests/test_search.py +0 -0
- {ace_git_copilot-0.2.5 → ace_git_copilot-0.2.7}/tests/test_undo.py +0 -0
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Whenever a new version of Ace is created (e.g., version incremented in `pyproject.toml` or when releasing a new tag), we must build the package and publish the updated release to PyPI (pip) so that users can install the latest package.
|
|
4
4
|
|
|
5
5
|
## Publishing Steps
|
|
6
|
-
1. Increment the version number in [pyproject.toml](file:///d:/Ace/pyproject.toml).
|
|
6
|
+
1. Increment the version number in [pyproject.toml](file:///d:/Projects/Ace/pyproject.toml).
|
|
7
7
|
2. Clean previous build artifacts from `dist/`.
|
|
8
8
|
3. Build the wheel and source distribution:
|
|
9
9
|
```bash
|
|
@@ -14,4 +14,4 @@ Whenever a new version of Ace is created (e.g., version incremented in `pyprojec
|
|
|
14
14
|
```bash
|
|
15
15
|
twine upload dist/*
|
|
16
16
|
```
|
|
17
|
-
5.
|
|
17
|
+
5. **DO NOT** create or push git release tags (e.g. `v0.2.x`) to GitHub. Tagging is managed separately.
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# BRIEFING — 2026-06-30T10:18:30Z
|
|
2
|
+
|
|
3
|
+
## Mission
|
|
4
|
+
Oversee the optimization of Ace Git Copilot, monitor progress, check liveness of the orchestrator, and verify project completion through Victory Auditor.
|
|
5
|
+
|
|
6
|
+
## 🔒 My Identity
|
|
7
|
+
- Archetype: sentinel
|
|
8
|
+
- Working directory: d:\Projects\Ace\.agents
|
|
9
|
+
- Orchestrator: 0dd9d0e8-c391-4ea8-819e-6ca3f6689294
|
|
10
|
+
- Victory Auditor: TBD
|
|
11
|
+
|
|
12
|
+
## 🔒 Key Constraints
|
|
13
|
+
- No technical decisions — relay only
|
|
14
|
+
- Victory Audit is MANDATORY before reporting completion
|
|
15
|
+
|
|
16
|
+
## User Context
|
|
17
|
+
- **Last user request**: Comprehensive performance, codebase size, and test suite optimization of Ace Git Copilot.
|
|
18
|
+
- **Pending clarifications**: none
|
|
19
|
+
- **Delivered results**: none
|
|
20
|
+
|
|
21
|
+
## Project Status
|
|
22
|
+
- **Phase**: in progress
|
|
23
|
+
- **Details**:
|
|
24
|
+
- E2E testing infrastructure setup complete with custom MockLLMServer.
|
|
25
|
+
- Startup performance optimization complete: cli.py imports refactored, import overhead reduced from 1.1s to ~177ms.
|
|
26
|
+
- Currently working on codebase refactoring, emoji cleanup, and pytest optimizations.
|
|
27
|
+
|
|
28
|
+
## Victory Audit Status
|
|
29
|
+
- **Triggered**: no
|
|
30
|
+
- **Verdict**: pending
|
|
31
|
+
- **Retry count**: 0
|
|
32
|
+
|
|
33
|
+
## Artifact Index
|
|
34
|
+
- d:\Projects\Ace\.agents\ORIGINAL_REQUEST.md — Verbatim user request tracking.
|
|
35
|
+
- d:\Projects\Ace\.agents\BRIEFING.md — Persistent agent state briefing.
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# Original User Request
|
|
2
|
+
|
|
3
|
+
## Initial Request — 2026-06-30T09:48:54Z
|
|
4
|
+
|
|
5
|
+
A comprehensive performance, codebase size, and test suite optimization of the Ace Git Copilot. This includes reducing startup latency and import overhead, refactoring code modules to remove redundancies, improving test suite speed and reliability, and enhancing the UI/UX layout while removing unprofessional or cringy emojis.
|
|
6
|
+
|
|
7
|
+
Working directory: d:/Projects/Ace
|
|
8
|
+
Integrity mode: demo
|
|
9
|
+
|
|
10
|
+
## Requirements
|
|
11
|
+
|
|
12
|
+
### R1. Startup & Import Overhead Optimization
|
|
13
|
+
Optimize CLI startup time by refactoring import paths and utilizing lazy-loading for heavy packages (e.g., LangChain and LLM endpoints) so that they are only loaded when their respective subcommands are invoked.
|
|
14
|
+
|
|
15
|
+
### R2. Codebase Cleanliness, Refactoring, & UI/UX Styling
|
|
16
|
+
* Refactor the codebase to eliminate redundant helper utilities, unused modules, and imports.
|
|
17
|
+
* Clean up the CLI prompts, logs, and banners by removing verbose or cringy emojis, replacing them with a polished, professional typography and layout.
|
|
18
|
+
* Maintain the functional subcommands, dashboard TUI, and core Neon-Sunset theme color settings.
|
|
19
|
+
|
|
20
|
+
### R3. Test Suite Speed & Reliability
|
|
21
|
+
Identify bottlenecks in the test suite (`tests/`), optimize fixtures and mocks, and ensure all tests run quickly and reliably without any flakiness.
|
|
22
|
+
|
|
23
|
+
## Verification Plan
|
|
24
|
+
|
|
25
|
+
We will programmatically verify these optimizations using a custom audit script `scratch/verify_optimizations.py`:
|
|
26
|
+
1. **Startup Performance**: Measure CLI startup execution time for `ace --help` (target: < 250ms).
|
|
27
|
+
2. **Code Quality**: Verify that `ruff check` passes cleanly without any linting or formatting warnings.
|
|
28
|
+
3. **Test Suite Integrity**: Execute `pytest` and verify that all 52 tests pass, with a total execution time under 15 seconds.
|
|
29
|
+
|
|
30
|
+
## Acceptance Criteria
|
|
31
|
+
|
|
32
|
+
### Performance & Quality
|
|
33
|
+
- [ ] The command `ace --help` executes in less than 250 milliseconds.
|
|
34
|
+
- [ ] Codebase linting checks with `ruff check` return 0 errors and warnings.
|
|
35
|
+
- [ ] All package dependencies listed in `pyproject.toml` are strictly necessary, and unused packages are removed.
|
|
36
|
+
|
|
37
|
+
### UI/UX & Emojis
|
|
38
|
+
- [ ] CLI prompts, notifications, and banners are clean, professional, and free of cringy emojis.
|
|
39
|
+
- [ ] All text layouts and tables are properly aligned and formatted.
|
|
40
|
+
|
|
41
|
+
### Test Suite Execution
|
|
42
|
+
- [ ] All 52 tests in the suite pass successfully.
|
|
43
|
+
- [ ] Total test execution time is under 15 seconds.
|
|
44
|
+
- [ ] No flaky tests or environment-specific failures occur.
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
# BRIEFING — 2026-06-30T15:21:41+05:30
|
|
2
|
+
|
|
3
|
+
## Mission
|
|
4
|
+
Design and implement a comprehensive, opaque-box, requirement-driven E2E test suite for Ace Git Copilot.
|
|
5
|
+
|
|
6
|
+
## 🔒 My Identity
|
|
7
|
+
- Archetype: orchestrator
|
|
8
|
+
- Roles: orchestrator, user_liaison, human_reporter, successor
|
|
9
|
+
- Working directory: d:\Projects\Ace\.agents\e2e_testing_track\
|
|
10
|
+
- Original parent: main agent
|
|
11
|
+
- Original parent conversation ID: 0dd9d0e8-c391-4ea8-819e-6ca3f6689294
|
|
12
|
+
|
|
13
|
+
## 🔒 My Workflow
|
|
14
|
+
- **Pattern**: Project (E2E Testing Track)
|
|
15
|
+
- **Scope document**: d:\Projects\Ace\.agents\e2e_testing_track\SCOPE.md
|
|
16
|
+
1. **Decompose**: Decompose the E2E test cases by feature area across Tiers 1-4.
|
|
17
|
+
2. **Dispatch & Execute**:
|
|
18
|
+
- **Delegate (sub-orchestrator)**: If needed, decompose further.
|
|
19
|
+
- **Direct (iteration loop)**: Spawn Explorer -> Worker -> Reviewer -> Challenger -> Auditor to design test infra, generate tests, verify, and run.
|
|
20
|
+
3. **On failure** (in this order):
|
|
21
|
+
- Retry: nudge stuck agent or re-send task
|
|
22
|
+
- Replace: spawn fresh agent with partial progress
|
|
23
|
+
- Skip: proceed without (only if non-critical)
|
|
24
|
+
- Redistribute: split stuck agent's remaining work
|
|
25
|
+
- Redesign: re-partition decomposition
|
|
26
|
+
- Escalate: report to parent (sub-orchestrators only, last resort)
|
|
27
|
+
4. **Succession**: Spawn successor after 16 spawns.
|
|
28
|
+
- **Work items**:
|
|
29
|
+
1. Explore current codebase and requirements [done]
|
|
30
|
+
2. Define E2E Test Case Design in SCOPE.md [done]
|
|
31
|
+
3. Implement Test Infra & Mock Server [in-progress]
|
|
32
|
+
4. Implement Tier 1-4 Test Cases [pending]
|
|
33
|
+
5. Verify and publish TEST_INFRA.md and TEST_READY.md [pending]
|
|
34
|
+
- **Current phase**: 2
|
|
35
|
+
- **Current focus**: Implement Test Infra & Mock Server
|
|
36
|
+
|
|
37
|
+
## 🔒 Key Constraints
|
|
38
|
+
- Opaque-box, requirement-driven E2E tests only. No implementation dependencies.
|
|
39
|
+
- Never write, modify, or create source code files directly.
|
|
40
|
+
- Never run build/test commands yourself — require workers to do so.
|
|
41
|
+
- Never reuse a subagent after it has delivered its handoff — always spawn fresh.
|
|
42
|
+
|
|
43
|
+
## Current Parent
|
|
44
|
+
- Conversation ID: 0dd9d0e8-c391-4ea8-819e-6ca3f6689294
|
|
45
|
+
- Updated: not yet
|
|
46
|
+
|
|
47
|
+
## Key Decisions Made
|
|
48
|
+
- None
|
|
49
|
+
|
|
50
|
+
## Team Roster
|
|
51
|
+
| Agent | Type | Work Item | Status | Conv ID |
|
|
52
|
+
|-------|------|-----------|--------|---------|
|
|
53
|
+
| Explorer 1 | teamwork_preview_explorer | Explore codebase & existing tests | completed | e2e54b05-b4ff-411a-9c04-120fb4f5fcfa |
|
|
54
|
+
| Worker 1 | teamwork_preview_worker | Implement Test Infra & E2E tests | pending | ac696ddf-5bf5-41e0-a2b1-38f88d876c8f |
|
|
55
|
+
|
|
56
|
+
## Succession Status
|
|
57
|
+
- Succession required: no
|
|
58
|
+
- Spawn count: 2 / 16
|
|
59
|
+
- Pending subagents: [ac696ddf-5bf5-41e0-a2b1-38f88d876c8f]
|
|
60
|
+
- Predecessor: none
|
|
61
|
+
- Successor: not yet spawned
|
|
62
|
+
|
|
63
|
+
## Active Timers
|
|
64
|
+
- Heartbeat cron: 75bd9c52-a2f3-416f-a979-0d0aaca1aa4f/task-21
|
|
65
|
+
- Safety timer: none
|
|
66
|
+
|
|
67
|
+
## Artifact Index
|
|
68
|
+
- d:\Projects\Ace\.agents\e2e_testing_track\ORIGINAL_REQUEST.md — Verbatim user request
|
|
69
|
+
- d:\Projects\Ace\.agents\e2e_testing_track\BRIEFING.md — Persistent memory
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# Original User Request
|
|
2
|
+
|
|
3
|
+
## Initial Request — 2026-06-30T15:21:41+05:30
|
|
4
|
+
|
|
5
|
+
You are the E2E Testing Orchestrator for the Ace Git Copilot optimization.
|
|
6
|
+
Your working directory is d:\Projects\Ace\.agents\e2e_testing_track\.
|
|
7
|
+
Your task is to implement a comprehensive, opaque-box, requirement-driven E2E test suite according to the instructions in the Dual Track section of the Project pattern.
|
|
8
|
+
Read ORIGINAL_REQUEST.md from d:\Projects\Ace\.agents\ORIGINAL_REQUEST.md.
|
|
9
|
+
Design test cases using Category-Partition, BVA, Pairwise, and Workload Testing across Tiers 1-4.
|
|
10
|
+
Generate and place the test cases and test runner appropriately.
|
|
11
|
+
Create TEST_INFRA.md and publish TEST_READY.md at the project root (d:\Projects\Ace\).
|
|
12
|
+
Verify that the test suite compiles and runs. Report back with a completion handoff.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Scope: E2E Testing Track
|
|
2
|
+
|
|
3
|
+
## Architecture
|
|
4
|
+
- The E2E tests must be opaque-box, meaning they execute the `ace` command as a subprocess (via `python -m ace` or the `ace` CLI command) and do not import or monkey-patch the application code.
|
|
5
|
+
- A local mock LLM server will run inside a pytest fixture or background thread during test execution. It will intercept `/v1/chat/completions` API calls and serve predefined JSON responses matching the test's prompt context.
|
|
6
|
+
- Env vars are injected: `ACE_PROVIDER=custom`, `CUSTOM_API_BASE=http://localhost:<port>/v1`, `CUSTOM_API_KEY=mock-key`, `CUSTOM_MODEL=mock-model`, and `HOME` points to a temporary folder to keep the developer's home directory pristine.
|
|
7
|
+
- All test runs create a temporary Git workspace, initialize a fresh Git repository, stage files, or set commits, run the CLI, and assert output, exit codes, and post-execution git repository state.
|
|
8
|
+
|
|
9
|
+
## Milestones
|
|
10
|
+
| # | Name | Scope | Dependencies | Status |
|
|
11
|
+
|---|------|-------|-------------|--------|
|
|
12
|
+
| 1 | Test Infra & Mock Server | Implement base test runner, mock HTTP server fixture, and CLI subprocess wrapper. | None | IN_PROGRESS |
|
|
13
|
+
| 2 | Tier 1 - Feature Coverage | Happy path tests for 6 core features: NL planning, Commit, Config, Changelog, Doctor/Undo, PR. (30 tests) | 1 | PLANNED |
|
|
14
|
+
| 3 | Tier 2 - Boundary & Edge | Boundary value and error condition testing for the 6 core features. (30 tests) | 2 | PLANNED |
|
|
15
|
+
| 4 | Tier 3 - Cross-Feature | Pairwise combinations of key features (e.g. Config + NL, NL + Commit, Commit + Changelog, etc.). (6 tests) | 3 | PLANNED |
|
|
16
|
+
| 5 | Tier 4 - Workload Scenarios | Complex, multi-step real-world user scenarios (e.g. init repo -> stage -> commit -> changelog -> doctor). (5 tests) | 4 | PLANNED |
|
|
17
|
+
| 6 | Verification & Publication | Run E2E test suite, compile results, verify zero lint errors, write TEST_INFRA.md and publish TEST_READY.md. | 5 | PLANNED |
|
|
18
|
+
|
|
19
|
+
## Interface Contracts
|
|
20
|
+
- Subprocess invocation interface: `run_ace(args: List[str], stdin: Optional[bytes] = None, env: Optional[Dict[str, str]] = None) -> CompletedProcess`
|
|
21
|
+
- Mock LLM server: HTTP POST requests on `/v1/chat/completions` must receive JSON responses modeled after OpenAI API.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
## Current Status
|
|
2
|
+
Last visited: 2026-06-30T15:40:00Z
|
|
3
|
+
- [x] Explore current codebase and requirements
|
|
4
|
+
- [x] Define E2E Test Case Design in SCOPE.md
|
|
5
|
+
- [/] Implement Test Infra & Mock Server (in-progress)
|
|
6
|
+
- [ ] Implement Tier 1-4 Test Cases
|
|
7
|
+
- [ ] Verify test suite compiles and runs
|
|
8
|
+
- [ ] Publish TEST_INFRA.md and TEST_READY.md
|
|
9
|
+
|
|
10
|
+
## Iteration Status
|
|
11
|
+
Current iteration: 1 / 32
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# BRIEFING — 2026-06-30T15:23:08+05:30
|
|
2
|
+
|
|
3
|
+
## Mission
|
|
4
|
+
Perform initial read-only codebase analysis of Ace to find entry points, heavy imports, slow tests, and clean-up areas.
|
|
5
|
+
|
|
6
|
+
## 🔒 My Identity
|
|
7
|
+
- Archetype: teamwork_preview_explorer
|
|
8
|
+
- Roles: explorer, analyst, reporter
|
|
9
|
+
- Working directory: d:\Projects\Ace\.agents\explorer_init\
|
|
10
|
+
- Original parent: ec67676c-109f-462d-a601-8f8b26d70488
|
|
11
|
+
- Milestone: Initial Analysis
|
|
12
|
+
|
|
13
|
+
## 🔒 Key Constraints
|
|
14
|
+
- Read-only investigation — do NOT implement
|
|
15
|
+
- Operating in CODE_ONLY network mode
|
|
16
|
+
- Write analysis report to d:\Projects\Ace\.agents\implementation_track\explorer_initial_report.md
|
|
17
|
+
|
|
18
|
+
## Current Parent
|
|
19
|
+
- Conversation ID: ec67676c-109f-462d-a601-8f8b26d70488
|
|
20
|
+
- Updated: not yet
|
|
21
|
+
|
|
22
|
+
## Investigation State
|
|
23
|
+
- **Explored paths**:
|
|
24
|
+
- `ace/cli.py`
|
|
25
|
+
- `ace/ai/llm_factory.py`
|
|
26
|
+
- `ace/ai/commit_generator.py`
|
|
27
|
+
- `ace/ai/intent_parser.py`
|
|
28
|
+
- `ace/core/git_ops.py`
|
|
29
|
+
- `tests/conftest.py`
|
|
30
|
+
- `tests/test_llm_factory.py`
|
|
31
|
+
- `tests/test_help.py`
|
|
32
|
+
- `tests/test_intent_parser.py`
|
|
33
|
+
- `tests/test_code_reviewer.py`
|
|
34
|
+
- `tests/test_pr_drafter.py`
|
|
35
|
+
- `pyproject.toml`
|
|
36
|
+
- **Key findings**:
|
|
37
|
+
- CLI eager imports cause ~1.1s startup overhead, reducible to 148ms via lazy imports.
|
|
38
|
+
- LangSmith tracing plugin blocks on network timeouts during tests, adding ~33s of overhead.
|
|
39
|
+
- Ollama health checks block on local tag connection timeouts (~3s) in programmatic command tests when run offline.
|
|
40
|
+
- Mocking the langchain provider modules in `sys.modules` during tests prevents slow import overhead.
|
|
41
|
+
- No unused modules or files found.
|
|
42
|
+
- setup banner animation blocks for 1.2s. Extensive emojis can be replaced with professional typography.
|
|
43
|
+
- **Unexplored areas**: None (completed all tasks).
|
|
44
|
+
|
|
45
|
+
## Key Decisions Made
|
|
46
|
+
- Initialized explorer workspace.
|
|
47
|
+
- Completed initial codebase analysis and profiling.
|
|
48
|
+
- Wrote detailed report to `d:\Projects\Ace\.agents\implementation_track\explorer_initial_report.md`.
|
|
49
|
+
|
|
50
|
+
## Artifact Index
|
|
51
|
+
- d:\Projects\Ace\.agents\explorer_init\ORIGINAL_REQUEST.md — Verbatim user request
|
|
52
|
+
- d:\Projects\Ace\.agents\explorer_init\BRIEFING.md — Persistent memory
|
|
53
|
+
- d:\Projects\Ace\.agents\explorer_init\progress.md — Heartbeat and checklist
|
|
54
|
+
- d:\Projects\Ace\.agents\implementation_track\explorer_initial_report.md — Analysis report
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
## 2026-06-30T09:53:00Z
|
|
2
|
+
Perform an initial analysis of the Ace repository:
|
|
3
|
+
1. Locate the entry points and CLI commands (e.g., where `ace` is executed).
|
|
4
|
+
2. Trace the module imports during startup (`ace --help`) and identify heavy dependencies (like LangChain, LLM factory, generators) that can be lazy-loaded.
|
|
5
|
+
3. Locate the test suite and profile it to see which tests are slow and what mocks/fixtures can be optimized.
|
|
6
|
+
4. Check the codebase for unused modules/imports and verbose/cringy emojis or logs/banners to be cleaned up.
|
|
7
|
+
Write your analysis to `d:\Projects\Ace\.agents\implementation_track\explorer_initial_report.md`.
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
ace\cli.py:109 -> ['🧠'] in line: console.print(f"🧠 Understanding request: [italic]\"{query}\"[/italic]...")
|
|
2
|
+
ace\cli.py:163 -> ['⚠'] in line: "⚠️ DESTRUCTIVE OPERATION DETECTED"
|
|
3
|
+
ace\cli.py:425 -> ['🚀'] in line: console.print("[bold orange3]Welcome to Ace AI Git Copilot Setup![/bold orange3] 🚀\n")
|
|
4
|
+
ace\cli.py:657 -> ['🔀'] in line: console.print(f"\n[bold yellow]🔀 Merge conflicts found in {len(conflicts)} file(s):[/bold yellow]")
|
|
5
|
+
ace\cli.py:696 -> ['🧠'] in line: console.print("[bold orange3]🧠 AI Suggestion:[/bold orange3] Keep incoming/HEAD or merged?")
|
|
6
|
+
ace\cli.py:926 -> ['🩺'] in line: title="🩺 Git Diagnostics Status Report",
|
|
7
|
+
ace\cli.py:993 -> ['🩺'] in line: title="[bold white]🩺 AI Diagnostics & Recovery Report[/bold white]",
|
|
8
|
+
ace\cli.py:1132 -> ['⚠'] in line: "⚠️ DESTRUCTIVE UNDO OPERATION DETECTED"
|
|
9
|
+
ace\cli.py:1392 -> ['🚀'] in line: console.print("[bold orange3]Ace AI Git Copilot — Help & User Guide[/bold orange3] 🚀")
|
|
10
|
+
ace\cli.py:1404 -> ['🗣'] in line: console.print(Panel(nl_text, title="🗣️ Natural Language Interface", border_style="orange3", expand=False))
|
|
11
|
+
ace\cli.py:1436 -> ['💡'] in line: "💡 [bold orange3]Tips & Tricks:[/bold orange3]\n"
|
|
12
|
+
ace\cli.py:1528 -> ['🧠'] in line: title="🧠 Proposed Commit Squash Plan",
|
|
13
|
+
ace\ai\llm_factory.py:49 -> ['⚠'] in line: console.print(f"\n[warning]⚠️ Ollama model [bold]{model_name}[/bold] is not downloaded locally.[/warning]")
|
|
14
|
+
ace\ai\llm_factory.py:61 -> ['✅'] in line: console.print(f"[success]✅ Successfully downloaded '{model_name}'![/success]\n")
|
|
15
|
+
ace\ai\llm_factory.py:65 -> ['❌'] in line: console.print(f"[error]❌ Failed to pull model: {e}[/error]")
|
|
16
|
+
ace\ai\prompts\changelog.py:12 -> ['✨'] in line: - **✨ Features** (New features added)
|
|
17
|
+
ace\ai\prompts\changelog.py:13 -> ['🐛'] in line: - **🐛 Bug Fixes** (Bugs or issues resolved)
|
|
18
|
+
ace\ai\prompts\changelog.py:14 -> ['⚡'] in line: - **⚡ Performance Improvements** (Performance tuning changes)
|
|
19
|
+
ace\ai\prompts\changelog.py:15 -> ['📝'] in line: - **📝 Documentation** (Doc additions/updates)
|
|
20
|
+
ace\ai\prompts\changelog.py:16 -> ['🔧'] in line: - **🔧 Maintenance & Internal** (Chores, refactors, dependencies, internal cleanups)
|
|
21
|
+
ace\ai\prompts\doctor.py:10 -> ['🩺'] in line: 1. 🩺 **Diagnostics Assessment**: A brief explanation of the problems found.
|
|
22
|
+
ace\ai\prompts\doctor.py:11 -> ['📋'] in line: 2. 📋 **Recovery Plan**: A step-by-step guide with instructions and standard code blocks (e.g. `git restore` or `git stash`) to resolve the issues.
|
|
23
|
+
ace\ai\prompts\doctor.py:12 -> ['💡'] in line: 3. 💡 **Prevention Tip**: A short advice block on how to prevent this state in the future.
|
|
24
|
+
ace\ai\prompts\review.py:7 -> ['🐛'] in line: 1. 🐛 **Bugs**: Logic errors, edge cases, off-by-one errors, null pointer risks, exception handling flaws.
|
|
25
|
+
ace\ai\prompts\review.py:8 -> ['🔒'] in line: 2. 🔒 **Security**: Hardcoded credentials, SQL injection, unsafe deserialization, sensitive data leakage, insecure cryptographic operations.
|
|
26
|
+
ace\ai\prompts\review.py:9 -> ['⚡'] in line: 3. ⚡ **Performance**: Slow database queries (N+1 queries), redundant operations in loops, memory leaks, missing indexes, thread safety issues.
|
|
27
|
+
ace\ai\prompts\review.py:10 -> ['📝'] in line: 4. 📝 **Style**: Inconsistent formatting, naming convention violations, code duplication, missing documentation.
|
|
28
|
+
ace\ai\prompts\review.py:11 -> ['🧪'] in line: 5. 🧪 **Tests**: Missing test coverage or poor assertions.
|
|
29
|
+
ace\ai\prompts\review.py:12 -> ['💡'] in line: 6. 💡 **Suggestions**: Refactoring recommendations, simpler algorithms, using modern library features.
|
|
30
|
+
ace\core\hooks.py:17 -> ['🧠'] in line: echo "🧠 Running Ace pre-commit code review..."
|
|
31
|
+
ace\core\hooks.py:20 -> ['❌'] in line: echo "❌ Ace Code Review detected critical issues. Commit aborted."
|
|
32
|
+
ace\core\hooks.py:39 -> ['🧠'] in line: echo "🧠 Ace is drafting commit message..."
|
|
33
|
+
ace\ui\dashboard.py:29 -> ['🚀'] in line: console.print("[bold orange3]🚀 Ace AI Git Copilot Interactive Dashboard[/bold orange3]\n")
|
|
34
|
+
ace\ui\dashboard.py:95 -> ['📂'] in line: sibling_table.add_row(f" 📂 {r_name} ", f" ({sib_branch})")
|
|
35
|
+
ace\ui\dashboard.py:250 -> ['🧠'] in line: console.print(f"🧠 Understanding request: [italic]\"{query}\"[/italic]...")
|
|
36
|
+
ace\ui\dashboard.py:276 -> ['⚠'] in line: show_warning_panel("\n\n".join(risk_details), "⚠️ DESTRUCTIVE OPERATION DETECTED")
|
|
37
|
+
ace\ui\display.py:17 -> ['⚡'] in line: console.print(f" [info]⚡ {message}[/info]")
|
|
38
|
+
ace\ui\display.py:21 -> ['✔'] in line: console.print(f" [success]✔ {message}[/success]")
|
|
39
|
+
ace\ui\display.py:25 -> ['⚠'] in line: console.print(f" [warning]⚠️ {message}[/warning]")
|
|
40
|
+
ace\ui\display.py:29 -> ['✖'] in line: console.print(f" [error]✖ {message}[/error]", file=sys.stderr)
|
|
41
|
+
ace\ui\display.py:35 -> ['⚠'] in line: title=f"⚠️ {title}",
|
|
42
|
+
ace\ui\display.py:45 -> ['❌'] in line: title=f"❌ {title}",
|
|
43
|
+
ace\ui\display.py:64 -> ['🧠'] in line: title="[bold white]🧠 Proposed Execution Plan[/bold white]",
|
|
44
|
+
ace\ui\display.py:123 -> ['📝'] in line: title="[bold white]📝 Suggested Commit Message[/bold white]",
|
|
45
|
+
ace\ui\display.py:146 -> ['🔍'] in line: console.print(f"\n[bold]🔍 AI Code Review Score: [ai]{score}/10[/ai][/bold]\n")
|
|
46
|
+
ace\ui\display.py:149 -> ['✅'] in line: console.print("[success]✅ No issues found! Excellent work.[/success]")
|
|
47
|
+
ace\ui\display.py:154 -> ['🚨'] in line: "critical": "🚨",
|
|
48
|
+
ace\ui\display.py:155 -> ['⚠'] in line: "warning": "⚠️",
|
|
49
|
+
ace\ui\display.py:156 -> ['💡'] in line: "info": "💡"
|
|
50
|
+
ace\ui\display.py:166 -> ['💡'] in line: emoji = sev_emoji.get(sev, "💡")
|
|
51
|
+
ace\ui\prompts.py:13 -> ['❔'] in line: prompt = f" ❔ [bold white]{question}[/bold white] [bold #00D5FF]{suffix}[/bold #00D5FF] "
|
|
52
|
+
ace\ui\prompts.py:89 -> ['✖'] in line: console.print(" [error]✖ Invalid choice. Try again or enter 's' to skip.[/error]")
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import os
|
|
2
|
+
import re
|
|
3
|
+
|
|
4
|
+
# Find all python files in ace/
|
|
5
|
+
ace_files = []
|
|
6
|
+
for root, dirs, files in os.walk("d:\\Projects\\Ace\\ace"):
|
|
7
|
+
if "__pycache__" in root:
|
|
8
|
+
continue
|
|
9
|
+
for file in files:
|
|
10
|
+
if file.endswith(".py"):
|
|
11
|
+
rel_path = os.path.relpath(os.path.join(root, file), "d:\\Projects\\Ace")
|
|
12
|
+
# Convert to module name
|
|
13
|
+
mod_name = rel_path.replace(os.sep, ".").replace(".__init__.py", "").replace(".py", "")
|
|
14
|
+
ace_files.append((rel_path, mod_name))
|
|
15
|
+
|
|
16
|
+
# Scan all python files in ace/ and tests/ for imports
|
|
17
|
+
import_patterns = [
|
|
18
|
+
re.compile(r"import\s+([\w\.]+)"),
|
|
19
|
+
re.compile(r"from\s+([\w\.]+)\s+import")
|
|
20
|
+
]
|
|
21
|
+
|
|
22
|
+
imported_modules = set()
|
|
23
|
+
for folder in ["d:\\Projects\\Ace\\ace", "d:\\Projects\\Ace\\tests"]:
|
|
24
|
+
for root, dirs, files in os.walk(folder):
|
|
25
|
+
if "__pycache__" in root:
|
|
26
|
+
continue
|
|
27
|
+
for file in files:
|
|
28
|
+
if file.endswith(".py"):
|
|
29
|
+
with open(os.path.join(root, file), "r", encoding="utf-8") as f:
|
|
30
|
+
for line in f:
|
|
31
|
+
for pattern in import_patterns:
|
|
32
|
+
for match in pattern.finditer(line):
|
|
33
|
+
imported_modules.add(match.group(1))
|
|
34
|
+
|
|
35
|
+
print("Unused modules (files that are never imported anywhere in ace or tests):")
|
|
36
|
+
found_any = False
|
|
37
|
+
for rel_path, mod_name in ace_files:
|
|
38
|
+
if mod_name == "ace" or mod_name == "ace.__main__" or mod_name == "ace.cli":
|
|
39
|
+
continue
|
|
40
|
+
# Check if mod_name or any parent is in imported_modules
|
|
41
|
+
is_imported = False
|
|
42
|
+
for imp in imported_modules:
|
|
43
|
+
if imp == mod_name or imp.startswith(mod_name + "."):
|
|
44
|
+
is_imported = True
|
|
45
|
+
break
|
|
46
|
+
if not is_imported:
|
|
47
|
+
print(f" {rel_path} ({mod_name})")
|
|
48
|
+
found_any = True
|
|
49
|
+
|
|
50
|
+
if not found_any:
|
|
51
|
+
print(" None")
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
# Handoff Report — Initial Explorer Analysis
|
|
2
|
+
|
|
3
|
+
## 1. Observation
|
|
4
|
+
- **Entry point and commands**:
|
|
5
|
+
- `pyproject.toml` lines 29-30:
|
|
6
|
+
```toml
|
|
7
|
+
[project.scripts]
|
|
8
|
+
ace = "ace.cli:app"
|
|
9
|
+
```
|
|
10
|
+
- `ace/cli.py` lists 19 subcommands including `commit`, `setup`, `config`, `review`, `resolve`, `changelog`, `stats`, `doctor`, `explain`, `undo`, `dash`, `pr`, `search`, `ignore`, `help`, `add`/`stage`, `squash`, and `hook`.
|
|
11
|
+
- **Eager imports on startup**:
|
|
12
|
+
- `ace/cli.py` lines 17-22:
|
|
13
|
+
```python
|
|
14
|
+
from ace.core.config import get_config, save_config, DEFAULT_CONFIG_PATH
|
|
15
|
+
from ace.core.git_ops import GitOps, NotAGitRepositoryError
|
|
16
|
+
from ace.ai.commit_generator import CommitGenerator, NoStagedChangesError
|
|
17
|
+
from ace.ai.llm_factory import get_llm, LLMConfigurationError
|
|
18
|
+
from ace.ai.intent_parser import IntentParser
|
|
19
|
+
from ace.core.safety import SafetyChecker
|
|
20
|
+
```
|
|
21
|
+
- Running `.venv\Scripts\python.exe -X importtime -m ace.cli --help` returned:
|
|
22
|
+
- `ace.cli` cumulative import time: `1119.61 ms`.
|
|
23
|
+
- `ace.ai.commit_generator` cumulative import time: `773.05 ms`.
|
|
24
|
+
- `ace.ai.llm_factory` cumulative import time: `380.38 ms`.
|
|
25
|
+
- `ace.core.git_ops` cumulative import time: `168.13 ms`.
|
|
26
|
+
- `typer` cumulative import time: `102.07 ms`.
|
|
27
|
+
- Simulating lazy-loaded imports by mocking the above submodules in `sys.modules` resulted in a startup time of `148.26 ms`.
|
|
28
|
+
- **Test suite bottlenecks**:
|
|
29
|
+
- Pytest output shows 52 tests passing in `50.96s`.
|
|
30
|
+
- Slowest tests:
|
|
31
|
+
```
|
|
32
|
+
18.61s call tests/test_llm_factory.py::test_get_llm_anthropic
|
|
33
|
+
13.79s call tests/test_llm_factory.py::test_get_llm_openai
|
|
34
|
+
5.49s call tests/test_help.py::test_commit_cmd_programmatic_invocation
|
|
35
|
+
2.54s call tests/test_llm_factory.py::test_get_llm_nvidia
|
|
36
|
+
```
|
|
37
|
+
- Disabling the `langsmith` plugin via pytest option `-p no:langsmith` dropped the total test execution time to `17.77 seconds` (a `33.19s` saving).
|
|
38
|
+
- `test_commit_cmd_programmatic_invocation` in `test_help.py` calls `commit_cmd(offline=True)`, which in turn executes `get_llm(offline_override=True)`. Under Ollama mode, `ensure_ollama_model()` (in `ace/ai/llm_factory.py` line 26) attempts a real network connection to `http://localhost:11434/api/tags` via `urllib.request.urlopen` with a 3-second timeout, blocking the tests.
|
|
39
|
+
- **Code cleanup**:
|
|
40
|
+
- `ruff check ace` and `ruff check tests` passed with zero errors/warnings.
|
|
41
|
+
- Setup command `setup_cmd` in `ace/cli.py` line 421 executes `animate_fire_banner(duration_seconds=1.2)` which blocks CLI wizard setup for 1.2s.
|
|
42
|
+
- Emojis are used across 52 lines in the codebase.
|
|
43
|
+
|
|
44
|
+
## 2. Logic Chain
|
|
45
|
+
- **Eager startup import bottleneck**: Eagerly importing `CommitGenerator`, `get_llm`, `IntentParser`, `GitOps`, and `SafetyChecker` at the top of `cli.py` forces Python to transitively load `langchain_core`, `langsmith`, and `gitpython` immediately on startup, leading to a `~1.1s` execution latency. Removing these from the top-level and importing them locally within the commands avoids this overhead.
|
|
46
|
+
- **Test suite bottlenecks**:
|
|
47
|
+
- The `langsmith` pytest plugin is active by default and attempts to trace and log LangChain calls to the cloud. Offline mode (CODE_ONLY) causes these HTTP calls to block and timeout, taking ~33s. Disabling the plugin bypasses the logging.
|
|
48
|
+
- Unmocked network tags calls in `ensure_ollama_model` fail slowly via timeout when running tests offline. Globally mocking `urllib.request.urlopen` in `conftest.py` causes them to fail instantly (0ms), avoiding the timeout block.
|
|
49
|
+
- Patching langchain provider classes forces Python to import `langchain_anthropic`, etc., adding ~1.5s per provider. Mocking these modules in `sys.modules` inside `conftest.py` completely bypasses the real import, speeding up test setup.
|
|
50
|
+
|
|
51
|
+
## 3. Caveats
|
|
52
|
+
- The simulated lazy startup time of `148.26 ms` was measured inside a clean python interpreter using mocks; actual execution times may vary slightly depending on OS caching and environment conditions but will remain well under the 250ms target.
|
|
53
|
+
- Global network mocking in `conftest.py` assumes no unit tests require a real network connection (which is standard practice and mandatory for offline mode anyway).
|
|
54
|
+
|
|
55
|
+
## 4. Conclusion
|
|
56
|
+
- **Startup**: Eager imports must be converted to local lazy imports in `cli.py` to meet the `<250ms` startup target.
|
|
57
|
+
- **Tests**: Pytest must be configured to disable the `langsmith` plugin (via `pyproject.toml` addopts). `tests/conftest.py` must be updated to globally mock `urllib.request.urlopen` and pre-mock heavy provider modules in `sys.modules` to meet the `<15s` execution target.
|
|
58
|
+
- **UI/Cleanup**: Banners should be static, and emojis replaced with clean styled typography. No dead/unused code modules need deletion.
|
|
59
|
+
|
|
60
|
+
## 5. Verification Method
|
|
61
|
+
- **Startup**: Run `.venv\Scripts\python.exe -m ace.cli --help` or `.venv\Scripts\python.exe .agents/explorer_init/measure_lazy_startup.py` to verify import speed.
|
|
62
|
+
- **Test Suite**: Run `.venv\Scripts\pytest -p no:langsmith` to verify the tests execute under 15 seconds.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import sys
|
|
2
|
+
from unittest.mock import MagicMock
|
|
3
|
+
import time
|
|
4
|
+
|
|
5
|
+
# Mock the submodules in sys.modules to simulate lazy loading
|
|
6
|
+
sys.modules["ace.core.git_ops"] = MagicMock()
|
|
7
|
+
sys.modules["ace.ai.commit_generator"] = MagicMock()
|
|
8
|
+
sys.modules["ace.ai.llm_factory"] = MagicMock()
|
|
9
|
+
sys.modules["ace.ai.intent_parser"] = MagicMock()
|
|
10
|
+
sys.modules["ace.core.safety"] = MagicMock()
|
|
11
|
+
sys.modules["ace.ui.prompts"] = MagicMock()
|
|
12
|
+
|
|
13
|
+
t0 = time.perf_counter()
|
|
14
|
+
import ace.cli
|
|
15
|
+
t1 = time.perf_counter()
|
|
16
|
+
|
|
17
|
+
print(f"Startup import time with lazy-loaded modules: {(t1 - t0)*1000:.2f} ms")
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import time
|
|
2
|
+
import sys
|
|
3
|
+
|
|
4
|
+
def profile_import(module_name):
|
|
5
|
+
t0 = time.perf_counter()
|
|
6
|
+
__import__(module_name)
|
|
7
|
+
t1 = time.perf_counter()
|
|
8
|
+
return (t1 - t0) * 1000 # in ms
|
|
9
|
+
|
|
10
|
+
modules_to_test = [
|
|
11
|
+
"typer",
|
|
12
|
+
"click",
|
|
13
|
+
"rich",
|
|
14
|
+
"git",
|
|
15
|
+
"langchain",
|
|
16
|
+
"langchain_nvidia_ai_endpoints",
|
|
17
|
+
"langchain_ollama",
|
|
18
|
+
"langchain_openai",
|
|
19
|
+
"langchain_anthropic",
|
|
20
|
+
"dotenv",
|
|
21
|
+
"toml"
|
|
22
|
+
]
|
|
23
|
+
|
|
24
|
+
print("Import times for top-level packages:")
|
|
25
|
+
for mod in modules_to_test:
|
|
26
|
+
try:
|
|
27
|
+
duration = profile_import(mod)
|
|
28
|
+
print(f" {mod}: {duration:.2f} ms")
|
|
29
|
+
except Exception as e:
|
|
30
|
+
print(f" {mod}: Failed ({e})")
|
|
31
|
+
|
|
32
|
+
# Let's test ace submodules
|
|
33
|
+
ace_submodules = [
|
|
34
|
+
"ace.core.config",
|
|
35
|
+
"ace.core.git_ops",
|
|
36
|
+
"ace.ai.commit_generator",
|
|
37
|
+
"ace.ai.llm_factory",
|
|
38
|
+
"ace.ai.intent_parser",
|
|
39
|
+
"ace.core.safety",
|
|
40
|
+
"ace.ui.display",
|
|
41
|
+
"ace.ui.prompts"
|
|
42
|
+
]
|
|
43
|
+
|
|
44
|
+
print("\nImport times for ace submodules:")
|
|
45
|
+
# To measure individual import times of ace submodules (including their dependencies if not loaded)
|
|
46
|
+
# We will do it in a fresh interpreter or just clear sys.modules.
|
|
47
|
+
# But clearing sys.modules is tricky because of transitive imports. Let's run it anyway.
|
|
48
|
+
for mod in ace_submodules:
|
|
49
|
+
t0 = time.perf_counter()
|
|
50
|
+
try:
|
|
51
|
+
__import__(mod)
|
|
52
|
+
duration = (time.perf_counter() - t0) * 1000
|
|
53
|
+
print(f" {mod}: {duration:.2f} ms")
|
|
54
|
+
except Exception as e:
|
|
55
|
+
print(f" {mod}: Failed ({e})")
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# progress — Ace Git Copilot Optimization Initial Explorer Analysis
|
|
2
|
+
|
|
3
|
+
## Current Status
|
|
4
|
+
Last visited: 2026-06-30T15:23:08+05:30
|
|
5
|
+
|
|
6
|
+
## Checklist
|
|
7
|
+
- [x] Locate entry points and CLI commands
|
|
8
|
+
- [x] Trace startup imports and heavy dependencies
|
|
9
|
+
- [x] Locate test suite and profile it
|
|
10
|
+
- [x] Identify unused imports/modules, verbose logs/emojis
|
|
11
|
+
- [x] Write analysis report `explorer_initial_report.md`
|
|
12
|
+
- [ ] Send handoff report and message back to main agent
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import subprocess
|
|
2
|
+
import sys
|
|
3
|
+
import re
|
|
4
|
+
|
|
5
|
+
def run_and_parse():
|
|
6
|
+
# Run the importtime check
|
|
7
|
+
cmd = [sys.executable, "-X", "importtime", "-c", "import ace.cli"]
|
|
8
|
+
res = subprocess.run(cmd, capture_output=True, text=True, encoding="utf-8")
|
|
9
|
+
|
|
10
|
+
# importtime output goes to stderr
|
|
11
|
+
output = res.stderr
|
|
12
|
+
|
|
13
|
+
lines = output.splitlines()
|
|
14
|
+
parsed_lines = []
|
|
15
|
+
|
|
16
|
+
# Example line:
|
|
17
|
+
# import time: self [us] | cumulative [us] | imported_name
|
|
18
|
+
# import time: 253 | 253 | _frozen_importlib_external
|
|
19
|
+
pattern = re.compile(r"import time:\s+(\d+)\s+\|\s+(\d+)\s+\|\s+(.+)")
|
|
20
|
+
|
|
21
|
+
for line in lines:
|
|
22
|
+
match = pattern.match(line)
|
|
23
|
+
if match:
|
|
24
|
+
self_time = int(match.group(1)) / 1000.0 # ms
|
|
25
|
+
cum_time = int(match.group(2)) / 1000.0 # ms
|
|
26
|
+
name = match.group(3)
|
|
27
|
+
parsed_lines.append((self_time, cum_time, name))
|
|
28
|
+
|
|
29
|
+
# Sort by self time
|
|
30
|
+
sorted_by_self = sorted(parsed_lines, key=lambda x: x[0], reverse=True)
|
|
31
|
+
print("Top 20 slowest imports by self time (ms):")
|
|
32
|
+
for self_time, cum_time, name in sorted_by_self[:20]:
|
|
33
|
+
print(f" {name:<40} : self={self_time:7.2f} ms, cumulative={cum_time:7.2f} ms")
|
|
34
|
+
|
|
35
|
+
print("\nTop 20 slowest imports by cumulative time (ms):")
|
|
36
|
+
sorted_by_cum = sorted(parsed_lines, key=lambda x: x[1], reverse=True)
|
|
37
|
+
for self_time, cum_time, name in sorted_by_cum[:20]:
|
|
38
|
+
print(f" {name:<40} : self={self_time:7.2f} ms, cumulative={cum_time:7.2f} ms")
|
|
39
|
+
|
|
40
|
+
if __name__ == "__main__":
|
|
41
|
+
run_and_parse()
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import os
|
|
2
|
+
import re
|
|
3
|
+
|
|
4
|
+
# Find all python files in ace/
|
|
5
|
+
py_files = []
|
|
6
|
+
for root, dirs, files in os.walk("d:\\Projects\\Ace\\ace"):
|
|
7
|
+
if "__pycache__" in root:
|
|
8
|
+
continue
|
|
9
|
+
for file in files:
|
|
10
|
+
if file.endswith(".py"):
|
|
11
|
+
py_files.append(os.path.join(root, file))
|
|
12
|
+
|
|
13
|
+
# Regex to match emojis (unicode ranges for emojis)
|
|
14
|
+
emoji_pattern = re.compile(r"[\U00010000-\U0010ffff\u2600-\u27bf\u2b50]")
|
|
15
|
+
|
|
16
|
+
out_lines = []
|
|
17
|
+
for path in py_files:
|
|
18
|
+
rel_path = os.path.relpath(path, "d:\\Projects\\Ace")
|
|
19
|
+
with open(path, "r", encoding="utf-8") as f:
|
|
20
|
+
for i, line in enumerate(f):
|
|
21
|
+
matches = emoji_pattern.findall(line)
|
|
22
|
+
if matches:
|
|
23
|
+
clean_line = line.strip()
|
|
24
|
+
out_lines.append(f" {rel_path}:{i+1} -> {list(set(matches))} in line: {clean_line}")
|
|
25
|
+
|
|
26
|
+
with open("d:\\Projects\\Ace\\.agents\\explorer_init\\emojis_list.txt", "w", encoding="utf-8") as out:
|
|
27
|
+
out.write("\n".join(out_lines))
|
|
28
|
+
print(f"Wrote {len(out_lines)} lines containing emojis to emojis_list.txt")
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
with open("d:\\Projects\\Ace\\ace\\cli.py", "r", encoding="utf-8") as f:
|
|
2
|
+
lines = f.readlines()
|
|
3
|
+
|
|
4
|
+
for i, line in enumerate(lines):
|
|
5
|
+
line_num = i + 1
|
|
6
|
+
# look for classes/functions being called/referenced
|
|
7
|
+
for name in ["CommitGenerator", "IntentParser", "get_llm", "GitOps", "SafetyChecker"]:
|
|
8
|
+
if name in line and "import" not in line:
|
|
9
|
+
print(f"Line {line_num:4d}: {line.strip()}")
|