Skip to content

refactor(sources): add reusable source-type inventory helper with precedence#49

Open
jony376 wants to merge 1 commit into
aglover1221:mainfrom
jony376:fix/issue-47-source-type-inventory-helper
Open

refactor(sources): add reusable source-type inventory helper with precedence#49
jony376 wants to merge 1 commit into
aglover1221:mainfrom
jony376:fix/issue-47-source-type-inventory-helper

Conversation

@jony376
Copy link
Copy Markdown

@jony376 jony376 commented May 31, 2026

Related issues

Closes #47

Summary

  • add collectDeclaredSourceTypes() to centralize source-type inventory precedence
    1. product MD manifest
    2. sources.yaml manifest
    3. filename inference fallback
  • update summarize() to consume the helper for required-type checks
  • add unit tests that verify each precedence path

Why this is structural

This extracts non-trivial decision logic from summarize() into a reusable function, making required-type behavior easier to test and evolve.

Validation

  • Added tests in tests/unit/sources.test.ts
  • Could not run Vitest in this environment because local Node is v18.19.0 while project Vitest/rolldown requires newer Node runtime.

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.

sources: add reusable source-type inventory function for required-type checks

1 participant