UAT: agents actor context import uses positional NAME CONTEXT_FILE instead of spec-required [--update] (--input|-i) <FILE> [<NAME>] signature; missing --update and --format flags #6542

Open
opened 2026-04-09 21:16:41 +00:00 by HAL9000 · 0 comments
Owner

Summary

The spec defines agents actor context import [--update] (--input|-i) <FILE> [<NAME>] where --input/-i is a required option and <NAME> is optional. The current implementation (from context.py) uses two positional arguments NAME CONTEXT_FILE with no --input/-i option and no --update flag. Additionally, the command has no --format option.

Spec Reference

docs/specification.md line 287:

agents actor context import [--update] (--input|-i) <FILE> [<NAME>]

docs/specification.md lines 6161–6172:

agents actor context import [--update] (--input|-i) <FILE> [<NAME>]

Arguments:
- [NAME]: Context name (optional, inferred from file if omitted).
- --input/-i FILE: Input JSON file (required).
- --update: Replace an existing context with the same name.

Example: agents actor context import --input /tmp/docs-context.json docs

Code Location

src/cleveragents/cli/commands/context.py, lines 606–641 (context_import):

@app.command("import")
def context_import(
    name: Annotated[str, typer.Argument(help="Name for the imported context")],
    context_file: Annotated[
        Path,
        typer.Argument(help="Path to JSON file to import", ...),
    ],
    context_dir: Annotated[Path | None, typer.Option("--context-dir", ...)] = None,
) -> None:
    # No --input/-i option, no --update flag, no --format option
    # NAME is required (not optional), CONTEXT_FILE is positional (not --input)

Steps to Reproduce

agents actor context import --help
# Shows: NAME CONTEXT_FILE (two required positional args)
# Missing: --input/-i option, --update flag, --format option

# Spec-compliant invocation
agents actor context import --input /tmp/ctx.json docs
# Error: Got unexpected extra argument (--input)

# Required invocation (implementation)
agents actor context import docs /tmp/ctx.json

Expected vs Actual

Expected Actual
Signature import [--update] (--input|-i) \<FILE\> [\<NAME\>] import NAME CONTEXT_FILE
--input/-i Required option Missing
--update Optional flag to replace existing Missing
<NAME> Optional (inferred from file) Required positional
--format Supported Missing
Output JSON envelope with context_import/merge sections Simple typer.echo message

Impact

Users following the spec signature receive errors. The --update flag is missing so users cannot replace existing contexts. The output is a plain text message instead of structured JSON/YAML.


Automated by CleverAgents Bot
Supervisor: UAT Testing | Agent: uat-tester

## Summary The spec defines `agents actor context import [--update] (--input|-i) <FILE> [<NAME>]` where `--input/-i` is a required option and `<NAME>` is optional. The current implementation (from `context.py`) uses two positional arguments `NAME CONTEXT_FILE` with no `--input/-i` option and no `--update` flag. Additionally, the command has no `--format` option. ## Spec Reference `docs/specification.md` line 287: ``` agents actor context import [--update] (--input|-i) <FILE> [<NAME>] ``` `docs/specification.md` lines 6161–6172: ``` agents actor context import [--update] (--input|-i) <FILE> [<NAME>] Arguments: - [NAME]: Context name (optional, inferred from file if omitted). - --input/-i FILE: Input JSON file (required). - --update: Replace an existing context with the same name. ``` Example: `agents actor context import --input /tmp/docs-context.json docs` ## Code Location `src/cleveragents/cli/commands/context.py`, lines 606–641 (`context_import`): ```python @app.command("import") def context_import( name: Annotated[str, typer.Argument(help="Name for the imported context")], context_file: Annotated[ Path, typer.Argument(help="Path to JSON file to import", ...), ], context_dir: Annotated[Path | None, typer.Option("--context-dir", ...)] = None, ) -> None: # No --input/-i option, no --update flag, no --format option # NAME is required (not optional), CONTEXT_FILE is positional (not --input) ``` ## Steps to Reproduce ```bash agents actor context import --help # Shows: NAME CONTEXT_FILE (two required positional args) # Missing: --input/-i option, --update flag, --format option # Spec-compliant invocation agents actor context import --input /tmp/ctx.json docs # Error: Got unexpected extra argument (--input) # Required invocation (implementation) agents actor context import docs /tmp/ctx.json ``` ## Expected vs Actual | | Expected | Actual | |---|---|---| | Signature | `import [--update] (--input\|-i) \<FILE\> [\<NAME\>]` | `import NAME CONTEXT_FILE` | | `--input/-i` | Required option | Missing | | `--update` | Optional flag to replace existing | Missing | | `<NAME>` | Optional (inferred from file) | Required positional | | `--format` | Supported | Missing | | Output | JSON envelope with `context_import`/`merge` sections | Simple `typer.echo` message | ## Impact Users following the spec signature receive errors. The `--update` flag is missing so users cannot replace existing contexts. The output is a plain text message instead of structured JSON/YAML. --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: uat-tester
HAL9000 added this to the v3.2.0 milestone 2026-04-09 21:28:38 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
cleveragents/cleveragents-core#6542
No description provided.