Component Update - Step by Step Walkthrough¶
A concrete, end-to-end example of updating one component. For the full workflow, rules, and troubleshooting, see COMPONENT_UPDATE_GUIDE.md.
Reminder: Components are updated by editing the JSON files directly in
backend/categorized_databases/. The backend is the only source of truth — there is no frontend database, no sync step, and no update CLI.
The Example: CGH40045 (a PA spanning two frequency bands)¶
CGH40045 covers frequencies below and above 1 GHz, so it exists as two separate
files (not symlinks):
backend/categorized_databases/pa/
├── sub_1ghz/
│ └── CGH40045.json ← Copy 1
└── 1_6ghz/
└── CGH40045.json ← Copy 2
Updating one file does not update the other — you must edit both.
Scenario: Set efficiency to 30¶
Step 1: Find every copy¶
cd backend/categorized_databases/pa
Get-ChildItem -Recurse -Filter "CGH40045.json" | Select-Object FullName
Output:
Two copies → two files to edit.
Step 2: Edit both files¶
Open each file in your editor and make the identical change:
backend/categorized_databases/pa/1_6ghz/CGH40045.jsonbackend/categorized_databases/pa/sub_1ghz/CGH40045.json
(Only the field you are changing — leave the rest of the file untouched. For array
fields use JSON syntax, e.g. "power_range": [25, 35].)
Step 3: Validate¶
Confirm the summary reports no new Tier 1 (schema) failures or Tier 5 (physics) errors for the files you touched.
Step 4: Verify both copies match¶
cd backend/categorized_databases/pa
Get-Content 1_6ghz\CGH40045.json | ConvertFrom-Json | Select-Object efficiency
Get-Content sub_1ghz\CGH40045.json | ConvertFrom-Json | Select-Object efficiency
Both must show 30.
Step 5: Restart the backend¶
The component database is loaded at startup:
Single-Band Components¶
Most parts live in exactly one band directory. Example: SST12CP21 exists only at
backend/categorized_databases/pa/1_6ghz/SST12CP21.json — Step 1 returns one file,
and you edit just that one. Everything else is identical.
Quick Reference¶
| Step | Command |
|---|---|
| Find copies | Get-ChildItem -Recurse -Filter "<PART>.json" under the category dir |
| Edit | Open each returned file, apply the same change |
| Validate | cd backend; python validate_components.py --category <category> |
| Restart | .\start-all-servers-windowed.ps1 |
Which copy first? Doesn't matter — what matters is that all copies end up identical.