Public Access
4009d68a7a
Universal: PR Check / Branch Policy (pull_request) Failing after 2s
Generic: Repo Health / Site Health (pull_request) Has been skipped
Generic: Repo Health / Access control (pull_request) Successful in 3s
Universal: PR Check / Validate PR (pull_request) Failing after 14s
Universal: PR Check / Secret Scan (pull_request) Successful in 15s
Generic: Project CI / Lint & Validate (pull_request) Successful in 57s
Platform: mokocli CI / Gate 1: Code Quality (pull_request) Successful in 2m4s
Universal: Build & Release / Promote to RC (pull_request) Has been skipped
RC Revert / Rename rc/ back to dev/ (pull_request) Has been skipped
Branch Cleanup / Delete merged branch (pull_request) Successful in 2s
Universal: Build & Release / Build & Release Pipeline (pull_request) Successful in 35s
Universal: Workflow Sync Trigger / Sync workflows to live repos (pull_request) Failing after 28m16s
Generic: Project CI / Tests (pull_request) Has been cancelled
Platform: mokocli CI / Gate 2: Unit Tests (8.1) (pull_request) Has been cancelled
Platform: mokocli CI / Gate 2: Unit Tests (8.2) (pull_request) Has been cancelled
Platform: mokocli CI / Gate 2: Unit Tests (8.3) (pull_request) Has been cancelled
Platform: mokocli CI / Gate 3: Self-Health Check (pull_request) Has been cancelled
Platform: mokocli CI / Gate 4: Governance (pull_request) Has been cancelled
Platform: mokocli CI / Gate 5: Template Integrity (pull_request) Has been cancelled
Platform: mokocli CI / CI Summary (pull_request) Has been cancelled
Universal: PR Check / Build RC Package (pull_request) Has been cancelled
Universal: PR Check / Report Issues (pull_request) Has been cancelled
Generic: Repo Health / Scripts governance (pull_request) Has been cancelled
Generic: Repo Health / Repository health (pull_request) Has been cancelled
Generic: Repo Health / Report: Scripts Governance (pull_request) Has been cancelled
Generic: Repo Health / Report: Repository Health (pull_request) Has been cancelled
The repo was renamed mokoplatform -> mokocli; this rewrites every stale
reference across the tree (case-sensitive):
MokoPlatform -> MokoCLI (DEFGROUP/INGROUP doc tags)
mokoplatform -> mokocli (repo URLs, /opt & /tmp paths, clone URLs,
EXCLUDE lists, XML xmlns + <root> namespace)
moko-platform -> moko-cli (marker files)
XML namespace URIs and ManifestParser::NAMESPACE_URI are changed in
lockstep so local manifest-vs-parser validation stays consistent. The
external standards.mokoconsulting.tech namespace endpoint must be updated
to match separately (tracked in #336).
Refs #336
Claude-Session: https://claude.ai/code/session_01WbGBN9VyRK61zczYWcCQ2i
66 lines
1.9 KiB
PHP
66 lines
1.9 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
/**
|
|
* Error Recovery Framework - Backward compatibility file
|
|
*
|
|
* This file now serves as a backward compatibility layer.
|
|
* Classes have been split into separate files following PSR-4 standards:
|
|
* - RecoveryError.php
|
|
* - CheckpointManager.php
|
|
* - RetryHelper.php
|
|
* - RecoveryManager.php
|
|
*
|
|
* Copyright (C) 2026 Moko Consulting <hello@mokoconsulting.tech>
|
|
*
|
|
* SPDX-License-Identifier: GPL-3.0-or-later
|
|
*
|
|
* FILE INFORMATION
|
|
* DEFGROUP: MokoCLI.Enterprise.Recovery
|
|
* INGROUP: MokoCLI.Enterprise
|
|
* REPO: https://git.mokoconsulting.tech/MokoConsulting/mokocli
|
|
* PATH: /lib/Enterprise/ErrorRecovery.php
|
|
* BRIEF: Error recovery framework
|
|
*
|
|
* @package MokoCLI\Enterprise
|
|
* @version 04.00.04
|
|
* @author mokocli Team
|
|
* @license GPL-3.0-or-later
|
|
* @deprecated Individual class files should be used instead
|
|
*/
|
|
|
|
namespace MokoCli;
|
|
|
|
use Throwable;
|
|
|
|
// For backward compatibility, ensure classes are loaded
|
|
require_once __DIR__ . '/RecoveryError.php';
|
|
require_once __DIR__ . '/CheckpointManager.php';
|
|
require_once __DIR__ . '/RetryHelper.php';
|
|
require_once __DIR__ . '/RecoveryManager.php';
|
|
|
|
/**
|
|
* Execute a callable with automatic rollback on failure.
|
|
*
|
|
* @param callable $operation Operation to execute
|
|
* @param callable $rollback Rollback function to call on failure
|
|
* @return mixed Result of operation
|
|
* @throws Throwable Re-throws the original exception after rollback
|
|
*/
|
|
function withRollback(callable $operation, callable $rollback): mixed
|
|
{
|
|
try {
|
|
return $operation();
|
|
} catch (Throwable $e) {
|
|
error_log("Operation failed, executing rollback: {$e->getMessage()}");
|
|
try {
|
|
$rollback();
|
|
error_log("Rollback completed successfully");
|
|
} catch (Throwable $rollbackError) {
|
|
error_log("Rollback failed: {$rollbackError->getMessage()}");
|
|
}
|
|
throw $e;
|
|
}
|
|
}
|