BloopAI/vibe-kanban · critical
Default profiles v3 JSON is invalid
Error message
Default profiles v3 JSON is invalid
What it means
ExecutorProfiles::from_defaults parses the embedded DEFAULT_PROFILES_JSON constant with serde_json; if the embedded v3 profiles JSON fails to deserialize it logs the serde error and panics with 'Default profiles v3 JSON is invalid'. This is a build-time-invariant check: the compiled-in profile data must always be valid, so a panic here means the shipped binary's embedded asset is broken.
Source
Thrown at crates/executors/src/profile.rs:467
}
// Ensure configuration names don't conflict with reserved words
for config_name in profile.configurations.keys() {
if config_name.starts_with("__") {
return Err(ProfileError::Validation(format!(
"Configuration name '{config_name}' is reserved (starts with '__')"
)));
}
}
}
Ok(())
}
/// Load from the new v3 defaults
pub fn from_defaults() -> Self {
serde_json::from_str(DEFAULT_PROFILES_JSON).unwrap_or_else(|e| {
tracing::error!("Failed to parse embedded default_profiles.json: {}", e);
panic!("Default profiles v3 JSON is invalid")
})
}
pub fn get_coding_agent(&self, executor_profile_id: &ExecutorProfileId) -> Option<CodingAgent> {
self.executors
.get(&executor_profile_id.executor)
.and_then(|executor| {
executor.get_variant(
&executor_profile_id
.variant
.clone()
.unwrap_or("DEFAULT".to_string()),
)
})
.cloned()
}
pub fn get_coding_agent_or_default(View on GitHub (pinned to 4deb7eca8f)
Solutions
- Read the preceding tracing::error! log line — it contains the exact serde error and field path.
- Regenerate or fix the embedded default_profiles.json so it matches the current ProfileVariants schema, then rebuild.
- Validate the JSON offline: `serde_json::from_str::<ExecutorProfiles>(DEFAULT_PROFILES_JSON)` in a unit test to catch drift at CI time.
- If the asset is packaged at build time, confirm the build script/embed path points at the correct, non-truncated file.
Example fix
// before
panic!("Default profiles v3 JSON is invalid")
// after (test to catch it earlier)
#[test]
fn default_profiles_parse() {
serde_json::from_str::<ExecutorProfiles>(DEFAULT_PROFILES_JSON).unwrap();
} Defensive patterns
Strategy: validation
Validate before calling
// CI unit test
#[test]
fn embedded_default_profiles_are_valid() {
serde_json::from_str::<ExecutorProfiles>(DEFAULT_PROFILES_JSON)
.expect("embedded default_profiles.json must match ProfileVariants schema");
} Prevention
- Keep a unit test that parses DEFAULT_PROFILES_JSON so schema drift fails CI before release
- Regenerate default_profiles.json whenever ProfileVariants fields change
- Never hand-edit the embedded JSON without validating against the Rust types
When it happens
Trigger: Calling ExecutorProfiles::from_defaults() when DEFAULT_PROFILES_JSON (embedded default_profiles.json) fails serde deserialization — schema drift between the ProfileVariants struct and the JSON, or a corrupted/empty embedded asset.
Common situations: A code change added/renamed a field in ProfileVariants without regenerating default_profiles.json; a build script packaged a stale or truncated asset; hand-edited profiles JSON that no longer matches the serde types.
Understand the failure class
Background: Schema validation failed / invalid input schema: payload rejected because its shape doesn't match the expected schema — this error's family across 28 libraries.
Related errors
- Workspace serialization should not fail
- Scratch serialization should not fail
- request_id called for unsupported request variant
- handled non-session commands earlier
- Raw stream should only have Stdout/Stderr/Finished
AI-assisted analysis of BloopAI/vibe-kanban@4deb7eca8f (2026-08-29).
Data as JSON: /api/errors/e140f7c6f4e446e8.
Report an issue: GitHub.