affaan-m/ECC · error · ValueError
incomplete application bundle
Error message
incomplete application bundle
What it means
validate_application_bundle performs a read-only recheck: the bundle dict must be a dict containing at least the union of required keys, optional keys, and 'provider_input'. Missing any of these makes the bundle unverifiable because the full deterministic rebuild cannot be reproduced, so it raises before comparison.
Solutions
- Regenerate the bundle with build_application_bundle so all required, optional and provider_input fields are present
- Add back the missing keys (including provider_input, even if null for local-only bundles) from a full backup
- If the bundle is from an older schema, rebuild it from the original config rather than patching fields
- Check bundle.keys() against _REQUIRED | _OPTIONAL | {'provider_input'} before validating
Example fix
// before (stripped bundle)
{"config": {...}}
// after (complete bundle incl. provider_input)
{...requiredKeys, ...optionalKeys, "provider_input": null, "local_only": true, "bundle_sha256": "<sha>"} Defensive patterns
Strategy: validation
Validate before calling
REQUIRED_EXTRAS = {"provider_input"}
def bundle_complete(bundle, required, optional):
return isinstance(bundle, dict) and (set(required) | set(optional) | REQUIRED_EXTRAS) <= bundle.keys() Type guard
def is_bundle(d):
return isinstance(d, dict) and "provider_input" in d and "source" in d and "baseline" in d Try / catch
try:
validate_application_bundle(bundle)
except ValueError as e:
if "incomplete application bundle" in str(e):
bundle = rebuild_bundle_from_config(original_cfg) # regenerate all fields
validate_application_bundle(bundle)
else:
raise Prevention
- Never hand-strip fields from bundles before validation
- Always round-trip bundles through build_application_bundle for regeneration
- Handle old schema versions by rebuilding, not patching
- Guard JSON saves against truncation (write temp + atomic rename)
When it happens
Trigger: Passing a truncated, hand-stripped, or legacy bundle to validate_application_bundle that lacks _REQUIRED keys, _OPTIONAL keys, or the 'provider_input' key — e.g. a bundle saved before provider_input/local_only were introduced, or a user deleting fields they deemed unneeded.
Common situations: Older serialized bundles from a previous schema version; manually pruning 'optional' fields like historical_receipts before validation; partial JSON writes due to interrupted saves; mixing up the bundle with the raw application config (which lacks provider_input).
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
- missing required bundle fields
- unknown bundle fields
- -32602
- artifact path must be a non-empty relative path
- Asset request_id/modality does not match the bundle
AI-assisted analysis of affaan-m/ECC@8321021c54 (2026-09-16).
Data as JSON: /api/errors/3533ba14f4a435f0.
Report an issue: GitHub.
Appendix: source
Thrown at skills/taste-application/scripts/tasteforge/integration.py:392
_inserts(cfg["inserts"], candidates, cfg, input_hash, edit_hash)
for receipt in cfg["historical_receipts"]:
_artifact(receipt)
result = {**cfg, "schema_version": 1, "mode": "preserve_native_timeline",
"provider_calls": 0, "provider_execution": False, "dry_run": True, "submit": False,
"provider_input": copy.deepcopy(compiled_input), "compiled_input_sha256": input_hash,
"edit_context_sha256": edit_hash,
"protected_stack": stack, "insert_policy": "new_video_track_preserve_baseline_audio",
"evidence_scope": "verified_local_bytes_and_supplied_metadata_only"}
if local_only:
result = {**result, "local_only": True, "provider_input_status": "not_prepared_local_only",
"insert_policy": "none_preserve_baseline"}
return {**result, "bundle_sha256": _digest(result)}
def validate_application_bundle(bundle: dict) -> None:
"""Recheck all files, derived state and exact flags; no mutation or execution."""
if not isinstance(bundle, dict) or not (_REQUIRED | _OPTIONAL | {"provider_input"}) <= bundle.keys():
raise ValueError("incomplete application bundle")
cfg = {key: bundle[key] for key in _REQUIRED | _OPTIONAL}
expected = build_application_bundle(cfg, bundle["provider_input"],
local_only=bundle.get("local_only", False))
if _canonical(bundle) != _canonical(expected):
raise ValueError("application bundle differs from its bound evidence")
View on GitHub (pinned to 8321021c54)