4f950a1600
CI / lint (push) Successful in 24s
CI / build (push) Successful in 16s
CI / typecheck (push) Successful in 38s
CI / quality (push) Successful in 43s
CI / security (push) Successful in 53s
CI / benchmark-regression (push) Has been skipped
CI / integration_tests (push) Successful in 2m39s
CI / unit_tests (push) Successful in 3m58s
CI / docker (push) Successful in 1m8s
CI / e2e_tests (push) Successful in 5m21s
CI / coverage (push) Successful in 6m31s
CI / benchmark-publish (push) Successful in 19m39s
## Summary Add `agents repo index` and `agents repo status` CLI commands, wiring the existing `RepoIndexingService` backend to the CLI layer. ### Commands - **`agents repo index <resource_name>`** — Triggers full or incremental indexing of a repository resource. Options: `--full` (force full re-index), `--format text|json` - **`agents repo status <resource_name>`** — Displays indexing metadata: status, file count, token estimate, primary language, last indexed timestamp. Options: `--format text|json` ### Implementation - New CLI module `src/cleveragents/cli/commands/repo.py` (238 lines) - Registered as `repo` subcommand group in `cli/main.py` - Resolves resource by name via `ResourceRegistryService` - Calls `RepoIndexingService.index_resource()` / `refresh_index()` / `get_index_status()` - Both text (Rich panel) and JSON output formats ### Quality Gates | Session | Result | |---|---| | `nox -s lint` | PASS | | `nox -s typecheck` | PASS (0 errors) | | `nox -s unit_tests` | PASS (10,819 scenarios) | | `nox -s coverage_report` | 98% (>= 97%) | | Integration tests | 5/5 PASS | Closes #856 Reviewed-on: #982 Co-authored-by: Brent Edwards <brent.edwards@cleverthis.com> Co-committed-by: Brent Edwards <brent.edwards@cleverthis.com>
47 lines
2.1 KiB
Plaintext
47 lines
2.1 KiB
Plaintext
*** Settings ***
|
|
Documentation Repository Indexing CLI Integration Tests
|
|
Library Process
|
|
Library OperatingSystem
|
|
|
|
*** Variables ***
|
|
${PYTHON} python
|
|
${HELPER} ${CURDIR}/helper_repo_indexing_cli.py
|
|
|
|
*** Test Cases ***
|
|
E2E Add Resource Index And Check Status
|
|
[Documentation] End-to-end: add resource, index it, check status
|
|
${result}= Run Process ${PYTHON} ${HELPER} e2e
|
|
... on_timeout=kill timeout=60s
|
|
Should Be Equal As Integers ${result.rc} 0 E2E test failed: ${result.stderr}
|
|
Should Contain ${result.stdout} E2E add-index-status PASSED
|
|
|
|
Incremental Reindex After File Change
|
|
[Documentation] Incremental re-index detects new files
|
|
${result}= Run Process ${PYTHON} ${HELPER} incremental
|
|
... on_timeout=kill timeout=60s
|
|
Should Be Equal As Integers ${result.rc} 0 Incremental test failed: ${result.stderr}
|
|
Should Contain ${result.stdout} Incremental reindex PASSED
|
|
|
|
Full Reindex Replaces Entire Index
|
|
[Documentation] Full re-index replaces the entire index
|
|
${result}= Run Process ${PYTHON} ${HELPER} full
|
|
... on_timeout=kill timeout=60s
|
|
Should Be Equal As Integers ${result.rc} 0 Full reindex test failed: ${result.stderr}
|
|
Should Contain ${result.stdout} Full reindex PASSED
|
|
|
|
Status Returns None When No Index Exists
|
|
[Documentation] Status check with no index returns None
|
|
${result}= Run Process ${PYTHON} ${HELPER} no-index
|
|
... on_timeout=kill timeout=60s
|
|
Should Be Equal As Integers ${result.rc} 0 Status no-index test failed: ${result.stderr}
|
|
Should Contain ${result.stdout} Status no-index PASSED
|
|
|
|
Remove Index Cleans Up All Data
|
|
[Documentation] Removing an index cleans up all data
|
|
${result}= Run Process ${PYTHON} ${HELPER} remove
|
|
... on_timeout=kill timeout=60s
|
|
Should Be Equal As Integers ${result.rc} 0 Remove index test failed: ${result.stderr}
|
|
Should Contain ${result.stdout} Remove index PASSED
|
|
|
|
*** Keywords ***
|