Skip to content

feat(io): standardize io types and enforce the vocabulary#539

Merged
jeffreylouden merged 2 commits into
mainfrom
feat/catalog-io/standardize-types-2
Jul 13, 2026
Merged

feat(io): standardize io types and enforce the vocabulary#539
jeffreylouden merged 2 commits into
mainfrom
feat/catalog-io/standardize-types-2

Conversation

@jeffreylouden

@jeffreylouden jeffreylouden commented Jul 12, 2026

Copy link
Copy Markdown
Member

Summary

schema/io-types.yaml was advisory — unknown values warned but did not fail CI — so the vocabulary drifted. Found while adding io to the web index (#538).

This fixes the data and closes the door, rather than aliasing the drift away at read time.

Three distinct problems had accumulated

1. Spelling variants. spdif alongside s/pdif; wordclock and word-clock alongside word clock; aes3 and aes-ebu alongside aes/ebu. A consumer filtering on "has S/PDIF" silently missed them.

2. Connectors in the type field. Electro-Voice wireless receivers carried type: bnc with connection: bnc — but those ports are named "Antenna A (Diversity)". They're RF antenna inputs. type is the signal; connection is the connector. 24 ports.

3. Values too vague to query. audio, analog, digital, other — 133 ports whose type said nothing the category field didn't already say.

Why fix the data instead of aliasing it

An earlier revision of #538 normalized these in the index builder. That was wrong, and it's been removed:

  • build-sqlite.ts doesn't normalize I/O types, so patching only the index would make catalog.sqlite and catalog-index.json disagree about port types.
  • An alias map makes the wrong value canonical forever and hides the mistake from review. Aliasing bnc would have permanently enshrined a connector as a signal type.
  • The shape doesn't fit. Categories have 335 canonical + 262 aliases — real synonyms from varied external sources. I/O types are a 23-value closed enum. Aliasing a small closed enum is a smell.

Changes

  • Widen the vocabulary with 10 genuinely missing types: rf, hdmi, video, gpio, insert, clock, bluetooth, wifi, ground, proprietary. These fixed 89 files with zero data edits — the data was right, the schema was incomplete.
    • clock (modular 1/8" sync) is deliberately distinct from word clock (BNC digital clock distribution).
  • Canonicalize 371 ports across 78 hardware entries. Line-based rewrite, so formatting and key order are untouched (371 insertions / 371 deletions, 1:1).
  • Enforce. Unknown types are now a hard error (E117) via the Zod IOSchema — matching how signalFlow, category, and position already behave. io.connection stays advisory (it has its own drift; separate cleanup).
  • Add the io.type enum to the generated JSON Schema for editor autocomplete.
  • Document E117 in docs/VALIDATION_ERRORS.md.

The error is actionable:

E117:30: Invalid IO type 'spdif'. Did you mean 's/pdif'?
  ... (If this is a real signal type, add it to schema/io-types.yaml.
       If it names a physical connector, it belongs in `connection`.)

Test plan

  • pnpm validate on a clean tree — exit 0, all files pass
  • Negative test: inject type: bnc -> fails with E117, suggests a fix
  • Negative test: inject type: spdif -> fails with E117, suggests s/pdif
  • Typecheck + Prettier clean
  • Zero off-vocabulary types remain: 15,549 ports scanned against a 33-value vocabulary
  • Query results verified against a combined build with feat(index): add io, formats, and releaseDate to catalog-index #538 (see below)

Query impact (combined with #538)

Query Before After
Audio interfaces with ADAT 40 40
Audio interfaces with 4+ mic preamps 39 40
Gear with S/PDIF 106 109
Gear with word clock 77 81
Gear with CV/gate 188 192
Gear with RF antenna 13 (was mislabelled bnc)

Follow-ups

  • io-connections.yaml is still advisory and likely has the same problem.
  • Closes AUREO-664.

Summary by CodeRabbit

  • New Features
    • Standardized and expanded the hardware I/O type vocabulary across 371 ports (78 hardware entries), including RF, HDMI, GPIO, clock, wireless, video, ground, and proprietary.
  • Bug Fixes
    • Normalized many hardware port classifications (e.g., word clock, AES/EBU, insert, headphone/line, and CV/gate) for more consistent matching.
  • Validation
    • Unknown I/O types are now rejected with blocking E117.
  • Documentation
    • Added/updated E117 documentation and clarified how to resolve invalid type values.

schema/io-types.yaml was advisory -- unknown values warned but did not
fail CI -- so the vocabulary drifted. Three distinct problems had
accumulated:

Spelling variants: spdif alongside s/pdif, wordclock and word-clock
alongside word clock, aes3 and aes-ebu alongside aes/ebu. A consumer
filtering on 'has S/PDIF' silently missed them.

Connectors in the type field: Electro-Voice wireless receivers carried
type: bnc with connection: bnc, where the ports are in fact RF antenna
inputs. type is the signal; connection is the connector.

Values too vague to query: audio, analog, digital, other -- 133 ports
whose type said nothing the category field did not already say.

Fix the data rather than alias it at read time. An alias map makes the
wrong value canonical forever and hides the mistake from review, and the
23-value enum was never the right shape for aliasing anyway (contrast
categories: 335 canonical + 262 aliases, where synonyms are real).

- widen the vocabulary with 10 genuinely missing types
- canonicalize 371 ports across 78 hardware entries
- promote unknown io types to a hard error (E117) via the Zod IOSchema,
  matching how signalFlow, category, and position already behave
- add the io.type enum to the generated JSON Schema for editor
  autocomplete

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@changeset-bot

changeset-bot Bot commented Jul 12, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: a561df1

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
catalog Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions github-actions Bot added documentation Documentation updates scripts Changes to build/validation scripts schema Changes to catalog schemas hardware Changes to hardware catalog entries labels Jul 12, 2026
@coderabbitai

coderabbitai Bot commented Jul 12, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 4b79eca1-1511-4297-aeee-0e22d9ee90cb

📥 Commits

Reviewing files that changed from the base of the PR and between ee522b1 and a561df1.

📒 Files selected for processing (1)
  • data/hardware/befaco-vcmc-2.yaml

Walkthrough

The PR expands and enforces the io[].type vocabulary, adds E117 validation handling and documentation, and canonicalizes IO type values across 78 hardware entries.

Changes

IO type standardization

Layer / File(s) Summary
IO type schema and validation enforcement
schema/io-types.yaml, schema/json/hardware.json, scripts/generate-json-schemas.ts, scripts/lib/error-codes.ts, scripts/validate.ts, .changeset/*
The IO vocabulary becomes a closed enum with additional values; invalid types now produce E117 hard validation errors instead of advisory warnings.
Validation error documentation
docs/VALIDATION_ERRORS.md, schema/CONTEXT.md
Documentation adds E117 guidance and updates the documented IO type vocabulary and examples.
Hardware IO normalization
data/hardware/allen-and-heath-*.yaml, data/hardware/austrian-audio-*.yaml, data/hardware/bastl-instruments-*.yaml, data/hardware/dbx-*.yaml, data/hardware/electro-voice-*.yaml, data/hardware/mackie-*.yaml, data/hardware/befaco-vcmc-2.yaml
Hardware declarations replace legacy or specialized IO types with canonical values such as line, mic, power, rf, cv/gate, aes/ebu, s/pdif, word clock, insert, and proprietary; a MIDI connection value is lowercased.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Possibly related PRs

Suggested labels: hardware, schema, documentation, scripts

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly captures the main change: standardizing io types and enforcing the allowed vocabulary.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/catalog-io/standardize-types-2

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added the broken-urls PR contains broken or unreachable URLs label Jul 12, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
schema/CONTEXT.md (1)

808-834: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Update the IO types heading to reflect hard validation.

The list is now enforced by IOSchema, but the heading at Line 800 still says unknown values produce warnings. Update it to describe E117 failures.

Proposed fix
-### IO Types (advisory — unknown values produce warnings)
+### IO Types (enforced — unknown values fail validation with E117)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@schema/CONTEXT.md` around lines 808 - 834, Update the IO types heading in the
surrounding documentation to state that values outside the IOSchema list trigger
E117 validation failures, replacing the outdated warning behavior description
while leaving the enumerated IO types unchanged.

Source: Path instructions

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@data/hardware/bastl-instruments-klik.yaml`:
- Around line 27-33: Update the Clock Output entry in the hardware definition to
use the canonical type clock instead of cv/gate, while preserving its
signalFlow, category, connection, maxConnections, and position values.

In `@data/hardware/mackie-dlm12.yaml`:
- Around line 36-57: Update the signal type for the Channel 1 Input entry to mic
and the Channel 2 Input entry to instrument; keep both Channel 2 RCA entries as
line.

In `@docs/VALIDATION_ERRORS.md`:
- Line 291: Update the validation example’s connector value to one listed in
schema/io-connections.yaml, such as 1/4-inch or 1/8-inch, instead of trs; only
use trs if it is first added to the connection vocabulary.

In `@schema/io-types.yaml`:
- Line 47: Update the clock entry in the schema type definitions to describe
only the modular sync/clock pulse signal, removing the 1/8-inch physical
connector reference. Keep connector-specific values assigned through the
connection field rather than type.

---

Outside diff comments:
In `@schema/CONTEXT.md`:
- Around line 808-834: Update the IO types heading in the surrounding
documentation to state that values outside the IOSchema list trigger E117
validation failures, replacing the outdated warning behavior description while
leaving the enumerated IO types unchanged.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: cab7cd3b-3944-4687-9e08-a445bb1a2c31

📥 Commits

Reviewing files that changed from the base of the PR and between afaed55 and ee522b1.

📒 Files selected for processing (86)
  • .changeset/olive-pandas-attack.md
  • data/hardware/allen-and-heath-cc-7-cc-10.yaml
  • data/hardware/allen-and-heath-dlive-mixracks.yaml
  • data/hardware/allen-and-heath-dlive-surfaces.yaml
  • data/hardware/allen-and-heath-dx164-w.yaml
  • data/hardware/allen-and-heath-dx168.yaml
  • data/hardware/allen-and-heath-gr4.yaml
  • data/hardware/allen-and-heath-me-u.yaml
  • data/hardware/allen-and-heath-qu-5.yaml
  • data/hardware/allen-and-heath-qu-6.yaml
  • data/hardware/allen-and-heath-qu-7.yaml
  • data/hardware/allen-and-heath-xone24.yaml
  • data/hardware/allen-and-heath-xone43.yaml
  • data/hardware/austrian-audio-pb17.yaml
  • data/hardware/austrian-audio-pg16.yaml
  • data/hardware/bastl-instruments-1983.yaml
  • data/hardware/bastl-instruments-abc.yaml
  • data/hardware/bastl-instruments-aikido.yaml
  • data/hardware/bastl-instruments-basil.yaml
  • data/hardware/bastl-instruments-buddy.yaml
  • data/hardware/bastl-instruments-ciaoii.yaml
  • data/hardware/bastl-instruments-cinnamon.yaml
  • data/hardware/bastl-instruments-citadel-alchemist.yaml
  • data/hardware/bastl-instruments-citadel-fx-wizard.yaml
  • data/hardware/bastl-instruments-citadel-wave-bard.yaml
  • data/hardware/bastl-instruments-crust.yaml
  • data/hardware/bastl-instruments-cv-trinity-exp.yaml
  • data/hardware/bastl-instruments-dark-matter.yaml
  • data/hardware/bastl-instruments-dup-dup.yaml
  • data/hardware/bastl-instruments-dynamo.yaml
  • data/hardware/bastl-instruments-ikarie.yaml
  • data/hardware/bastl-instruments-klik.yaml
  • data/hardware/bastl-instruments-knit-rider.yaml
  • data/hardware/bastl-instruments-kompas.yaml
  • data/hardware/bastl-instruments-kong.yaml
  • data/hardware/bastl-instruments-pizza.yaml
  • data/hardware/bastl-instruments-popcorn-cv-exp.yaml
  • data/hardware/bastl-instruments-popcorn.yaml
  • data/hardware/bastl-instruments-propust.yaml
  • data/hardware/bastl-instruments-quattro-figaro.yaml
  • data/hardware/bastl-instruments-sense.yaml
  • data/hardware/bastl-instruments-servo.yaml
  • data/hardware/bastl-instruments-skis-2.yaml
  • data/hardware/bastl-instruments-softpop.yaml
  • data/hardware/bastl-instruments-solenoid.yaml
  • data/hardware/bastl-instruments-tea-kick.yaml
  • data/hardware/bastl-instruments-timber.yaml
  • data/hardware/bastl-instruments-tromso.yaml
  • data/hardware/bastl-instruments-waver.yaml
  • data/hardware/dbx-166ad.yaml
  • data/hardware/dbx-166xl.yaml
  • data/hardware/dbx-166xs.yaml
  • data/hardware/dbx-2031.yaml
  • data/hardware/dbx-215.yaml
  • data/hardware/dbx-215s.yaml
  • data/hardware/dbx-2215.yaml
  • data/hardware/dbx-266xl.yaml
  • data/hardware/dbx-266xs.yaml
  • data/hardware/dbx-286a.yaml
  • data/hardware/dbx-286s.yaml
  • data/hardware/dbx-376.yaml
  • data/hardware/dbx-386.yaml
  • data/hardware/electro-voice-r300-e.yaml
  • data/hardware/electro-voice-r300-hd.yaml
  • data/hardware/electro-voice-r300-l.yaml
  • data/hardware/electro-voice-re3-bpcl.yaml
  • data/hardware/electro-voice-re3-bpgc.yaml
  • data/hardware/electro-voice-re3-bphw.yaml
  • data/hardware/electro-voice-re3-bpnid.yaml
  • data/hardware/electro-voice-re3-bpol.yaml
  • data/hardware/electro-voice-re3-nd76.yaml
  • data/hardware/electro-voice-re3-nd86.yaml
  • data/hardware/electro-voice-re3-nd96.yaml
  • data/hardware/electro-voice-re3-re520.yaml
  • data/hardware/mackie-dlm12.yaml
  • data/hardware/mackie-dlz-creator.yaml
  • data/hardware/mackie-hr824mk2.yaml
  • data/hardware/mackie-thrash215.yaml
  • data/hardware/mackie-thump15v4.yaml
  • docs/VALIDATION_ERRORS.md
  • schema/CONTEXT.md
  • schema/io-types.yaml
  • schema/json/hardware.json
  • scripts/generate-json-schemas.ts
  • scripts/lib/error-codes.ts
  • scripts/validate.ts

Comment on lines 27 to 33
- name: Clock Output
signalFlow: output
category: audio
type: trigger
type: "cv/gate"
connection: 1/8-inch
maxConnections: 1
position: Top

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '\n== schema/io-types.yaml ==\n'
sed -n '1,220p' schema/io-types.yaml

printf '\n== data/hardware/bastl-instruments-klik.yaml ==\n'
cat -n data/hardware/bastl-instruments-klik.yaml | sed -n '1,220p'

printf '\n== related Bastl hardware entries ==\n'
for f in data/hardware/bastl-instruments-knit-rider.yaml data/hardware/bastl-instruments-kompas.yaml data/hardware/bastl-instruments-microgranny.yaml; do
  if [[ -f "$f" ]]; then
    printf '\n-- %s --\n' "$f"
    rg -n 'Clock|clock|cv/gate|type:' "$f"
  fi
done

Repository: existential-engineering/catalog

Length of output: 5845


Use type: clock for Clock Output.
Clock Output is the sync pulse here, so clock is the correct canonical type; cv/gate is too generic for downstream consumers.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@data/hardware/bastl-instruments-klik.yaml` around lines 27 - 33, Update the
Clock Output entry in the hardware definition to use the canonical type clock
instead of cv/gate, while preserving its signalFlow, category, connection,
maxConnections, and position values.

Comment on lines +36 to +57
type: line
connection: combo jack
maxConnections: 1
position: Bottom
- name: Channel 2 Input
signalFlow: input
category: audio
type: audio
type: line
connection: combo jack
maxConnections: 1
position: Bottom
- name: Channel 2 RCA Left
signalFlow: input
category: audio
type: audio
type: line
connection: rca
maxConnections: 1
position: Bottom
- name: Channel 2 RCA Right
signalFlow: input
category: audio
type: audio
type: line

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '\n## target file\n'
git ls-files 'data/hardware/mackie-dlm12.yaml'
wc -l data/hardware/mackie-dlm12.yaml
sed -n '1,140p' data/hardware/mackie-dlm12.yaml | cat -n

printf '\n## io type vocabulary\n'
git ls-files 'schema/io-types.yaml' 'schema/io-connections.yaml'
sed -n '1,220p' schema/io-types.yaml | cat -n
printf '\n--- connections ---\n'
sed -n '1,220p' schema/io-connections.yaml | cat -n

printf '\n## search for related mackie DLM entries\n'
rg -n "mackie-dlm12|DLM12|Channel 1 Input|Channel 2 Input|RCA Left|RCA Right" data/hardware schema -S

Repository: existential-engineering/catalog

Length of output: 14923


🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '\n## target file around io entries\n'
sed -n '20,90p' data/hardware/mackie-dlm12.yaml | cat -n

printf '\n## canonical io type values\n'
python3 - <<'PY'
import yaml, pathlib
p = pathlib.Path('schema/io-types.yaml')
data = yaml.safe_load(p.read_text())
print(data)
PY

printf '\n## similar combo-jack modeling in hardware entries\n'
rg -n "connection: combo jack|type: mic|type: instrument|type: line" data/hardware -g '*.yaml' -S | head -n 120

Repository: existential-engineering/catalog

Length of output: 10096


🏁 Script executed:

#!/bin/bash
set -euo pipefail

python3 - <<'PY'
from pathlib import Path
import yaml, re

target = Path('data/hardware/mackie-dlm12.yaml')
data = yaml.safe_load(target.read_text())
print('TARGET NAME:', data.get('name'))
for io in data.get('io', []):
    print(io.get('name'), '|', io.get('signalFlow'), '|', io.get('category'), '|', io.get('type'), '|', io.get('connection'))

print('\nSIMILAR ENTRIES WITH COMBO JACKS:')
for path in Path('data/hardware').glob('*.yaml'):
    if path.name == 'mackie-dlm12.yaml':
        continue
    try:
        d = yaml.safe_load(path.read_text())
    except Exception:
        continue
    ios = d.get('io') or []
    combo = [io for io in ios if io.get('connection') == 'combo jack']
    if combo:
        print(path.name, '=>', d.get('name'))
        for io in combo[:5]:
            print('  ', io.get('name'), '|', io.get('type'), '|', io.get('connection'))
PY

Repository: existential-engineering/catalog

Length of output: 21858


🌐 Web query:

Mackie DLM12 channel 1 mic line channel 2 Hi-Z line documentation

💡 Result:

The Mackie DLM12 loudspeaker features two versatile input channels with distinct capabilities for microphones, line-level signals, and instruments [1][2][3]. Channel 1 Channel 1 is equipped with a female XLR/TRS combo input [1][3]. It features a Mic/Line switch that allows you to optimize the input sensitivity for either microphone-level or line-level signals [4][2][3]. The input impedance is 3.3 kΩ (balanced) for the Mic setting and 20 kΩ (balanced) or 10 kΩ (unbalanced) for the Line setting [5][3][6]. Channel 2 Channel 2 includes a female XLR/TRS combo input and dual RCA phono inputs [3]. The 1/4" TRS input on this channel is specifically designed as a Hi-Z (high-impedance) input for instruments [7][5][3]. The input impedance for the Hi-Z instrument input is 1 MΩ (unbalanced), while the XLR line input is 20 kΩ (balanced) and 10 kΩ (unbalanced) [5][3][6]. The RCA inputs have an impedance of 25 kΩ (unbalanced) [5][3][6]. Users can select whether the Thru output carries only the Channel 1 signal or a mix of both channels using the Ch 1/Mix switch [2][3].

Citations:


🌐 Web query:

Mackie DLM12 user guide mic line Hi-Z inputs

💡 Result:

The Mackie DLM12 loudspeaker features an integrated mixer with two distinct input channels [1][2]. Each channel has specific capabilities for microphones, line-level signals, and instruments: Channel 1 This channel is equipped with an XLR/TRS combo input [3]. It features a mic/line switch that adjusts the input sensitivity [1]. When the switch is depressed (Mic), it provides an additional 30 dB of gain, which is designed to optimize the input for microphones [2]. If you are connecting a line-level signal (such as a mixer output), the switch should be in the OUT position [2]. Channel 2 This channel is designed for instruments and line-level sources [1][2]. It includes: - A 1/4" TRS input, which functions as a Hi-Z (high-impedance) instrument input suitable for guitars, basses, and other high-impedance devices [4][5]. - RCA connectors for stereo line-level signals [1][6]. For further details, refer to the official Mackie DLM8 and DLM12 Owner's Manual [7][8].

Citations:


Use the primary input modes here
Channel 1 should be mic and Channel 2 should be instrument; keeping both as line drops the supported mic and Hi-Z instrument modes from the catalog. The RCA inputs remain line.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@data/hardware/mackie-dlm12.yaml` around lines 36 - 57, Update the signal type
for the Channel 1 Input entry to mic and the Channel 2 Input entry to
instrument; keep both Channel 2 RCA entries as line.

Source: Path instructions

Comment thread docs/VALIDATION_ERRORS.md

**Common mistakes:**

- `bnc`, `xlr`, `trs` -> connectors, not signals. Put them in `connection` and give `type` the actual signal (`rf`, `line`, `mic`)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

rg -n '(^|[[:space:]])trs([[:space:]]|$)' schema/io-connections.yaml schema/CONTEXT.md

Repository: existential-engineering/catalog

Length of output: 169


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Find the docs section and the connection vocabulary sources.
git ls-files | rg '^(docs/VALIDATION_ERRORS\.md|schema/(io-connections\.yaml|CONTEXT\.md))$'

echo '--- docs/VALIDATION_ERRORS.md (around line 291) ---'
sed -n '280,305p' docs/VALIDATION_ERRORS.md

echo '--- schema/io-connections.yaml ---'
cat -n schema/io-connections.yaml | sed -n '1,220p'

echo '--- schema/CONTEXT.md ---'
cat -n schema/CONTEXT.md | sed -n '1,220p'

Repository: existential-engineering/catalog

Length of output: 7905


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Check whether trs is used anywhere else as an accepted connection value or just informal wording.
rg -n --hidden --glob '!*.git' '\btrs\b' .

Repository: existential-engineering/catalog

Length of output: 5903


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo '--- W121 / connection validation references ---'
rg -n 'W121|connection.*warning|unknown values generate warnings|io-connections|trs' schema docs data -g '!**/*.png'

echo '--- schema files with connection-related enums ---'
fd -a 'io-.*connections.*|validation.*|errors.*' schema docs

Repository: existential-engineering/catalog

Length of output: 7118


Use a listed connector value here. trs isn’t in schema/io-connections.yaml, so this example would shift from E117 to W121. Use a canonical value such as 1/4-inch/1/8-inch, or add trs to the connection vocabulary first.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/VALIDATION_ERRORS.md` at line 291, Update the validation example’s
connector value to one listed in schema/io-connections.yaml, such as 1/4-inch or
1/8-inch, instead of trs; only use trs if it is first added to the connection
vocabulary.

Source: Path instructions

Comment thread schema/io-types.yaml
# Control types
- expression
- cv/gate
- clock # modular sync/clock pulse (1/8-inch), distinct from `word clock`

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win

Keep the clock type connector-agnostic.

type describes the signal/function, while connection owns physical connector values. Mentioning 1/8-inch here can encourage connector-specific classifications.

Proposed fix
-  - clock # modular sync/clock pulse (1/8-inch), distinct from `word clock`
+  - clock # modular sync/clock pulse, distinct from `word clock`; connector belongs in `connection`
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- clock # modular sync/clock pulse (1/8-inch), distinct from `word clock`
- clock # modular sync/clock pulse, distinct from `word clock`; connector belongs in `connection`
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@schema/io-types.yaml` at line 47, Update the clock entry in the schema type
definitions to describe only the modular sync/clock pulse signal, removing the
1/8-inch physical connector reference. Keep connector-specific values assigned
through the connection field rather than type.

Source: Path instructions

befaco-vcmc-2 carried a midi port with connection '5-pin DIN'; the
canonical spelling is '5-pin din'. The casing variant made the device
invisible to consumers filtering for MIDI DIN ports.

Connection drift is broader than this (31 off-vocabulary values across
324 ports: trs/trs-male/trs-female, rj45/rj-45, etherCON/ethercon).
That needs the same data-fix-plus-enforce treatment this PR gives
io types, and is tracked separately.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@jeffreylouden jeffreylouden merged commit 5c6b735 into main Jul 13, 2026
10 checks passed
@jeffreylouden jeffreylouden deleted the feat/catalog-io/standardize-types-2 branch July 13, 2026 01:06
jeffreylouden added a commit that referenced this pull request Jul 13, 2026
Apply verified CodeRabbit findings from #539: Bastl Klik clock output
uses type clock; Mackie DLM12 channel 1 is mic and channel 2 is
instrument (per owner's manual); io-types clock comment drops the
connector reference; docs no longer suggest trs as a connection value;
CONTEXT.md and CLAUDE.md reflect that io type is enforced via E117.

Expand the connection vocabulary with usb-b-mini (verified against the
Bastl Klik manual), canonicalize mini-usb on the Artiphon INSTRUMENT 1,
and canonicalize trs/minijack on the Xone:43 to 1/4-inch and 1/8-inch.
Encode the expansion policy in CLAUDE.md: verified new values grow the
schema instead of being force-fit onto near-miss values.

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

broken-urls PR contains broken or unreachable URLs documentation Documentation updates hardware Changes to hardware catalog entries schema Changes to catalog schemas scripts Changes to build/validation scripts

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant