Repository navigation
fix(import): preflight unsupported sources truthfully (#1815) - #1969
Conversation
Problem: /api/ingest accepted staged artifacts before checking whether the input contained any supported export shape, so unsupported files could be reported as pending work and the CLI lost structured daemon rejection detail. What changed: add a source import preflight classifier for JSON, JSONL, ZIP, and fixture directories; reject unsupported or malformed staged inputs before scheduling; carry supported/degraded preflight details in daemon acks and events; and surface structured daemon rejection bodies in the import CLI. Verification: devtools test tests/unit/sources/test_import_preflight.py tests/unit/cli/test_import.py tests/unit/daemon/test_daemon_http_security.py; uv run devtools verify --quick. Ref #1815
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Warning Review limit reached
More reviews will be available in 58 minutes and 30 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 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 configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (8)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
Summary
Adds an import preflight classifier so daemon import scheduling rejects unsupported or malformed staged sources before claiming they are accepted, and surfaces structured rejection detail in the CLI.
Problem
#1815 tightened the import/demo vocabulary, but import scheduling could still treat unknown or malformed staged inputs as accepted work. That made unsupported-source failures look like daemon backlog rather than an input truthfulness problem.
Solution
Introduces
polylogue.sources.import_preflightfor JSON/JSONL/ZIP/directory preflight classification, wires the daemon/api/ingestroute to reject unsupported/malformed staged inputs before scheduling, and improves the CLI import error detail when the daemon rejects the staged source. Demo fixture expansion remains under #1843.Verification
uv run devtools test tests/unit/sources/test_import_preflight.py tests/unit/cli/test_import.py tests/unit/daemon/test_daemon_http_security.py -q→218 passeduv run devtools verify --quick→exit_code: 0Ref #1815