Conversation
Use versioned php8.4-* Debian packages instead of php-cli (>= 8.4) so PHP 8.5+ can no longer satisfy the dependency; adjust docstring and Windows INSTALL.txt wording from "PHP >= 8.4" to "PHP 8.4".
…ers Release build
…; tag from CHANGELOG version
…LOG-driven releases
…views, code owners, CI gates, linear history)
…itter / nginx-only / Apache), generates from platform domains + CLI apply
…ver config, sync to /etc/hosts (edge:hosts, --no-hosts)
…ect base_path); document EDGE_* env in template
…blic, fpm|swoole via proj.json) with injected run-env (APP_ENV/HKM_USERDATA_DIR/PSP_GLOBAL_AUTOLOAD/HKM_KERNEL_HOME)
…son); add --all for the whole registry
…(multi-PHP hosts); show php/fpm binding in edge:status
…rotection (#23) * Initial commit * remove module common-type-alias * remove module bind-it * add submodules for bind-it, php-io-cli, and module-template * feat(module): add commands for managing git submodules - Implemented `module:add` command to add a git submodule and configure it as a Composer path package. - Implemented `module:remove` command to fully remove a git submodule and clean up all traces from the repository. - Created a bash script `module.sh` for adding and removing modules with similar functionality. - Added scaffolding for module structure including `src/` directory and `composer.json`. - Updated root `composer.json` to include new modules as path repositories. - Added error handling and user confirmation prompts for destructive actions. * fix(common-type-alias): update subproject commit to indicate dirty state * d * remove module orchestrator * Add unit tests for I18n, Pageflow, Support, and Validation plugins; introduce Zig build system - Created `TranslatorTest` to validate translation functionality including key resolution and interpolation. - Implemented `PageflowResponderTest` to ensure correct rendering of pages and handling of requests. - Added `CollectionTest` to test collection operations and array helper functions. - Developed `ResourceTest` to verify resource transformation and serialization. - Established `ValidatorTest` to check validation rules and error handling. - Introduced Zig build configuration with `build.zig`, `config.zig`, and `main.zig` for project management. * fix(pulse-engine): update subproject commit to indicate dirty state * feat(routes): implement project-level route handling and manifest compilation * feat(cookie): introduce cookie management with configuration and helpers - Added cookie configuration file and helper functions for managing cookies. - Implemented CookieJar for queuing and reading cookies, including encryption support. - Created tests for cookie functionality, ensuring correct behavior for setting, reading, and deleting cookies. feat(http): enhance request handling with RequestAware interface - Introduced RequestAware interface for controllers to hold the active Request. - Updated ExecuteStage to set the Request on controllers implementing RequestAware. feat(http): implement route filters for declarative behavior - Added FilterRegistry to map route-filter aliases to pipeline stages. - Implemented RouteFilterStage to execute filters declared on routes. feat(view): compile view manifest for structured view resolution - Created CompileViewManifestStage to compile view paths with priority handling. - Ensured project views take precedence over plugin views. feat(api): create base controllers for JSON and HTML responses - Developed ApiController for JSON endpoints with standardized response methods. - Created ViewController for rendering HTML views with integrated cookie management. feat(task): add example plugin with JSON filter and view rendering - Implemented RequireJsonStage to enforce JSON response expectations. - Added a welcome view for the Task plugin demonstrating view rendering. * refactor(routes): enhance project route handling with additional validation and state management * feat(storage): add storage configuration and local storage adapter - Introduced a new storage configuration file to manage storage settings via environment variables. - Implemented a LocalStorageAdapter for handling file storage operations, including storing, retrieving, and deleting files. - Added tests for LocalStorageAdapter to ensure functionality and edge cases are covered. feat(session): implement session management traits and tests - Created HasRequest and InteractsWithSession traits for managing request and session data in controllers. - Developed unit tests for session management, ensuring proper functionality of session storage, retrieval, and lifecycle management. test(session): add comprehensive tests for session handling - Added tests for cookie-based session handling, including encryption, tampering, and session expiration scenarios. - Ensured that session management adheres to expected behaviors under various conditions. feat(s3): implement S3 storage adapter with configuration options - Added S3StorageAdapter to support AWS S3 and compatible storage services. - Implemented configuration options for region, credentials, and custom endpoints. - Created tests to validate S3 adapter functionality and credential resolution. * feat(seo): Implement SEO components including RouteCatalog, SeoHead, SitemapGenerator, and SitemapStreamWriter - Added RouteCatalog to manage public routes for sitemaps based on the compiled route manifest. - Introduced SeoHead for assembling comprehensive SEO <head> elements for pages. - Created SitemapGenerator to facilitate sitemap creation from public routes and dynamic URLs. - Developed SitemapSource to combine static and dynamic URLs for sitemaps. - Implemented SitemapStreamWriter for efficient streaming of large sitemaps, supporting gzip compression. - Added SitemapUrlProvider interface for dynamic route pattern expansion into concrete URLs from data stores. * Refactor code structure for improved readability and maintainability * Add integration tests for OAuth2 functionality - Implement OAuth2HttpIntegrationTest to cover HTTP interactions with OAuth2 controllers, including token issuance, introspection, and discovery. - Implement OAuth2PersistenceIntegrationTest to validate the behavior of repositories and services against an in-memory SQLite database, focusing on authorization code flow, refresh token rotation, and client CRUD operations. * feat: Implement DataConverter for hydration between DB and Domain objects - Added DataConverter class to handle conversion between raw DB data and PHP Domain objects. - Introduced methods for data extraction and reconstruction with type casting support. feat: Create Resource and ResourceCollection for API response transformation - Added Resource class to map domain objects to API response shapes. - Introduced ResourceCollection to handle lists of resources and their transformations. feat: Add Str utility class for string manipulation - Implemented various string utility methods including studly, camel, snake, kebab, and slug. test: Add unit tests for RequireTenantStage and RouteFilterStage - Implemented tests to ensure tenant requirements are enforced in HTTP request handling. - Verified correct behavior of route filters in the pipeline. test: Add TenantAdminService tests for tenant management functionality - Created tests to validate tenant creation, provisioning, and authorization checks. test: Implement FeedbackService tests for user feedback submission and retrieval - Added tests to ensure proper handling of feedback submissions and access control. test: Add UserSettingsService tests for user preferences management - Implemented tests to verify user settings updates and validation rules. * Refactor code structure for improved readability and maintainability * feat: Add native launcher and install script for HKM kernel with dependency resolution * feat: Implement seeder command structure with run, fresh, and status functionalities * feat: Add versioning and upgrade command for kernel management * feat: Add upgrade command for kernel updates and implement versioning in binaries * feat: Add unit tests for exception handling, request, response, identity, and security verdict functionalities * Update PHP version requirement to 8.4 across various scripts - Updated the minimum PHP version requirement from 8.2 to 8.4 in bundle.sh, ensuring compatibility with the latest features. - Modified the doctor.zig command to check for PHP version 8.4, reflecting the updated requirement. - Adjusted install-kernel.sh to require PHP 8.4, providing clearer instructions for users. - Updated installation instructions for Debian/Ubuntu to install PHP 8.4 and its extensions. * feat: Add PHPUnit configuration file for unit testing * feat: Update CI workflows to use self-hosted Zig toolchain and improve macOS bundle process * docs: rewrite README as a full framework guide (concepts, lifecycle, usage) * ci(release): auto-tag new CHANGELOG version on merge to main -> triggers Release build * ci(release): auto-release on merge to main via workflow_call (no PAT); tag from CHANGELOG version * docs(readme): document master->main branch model and automatic CHANGELOG-driven releases * ci(security): CODEOWNERS + main branch protection script (required reviews, code owners, CI gates, linear history) * feat(edge): host-aware web-server config plugin (nginx SNI stream splitter / nginx-only / Apache), generates from platform domains + CLI apply * feat(edge): classify .local/.test as local domains — exclude from server config, sync to /etc/hosts (edge:hosts, --no-hosts) * fix(edge): resolve project registry from global kernel home (not project base_path); document EDGE_* env in template * feat(edge): project-aware config — per-project vhosts (docroot app/public, fpm|swoole via proj.json) with injected run-env (APP_ENV/HKM_USERDATA_DIR/PSP_GLOBAL_AUTOLOAD/HKM_KERNEL_HOME) * feat(edge): default commands to the CURRENT project (base_path/proj.json); add --all for the whole registry * feat(edge): auto-resolve PHP-FPM socket to match the CLI PHP version (multi-PHP hosts); show php/fpm binding in edge:status * feat(userconfig): resolve config path for non-root sudo users --------- Co-authored-by: Hakeem Shamavu <hakimushamavu@gmail.com>
…ption; update documentation
…arlier auto-release misfire)
* Initial commit * remove module common-type-alias * remove module bind-it * add submodules for bind-it, php-io-cli, and module-template * feat(module): add commands for managing git submodules - Implemented `module:add` command to add a git submodule and configure it as a Composer path package. - Implemented `module:remove` command to fully remove a git submodule and clean up all traces from the repository. - Created a bash script `module.sh` for adding and removing modules with similar functionality. - Added scaffolding for module structure including `src/` directory and `composer.json`. - Updated root `composer.json` to include new modules as path repositories. - Added error handling and user confirmation prompts for destructive actions. * fix(common-type-alias): update subproject commit to indicate dirty state * d * remove module orchestrator * Add unit tests for I18n, Pageflow, Support, and Validation plugins; introduce Zig build system - Created `TranslatorTest` to validate translation functionality including key resolution and interpolation. - Implemented `PageflowResponderTest` to ensure correct rendering of pages and handling of requests. - Added `CollectionTest` to test collection operations and array helper functions. - Developed `ResourceTest` to verify resource transformation and serialization. - Established `ValidatorTest` to check validation rules and error handling. - Introduced Zig build configuration with `build.zig`, `config.zig`, and `main.zig` for project management. * fix(pulse-engine): update subproject commit to indicate dirty state * feat(routes): implement project-level route handling and manifest compilation * feat(cookie): introduce cookie management with configuration and helpers - Added cookie configuration file and helper functions for managing cookies. - Implemented CookieJar for queuing and reading cookies, including encryption support. - Created tests for cookie functionality, ensuring correct behavior for setting, reading, and deleting cookies. feat(http): enhance request handling with RequestAware interface - Introduced RequestAware interface for controllers to hold the active Request. - Updated ExecuteStage to set the Request on controllers implementing RequestAware. feat(http): implement route filters for declarative behavior - Added FilterRegistry to map route-filter aliases to pipeline stages. - Implemented RouteFilterStage to execute filters declared on routes. feat(view): compile view manifest for structured view resolution - Created CompileViewManifestStage to compile view paths with priority handling. - Ensured project views take precedence over plugin views. feat(api): create base controllers for JSON and HTML responses - Developed ApiController for JSON endpoints with standardized response methods. - Created ViewController for rendering HTML views with integrated cookie management. feat(task): add example plugin with JSON filter and view rendering - Implemented RequireJsonStage to enforce JSON response expectations. - Added a welcome view for the Task plugin demonstrating view rendering. * refactor(routes): enhance project route handling with additional validation and state management * feat(storage): add storage configuration and local storage adapter - Introduced a new storage configuration file to manage storage settings via environment variables. - Implemented a LocalStorageAdapter for handling file storage operations, including storing, retrieving, and deleting files. - Added tests for LocalStorageAdapter to ensure functionality and edge cases are covered. feat(session): implement session management traits and tests - Created HasRequest and InteractsWithSession traits for managing request and session data in controllers. - Developed unit tests for session management, ensuring proper functionality of session storage, retrieval, and lifecycle management. test(session): add comprehensive tests for session handling - Added tests for cookie-based session handling, including encryption, tampering, and session expiration scenarios. - Ensured that session management adheres to expected behaviors under various conditions. feat(s3): implement S3 storage adapter with configuration options - Added S3StorageAdapter to support AWS S3 and compatible storage services. - Implemented configuration options for region, credentials, and custom endpoints. - Created tests to validate S3 adapter functionality and credential resolution. * feat(seo): Implement SEO components including RouteCatalog, SeoHead, SitemapGenerator, and SitemapStreamWriter - Added RouteCatalog to manage public routes for sitemaps based on the compiled route manifest. - Introduced SeoHead for assembling comprehensive SEO <head> elements for pages. - Created SitemapGenerator to facilitate sitemap creation from public routes and dynamic URLs. - Developed SitemapSource to combine static and dynamic URLs for sitemaps. - Implemented SitemapStreamWriter for efficient streaming of large sitemaps, supporting gzip compression. - Added SitemapUrlProvider interface for dynamic route pattern expansion into concrete URLs from data stores. * Refactor code structure for improved readability and maintainability * Add integration tests for OAuth2 functionality - Implement OAuth2HttpIntegrationTest to cover HTTP interactions with OAuth2 controllers, including token issuance, introspection, and discovery. - Implement OAuth2PersistenceIntegrationTest to validate the behavior of repositories and services against an in-memory SQLite database, focusing on authorization code flow, refresh token rotation, and client CRUD operations. * feat: Implement DataConverter for hydration between DB and Domain objects - Added DataConverter class to handle conversion between raw DB data and PHP Domain objects. - Introduced methods for data extraction and reconstruction with type casting support. feat: Create Resource and ResourceCollection for API response transformation - Added Resource class to map domain objects to API response shapes. - Introduced ResourceCollection to handle lists of resources and their transformations. feat: Add Str utility class for string manipulation - Implemented various string utility methods including studly, camel, snake, kebab, and slug. test: Add unit tests for RequireTenantStage and RouteFilterStage - Implemented tests to ensure tenant requirements are enforced in HTTP request handling. - Verified correct behavior of route filters in the pipeline. test: Add TenantAdminService tests for tenant management functionality - Created tests to validate tenant creation, provisioning, and authorization checks. test: Implement FeedbackService tests for user feedback submission and retrieval - Added tests to ensure proper handling of feedback submissions and access control. test: Add UserSettingsService tests for user preferences management - Implemented tests to verify user settings updates and validation rules. * Refactor code structure for improved readability and maintainability * feat: Add native launcher and install script for HKM kernel with dependency resolution * feat: Implement seeder command structure with run, fresh, and status functionalities * feat: Add versioning and upgrade command for kernel management * feat: Add upgrade command for kernel updates and implement versioning in binaries * feat: Add unit tests for exception handling, request, response, identity, and security verdict functionalities * Update PHP version requirement to 8.4 across various scripts - Updated the minimum PHP version requirement from 8.2 to 8.4 in bundle.sh, ensuring compatibility with the latest features. - Modified the doctor.zig command to check for PHP version 8.4, reflecting the updated requirement. - Adjusted install-kernel.sh to require PHP 8.4, providing clearer instructions for users. - Updated installation instructions for Debian/Ubuntu to install PHP 8.4 and its extensions. * feat: Add PHPUnit configuration file for unit testing * feat: Update CI workflows to use self-hosted Zig toolchain and improve macOS bundle process * docs: rewrite README as a full framework guide (concepts, lifecycle, usage) * ci(release): auto-tag new CHANGELOG version on merge to main -> triggers Release build * ci(release): auto-release on merge to main via workflow_call (no PAT); tag from CHANGELOG version * docs(readme): document master->main branch model and automatic CHANGELOG-driven releases * ci(security): CODEOWNERS + main branch protection script (required reviews, code owners, CI gates, linear history) * feat(edge): host-aware web-server config plugin (nginx SNI stream splitter / nginx-only / Apache), generates from platform domains + CLI apply * feat(edge): classify .local/.test as local domains — exclude from server config, sync to /etc/hosts (edge:hosts, --no-hosts) * fix(edge): resolve project registry from global kernel home (not project base_path); document EDGE_* env in template * feat(edge): project-aware config — per-project vhosts (docroot app/public, fpm|swoole via proj.json) with injected run-env (APP_ENV/HKM_USERDATA_DIR/PSP_GLOBAL_AUTOLOAD/HKM_KERNEL_HOME) * feat(edge): default commands to the CURRENT project (base_path/proj.json); add --all for the whole registry * feat(edge): auto-resolve PHP-FPM socket to match the CLI PHP version (multi-PHP hosts); show php/fpm binding in edge:status * feat(userconfig): resolve config path for non-root sudo users * feat(edge): enhance hosts management with dev mode checks and force option; update documentation * chore(release): v1.0.13 — Edge plugin, PSP_PROJECTS_DIR export, frontend/sudo fixes * chore(release): bump to v1.0.14 (v1.0.13 tag already exists from an earlier auto-release misfire) * chore(release): reclaim v1.0.13 (stale mis-tagged v1.0.13 release/tag deleted) --------- Co-authored-by: Hakeem Shamavu <hakimushamavu@gmail.com>
The EDGE_LOCAL_IN_SERVER flag was defined but never read, so a project whose domains are all local rendered an empty vhost. Dev mode (HKM_DEV=1) now folds local domains into the generated nginx/Apache vhost; production runs keep them out (DNS). Local domains still sync to /etc/hosts either way.
…ntains its content)
* Initial commit * remove module common-type-alias * remove module bind-it * add submodules for bind-it, php-io-cli, and module-template * feat(module): add commands for managing git submodules - Implemented `module:add` command to add a git submodule and configure it as a Composer path package. - Implemented `module:remove` command to fully remove a git submodule and clean up all traces from the repository. - Created a bash script `module.sh` for adding and removing modules with similar functionality. - Added scaffolding for module structure including `src/` directory and `composer.json`. - Updated root `composer.json` to include new modules as path repositories. - Added error handling and user confirmation prompts for destructive actions. * fix(common-type-alias): update subproject commit to indicate dirty state * d * remove module orchestrator * Add unit tests for I18n, Pageflow, Support, and Validation plugins; introduce Zig build system - Created `TranslatorTest` to validate translation functionality including key resolution and interpolation. - Implemented `PageflowResponderTest` to ensure correct rendering of pages and handling of requests. - Added `CollectionTest` to test collection operations and array helper functions. - Developed `ResourceTest` to verify resource transformation and serialization. - Established `ValidatorTest` to check validation rules and error handling. - Introduced Zig build configuration with `build.zig`, `config.zig`, and `main.zig` for project management. * fix(pulse-engine): update subproject commit to indicate dirty state * feat(routes): implement project-level route handling and manifest compilation * feat(cookie): introduce cookie management with configuration and helpers - Added cookie configuration file and helper functions for managing cookies. - Implemented CookieJar for queuing and reading cookies, including encryption support. - Created tests for cookie functionality, ensuring correct behavior for setting, reading, and deleting cookies. feat(http): enhance request handling with RequestAware interface - Introduced RequestAware interface for controllers to hold the active Request. - Updated ExecuteStage to set the Request on controllers implementing RequestAware. feat(http): implement route filters for declarative behavior - Added FilterRegistry to map route-filter aliases to pipeline stages. - Implemented RouteFilterStage to execute filters declared on routes. feat(view): compile view manifest for structured view resolution - Created CompileViewManifestStage to compile view paths with priority handling. - Ensured project views take precedence over plugin views. feat(api): create base controllers for JSON and HTML responses - Developed ApiController for JSON endpoints with standardized response methods. - Created ViewController for rendering HTML views with integrated cookie management. feat(task): add example plugin with JSON filter and view rendering - Implemented RequireJsonStage to enforce JSON response expectations. - Added a welcome view for the Task plugin demonstrating view rendering. * refactor(routes): enhance project route handling with additional validation and state management * feat(storage): add storage configuration and local storage adapter - Introduced a new storage configuration file to manage storage settings via environment variables. - Implemented a LocalStorageAdapter for handling file storage operations, including storing, retrieving, and deleting files. - Added tests for LocalStorageAdapter to ensure functionality and edge cases are covered. feat(session): implement session management traits and tests - Created HasRequest and InteractsWithSession traits for managing request and session data in controllers. - Developed unit tests for session management, ensuring proper functionality of session storage, retrieval, and lifecycle management. test(session): add comprehensive tests for session handling - Added tests for cookie-based session handling, including encryption, tampering, and session expiration scenarios. - Ensured that session management adheres to expected behaviors under various conditions. feat(s3): implement S3 storage adapter with configuration options - Added S3StorageAdapter to support AWS S3 and compatible storage services. - Implemented configuration options for region, credentials, and custom endpoints. - Created tests to validate S3 adapter functionality and credential resolution. * feat(seo): Implement SEO components including RouteCatalog, SeoHead, SitemapGenerator, and SitemapStreamWriter - Added RouteCatalog to manage public routes for sitemaps based on the compiled route manifest. - Introduced SeoHead for assembling comprehensive SEO <head> elements for pages. - Created SitemapGenerator to facilitate sitemap creation from public routes and dynamic URLs. - Developed SitemapSource to combine static and dynamic URLs for sitemaps. - Implemented SitemapStreamWriter for efficient streaming of large sitemaps, supporting gzip compression. - Added SitemapUrlProvider interface for dynamic route pattern expansion into concrete URLs from data stores. * Refactor code structure for improved readability and maintainability * Add integration tests for OAuth2 functionality - Implement OAuth2HttpIntegrationTest to cover HTTP interactions with OAuth2 controllers, including token issuance, introspection, and discovery. - Implement OAuth2PersistenceIntegrationTest to validate the behavior of repositories and services against an in-memory SQLite database, focusing on authorization code flow, refresh token rotation, and client CRUD operations. * feat: Implement DataConverter for hydration between DB and Domain objects - Added DataConverter class to handle conversion between raw DB data and PHP Domain objects. - Introduced methods for data extraction and reconstruction with type casting support. feat: Create Resource and ResourceCollection for API response transformation - Added Resource class to map domain objects to API response shapes. - Introduced ResourceCollection to handle lists of resources and their transformations. feat: Add Str utility class for string manipulation - Implemented various string utility methods including studly, camel, snake, kebab, and slug. test: Add unit tests for RequireTenantStage and RouteFilterStage - Implemented tests to ensure tenant requirements are enforced in HTTP request handling. - Verified correct behavior of route filters in the pipeline. test: Add TenantAdminService tests for tenant management functionality - Created tests to validate tenant creation, provisioning, and authorization checks. test: Implement FeedbackService tests for user feedback submission and retrieval - Added tests to ensure proper handling of feedback submissions and access control. test: Add UserSettingsService tests for user preferences management - Implemented tests to verify user settings updates and validation rules. * Refactor code structure for improved readability and maintainability * feat: Add native launcher and install script for HKM kernel with dependency resolution * feat: Implement seeder command structure with run, fresh, and status functionalities * feat: Add versioning and upgrade command for kernel management * feat: Add upgrade command for kernel updates and implement versioning in binaries * feat: Add unit tests for exception handling, request, response, identity, and security verdict functionalities * Update PHP version requirement to 8.4 across various scripts - Updated the minimum PHP version requirement from 8.2 to 8.4 in bundle.sh, ensuring compatibility with the latest features. - Modified the doctor.zig command to check for PHP version 8.4, reflecting the updated requirement. - Adjusted install-kernel.sh to require PHP 8.4, providing clearer instructions for users. - Updated installation instructions for Debian/Ubuntu to install PHP 8.4 and its extensions. * feat: Add PHPUnit configuration file for unit testing * feat: Update CI workflows to use self-hosted Zig toolchain and improve macOS bundle process * docs: rewrite README as a full framework guide (concepts, lifecycle, usage) * ci(release): auto-tag new CHANGELOG version on merge to main -> triggers Release build * ci(release): auto-release on merge to main via workflow_call (no PAT); tag from CHANGELOG version * docs(readme): document master->main branch model and automatic CHANGELOG-driven releases * ci(security): CODEOWNERS + main branch protection script (required reviews, code owners, CI gates, linear history) * feat(edge): host-aware web-server config plugin (nginx SNI stream splitter / nginx-only / Apache), generates from platform domains + CLI apply * feat(edge): classify .local/.test as local domains — exclude from server config, sync to /etc/hosts (edge:hosts, --no-hosts) * fix(edge): resolve project registry from global kernel home (not project base_path); document EDGE_* env in template * feat(edge): project-aware config — per-project vhosts (docroot app/public, fpm|swoole via proj.json) with injected run-env (APP_ENV/HKM_USERDATA_DIR/PSP_GLOBAL_AUTOLOAD/HKM_KERNEL_HOME) * feat(edge): default commands to the CURRENT project (base_path/proj.json); add --all for the whole registry * feat(edge): auto-resolve PHP-FPM socket to match the CLI PHP version (multi-PHP hosts); show php/fpm binding in edge:status * feat(userconfig): resolve config path for non-root sudo users * feat(edge): enhance hosts management with dev mode checks and force option; update documentation * chore(release): v1.0.13 — Edge plugin, PSP_PROJECTS_DIR export, frontend/sudo fixes * chore(release): bump to v1.0.14 (v1.0.13 tag already exists from an earlier auto-release misfire) * chore(release): reclaim v1.0.13 (stale mis-tagged v1.0.13 release/tag deleted) * chore(release): v1.0.14 * chore: align CHANGELOG to released v1.0.13 (drop phantom 1.0.14) * fix(edge): serve local .local/.test domains in dev mode (--dev) The EDGE_LOCAL_IN_SERVER flag was defined but never read, so a project whose domains are all local rendered an empty vhost. Dev mode (HKM_DEV=1) now folds local domains into the generated nginx/Apache vhost; production runs keep them out (DNS). Local domains still sync to /etc/hosts either way. --------- Co-authored-by: Hakeem Shamavu <hakimushamavu@gmail.com>
…26) Adds per-run TLS mode selection (ssl|none|both), an APP_ENV-derived cache profile, and a full OpenSwoole reverse-proxy runtime alongside PHP-FPM. Added - --tls=ssl|none|both (+ --no-ssl) and --ssl-cert/--ssl-key on edge:apply. - Cache profiles from APP_ENV: local/development disable browser caching entirely; production keeps dynamic responses uncached and serves fingerprinted assets immutable for a year. Unknown envs fall back to DEVELOPMENT, never production. - Environment flags --local/--dev, --development/-d, --production (scoped to the edge commands, not launcher-global). - OpenSwoole runtime via proj.json "edge": { "runtime": "openswoole" }: dedicated upstream (least_conn, max_fails/fail_timeout, keepalive pool, multi-worker via "ports"), $connection_upgrade map, /ws WebSocket location, optional /health, and CF-Connecting-IP forwarded upstream. - edge:service command generating the systemd unit (or supervisor block) that supervises a project's OpenSwoole server. - Brotli/gzip resolved per server from that server's own capability, HSTS on TLS modes only, and an opt-in http-context prelude (log_format, rate-limit zones, Cloudflare real-IP ranges). Changed - The cache profile is no longer inferred from the kernel mode; nothing in vhost generation reads HKM_DEV, so kernel selection and app environment are independent. - All generated paths derive from the project root, and the OpenSwoole entry script defaults to app/swoole/index.php — matching what `hkm run --swoole` executes. - Security headers are repeated inside locations that set their own add_header, which nginx would otherwise drop. Fixed - Generated nginx failed `nginx -t`: `location = /index.php` was nested inside `location ~ \.php$`, which nginx rejects. - `.well-known` was denied by a blanket dotfile rule, breaking ACME/Let's Encrypt issuance and renewal. - Apache vhosts failed configtest: ServerTokens is not valid inside <VirtualHost>. - Apache no longer emits directives for modules that are not loaded; HSTS and compression degrade to what the host actually supports. Co-authored-by: Hakeem Shamavu <hakimushamavu@gmail.com>
…profiles, OpenSwoole runtime)
…mgrep, PHPStan); add docs + plugin issue templates
…ids advanced-config conflict)
…gate - phpstan.neon.dist: analyse src/plugins/projects at level 5, scan modules/, exclude __dev__ - phpstan-baseline.neon: capture 542 pre-existing errors so only NEW issues fail CI - php-analysis.yml: PHPStan job now blocking (was continue-on-error) - fix(auth): correct stale \HKMCode\ docblock namespace in Driver port Excluded pending real-bug fixes (tracked separately): MigrateListCommand extends non-existent AbstractMigrateCommand; OutboxWriter does not satisfy OutboxPort
- MigrateListCommand extended a non-existent AbstractMigrateCommand (fatal on load) -> extend LetMigrateCommand like its sibling migrate commands - OutboxWriter now satisfies OutboxPort: write() returns the new row id via lastInsertId(); implement the missing markDispatched(int) to set status=1 - Remove both files from the PHPStan excludePaths now that they analyse cleanly
… composer audit flag - PHPStan CI had no Swoole ext, so the runtime-guarded OpenSwoole/Swoole Coroutine calls (CurlHttpClient backoff, PageflowStream) reported as undefined/impossible-type. Ignore them by pattern — behaviour is correct at runtime (class_exists/method_exists guarded). Verified green with AND without the extension loaded. - composer audit: drop invalid '--no-dev=false' (the flag takes no value)
…example - LICENSE: replace Apache-2.0 text with MIT to match composer.json (was a license mismatch); copyright Hakeem Shamavu (AlfaCode Team) - composer.json: add php ">=8.4" + required ext-* platform requirements, keywords, homepage, support links; remove duplicate license key - composer.lock: re-resolved (composer update -W) so it is in sync; audit clean - .env.example: curated core + common-plugin env template (copy to .env) - protect-main.sh: require PHPStan + composer audit checks alongside PHPUnit/Zig
- Renamed PageflowSharerContract implementation to PageflowStage and merged the functionality of the previous PageflowShareStage, PageflowValidationStage, PageflowVersionStage, and PageflowPrecognitionStage into a single class. - Updated references throughout the codebase to reflect the new PageflowStage class. - Removed unused stage classes (PageflowShareStage, PageflowValidationStage, PageflowVersionStage, PageflowPrecognitionStage, and CorsStage). - Introduced SecurityHeadersStage to handle both CORS and security headers in a single stage. - Updated the Provider class to register the new PageflowStage and SecurityHeadersStage. - Adjusted helper functions and documentation to align with the new structure.
…gle PageflowStage
📝 WalkthroughWalkthroughThe PR rebrands runtime and documentation surfaces from Sentinel to HKM Kernel, rewrites the README, and adds architecture, layer, plugin, security, testing, CLI, data, tenancy, and deployment guides. It also updates the guides index and preserves guide files through ChangesHKM Kernel documentation and branding
Estimated code review effort: 3 (Moderate) | ~20 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
… (v1.0.21) - Integrate edge features, CLI commands, security updates from #36 - Rebrand Sentinel -> HKM across CLI banner, debug page, error messages - Publish curated public architecture guides under docs/guides/ (ai-context stays private) - Correct security-layer docs to match code (kernel ships only CsrfTokenLayer) - Rewrite README as a guided doc (Purpose, goals, done-vs-cooking status) - CHANGELOG: 1.0.21
There was a problem hiding this comment.
Note
Due to the large number of review comments, Critical severity comments were prioritized as inline comments.
🟠 Major comments (38)
docs/guides/18_MIGRATIONS.md-157-161 (1)
157-161: 🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick winCorrect the migration scaffolder claims.
MakeMigrationCommandgeneratesY_m_d_Hisfilenames, notYYYY_MM_DD_NNNNNN, and writes withfile_put_contents()without checking whether the target already exists. The guide currently promises sequence numbering and overwrite protection that the implementation does not provide.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@docs/guides/18_MIGRATIONS.md` around lines 157 - 161, Update the “The scaffolder” claims in the migration guide to accurately describe MakeMigrationCommand: state that filenames use the Y_m_d_His timestamp format, remove the sequence-numbering claim, and remove the promise of overwrite protection because file_put_contents() does not check for existing targets.docs/guides/SAFE_DEPLOYMENTS_GUIDE.md-171-174 (1)
171-174: 🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick winDo not recommend editing a migration to retry a partial failure.
A partially applied migration may have changed the schema before failing, and editing the original file can make the recorded migration history diverge from the deployed schema. Restore or repair the database deliberately, then use a new corrective migration; only rerun an unchanged, unrecorded migration after verifying its side effects.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@docs/guides/SAFE_DEPLOYMENTS_GUIDE.md` around lines 171 - 174, Update the “Option 2: Fix and retry” guidance in SAFE_DEPLOYMENTS_GUIDE.md to prohibit editing a partially applied migration before retrying. Instruct operators to deliberately restore or repair the database, then create a new corrective migration; only permit rerunning an unchanged, unrecorded migration after verifying its side effects.docs/guides/18_MIGRATIONS.md-61-70 (1)
61-70: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick winStandardize the database environment-variable contract.
The migration and deployment examples use names that differ from the Database module’s documented contract, so copy-pasted commands can silently use missing or default connection values.
docs/guides/18_MIGRATIONS.md#L61-L70: replaceDB_NAME,DB_USER, andDB_PASSwithDB_DATABASE,DB_USERNAME, andDB_PASSWORD, or document explicit aliases.docs/guides/SAFE_DEPLOYMENTS_GUIDE.md#L337-L346: replaceDB_NAMEwithDB_DATABASE.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@docs/guides/18_MIGRATIONS.md` around lines 61 - 70, Standardize the database environment-variable names in the migration configuration example by replacing DB_NAME, DB_USER, and DB_PASS with DB_DATABASE, DB_USERNAME, and DB_PASSWORD in docs/guides/18_MIGRATIONS.md:61-70. Also replace DB_NAME with DB_DATABASE in docs/guides/SAFE_DEPLOYMENTS_GUIDE.md:337-346; no aliases are needed.docs/guides/SAFE_DEPLOYMENTS_GUIDE.md-10-13 (1)
10-13: 🔒 Security & Privacy | 🟠 Major | ⚡ Quick winDo not require secrets to live in
.envfiles.The checklist says all required environment variables must be defined in
.env, while the same section requires credentials from a secrets manager. Clarify that only non-secret configuration belongs in.env; production secrets should be injected at runtime from the configured secret provider.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@docs/guides/SAFE_DEPLOYMENTS_GUIDE.md` around lines 10 - 13, Update the deployment checklist entries to state that only non-secret configuration belongs in `.env`, while production secrets such as database credentials must be injected at runtime from the configured secrets manager or provider. Keep the existing environment-variable validation guidance, but remove the implication that all required variables, including secrets, must be stored in `.env`.docs/guides/SAFE_DEPLOYMENTS_GUIDE.md-94-128 (1)
94-128: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick winVerify or remove the undocumented deployment commands.
The canonical
CliCommandFactory::all()registers migration, generation, tenant, seed, make, and maintenance commands, but this guide presentsmigrate:create-approval,migrate:request-approval,deployment:locks,deployment:lock-release, backup commands, and audit commands as available CLI workflows. If these commands are not registered elsewhere, the documented production procedure will fail at runtime; either implement/register them or rewrite the guide around supported commands.Also applies to: 141-143, 153-158, 211-259
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@docs/guides/SAFE_DEPLOYMENTS_GUIDE.md` around lines 94 - 128, Verify every CLI command documented in SAFE_DEPLOYMENTS_GUIDE.md against the registrations returned by CliCommandFactory::all(), including migrate:create-approval, migrate:request-approval, deployment lock, backup, and audit commands. For any command not registered or implemented, either add it to the appropriate command registration flow or revise the guide to use only supported commands, preserving a runnable production deployment procedure.docs/guides/22_DATA_ACCESS_ORM_BLUEPRINT.md-159-180 (1)
159-180: 🔒 Security & Privacy | 🟠 Major | 🏗️ Heavy liftEnforce tenant ownership before upserting.
find()applies the tenant predicate, butsave()accepts anyInvoice, conflicts only oninvoice_id, and updates persisted fields without checking thatinvoice->tenantId()matchesidentity->tenantId. A misrouted entity can therefore modify another tenant’s invoice. Reject mismatched entities before the upsert and ensure the schema/conflict key matches whether invoice IDs are global or tenant-local.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@docs/guides/22_DATA_ACCESS_ORM_BLUEPRINT.md` around lines 159 - 180, Update InvoiceRepository::save to validate that invoice->tenantId() matches identity->tenantId() before calling db->upsert, rejecting mismatches with the repository’s established exception behavior. Ensure the invoices schema and upsert conflictColumns use the correct global or tenant-local ownership key, including tenant_id when IDs are tenant-local, while preserving tenant scoping for every operation.docs/guides/SAFE_DEPLOYMENTS_GUIDE.md-327-335 (1)
327-335: 🔒 Security & Privacy | 🟠 Major | ⚡ Quick winUse restrictive permissions for database backups.
chmod 644 storage/backups/*.sqlmakes SQL backups world-readable on Unix systems. Backups may contain credentials or personal data; use a least-privilege mode such as600and restrict directory access as appropriate.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@docs/guides/SAFE_DEPLOYMENTS_GUIDE.md` around lines 327 - 335, Update the backup permission commands in the “Backup failed: permission denied” section to use restrictive, least-privilege permissions: change SQL backup files to mode 600 and restrict the storage/backups directory access appropriately, while preserving the existing troubleshooting flow.docs/guides/21_CSRF.md-68-80 (1)
68-80: 🔒 Security & Privacy | 🟠 Major | ⚡ Quick winDo not exempt the entire
/apiprefix without an enforced invariant.This bypasses CSRF for every API route, including any future cookie-authenticated browser endpoint accidentally placed under
/api. Prefer an explicit machine-endpoint allowlist, or state and enforce that all exempted routes require non-cookie authentication.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@docs/guides/21_CSRF.md` around lines 68 - 80, Update the CsrfTokenLayer configuration example to avoid exempting the entire /api prefix by default. Replace it with an explicit machine-endpoint allowlist, or document and enforce an invariant that every exempted route uses non-cookie authentication; ensure future cookie-authenticated browser endpoints cannot bypass CSRF unintentionally.docs/guides/05_REPOSITORY.md-94-101 (1)
94-101: 🗄️ Data Integrity & Integration | 🟠 Major | 🏗️ Heavy liftMake the
versioncolumn enforce optimistic concurrency.The upsert increments
versionbut never checks the caller’s expected version, so concurrent saves silently overwrite one another. Update withWHERE version = :expected_versionand raise a conflict when no row is affected.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@docs/guides/05_REPOSITORY.md` around lines 94 - 101, Update the repository upsert’s ON DUPLICATE KEY UPDATE flow to require version = :expected_version before applying changes, and raise a concurrency conflict when the update affects no row. Preserve the existing version increment and field assignments for successful saves.docs/guides/07_CONTROLLER.md-63-75 (1)
63-75: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick winAlign the controller with the published service contract.
This controller calls
update()anddelete(), butdocs/guides/04_SERVICE.mdonly publishescreate(),find(),list(), andmarkPaid(). Add these methods to the contract with their DTO/response types, or remove them from the canonical controller example.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@docs/guides/07_CONTROLLER.md` around lines 63 - 75, Align the canonical controller example with the published service contract by either documenting update() and delete() in the service contract with their DTO and response types, or removing the update() and destroy() actions from the controller example. Keep the chosen interface consistent across the controller and service documentation.docs/guides/05_REPOSITORY.md-72-75 (1)
72-75: 🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick winApply tenant and soft-delete filters to line-item queries.
This query omits both
tenant_idanddeleted_at IS NULL, despite the guide requiring those predicates on every query. Reapply the aggregate’s tenant scope and exclude deleted children before hydration.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@docs/guides/05_REPOSITORY.md` around lines 72 - 75, Update the invoice line-item query using the `$this->db->query` call to add the aggregate’s tenant scope and require `deleted_at IS NULL` alongside the existing `invoice_id` condition. Preserve the ascending `sort_order` ordering and ensure only tenant-owned, non-deleted children are hydrated.docs/guides/05_REPOSITORY.md-113-127 (1)
113-127: 🩺 Stability & Availability | 🟠 Major | ⚡ Quick winTranslate every database failure inside the repository.
saveLineItems()is called outside thePDOExceptionhandler, andsoftDelete()has no handler at all. These paths can leakPDOExceptiondirectly, contradicting the repository contract.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@docs/guides/05_REPOSITORY.md` around lines 113 - 127, Wrap the database operations in saveLineItems() and softDelete() with the repository’s existing PDOException translation mechanism. Ensure any PDOException from these paths is converted to the repository-level exception contract, while preserving the current tenant filtering and soft-delete behavior.docs/guides/04_SERVICE.md-149-177 (1)
149-177: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick winDo not silently discard the requested currency.
CreateInvoiceDTOexposescurrency, butfromRequest()never maps it andInvoice::create()receives no currency. Non-USD requests therefore default to USD or lose their currency information.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@docs/guides/04_SERVICE.md` around lines 149 - 177, Update CreateInvoiceDTO::fromRequest() to read the requested currency from the request data and pass it to the constructor’s currency parameter when creating the DTO. Ensure Invoice::create() receives and preserves this currency value through the existing DTO-to-invoice flow, while retaining USD only as the default when no currency is requested.docs/guides/04_SERVICE.md-102-110 (1)
102-110: 🗄️ Data Integrity & Integration | 🟠 Major | 🏗️ Heavy liftMake post-commit event delivery durable and idempotent.
If
eventBus->dispatch()fails after the transaction commits, the caller receives an error even though the invoice exists; retrying may create duplicates. Use an outbox written in the same transaction, then dispatch asynchronously with idempotent handling.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@docs/guides/04_SERVICE.md` around lines 102 - 110, Replace the direct post-commit eventBus->dispatch call in the invoice creation flow with an outbox record written within the same transaction as the invoice. Add asynchronous dispatch of the stored InvoiceCreatedIntegrationEvent, ensuring delivery and handling are idempotent so retries do not create duplicate invoices or effects.docs/guides/21_CSRF.md-123-146 (1)
123-146: 🔒 Security & Privacy | 🟠 Major | ⚡ Quick winEnforce the expected CSRF action during verification.
valid()derives the action from the submitted token, so a token minted for one action can be replayed for another. Either pass an expected action intovalid()/check()and compare it, or document thatactionis informational rather than an authorization scope.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@docs/guides/21_CSRF.md` around lines 123 - 146, Update the static CSRF verification example and its API usage around CsrfTokenLayer::valid() to accept and enforce an expected action, comparing it against the token’s action rather than trusting the submitted token. Apply the same contract to check() if applicable, and document the required action argument alongside the existing binding and lifetime parameters.docs/guides/06_GATEWAY.md-45-95 (1)
45-95: 🩺 Stability & Availability | 🟠 Major | 🏗️ Heavy liftCatch the complete Stripe exception surface.
charge()only translatesCardException,InvalidRequestException,ApiConnectionException, andRateLimitException;refund()only translatesInvalidRequestException. Other Stripe exceptions such asAuthenticationException,PermissionException,IdempotencyException, and API-error fallbacks can still escape, breaking the guide’s “vendor exceptions never escape this layer” rule. Add a final vendor-base/interface catch in both methods with safe context after the specific case catches.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@docs/guides/06_GATEWAY.md` around lines 45 - 95, Add a final catch for the Stripe vendor base exception/interface in both charge() and refund(), after their existing specific Stripe catches, translating any remaining vendor exception into GatewayException. Include safe, non-sensitive context and preserve the original exception as previous, ensuring AuthenticationException, PermissionException, IdempotencyException, and API fallback errors cannot escape either method.docs/guides/26_OAUTH2.md-31-42 (1)
31-42: 🔒 Security & Privacy | 🟠 Major | ⚡ Quick winLock public clients to S256 PKCE.
docs/guides/26_OAUTH2.mdcurrently documents public PKCE asS256/plain, and the discovery responses advertise both supported methods, whileAuthorizationServicefalls back toplainwhencode_challenge_methodis absent. Sinceplainsends the verifier in the request and discovery tells clientsplainis supported, don’t advertise/allow it by default; enforce S256 for public clients or add an explicit legacy opt-in with a strong migration warning.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@docs/guides/26_OAUTH2.md` around lines 31 - 42, Update the OAuth2 documentation around the authorization_code grant to state that PKCE is mandatory for public clients using S256 only, removing plain from the documented default behavior. Align the related discovery responses and AuthorizationService handling so plain is neither advertised nor accepted unless an explicitly enabled legacy opt-in is provided with a strong migration warning.docs/guides/20_FIRST_PARTY_PLUGINS.md-132-137 (1)
132-137: 🚀 Performance & Scalability | 🟠 Major | 🏗️ Heavy liftDo not describe the
usleep()fallback as non-blocking.
Coroutine::usleep()is cooperative, but the documented fallback tousleep()blocks the current worker/thread. Either qualify the claim for coroutine runtimes or provide a genuinely non-blocking scheduler path.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@docs/guides/20_FIRST_PARTY_PLUGINS.md` around lines 132 - 137, Update the retry backoff documentation near retry(n) to distinguish cooperative Coroutine::usleep behavior from the blocking usleep fallback. Remove the claim that the fallback never blocks the worker, or qualify it so non-blocking behavior is asserted only for coroutine runtimes.docs/guides/09_SECURITY.md-222-228 (1)
222-228: 🔒 Security & Privacy | 🟠 Major | ⚡ Quick winDo not fail open when the verification cache misses.
RequireVerifiedEmailLayerallows the request when the cache has no value, so cache eviction or an outage bypasses the layer entirely. Either deny on an unavailable/unknown verification state, or remove this layer and make the service-level check authoritative for every protected operation.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@docs/guides/09_SECURITY.md` around lines 222 - 228, Update RequireVerifiedEmailLayer’s cache-miss handling so an unknown or unavailable email-verification state does not allow the request. Deny the request on a null cache value, or remove this layer and ensure the service-level verification check is authoritative for every protected operation; preserve allow behavior only for confirmed verification.docs/guides/08_EVENTS.md-60-65 (1)
60-65: 🗄️ Data Integrity & Integration | 🟠 Major | 🏗️ Heavy liftDo not apply projections after committing while calling them “in-transaction.”
The flow commits before
collector->release()and projection execution. A projection failure can therefore leave the database committed but the read model stale. Apply projections before commit, or document this as a post-commit process backed by durable retry handling.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@docs/guides/08_EVENTS.md` around lines 60 - 65, The documented transaction flow incorrectly labels projections as in-transaction after commit. Update the flow around transaction->commit(), collector->release(), and projection->on() to either execute projections before committing or explicitly document them as post-commit with durable retry handling; ensure failure semantics no longer claim atomicity when the database is already committed.docs/guides/23_TENANCY.md-104-119 (1)
104-119: 🔒 Security & Privacy | 🟠 Major | 🏗️ Heavy liftDo not let a tenant cookie override the requested hostname.
In
domainandhostmodes, consulting the cookie before the host-derived identifier can route a request for tenant B’s hostname to tenant A’s database whenever the principal-bound cookie contains A. Revalidate the cookie against the authoritative host identifier, or make the host/domain identifier take precedence.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@docs/guides/23_TENANCY.md` around lines 104 - 119, The tenant-selection documentation must not allow a cookie to override the requested hostname in domain or host modes. Update the TenantContextStage behavior described here so the authoritative host/domain-derived identifier takes precedence, or ensure any cookie hint is revalidated against that identifier before use; retain cookie fallback only where it cannot route the request to another tenant.docs/guides/08_EVENTS.md-84-93 (1)
84-93: 🗄️ Data Integrity & Integration | 🟠 Major | 🏗️ Heavy liftUse a lossless representation for monetary event amounts.
Publishing currency as
floatcan change values during serialization or arithmetic. Use integer minor units (for example, cents) or a decimal string in the integration contract.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@docs/guides/08_EVENTS.md` around lines 84 - 93, Update the event constructor’s amount field to use a lossless integration-contract representation instead of float: prefer an integer minor-unit value or a decimal string, and adjust its documentation/comments to identify the chosen representation. Keep the remaining event fields and primitive-type contract unchanged.docs/guides/24_USER.md-104-117 (1)
104-117: 🔒 Security & Privacy | 🟠 Major | 🏗️ Heavy liftResolve the audit PII contradiction.
The guide promises “never PII” while explicitly logging and persisting
ip. Clarify whether IP addresses are intentionally retained; if so, document protection, access control, retention/purge, and redaction requirements, or stop storing them.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@docs/guides/24_USER.md` around lines 104 - 117, Update the AuditLogger documentation to resolve the contradiction around IP addresses: either remove IP capture from structured and database audit records, or explicitly classify IPs as retained sensitive data and document protection, restricted access, retention/purge, and redaction requirements. Keep the documentation consistent with the chosen behavior across the security-audit summary and field mapping.docs/guides/08_EVENTS.md-80-98 (1)
80-98: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick winRemove default values from readonly properties in the event examples.
Readonly properties are not allowed to declare initial values (
public string $version = '1.0';), so these examples fail withFatal error: Readonly property ... cannot have default value. Initializeversionthrough the constructor or return the literal fromversion()in both examples.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@docs/guides/08_EVENTS.md` around lines 80 - 98, Remove the default initializer from the readonly version property in both event examples. Preserve the version contract by initializing version through each constructor or returning the literal directly from each version() method, ensuring the examples remain valid PHP.docs/guides/23_TENANCY.md-45-50 (1)
45-50: 🎯 Functional Correctness | 🟠 Major | 🏗️ Heavy liftResolve the central/login routing path.
TenantContextStageonly bypasses tenant resolution forTENANCY_EXEMPTpaths (default/ping), then returns 404 when the cookie hint and tenant identifier both resolve to''. The guides still need a concrete exception/model for login/picker/public auth flows: either document the allowed exempt flow/prefix and route policy, or explicitly require those hosts/pages to be tenant-registered so the 404-only model is unambiguous.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@docs/guides/23_TENANCY.md` around lines 45 - 50, Clarify the central/login routing policy in docs/guides/23_TENANCY.md (lines 45-50) and docs/guides/09_SECURITY.md (lines 183-188): document the permitted exempt path or prefix and its routing behavior for login, tenant-picker, and public authentication flows, or explicitly require those hosts/pages to be tenant-registered. Ensure both guides consistently describe how these requests avoid or receive the 404 tenant-resolution response.docs/guides/11_PROJECT.md-70-76 (1)
70-76: 🔒 Security & Privacy | 🟠 Major | 🏗️ Heavy liftDo not exempt every
/apiroute from CSRF in the shared base.This base is reused by projects, including session-cookie applications documented later. A blanket
/apiexemption can let cookie-authenticated state-changing endpoints bypass CSRF. Scope exemptions to token-only routes or configure explicit stateless route groups.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@docs/guides/11_PROJECT.md` around lines 70 - 76, Update the shared base configuration around withSecurity and CsrfTokenLayer so it does not exempt every /api route from CSRF. Scope the exemption to explicitly stateless, token-only routes or remove it from the shared base and configure explicit stateless route groups, while preserving CSRF protection for cookie-authenticated state-changing endpoints.docs/guides/16_PLUGINS.md-61-71 (1)
61-71: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick winKeep namespace casing aligned with the directory layout.
The documented directory is
API/Contracts, but the example exposesPlugins\\MyModule\\Api\\Contracts.... With PSR-4 on case-sensitive filesystems, this casing mismatch can prevent the contract from autoloading. UseAPI.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@docs/guides/16_PLUGINS.md` around lines 61 - 71, Update the exposes example in the routes JSON documentation to use the namespace segment API, matching the documented API/Contracts directory layout. Keep the remaining Plugins\MyModule\Api\Contracts path unchanged.docs/guides/12_WORKER.md-260-263 (1)
260-263: 🗄️ Data Integrity & Integration | 🟠 Major | 🏗️ Heavy liftDo not acknowledge a partially processed job on graceful shutdown.
AcknowledgeStageremoves jobs after success, but this branch returnsJobResult::success()after only some batches. The queue item is then deleted and the remaining tenants are lost. Return a requeue/deferred result, or persist a checkpoint and enqueue the remainder.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@docs/guides/12_WORKER.md` around lines 260 - 263, Update the graceful-shutdown branch in the worker loop to avoid returning JobResult::success() when only some batches have been processed. Return the existing requeue/deferred result type so AcknowledgeStage retains the queue item, or persist a checkpoint and enqueue the unprocessed tenants before returning.docs/guides/12_WORKER.md-186-191 (1)
186-191: 🗄️ Data Integrity & Integration | 🟠 Major | 🏗️ Heavy liftUse a durable outbox for post-commit job dispatch.
If
queue->push()fails after the transaction commits, the invoice exists but the email job is absent; the committed write cannot be rolled back. Persist an outbox record in the transaction and deliver it asynchronously with idempotency.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@docs/guides/12_WORKER.md` around lines 186 - 191, Replace the direct post-commit queue->push call in the invoice workflow with a durable outbox record written within the transaction. Add asynchronous outbox delivery that dispatches the SendInvoiceEmailJob payload to the emails queue, using idempotency to prevent duplicate email jobs.docs/guides/15_ERROR_HANDLING.md-82-101 (1)
82-101: 🔒 Security & Privacy | 🟠 Major | 🏗️ Heavy liftDefine redaction and notifier-specific error payloads before capturing this context automatically.
Full traces, previous exception messages, and arbitrary context can contain tokens, request data, SQL, vendor secrets, or PII. Do not forward the same unredacted payload to database/file sinks and external Slack/mail notifiers; use an allowlist and redaction policy.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@docs/guides/15_ERROR_HANDLING.md` around lines 82 - 101, Update the ErrorPipeline context-capture documentation to define an explicit redaction policy and notifier-specific payloads before claiming automatic capture. Specify an allowlist and redact sensitive data from traces, previous exception messages, arbitrary context, and other request or identity fields; ensure database/file sinks and external Slack/mail notifiers do not receive the same unredacted payload.docs/guides/16_PLUGINS.md-131-136 (1)
131-136: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick winShow the two
viewsforms as separate valid examples.The current block contains duplicate
viewskeys and no separator between them, so it is invalid JSON/JSONC. Split the string and object forms into separate snippets or comment out the alternative.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@docs/guides/16_PLUGINS.md` around lines 131 - 136, Update the documentation example around the two views forms to present them as separate valid JSONC snippets, or comment out the alternative form, so no snippet contains duplicate views keys or missing separators. Preserve both the shorthand string form and the explicit object form.docs/guides/17_PHP_IO_CLI.md-8-10 (1)
8-10: 🩺 Stability & Availability | 🟠 Major | ⚡ Quick winDo not advertise Symfony as dev-only while using it at runtime.
docs/guides/17_PHP_IO_CLI.mdstill says runtime dependencies are onlypsr/log, but the package requiressymfony/console, and the non-TTY fallback/example uses SymfonyQuestionHelper/ArgvInput. A--no-devor production install can fail when a command needs non-TTY I/O; either make Symfony a runtime dependency, add a dependency-free fallback, or explicitly document the required installation contract.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@docs/guides/17_PHP_IO_CLI.md` around lines 8 - 10, Update the dependency and installation guidance in the php-io-cli documentation to match its actual runtime use of Symfony Console, including the non-TTY ConsoleIO/BufferIO fallback and QuestionHelper/ArgvInput examples. Remove the claim that Symfony is dev-only and either document Symfony as a required runtime dependency or clearly specify the installation contract that guarantees it is available.docs/guides/03_DOMAIN.md-56-70 (1)
56-70: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick winPass creation time into the factory.
Invoice::create()callsnew DateTimeImmutable()despite the guide explicitly forbidding that pattern. It also lacks an import for the globalDateTimeImmutable. Accept an explicit timestamp/clock value and import or fully qualify the type.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@docs/guides/03_DOMAIN.md` around lines 56 - 70, Update Invoice::create to accept an explicit DateTimeImmutable creation timestamp and use it for createdAt instead of constructing a new timestamp internally. Import DateTimeImmutable or fully qualify the global type, while preserving the existing factory behavior and parameter flow.docs/guides/03_DOMAIN.md-61-70 (1)
61-70: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick winFix the domain-event constructor call.
The entity calls
new InvoiceCreatedDomainEvent($invoice), but the declared event constructor requiresInvoiceId,ClientId,Money, andDateTimeImmutable. As written, the sample throws an argument-count error; pass the declared fields or change the event contract.Also applies to: 230-238
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@docs/guides/03_DOMAIN.md` around lines 61 - 70, Update the InvoiceCreatedDomainEvent construction in the invoice creation flow to pass the constructor’s declared InvoiceId, ClientId, Money, and DateTimeImmutable fields instead of the Invoice entity object. Keep the event data aligned with the newly created invoice and preserve the existing record call.docs/guides/01_KERNEL.md-3-5 (1)
3-5: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick winReplace the stale Sentinel kernel path.
This new HKM guide still directs readers to
vendor/sentinel/kernel/, while the supplied runtime/scaffolding uses the HKM-facingAlfacodeTeam\PhpServicePlatformnamespace and package. Update the path and terminology before publishing.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@docs/guides/01_KERNEL.md` around lines 3 - 5, Update the introductory kernel guidance in 01_KERNEL.md to replace the stale vendor/sentinel/kernel/ path and Sentinel terminology with the HKM-facing AlfacodeTeam\PhpServicePlatform namespace and package terminology used by the runtime and scaffolding.docs/guides/02_MODULE.md-143-150 (1)
143-150: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick winImport or fully qualify every dependency used by the Provider.
TransactionManager,DomainEventCollector,IntegrationEventBus, andIdentityare referenced withoutusedeclarations. In this namespace, PHP resolves them asInvoiceModule\...classes, so the sample will fail unless the intended namespaces are imported.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@docs/guides/02_MODULE.md` around lines 143 - 150, Update the provider example’s dependency references in the InvoiceService binding to import or fully qualify TransactionManager, DomainEventCollector, IntegrationEventBus, and Identity, ensuring each resolves to its intended class rather than an InvoiceModule-local namespace. Keep the existing InvoiceService construction and repository binding unchanged.docs/guides/01_KERNEL.md-104-108 (1)
104-108: 🔒 Security & Privacy | 🟠 Major | ⚡ Quick winSynchronize the security architecture documentation before release.
The public guide still describes nonexistent kernel layers, so the changelog's “corrected to match the code” claim is currently inaccurate.
docs/guides/01_KERNEL.md#L104-L108: documentCsrfTokenLayer, Auth-plugin layers, and route-levelthrottle/shieldfilters instead of the obsolete Firewall/RateLimiter/TokenValidator sequence.CHANGELOG.md#L25-L30: retain the correction claim only after the guide matches the implementation, or amend the release note.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@docs/guides/01_KERNEL.md` around lines 104 - 108, Update docs/guides/01_KERNEL.md lines 104-108 to describe the implemented CsrfTokenLayer, Auth-plugin layers, and route-level throttle/shield filters, replacing the obsolete Firewall/RateLimiter/TokenValidator sequence. After the guide is accurate, retain the correction claim in CHANGELOG.md lines 25-30; otherwise amend that release note to match the documentation state.docs/guides/02_MODULE.md-125-132 (1)
125-132: 🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick winAlign the Provider contract with the manifest identifiers.
module.jsondeclares"database.query"and exposes"InvoiceServiceContract", but the canonical Provider returnsDatabasePort::classandInvoiceServiceContract::class. Either mirror the manifest with literal domain/export strings, or update the manifest to use contract class names consistently.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@docs/guides/02_MODULE.md` around lines 125 - 132, Align the Provider contract with module.json by making requires() and exposes() use the same identifier format as the manifest: either return the literal domain/export strings or update the manifest to reference the corresponding contract class names. Keep both declarations consistent across the provider and manifest.
🟡 Minor comments (17)
docs/guides/README.md-40-49 (1)
40-49: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick winAdd the safe-deployment guide to the index.
SAFE_DEPLOYMENTS_GUIDE.mdis part of this documentation cohort but is absent from the CLI/data guide list, so readers cannot discover the deployment procedures from the main index.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@docs/guides/README.md` around lines 40 - 49, Update the “CLI & data” guide index in README.md to add a linked entry for SAFE_DEPLOYMENTS_GUIDE.md, using the guide’s title and matching the existing table format so the safe-deployment procedures are discoverable.docs/guides/06_GATEWAY.md-192-200 (1)
192-200: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick winAdd language identifiers to all fenced code blocks.
These blocks trigger markdownlint MD040. Use identifiers such as
php,yaml,text,html, orjavascriptaccording to the contents.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@docs/guides/06_GATEWAY.md` around lines 192 - 200, Add language identifiers to every affected fenced code block: docs/guides/06_GATEWAY.md lines 192-200; docs/guides/25_AUTH.md lines 24-27 and 309-323; docs/guides/26_OAUTH2.md lines 17-20 and 108-118; and docs/guides/21_CSRF.md lines 18-20, 103-116, and 237-248. Choose the appropriate identifier for each block’s contents, such as php, yaml, text, html, or javascript.Source: Linters/SAST tools
docs/guides/07_CONTROLLER.md-197-225 (1)
197-225: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick winValidate input types before parsing or constructing the DTO.
An array
dueDatecan raiseTypeError, which is not caught bycatch (\Exception), producing a 500 instead of a 422. Likewise, any truthy scalarlineItemspassesempty()and later breaks iteration. Require a string date and array line items before processing.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@docs/guides/07_CONTROLLER.md` around lines 197 - 225, Update the validation flow before DateTimeImmutable construction and DTO creation: require dueDate to be a non-empty string before parsing, so invalid types are recorded in errors as 422 validation failures, and require lineItems to be a non-empty array rather than relying on empty(). Preserve the existing future-date validation and ValidationException behavior for valid inputs.docs/guides/06_GATEWAY.md-213-227 (1)
213-227: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick winReset
shouldFailafter the promised one-shot failure.
failOnNextCall()setsshouldFailpermanently, so every later call fails despite the method name. Clear the flag before throwing, or rename the helper to indicate persistent failure.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@docs/guides/06_GATEWAY.md` around lines 213 - 227, The fake gateway’s shouldFail flag must represent a one-shot failure as promised by failOnNextCall(). Update generate() to clear shouldFail before throwing the GatewayException, while preserving successful generation and call-tracking behavior for subsequent invocations.docs/guides/20_FIRST_PARTY_PLUGINS.md-3-8 (1)
3-8: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick winFinish the HKM rebrand in this guide.
The guide still says “GDA kernel” even though the surrounding documentation identifies the project as HKM Kernel. This leaves users with an obsolete product name and inconsistent bootstrap guidance.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@docs/guides/20_FIRST_PARTY_PLUGINS.md` around lines 3 - 8, Update the introductory plugin description in the guide to consistently use the HKM Kernel product name instead of “GDA kernel,” and revise the surrounding bootstrap guidance to match the current HKM terminology while preserving the existing plugin registration instructions.docs/guides/09_SECURITY.md-139-148 (1)
139-148: 🔒 Security & Privacy | 🟡 Minor | ⚡ Quick winAlign the plugin guide’s CSRF description with
CsrfTokenLayer’s HMAC model.
- The kernel CSRF guide and source consistently describe this as stateless HMAC-signed CSRF, not plain double-submit. Replace “double-submit-cookie based” in
docs/guides/20_FIRST_PARTY_PLUGINS.mdor update the security guide if the latter is no longer authoritative.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@docs/guides/09_SECURITY.md` around lines 139 - 148, Align the CSRF documentation with CsrfTokenLayer’s stateless HMAC-signed model: update docs/guides/20_FIRST_PARTY_PLUGINS.md:162-164 to remove the “double-submit-cookie based” description and describe HMAC-signed tokens instead. Keep docs/guides/09_SECURITY.md:139-148 authoritative and make no direct change there.docs/guides/11_PROJECT.md-114-116 (1)
114-116: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick winUse “afterward” for the documented American-English locale.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@docs/guides/11_PROJECT.md` around lines 114 - 116, Update the prose in the documented section to use the American-English term “afterward” instead of “afterwards,” without changing the technical guidance or code references.Source: Linters/SAST tools
docs/guides/17_PHP_IO_CLI.md-16-16 (1)
16-16: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick winAdd language identifiers to all three fenced blocks.
Also applies to: 603-603, 739-739
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@docs/guides/17_PHP_IO_CLI.md` at line 16, Add the appropriate language identifier to each of the three fenced code blocks in the documentation, including the blocks at the referenced locations, by annotating their opening fences while preserving the existing code content.Source: Linters/SAST tools
docs/guides/12_WORKER.md-11-11 (1)
11-11: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick winAdd a language identifier to the pipeline diagram fence.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@docs/guides/12_WORKER.md` at line 11, Update the pipeline diagram’s fenced code block in the worker guide to include the appropriate language identifier after the opening fence, while preserving the diagram content and formatting.Source: Linters/SAST tools
docs/guides/16_PLUGINS.md-34-34 (1)
34-34: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick winAdd language identifiers to both fenced blocks.
Also applies to: 156-156
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@docs/guides/16_PLUGINS.md` at line 34, Update the fenced code blocks in the documented sections, including the location corresponding to the additional occurrence, to include the appropriate language identifier after each opening fence.Source: Linters/SAST tools
docs/guides/12_WORKER.md-341-356 (1)
341-356: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick winUpdate the Supervisor example to HKM paths and names.
This guide now documents HKM Kernel, but copying this section still creates
sentinel-*programs and/var/log/sentinel/...logs. Use the canonical HKM service/log paths or label these as legacy.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@docs/guides/12_WORKER.md` around lines 341 - 356, Update the Supervisor examples for sentinel-worker-critical and sentinel-worker-default to use the canonical HKM program names and service/log paths, including each stdout_logfile and stderr_logfile. Do not leave sentinel-* identifiers or /var/log/sentinel paths unless the section is explicitly labeled as legacy.docs/guides/15_ERROR_HANDLING.md-11-11 (1)
11-11: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick winAdd language identifiers to all four fenced blocks.
Also applies to: 165-165, 216-216, 251-251
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@docs/guides/15_ERROR_HANDLING.md` at line 11, Update all four fenced code blocks in the documentation, including the blocks at the referenced locations, to specify the appropriate language identifier immediately after each opening fence. Preserve the existing examples and formatting aside from adding these identifiers.Source: Linters/SAST tools
docs/guides/15_ERROR_HANDLING.md-204-210 (1)
204-210: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick winCorrect the JSON media-type match.
*/jsonis not a normal JSONAcceptvalue; clients commonly sendapplication/jsonorapplication/*+json. If implemented literally, JSON clients may receive the wrong error format or a debug page. Define the matching rules explicitly for both error layers.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@docs/guides/15_ERROR_HANDLING.md` around lines 204 - 210, Update the JSON detection documentation for both the kernel ErrorStage and pre-kernel ErrorGuard to match standard JSON media types, including application/json and application/*+json, rather than the invalid */json pattern. Keep the existing X-Requested-With, JSON-body, and /api-prefix signals, and state the rules separately for each layer.docs/guides/11_PROJECT.md-47-52 (1)
47-52: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick winUse the documented CLI entrypoint in all commands.
The project CLI template documents
app/cli/run.php, but the worker and CLI guides showphp cli.php, which is not a committed app entrypoint. Replace those commands withphp app/cli/run.php(or labelcli.phpexplicitly as a generated/wrapper shim).🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@docs/guides/11_PROJECT.md` around lines 47 - 52, Update the command examples in docs/guides/11_PROJECT.md, docs/guides/12_WORKER.md (lines 322-333), and docs/guides/14_CLI.md (lines 30-31) to use the committed app/cli/run.php entrypoint via php app/cli/run.php; alternatively, explicitly label any remaining cli.php usage as a generated or wrapper shim.README.md-566-567 (1)
566-567: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick winProvide an HTTPS clone path as well.
The new instructions require a configured GitHub SSH key, which blocks many contributors. Use HTTPS or document both HTTPS and SSH forms.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@README.md` around lines 566 - 567, Update the repository cloning instructions to include an HTTPS clone command alongside the existing SSH command, allowing contributors without configured GitHub SSH keys to proceed.README.md-217-217 (1)
217-217: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick winAlign the
hkm moduledocumentation with the CLI help.The README says this command inspects/updates packages, but
tools/src/main.zigstill advertiseshkm module [create|delete]. Make the public table and native help describe the same supported subcommands.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@README.md` at line 217, Align the `hkm module` entry in README.md and the CLI help defined in main.zig so both describe the same supported create and delete subcommands. Update the table text to match the native help without implying unsupported inspect or update behavior.docs/guides/02_MODULE.md-24-65 (1)
24-65: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick winUse JSONC or remove the inline comments.
This block is labeled
jsonbut contains//comments, so it is not valid JSON and cannot be copied into a parser as shown. Label itjsoncor present a valid JSON example separately.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@docs/guides/02_MODULE.md` around lines 24 - 65, Update the module manifest example around the JSON block to use a JSONC language label when retaining its inline comments, or remove all comments and keep the json label. Ensure the displayed example matches the syntax of its declared format.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 51322384-d0d0-47d9-ac72-101c904b78cf
📒 Files selected for processing (38)
.gitignoreCHANGELOG.mdREADME.mddocs/guides/00_SENTINEL_OVERVIEW.mddocs/guides/01_KERNEL.mddocs/guides/02_MODULE.mddocs/guides/03_DOMAIN.mddocs/guides/04_SERVICE.mddocs/guides/05_REPOSITORY.mddocs/guides/06_GATEWAY.mddocs/guides/07_CONTROLLER.mddocs/guides/08_EVENTS.mddocs/guides/09_SECURITY.mddocs/guides/10_TESTING.mddocs/guides/11_PROJECT.mddocs/guides/12_WORKER.mddocs/guides/13_ANTIPATTERNS.mddocs/guides/14_CLI.mddocs/guides/15_ERROR_HANDLING.mddocs/guides/16_PLUGINS.mddocs/guides/17_PHP_IO_CLI.mddocs/guides/18_MIGRATIONS.mddocs/guides/19_DATABASE.mddocs/guides/20_FIRST_PARTY_PLUGINS.mddocs/guides/21_CSRF.mddocs/guides/22_DATA_ACCESS_ORM_BLUEPRINT.mddocs/guides/23_TENANCY.mddocs/guides/24_USER.mddocs/guides/25_AUTH.mddocs/guides/26_OAUTH2.mddocs/guides/27_ENTITY_SUPPORT.mddocs/guides/README.mddocs/guides/SAFE_DEPLOYMENTS_GUIDE.mdsrc/Kernel/Error/DebugPageRenderer.phpsrc/System/GlobalKernelProjectScaffolder.phptools/src/commands/upgrade.zigtools/src/lib/banner.zigtools/src/main.zig
Summary
Closes #
Type of change
master→main, includes a CHANGELOG version bump)Target branch
master(development), ormaster→mainrelease PR and adds a## [x.y.z] - YYYY-MM-DDsection toCHANGELOG.md.How has this been tested?
Checklist
declare(strict_types=1);.module.json/proj.json, not in PHP.config[].\PDOException/SDK exceptions escape).## [Unreleased]entry toCHANGELOG.md.Screenshots / notes (optional)
Summary by CodeRabbit
New Features
Documentation