Skip to content

refactor(cli): rename ingest command to import (#1815) - #1875

Merged
Sinity merged 2 commits into
masterfrom
feature/refactor/ingest-to-import
Jun 14, 2026
Merged

Sinity merged 2 commits into
masterfrom
feature/refactor/ingest-to-import

Conversation

@Sinity

@Sinity Sinity commented Jun 14, 2026

Copy link
Copy Markdown
Owner

Summary

Renames the public CLI command polylogue ingest → polylogue import. No backwards-compat alias. This is the first slice of #1815.

Problem

The command was named ingest — a pipeline/daemon internal verb — while its user-facing role is to schedule a file for import. The mismatch violated the vocabulary policy (#1815) and caused confusion for new users expecting polylogue import.

Solution

  • Deleted polylogue/cli/commands/ingest.py; new module is polylogue/cli/commands/import_command.py (module can't be named import.py — Python keyword)
  • Click command name string changed from "ingest" to "import" in the @click.command decorator
  • click_command_registration.py: module key changed to "import_command", display name to "import"
  • commands.py: command group listing updated
  • output_assurance.py: INGEST_FAMILY constant value updated to "import"
  • Help text updated: "Schedule a file or directory for import by the running daemon" vs. previous "ingestion" wording
  • Tests: test_ingest.py replaced by test_import.py; all invocations updated to "import"
  • Docs (getting-started.md, configuration.md, maintenance.md, cli-audit.md): polylogue ingest command invocations → polylogue import
  • Snapshots updated: syrupy help/terminal snapshots and showcase baselines (help-ingest.txt → help-import.txt, help-main.txt)
  • Generated surfaces regenerated: cli-reference.md, AGENTS.md, topology-target.yaml, test-quality-workflows.md

Internal vocabulary preserved: pipeline/ingest_support.py, pipeline/services/ingest_batch.py, live_ingest_attempt, daemon /api/ingest endpoint, live-ingest log terminology — all unchanged. Those are not public command vocabulary.

Deferred to later #1815 slices

  • provider_meta field elimination
  • provider/conversation → origin/session terminology sweep
  • Parser regression pack
  • Demo mode additions

Verification

# Command renamed correctly
nix develop --command polylogue import --help
# → "Usage: polylogue import [OPTIONS] PATH"

# Old name is gone (falls through to query mode, not an error)
nix develop --command polylogue ingest --help
# → shows root usage (no ingest subcommand)

# mypy clean
nix develop --command mypy polylogue/cli/commands/import_command.py polylogue/cli/click_command_registration.py
# → Success: no issues found in 2 source files

# Topology clean
nix develop --command devtools verify-topology
# → realized=827 declared=827 blocking=False

# Generated surfaces all in sync
nix develop --command devtools render-all --check
# → all 8 checks: sync OK

# All showcase baselines match
POLYLOGUE_FORCE_PLAIN=1 nix develop --command devtools lab-scenario verify-baselines
# → Ran 81 exercises / All baselines match.

# CLI tests pass
nix develop --command devtools test -k "import or ingest" tests/unit/cli/
# → 23 passed, 1732 deselected

# Full pre-push gate (run on git push)
# → 15/15 checks green: ruff format, ruff check, mypy, render-all,
#   verify-topology, verify-layering, verify-closure-matrix,
#   verify-schema-roundtrip, verify-manifests, verify-ci-workflows,
#   verify-doc-commands, verify-lane-assertions, verify-test-infra-currency,
#   verify-test-clock-hygiene, public-surface-audit

Ref #1815

Sinity and others added 2 commits June 14, 2026 04:36
Renames the public CLI command `polylogue ingest` → `polylogue import`.
No backwards-compat alias. The old module polylogue/cli/commands/ingest.py
is deleted and replaced by import_command.py (using a non-keyword module
name since `import.py` is illegal in Python).

Internal vocabulary is preserved: pipeline modules, daemon endpoints
(/api/ingest), live_ingest_attempt tables, and cursor/stage names remain
unchanged — those are not public command vocabulary.

Changes:
- polylogue/cli/commands/import_command.py (new, replaces ingest.py)
- polylogue/cli/click_command_registration.py: module key + command name
- polylogue/cli/commands/commands.py: command group listing
- polylogue/cli/output_assurance.py: INGEST_FAMILY string stays "import"
- tests/unit/cli/test_import.py (new, replaces test_ingest.py)
- test_output_contracts.py, test_sentinel_env_leak.py: invoke "import"
- syrupy snapshots (help_snapshots, terminal_snapshots): ingest → import
- docs/maintenance.md: polylogue ingest → polylogue import in examples
- docs/cli-audit.md: command table entries updated
- docs/getting-started.md, docs/configuration.md: already updated

Ref #1815

Co-Authored-By: Claude <[email protected]>
Regenerated files following the command rename:
- AGENTS.md (re-rendered from CLAUDE.md)
- docs/cli-reference.md (re-rendered from live CLI help)
- docs/plans/topology-target.yaml (re-projected after module rename)
- docs/test-quality-workflows.md (exercise catalog re-rendered)
- tests/baselines/showcase/help-ingest.txt → help-import.txt
- tests/baselines/showcase/help-main.txt (command list updated)

Co-Authored-By: Claude <[email protected]>
@coderabbitai

coderabbitai Bot commented Jun 14, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@Sinity, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 53 minutes and 28 seconds. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 7c4a35c6-d576-4047-8400-109459900676

📥 Commits

Reviewing files that changed from the base of the PR and between 984c7f6 and 0d6532d.

📒 Files selected for processing (25)
  • AGENTS.md
  • docs/cli-audit.md
  • docs/cli-reference.md
  • docs/configuration.md
  • docs/getting-started.md
  • docs/maintenance.md
  • docs/plans/topology-target.yaml
  • docs/test-quality-workflows.md
  • polylogue/cli/click_command_registration.py
  • polylogue/cli/commands/commands.py
  • polylogue/cli/commands/import_command.py
  • polylogue/cli/output_assurance.py
  • tests/baselines/showcase/help-import.txt
  • tests/baselines/showcase/help-main.txt
  • tests/unit/cli/__snapshots__/test_help_snapshots.ambr
  • tests/unit/cli/__snapshots__/test_terminal_snapshots.ambr
  • tests/unit/cli/test_cli_error_boundaries.py
  • tests/unit/cli/test_click_app.py
  • tests/unit/cli/test_deterministic_output.py
  • tests/unit/cli/test_exit_code_contracts.py
  • tests/unit/cli/test_import.py
  • tests/unit/cli/test_json_output.py
  • tests/unit/cli/test_output_contracts.py
  • tests/unit/cli/test_stdout_stderr_split.py
  • tests/unit/security/test_sentinel_env_leak.py
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/refactor/ingest-to-import

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

github-actions Bot pushed a commit that referenced this pull request Jun 14, 2026
@Sinity
Sinity merged commit dcb8916 into master Jun 14, 2026
13 of 16 checks passed
@Sinity
Sinity deleted the feature/refactor/ingest-to-import branch June 14, 2026 02:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant