Skip to content

fix(import): preflight unsupported sources truthfully (#1815) - #1969

Merged
Sinity merged 1 commit into
masterfrom
feature/fix/1815-import-truth-status
Jun 16, 2026
Merged

Sinity merged 1 commit into
masterfrom
feature/fix/1815-import-truth-status

Conversation

@Sinity

@Sinity Sinity commented Jun 15, 2026

Copy link
Copy Markdown
Owner

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_preflight for JSON/JSONL/ZIP/directory preflight classification, wires the daemon /api/ingest route 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 passed
  • uv run devtools verify --quick → exit_code: 0

Ref #1815

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
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@coderabbitai

coderabbitai Bot commented Jun 15, 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 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 @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: 3ebbf7b9-3455-4ce3-a4a9-420dadc2e689

📥 Commits

Reviewing files that changed from the base of the PR and between 28ffc4c and c66fc3c.

📒 Files selected for processing (8)
  • docs/plans/topology-target.yaml
  • docs/topology-status.md
  • polylogue/cli/commands/import_command.py
  • polylogue/daemon/http.py
  • polylogue/sources/import_preflight.py
  • tests/unit/cli/test_import.py
  • tests/unit/daemon/test_daemon_http_security.py
  • tests/unit/sources/test_import_preflight.py
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/fix/1815-import-truth-status

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 15, 2026
@Sinity
Sinity merged commit 0c4a348 into master Jun 16, 2026
14 checks passed
@Sinity
Sinity deleted the feature/fix/1815-import-truth-status branch June 16, 2026 00:34
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