feat(cadfs): expand reconstruction capability coverage
This commit is contained in:
@@ -117,6 +117,12 @@ def rebuild_one(sample: Sample, output: Path, *, force: bool = False, timeout_se
|
||||
if outcome == "completed":
|
||||
result = read_json(worker_result); worker_result.unlink(missing_ok=True)
|
||||
bound_cdsl = result.pop("bound_cdsl", None)
|
||||
prefix = result.get("last_executable_prefix")
|
||||
if isinstance(prefix, dict):
|
||||
prefix_bound_cdsl = prefix.pop("bound_cdsl", None)
|
||||
if bound_cdsl is None and prefix_bound_cdsl is not None:
|
||||
bound_cdsl = prefix_bound_cdsl
|
||||
prefix["bound_feature_count"] = prefix.get("feature_count")
|
||||
if bound_cdsl is not None: write_json(directory / "bound.cdsl.json", bound_cdsl)
|
||||
else:
|
||||
step_path.unlink(missing_ok=True)
|
||||
@@ -144,6 +150,10 @@ def compare_one(sample: Sample, output: Path, *, force: bool = False, compare_mo
|
||||
message = f"comparison exceeded {timeout_seconds:g} seconds" if outcome == "timeout" else "comparison worker exited without a result"
|
||||
status["comparison_error"] = {"type": error_type, "message": message}; write_json(status_path, status); return status
|
||||
else: comparison = read_json(comparison_path)
|
||||
# A forced retry can recover from a transient worker timeout. The final
|
||||
# status must describe the successful comparison rather than retaining a
|
||||
# stale infrastructure failure beside an accepted result.
|
||||
status.pop("comparison_error", None)
|
||||
status["comparison_decision"] = comparison["decision"]
|
||||
accepted = comparison[compare_mode]["passed"]
|
||||
status["status"] = "rebuilt_strict" if comparison["strict"]["passed"] else "rebuilt_approximate" if accepted else "rebuilt_rejected"
|
||||
|
||||
Reference in New Issue
Block a user