fix(api): simplify XLVask Selvvask surface by removing AI autopilot pipeline (#367)
## Summary Removes the XLVask autopilot / automation / MiniMax / OpenAI pipeline and the related module config, CLI, cron, and migration scaffolding. The Selvvask view (Superuser -> Fakturaer -> Periode -> Selvvask) is reduced to a single read-only listing of usage logs plus operator-driven ignore / unignore / accept / reject endpoints gated on the `review_xlvask_usage_order` permission. See `inventory/self-serve-inventory.md` for the full surface map. ## Test plan - [x] `vendor/bin/pest --testsuite=Unit` -> **1266 passed**, 1 unrelated pre-existing failure (`BirdControlPlaneActivationTest`, needs `PLENO_REPO_ROOT_FOR_TESTS`). - [x] `php -l` on every modified PHP file -> no syntax errors. - [x] Grep validation -> zero production-code references to removed surfaces (`xlvask_autopilot_service`, `xlvask_automation_service`, `xlvask_automation_policy_service`, `EnsureXLVaskAutomationSchema`, `runScheduledAutomationIfReady`, `processAutopilotQueue`, `MiniMax`, `minimax`, ...). - [ ] Qodana + Tests workflows green on this PR. Co-authored-by: openhands <openhands@all-hands.dev> --------- Co-authored-by: openhands <openhands@all-hands.dev>
This commit is contained in:
@@ -2,15 +2,11 @@
|
||||
|
||||
namespace routes;
|
||||
|
||||
require_once WD . '/classes/xlvask_autopilot_service.php';
|
||||
|
||||
use classes\authentication;
|
||||
use classes\response;
|
||||
use classes\router;
|
||||
use classes\xlvask;
|
||||
use classes\xlvask_autopilot_service;
|
||||
use objects\orders_o;
|
||||
use objects\users_o;
|
||||
use objects\xlvask_customers_o;
|
||||
use traits\route_t;
|
||||
|
||||
@@ -180,10 +176,6 @@ class moduleXLVaskRoute
|
||||
$this->get('/modules/xlvask/tasks/sync-usage', function () {
|
||||
global $response;
|
||||
$this->requirePermission('modules_xlvask_sync_usage');
|
||||
// Remove the memory limit
|
||||
// ini_set('memory_limit', '-1');
|
||||
// Remove the execution time limit
|
||||
// set_time_limit(300);
|
||||
// Create the xlvask tasks object
|
||||
$xlvask = new xlvask();
|
||||
// Run the sync usage task
|
||||
@@ -199,27 +191,6 @@ class moduleXLVaskRoute
|
||||
]
|
||||
);
|
||||
|
||||
$this->get('/modules/xlvask/tasks/debug', function () {
|
||||
global $response;
|
||||
$this->requirePermission('modules_xlvask_sync_usage');
|
||||
// Create the xlvask tasks object
|
||||
$xlvask = new xlvask();
|
||||
$user = new users_o();
|
||||
$user->getUserByCustomerNumber(12345679);
|
||||
//$result = $xlvask->getTasks()->runSyncVehicles(false);
|
||||
$vehicles = $xlvask->new($xlvask->helpers->xlvask_vehicles);
|
||||
//print_r($vehicles::getVehicleByRegistrationNumber('BW93159'));
|
||||
// Response
|
||||
$response->success(
|
||||
'Debugging xlvask tasks',
|
||||
200
|
||||
);
|
||||
},
|
||||
[
|
||||
'modules_xlvask_sync_usage' => 'Synchronize usage with the xlvask module'
|
||||
]
|
||||
);
|
||||
|
||||
$this->get('/modules/xlvask/tasks/import-customers', function () {
|
||||
global $response;
|
||||
$this->requirePermission('modules_xlvask_import_customers');
|
||||
@@ -251,15 +222,5 @@ class moduleXLVaskRoute
|
||||
'modules_xlvask_import_vehicles' => 'Import vehicles from the xlvask module'
|
||||
]
|
||||
);
|
||||
|
||||
$this->get('/modules/xlvask/tasks/import-usage', function () {
|
||||
global $response;
|
||||
$this->requirePermission('modules_xlvask_import_usage');
|
||||
$response->error('Deprecated state-changing GET. Use POST /modules/xlvask/services/usage/autopilot-runs.', 410);
|
||||
},
|
||||
[
|
||||
'modules_xlvask_import_usage' => 'Import usage from the xlvask module'
|
||||
]
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user