Summary
`parseCategory` destructures only `name, description, icon, packages` and shoves every other key into a "subcategories" rest spread. Any non-recognized field whose value isn't another category-shaped object gets logged as `Invalid subcategory format` and silently dropped.
Repro
`npm run build` currently emits:
```
Invalid subcategory format for physionet_repo: https://physionet.org/content/mimic-iv-demo-meds/0.0.1/
```
Code pointers
- `src/lib/ecosystem/utils.ts` line 58 — destructure that creates the rest-spread of "subcategories":
```ts
const { name, description, icon, packages: rawPackages, ...rawSubcategories } = rawCategory;
```
- `src/lib/ecosystem/utils.ts` line 124 — the warn:
```ts
console.warn(`Invalid subcategory format for ${key}:`, rawSubcategory);
```
- `static/data/ecosystem.yaml` lines 81–87 — the trigger:
```yaml
publicly_available_datasets:
name: 'Public Datasets'
description: '...'
datasets: # <-- not in the destructure; treated as a subcategory map
- name: 'MIMIC-IV Demo'
physionet_repo: https://physionet.org/content/mimic-iv-demo-meds/0.0.1/
```
Symptom
`MIMIC-IV Demo` (and any future `datasets:` entries) never reach the rendered ecosystem page. The build logs the warning but nothing surfaces it as a failure, so this regression can land silently.
Suggested fix
Two layers:
- Parser: explicitly recognize `datasets:` (and any other intentional non-package keys), or replace the rest-spread with an explicit `subcategories:` field, so unknown keys are caught at parse time rather than treated as silent subcategory maps.
- CI: consider failing the build on these warnings (or surfacing them as console errors) so future drift is caught.
Found while doing a repo health pass; reproduced via `npm run build` on `main`.
Summary
`parseCategory` destructures only `name, description, icon, packages` and shoves every other key into a "subcategories" rest spread. Any non-recognized field whose value isn't another category-shaped object gets logged as `Invalid subcategory format` and silently dropped.
Repro
`npm run build` currently emits:
```
Invalid subcategory format for physionet_repo: https://physionet.org/content/mimic-iv-demo-meds/0.0.1/
```
Code pointers
```ts
const { name, description, icon, packages: rawPackages, ...rawSubcategories } = rawCategory;
```
```ts
console.warn(`Invalid subcategory format for ${key}:`, rawSubcategory);
```
```yaml
publicly_available_datasets:
name: 'Public Datasets'
description: '...'
datasets: # <-- not in the destructure; treated as a subcategory map
- name: 'MIMIC-IV Demo'
physionet_repo: https://physionet.org/content/mimic-iv-demo-meds/0.0.1/
```
Symptom
`MIMIC-IV Demo` (and any future `datasets:` entries) never reach the rendered ecosystem page. The build logs the warning but nothing surfaces it as a failure, so this regression can land silently.
Suggested fix
Two layers:
Found while doing a repo health pass; reproduced via `npm run build` on `main`.