feat(io): import handler warnings for unregistered platforms (#182)#422
Merged
feat(io): import handler warnings for unregistered platforms (#182)#422
Conversation
Add debrief-data dependency to services/io for platform registry access. https://claude.ai/code/session_01EYVqLiYdMg7FVjjUfLysJq
Implement the core validation function that checks extracted platform IDs against the platform registry and emits UNREGISTERED_PLATFORM warnings. 9 unit tests cover: registered/unregistered, deduplication, case sensitivity, empty IDs, and missing properties. https://claude.ai/code/session_01EYVqLiYdMg7FVjjUfLysJq
Load platform registry at import start with graceful fallback. Validate platform IDs after each file parse, emitting UNREGISTERED_PLATFORM warnings. 8 integration tests cover: registered/unregistered platforms (REP + DPF), registry unavailable, deduplication, file attribution. All 344 tests pass. https://claude.ai/code/session_01EYVqLiYdMg7FVjjUfLysJq
Capture test-summary.md (17 pass, 0 fail), usage-example.md, sample-warnings.json. Create shipped blog post and LinkedIn summary. Fix lint issues (import sorting, type annotations). https://claude.ai/code/session_01EYVqLiYdMg7FVjjUfLysJq
…kit-182-qIh5P # Conflicts: # BACKLOG.md # docs/CHANGELOG.md # docs/evidence-index.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
platform_idvalues against the platform registry (Add Tool Library Migration SRD for legacy Java tool discovery #180) and emits deduplicatedUNREGISTERED_PLATFORMwarningsREGISTRY_UNAVAILABLEwarning, validation skippedChanges
Phase 1: Setup
debrief-datadependency toservices/io/pyproject.tomlPhase 2: Foundation — Validation Function
_validate_platform_ids()inservices/io/src/debrief_io/import_catalog.pyplatform_idvalues from parsed featuresImportWarningper unregistered platform per source fileservices/io/tests/test_platform_validation.pyPhase 3-5: Pipeline Integration
import_legacy_data()with try/except fallbackEvidence
Test Results
Key scenarios verified:
UNREGISTERED_PLATFORMwarnings with correct file attributionREGISTRY_UNAVAILABLEwarning; validation skippedplatform_idhandled gracefullyUsage Example
Sample Warning Output
Click to expand
{ "warnings": [ { "file": "exercise1.rep", "code": "UNREGISTERED_PLATFORM", "message": "Platform 'CONTACT_BRAVO' is not registered in the platform registry" }, { "file": "exercise1.rep", "code": "UNREGISTERED_PLATFORM", "message": "Platform 'PHANTOM' is not registered in the platform registry" } ] }Test Plan
UNREGISTERED_PLATFORMwarningsplatform_id— skipped gracefullyREGISTRY_UNAVAILABLEwarning, import succeedsRelated
specs/182-import-platform-warnings/spec.mdspecs/182-import-platform-warnings/tasks.mdspecs/182-import-platform-warnings/plan.mdhttps://claude.ai/code/session_01EYVqLiYdMg7FVjjUfLysJq