Repository navigation
feat(providers): report importer package completeness (#2180) - #2189
Conversation
Problem: the broad seed run exposed two harness leaks unrelated to provider completeness. A storage test could leave the search runtime using a monkeypatched connection helper through the public search package, and the status JSON test parsed stderr warnings as JSON payload data. What changed: reset both public and runtime search cache state between tests, restore the canonical read connection helper, and parse status JSON from stdout while preserving combined-output assertions for Click errors. Verification: devtools test tests/unit/storage/test_fts5.py::test_search_invalid_query_reports_error tests/unit/pipeline/test_ingest_batch.py::test_process_ingest_batch_sync_commits_fts_repair_and_invalidates_search_cache; devtools test tests/unit/cli/test_status.py::test_status_command_accepts_json_alias_flag; devtools verify --seed-testmon --skip-slow.
Problem: provider/importer readiness was implicit in scattered parser files, fixture names, schemas, and docs. That made it easy to add a parser while missing ImportExplain, privacy caveats, generated docs, or query/read surface evidence. What changed: add a finite provider-package completeness model and devtools report keyed by public origin plus capture mode. The report exposes item-level evidence and blockers for accepted rows, treats browser capture as proposed rather than complete, and adds docs/tests plus generated-surface updates. Compatibility: this is a readiness/reporting surface only. Runtime import behavior is unchanged, and --check gates accepted provider packages without blocking proposed modes. Ref #2180
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (17)
📝 WalkthroughWalkthroughAdds a provider/importer package completeness reporting system. New Pydantic payload models define the schema; ChangesProvider Package Completeness Feature
Sequence Diagram(s)sequenceDiagram
participant User
participant devtools_CLI as devtools provider completeness
participant provider_package_completeness
participant _row_for_spec
participant _item as _item(paths)
participant accepted_blockers
User->>devtools_CLI: --origin X [--json] [--check]
devtools_CLI->>provider_package_completeness: origin=X
loop for each PACKAGE_MODE_SPECS entry
provider_package_completeness->>_row_for_spec: spec
_row_for_spec->>_item: declared paths per category
_item-->>_row_for_spec: missing / partial / complete
_row_for_spec-->>provider_package_completeness: ProviderPackageCompletenessRowPayload
end
provider_package_completeness-->>devtools_CLI: ProviderPackageCompletenessPayload
alt --check flag set
devtools_CLI->>accepted_blockers: report
accepted_blockers-->>devtools_CLI: blocker strings (accepted rows only)
devtools_CLI-->>User: exit 1 + stderr blockers (if any)
else normal output
devtools_CLI-->>User: table or JSON to stdout
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related issues
Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 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 |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3bd019efea
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| rows = tuple( | ||
| row | ||
| for row in (_row_for_spec(spec) for spec in PACKAGE_MODE_SPECS) | ||
| if origin is None or row.origin == origin or row.provider_wire == origin |
There was a problem hiding this comment.
Map provider aliases before filtering completeness rows
In the current core mapping, both Provider.GEMINI and Provider.DRIVE collapse to Origin.AISTUDIO_DRIVE, but this filter only matches the single row.provider_wire value recorded on the row (gemini). As a result, devtools provider completeness --origin drive --check returns a zero-row report and exits successfully instead of auditing the accepted Drive/AI Studio importer, even though the CLI help says provider-wire tokens are accepted.
Useful? React with 👍 / 👎.
Summary
Adds a provider/importer package completeness report that makes provider readiness explicit by public origin and capture mode. The report records detector, raw model, parser, normalizer, fixture, schema, query/read, ImportExplain, privacy, docs, and debt-row evidence for each package mode.
Problem
Provider support was scattered across parser files, fixtures, schemas, docs, and generated surfaces. That made it easy to treat a parser as product-ready while missing ImportExplain evidence, privacy caveats, docs, or query/read coverage. #2180 calls for a finite importer/provider completeness map rather than relying on implicit source inspection.
Solution
polylogue.surfaces.payloads.polylogue.sources.provider_completenesswith accepted/proposed package-mode rows keyed byorigin + capture_mode.devtools provider completenesswith table, JSON, origin-filter, and--checkmodes.docs/provider-completeness.md, README/docs-surface wiring, devtools catalog wiring, topology/generated-surface updates, and focused tests.browser-captureis intentionally markedproposed; incomplete proposed rows are visible but do not fail--check. Accepted rows fail--checkwhen required evidence is missing or partial.Closes #2180
Verification
devtools provider completeness --json --origin codex-sessiondevtools provider completeness --check --origin unknown-exportdevtools test tests/unit/sources/test_provider_completeness.py tests/unit/devtools/test_provider_completeness.py-> 6 passeddevtools test tests/unit/storage/test_fts5.py::test_search_invalid_query_reports_error tests/unit/pipeline/test_ingest_batch.py::test_process_ingest_batch_sync_commits_fts_repair_and_invalidates_search_cache-> 2 passeddevtools test tests/unit/cli/test_status.py::test_status_command_accepts_json_alias_flag-> 1 passeddevtools verify --quick-> passeddevtools verify --seed-testmon --skip-slow-> 11,543 passed, 1 xfailed in 246s; peak pytest tree RSS 3.4 GiBdevtools verify --quick-> passedSummary by CodeRabbit
New Features
devtools provider completenesscommand to inspect and report provider/importer package readiness status with JSON export, origin filtering, and validation mode (--check).Documentation