affaan-m/ECC · error · ContractError
probe duration is not bound to source duration
Error message
{label} probe duration is not bound to source duration What it means
_validate_probe_evidence binds the probe's self-declared duration to the source duration passed in from the receipt. If probe['duration'] differs (by exact != comparison) from the receipt's source duration, the evidence is not bound to the artifact's media and is rejected. This prevents reusing probe evidence from a different file.
Solutions
- Re-run the probe against the exact media file so durations match exactly.
- Update both the receipt source duration and probe duration together from the same measurement.
- Normalize float precision at generation time (round both to a fixed number of decimals).
- Verify you did not paste probe evidence from a different artifact's receipt.
Example fix
// before
"source_duration": 12.5, "probe": {"duration": 12.7, ...}
// after
"source_duration": 12.5, "probe": {"duration": 12.5, ...} Defensive patterns
Strategy: validation
Validate before calling
def probe_bound(receipt) -> bool:
src = receipt.get('source_duration')
probe = receipt.get('probe')
return isinstance(probe, dict) and probe.get('duration') == src Type guard
def durations_match(receipt) -> bool:
return (isinstance(receipt, dict)
and isinstance(receipt.get('probe'), dict)
and receipt['probe'].get('duration') == receipt.get('source_duration')) Try / catch
try:
validate_artifact_receipt(receipt)
except ContractError as e:
if 'probe duration is not bound' in str(e):
receipt = regenerate_receipt(receipt['artifact']) # re-probe same file
else:
raise Prevention
- Always generate source_duration and probe.duration from the same measurement
- Re-probe media after any re-encode or trim
- Round both duration fields identically at generation time
- Never copy probe blocks between different artifacts' receipts
When it happens
Trigger: validate_artifact_receipt where probe.duration and source_duration were generated from different media files, durations rounded differently in one place (12.5 vs 12.500001), or one field stored as int and the other float with unequal values.
Common situations: Copying a probe from a sibling receipt, re-encoding media without re-probing (duration shifted), float formatting differences between generator and validator, manual edits updating only one of the two duration fields.
Understand the failure class
Background: Checksum mismatch errors: "checksum verification failed", "digest mismatch", "expected vs actual checksum" — what they mean and how to fix them — this error's family across 41 libraries.
Related errors
- is outside its source duration
- lacks probe evidence
- rule lacks time evidence
- a generated candidate cannot claim original-source identity
- anchor evidence source duration is not bound to its receipt…
AI-assisted analysis of affaan-m/ECC@8321021c54 (2026-09-16).
Data as JSON: /api/errors/3b5a31e183b040ab.
Report an issue: GitHub.
Appendix: source
Thrown at skills/taste-application/scripts/tasteforge/contract.py:56
if isinstance(value, bool):
raise ContractError(f"{label} contains a boolean numeric value")
if isinstance(value, (int, float)):
if not math.isfinite(value):
raise ContractError(f"{label} contains a non-finite numeric value")
elif isinstance(value, dict):
for nested in value.values():
_validate_numeric_evidence(nested, label=label)
elif isinstance(value, list):
for nested in value:
_validate_numeric_evidence(nested, label=label)
def _validate_probe_evidence(probe: Any, source_duration: float, *, label: str) -> None:
if not isinstance(probe, dict):
raise ContractError(f"{label} lacks probe evidence")
_validate_numeric_evidence(probe, label=label)
if probe.get("duration") != source_duration:
raise ContractError(f"{label} probe duration is not bound to source duration")
for field in ("sample_times", "scene_changes"):
values = probe.get(field, [])
if not isinstance(values, list):
raise ContractError(f"{label} has invalid {field}")
for value in values:
_validate_media_time(value, source_duration, label=f"{label} {field}")
samples = probe.get("style_samples", [])
if not isinstance(samples, list) or any(not isinstance(sample, dict) for sample in samples):
raise ContractError(f"{label} has invalid style evidence")
for sample in samples:
_validate_media_time(sample.get("time"), source_duration, label=f"{label} style evidence")
def _sha256(path: Path) -> str:
if not hasattr(os, "O_NOFOLLOW"):
raise ContractError("secure receipt validation requires O_NOFOLLOW")
descriptor = os.open(path, os.O_RDONLY | os.O_NOFOLLOW)
digest = hashlib.sha256()View on GitHub (pinned to 8321021c54)