Commit Graph
30 Commits
Author SHA1 Message Date
Jeppe Bandopenhands 5441fea665 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>
2026-08-12 20:02:30 +02:00
Jeppe B b107ba649c Wire XL Vask usage-log sync, order linking, and order creation (#353)
Wires the three broken paths in the cron-driven XL Vask integration:

- runSyncUsage() now calls the revision-aware importUsageLogsWithSummary() on xlvask_usage_logs_o (was a no-op stub; the upstream API was never queried for washes).
- linkImportedUsageLogsToOrders() persists xlvask_potential_order_matches rows so the accept/compare/link/deny UI has data to render.
- When automatic_order_creation_enabled is on and the wash qualifies, falls through to createOrderFromWash() → orders_o::addXLVaskOrder().
- Removes the obsolete TODO in RunXLVaskModuleCron.php.
- Returns linked + orders_created alongside the existing counters so ops can observe the pipeline.
2026-08-09 13:38:27 +02:00
Jeppe B 40b104abed Add governed XL Vask AI invoice automation (#343) 2026-08-04 11:32:49 +02:00
Jeppe B 6d888a455d Automate XL-Vask invoice-period resolution (#340)
Deploy the revision-aware XL-Vask import and guarded autopilot infrastructure. Automatic actions remain fail-closed pending production readiness, calibration, dry-run, and canary gates.
2026-08-03 15:33:55 +02:00
Jeppe B 2a6a86c9c3 Resolve backend Qodana critical and high findings (#314)
Resolve recommended-profile Critical and High findings, retain narrow analyzer exceptions, and update the edge-broker WebSocket dependency to a non-vulnerable release.
2026-07-17 05:44:16 +02:00
Jeppe Bundgaard 70080086da Add unit tests for Redis namespace safety, MotorAPI cache functionality, and configuration classes, alongside implementation of xlvask_automation_service
- Added tests to ensure Redis namespace safety for `db_object_t` and `users_o`.
- Implemented `MotorApiCachedResultTest` to validate metadata caching behavior.
- Introduced configuration classes for `xlvask_automatic_order_attachment_enabled` and `xlvask_automatic_order_creation_enabled`.
- Developed `xlvask_automation_service` with supporting features for usage log evaluation, suggestion building, and order automation.
2026-05-12 00:22:27 +02:00
Jeppe Bundgaard af3b0666fb Add import tasks and new parsers to XL Vask module
- Introduced `runImportTasks` method for vehicle, user, and usage log imports.
- Added new product parsers: `ht_b_rstel_s`, `ht_turbo`, and `ikke_b_rster_p_kabinen`.
- Implemented simulation and duplicate detection for usage logs via order objects.
- Updated usage log handling to include default customer checks and user association.
- Enhanced request handling with fast-link functionality for usage orders.
2025-07-21 10:32:56 +02:00
Jepp9350 ffd0606ece Enhance xlvask_tasks: introduce date range options and additional debug outputs for runSyncUsage. Add new parsers xlvask_parser_ingen_b_rster_foran_no_brush_wash_front and xlvask_parser_ht_dysebom and integrate into xlvask_helpers. Improve rate limiting and reduce FastCGI timeout in nginx configuration. Adjust execution time and memory limits in cli.php. 2025-07-14 09:22:32 +02:00
Jepp9350 9d431d55d8 Refactor vehicle synchronization logic in XLVask helpers, update instantiation, and remove legacy customer creation code. 2025-06-18 15:39:27 +02:00
Jepp9350 3bf1292775 Add runSyncVehicles method to XLVask helpers for vehicle synchronization and caching. 2025-06-18 15:34:07 +02:00
Jepp9350 177767c499 Remove debugging statements and refine XLVask customer creation logic. 2025-06-18 14:36:35 +02:00
Jepp9350 280f87535c Enhance XLVask customer handling: improve JSON encoding with error handling, refine property assignment in xlvask_customer, add debugging logs, and update customer cache logic. 2025-06-18 12:11:30 +02:00
Jepp9350 5693d30c47 Add runCleanupTasks method to XLVask tasks, including module enablement check and task execution logic 2025-06-16 11:51:39 +02:00
Jepp9350 3987cf5de9 Refactor xlvask_potential_order_matches_o object, update related method signatures, and introduce route for retrieving potential order matches with permission checks and pagination. 2025-06-16 10:47:53 +02:00
Jepp9350 d72c534b2f Add xlvask_potential_order_matches_o object and logic to manage potential order matches in XLVask tasks. 2025-06-16 09:37:05 +02:00
Jepp9350 7109f68cdd Comment out $dateFrom echo statement in XLVask tasks helper to clean up output 2025-06-12 12:15:13 +02:00
Jepp9350 27e8c558a4 Add getPlateReferenceIfExists in customer_vehicles_o, refine order creation logic to include plate references, enable usage synchronization in XLVask tasks, and introduce xlvask_parser_special_s_be_front. 2025-06-12 12:14:20 +02:00
Jepp9350 5fb962f6ba Add XLVask order creation logic, enhance wash item validation, update customer handling, and refine parser product ID logic 2025-06-11 12:30:06 +02:00
Jepp9350 f8c0c5a78c Extend order selection logic with registration number and date range in orders_o, update Slack messaging for modules, and implement potential order detection in XLVask tasks. 2025-06-11 09:38:21 +02:00
Jepp9350 1e9ca3e015 Add isCountAboveZero method to xlvask_wash_item and update task logic to skip items with non-positive counts 2025-06-10 16:45:20 +02:00
Jepp9350 940969a466 Update XLVask parsers with correct product IDs, add skipped item details to task logs, and handle special case for vask_udf_rt parser logic. 2025-06-10 16:03:28 +02:00
Jepp9350 59a0c642d3 Add additional XLVask parsers, refine department name capitalization logic, enhance task log outputs, and update helper imports 2025-06-10 15:40:32 +02:00
Jepp9350 e4e4a03b09 Include department and product name details in xlvask task log output for improved clarity. 2025-06-10 15:07:02 +02:00
Jepp9350 39e24465c4 Add multiple XLVask parsers, extend department and order selection logic, and add usage synchronization endpoint 2025-06-10 14:52:47 +02:00
Jepp9350 af75d38af9 Add new cron task for XLVask module with synchronization logic in Cron.php and tasks helper functions 2025-06-03 14:08:59 +02:00
Jepp9350 4d2d72224c Update comments in xlvask_tasks.php to clarify cache addition behavior and remove redundant newlines 2025-06-03 14:00:42 +02:00
Jepp9350 90823c4983 Update getCustomerCache return type to xlvask_customer for stricter type handling and remove redundant newlines in xlvask_tasks.php 2025-06-03 13:56:00 +02:00
Jepp9350 0e82d9a7bf Add customer synchronization support in xlvask with caching, filtering, and external ID handling 2025-06-03 13:52:23 +02:00
Jepp9350 1b2c573629 Enhance xlvask customer handling with nullable properties, default values, and data type conversion 2025-06-03 12:37:06 +02:00
Jepp9350 b0173193f2 Add task helpers and cron job support for xlvask module with user synchronization endpoint integration 2025-06-03 09:09:50 +02:00