Commit graph

13 commits

Author SHA1 Message Date
Snider
208cb93c95 fix(dx): code style fixes, strict_types, and test repair
All checks were successful
CI / PHP 8.3 (pull_request) Successful in 2m32s
CI / PHP 8.4 (pull_request) Successful in 2m17s
- Remove non-existent src/Core/Service/ from CLAUDE.md L1 packages list
- Fix LifecycleEventsTest: remove dependency on McpToolHandler interface
  (lives in core-mcp, not needed since McpToolsRegistering stores class
  name strings)
- Run Laravel Pint to fix PSR-12 violations across all source and test files
- Add missing declare(strict_types=1) to 18 PHP files (tests, seeders,
  Layout.php, GenerateServiceOgImages.php)

Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-17 09:03:50 +00:00
Snider
d02f4361e3 fix(scheduler): skip test directories in ScheduledActionScanner
Some checks failed
CI / PHP 8.4 (push) Failing after 2m1s
CI / PHP 8.3 (push) Failing after 2m8s
Test files inside module Tests/ directories (e.g. app/Mod/Lem/Tests/)
extend Tests\TestCase which isn't available in production without dev
dependencies. The scanner now skips /Tests/ directories and *Test.php
files, and wraps class_exists() in try/catch for defence in depth.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-12 15:45:45 +00:00
Snider
7db3637985 feat(webhook): add CronTrigger scheduled action — replaces 4 Docker cron containers
Some checks failed
CI / PHP 8.3 (push) Failing after 2m9s
CI / PHP 8.4 (push) Failing after 2m14s
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 14:26:58 +00:00
Snider
a1de171871 feat(webhook): add WebhookController — store, verify, fire event, return 200
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 14:23:32 +00:00
Snider
39ede84d0e feat(webhook): add WebhookCall model, migration, event, verifier interface
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 14:21:20 +00:00
Snider
a0a0727c88 fix(actions): harden scheduled actions — security allowlists, trait verification, scan safety
- Add ALLOWED_NAMESPACES prefix allowlist to ScheduleServiceProvider
- Add ALLOWED_FREQUENCIES method allowlist (prevents arbitrary method dispatch)
- Verify Action trait on scheduled classes before dispatch
- Move try/catch inside foreach for per-action isolation
- Add empty-scan guard to ScheduleSyncCommand (prevents disabling all rows)
- Consolidate ScheduledActionScanner to single tokenisation pass
- Cast numeric frequency args via ctype_digit() in ScheduledAction

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 13:56:14 +00:00
Snider
3c4011bdcb test(actions): add integration tests for scheduled actions flow
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 12:43:51 +00:00
Snider
633fbeb559 feat(actions): add ScheduleServiceProvider — wires DB-backed actions into scheduler
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 12:42:59 +00:00
Snider
d1598882bb feat(actions): add schedule:sync command — persists #[Scheduled] to database
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 12:41:17 +00:00
Snider
9ffb756969 feat(actions): add ScheduledActionScanner — discovers #[Scheduled] classes
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 12:25:31 +00:00
Snider
ace48d57c2 feat(actions): add ScheduledAction model and migration
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 12:24:20 +00:00
Snider
8d0b2b64ec feat(actions): add #[Scheduled] attribute for Action classes
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 12:23:33 +00:00
Snider
28d004ff61 feat: replace Go CLI with PHP framework
Some checks failed
CI / PHP 8.4 (push) Failing after 1m54s
CI / PHP 8.3 (push) Failing after 1m58s
Go CLI commands moved to core/go-php. This repo now contains
the Laravel modular monolith framework (previously php-framework).

- Remove all Go files (now in core/go-php)
- Add PHP framework: event-driven module loading, lifecycle events
- Composer package: core/php
- core/php-framework remains as-is for backward compat

Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-06 08:49:51 +00:00