Add validate-modules.sh script that validates critical naming conventions
and module structure to prevent common RPC and HTTP 404 errors.
New validation checks:
- RPCD script names must match ubus object names (luci.* prefix)
- Menu paths must match view file locations
- View files must have corresponding menu entries
- RPCD scripts must be executable
- JSON files must have valid syntax
- ubus objects must follow naming convention
Updated CLAUDE.md documentation with:
- Critical naming conventions section with examples
- Common error patterns and solutions
- Updated development workflow to include validation
- Enhanced troubleshooting guide for RPC and 404 errors
- Updated package structure diagram with correct RPCD naming
Added secubox-tools/README.md:
- Detailed usage instructions for validation script
- Common fixes for naming issues
- CI/CD integration examples
- Quick reference for critical naming rules
This tooling prevents deployment of modules with naming mismatches that
cause runtime errors like:
- RPC call failed with error -32000: Object not found
- HTTP error 404 while loading view files
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Tous les modules dashboard pointaient vers des chemins incorrects:
- crowdsec/overview → crowdsec-dashboard/overview
- netdata/dashboard → netdata-dashboard/dashboard
- netifyd/overview → netifyd-dashboard/overview
- wireguard/overview → wireguard-dashboard/overview
Les fichiers JS sont dans {module}-dashboard/ mais les menus pointaient
vers {module}/, causant des erreurs HTTP 404.
Modules corrigés:
- luci-app-crowdsec-dashboard (5 vues)
- luci-app-netdata-dashboard (2 vues)
- luci-app-netifyd-dashboard (4 vues)
- luci-app-wireguard-dashboard (4 vues)
Fixes: NetworkError HTTP 404 pour tous les dashboards
Le fichier RPCD 'secubox' a été renommé en 'luci.secubox' pour correspondre
au nom d'objet ubus utilisé par l'API JavaScript (object: 'luci.secubox').
Cela permet aux appels ubus comme 'ubus call luci.secubox get_dashboard_data'
de fonctionner correctement.
Fixes: Method not found error for all luci.secubox/* methods
Implémente un switcher de mode réseau complet avec 4 modes:
- Router: NAT, DHCP server, firewall (default)
- Access Point: Bridge mode, no NAT, DHCP client
- Repeater: WiFi client + AP relay with optimizations
- Bridge: Pure L2 bridge, DHCP client
Nouvelles méthodes RPCD:
- get_current_mode: Détails du mode actif avec statut rollback
- get_available_modes: Liste des modes avec features
- set_mode: Préparer le changement de mode
- preview_changes: Prévisualiser les modifications
- apply_mode: Appliquer avec reconfiguration réseau complète
- confirm_mode: Confirmer et annuler le timer de rollback
- rollback: Restaurer la configuration précédente
Sécurité:
- Backup automatique avant changement
- Rollback automatique après 2 minutes sans confirmation
- Timer affiché en temps réel dans l'interface
- Restauration complète de network/wireless/firewall/dhcp
Vue wizard.js:
- Cards interactives pour chaque mode avec icônes
- Preview des changements avant application
- Progress bar et instructions post-switch
- Polling du timer de rollback
- Boutons de confirmation et rollback manuel
ACL mis à jour pour toutes les nouvelles méthodes.
Major improvements to feed management across all workflows:
1. **build-openwrt-packages.yml:**
- Removed 'base' feed (not needed for SDK)
- Added comprehensive error handling with retry logic
- Verify feed directories exist after update
- Fail fast if feeds don't update successfully
- Log feed update/install output for debugging
2. **build-secubox-images.yml & test-validate.yml:**
- Added feed verification after update/install
- Capture logs for debugging feed issues
- Exit with error if critical feeds missing
- Show feed directory sizes for verification
Key changes:
- Feeds are now validated to exist before continuing
- Better error messages when feeds fail to update
- Logs captured for troubleshooting
- Workflow fails immediately if feeds missing
This should fix the 'find: feeds/packages: No such file or directory'
error by ensuring feeds are actually cloned successfully.
Enhanced the firmware build workflow with better diagnostics:
1. Added directory listing before artifact collection to show what was built
2. Changed collection strategy to copy all files from target dir (excluding
metadata like .ipk, .manifest, .json, .buildinfo)
3. Added warnings when no firmware images are found
4. Added file listing after successful builds to verify output
5. Show file sizes during collection
This should help identify why firmware artifacts might be missing:
- Shows exactly what files were generated
- Provides clear warnings if target directory is empty
- Helps debug firmware build issues
The new approach copies all firmware image files regardless of extension,
which is more robust than pattern matching specific file types.
Added comprehensive documentation about the SecuBox menu hierarchy:
- Visual tree representation of the complete menu structure
- Explanation of category parent menus
- Troubleshooting guide for menu visibility issues
This helps users understand how modules are organized in LuCI
and how to resolve common menu-related issues.
Added missing category parent menu entries that other SecuBox modules
depend on:
- admin/secubox/security (Security & Monitoring)
- admin/secubox/network (Network Management)
- admin/secubox/system (System & Performance)
Without these parent menus, individual modules like crowdsec, network-modes,
and system-hub couldn't register their menu entries under admin/secubox/*/
This allows all SecuBox modules to appear in the LuCI menu hierarchy.
Fixes: luci-app-secubox menu structure
The RPCD backend was generating module IDs with dashes (network-modes,
client-guardian, etc.) but the UCI config uses underscores (network_modes,
client_guardian, etc.). This mismatch prevented modules from being loaded
and displayed in the dashboard.
Fixed by adding conversion of dashes to underscores when generating
module IDs from RPCD script names.
Fixes: luci-app-secubox/root/usr/libexec/rpcd/secubox:18
Extended the feed removal to also exclude the routing feed, which was
causing the same indexing error during make defconfig.
Now removing both telephony and routing feeds from feeds.conf.default
before updating feeds in all three workflows.
This ensures only base, packages, and luci feeds are used.
Moved telephony removal to occur BEFORE './scripts/feeds update' to prevent
the telephony feed from ever being cloned or indexed. The previous fix tried
to remove telephony after feeds were already updated, which was too late.
Key changes:
- Remove telephony from feeds.conf.default BEFORE feed updates
- Keep final cleanup before make defconfig as safety measure
- Applies to all three workflows
This should completely eliminate the 'Collecting package info: feeds/telephony'
error during make defconfig.
The telephony feed was causing 'Collecting package info' failures during
make defconfig. This fix removes the telephony feed directory and references
from feeds.conf.default before running defconfig in all workflows.
Fixes applied to:
- build-openwrt-packages.yml
- build-secubox-images.yml
- test-validate.yml