Commit 905e1a5
feat(schema): encode all audit fixes into SCHEMA_OVERRIDES — generator now authoritative
Problem: manual edits to config_schema.yaml drift over time because running
generate_schema.py would overwrite them. This caused the v6.0.2 audit to find
stale type/range values that were fixed manually but never recorded in the generator.
Solution: all schema corrections now live in SCHEMA_OVERRIDES dict inside
generate_schema.py. Running the generator re-applies them automatically.
Overrides added (16 entries):
- VideoSource.RTSP_RECOVERY_BACKOFF_BASE: max 1.0 → 30.0 (seconds)
- FW/MC_ATTITUDE_RATE.TARGET_LOSS_COORDINATE_THRESHOLD: type int/990 → float/1.5
- GM_VELOCITY_CHASE.NEUTRAL_PITCH_ANGLE: max 1.0 → ±90deg with unit
- GM_VELOCITY_VECTOR.MOUNT_{ROLL,PITCH,YAW}_OFFSET_DEG: max 1.0 → ±180deg with unit
- GM_VELOCITY_VECTOR.RAMP_ACCELERATION: max 1.0 → 20.0 m/s²
- GM_VELOCITY_VECTOR.INITIAL_VELOCITY: max 1.0 → 30.0 m/s
- GM_VELOCITY_VECTOR.ALTITUDE_CHECK_INTERVAL: max 1.0 → 60.0 s
- MC_VELOCITY_CHASE.FORWARD_RAMP_RATE: max 1.0 → 20.0 m/s², fixed unit
- MC_VELOCITY_CHASE.INITIAL_FORWARD_VELOCITY: max 1.0 → 30.0 m/s
- MC_VELOCITY_CHASE.TARGET_LOSS_STOP_VELOCITY: max 1.0 → 30.0 m/s
- MC_VELOCITY_CHASE.MIN_FORWARD_VELOCITY_THRESHOLD: max→20.0, proper description
- FW_ATTITUDE_RATE.ORBIT_RADIUS: max 100.0 → 2000.0 m
- FW_ATTITUDE_RATE.L1_MAX_DISTANCE: max 100.0 → 1000.0 m
- FW_ATTITUDE_RATE.{L1_LATERAL_SCALE,TECS_ALTITUDE_SCALE,TECS_MAX_INTEGRAL,
FALLBACK_ALTITUDE_PITCH_GAIN}: new entries (were missing from schema entirely)
Workflow: to add a new config key or fix a schema metadata error:
1. Edit config_default.yaml (the config value)
2. Edit SCHEMA_OVERRIDES in generate_schema.py (the metadata)
3. Run: python scripts/generate_schema.py
4. Commit all three files
Tests: 34 passed (generate_schema + config_consistency)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent 4432441 commit 905e1a5
2 files changed
+309
-181
lines changed
0 commit comments