ipsocode/hypervel-auditing
Audit trail package for Hypervel apps that logs model creates, updates, and deletes with old/new values and user attribution. Track changes, debug issues, and support compliance with a simple, configurable activity history.
This is the first assessment for ipsocode/hypervel-auditing, produced from the v0.2.0 release notes alone (no prior evaluation, no repository/API data supplied). Confidence is therefore low-to-moderate; treat findings as hypotheses to validate during a spike rather than settled conclusions.
Architecture fit. The package implements an auditing concern (Ipsocode\Auditing\Contracts\Auditor) with a fluent, callback-scoped causer API — a pattern familiar from Laravel Auditing. It is a Hypervel package, not stock Laravel: v0.2.0 requires hypervel/components 0.4.x-dev. That is the single most important architectural fact in this release. If our target application is Hypervel (Swoole/coroutine runtime), fit is good and the dependency is expected. If we are on Laravel or a Laravel-adjacent stack, this is not a drop-in and we should evaluate the upstream Laravel equivalent instead. A TPM's first action is to confirm which runtime we are actually standardising on.
Integration feasibility. The application-facing surface is small and low-risk: consumers using the package's bundled Auditor need no change, so the breaking change in this release only bites teams that wrote their own auditor implementation. Feasibility is moderate overall, gated by two things: (1) the dev-branch dependency, and (2) the fact that the contract now carries causer-resolution responsibility, which implies the package expects to derive the current user from framework context we must wire up correctly.
Technical risk.
0.4.x-dev is not a tagged stability. Any composer update can pull an arbitrary commit of hypervel/components and, via it, an implicit PHP version change. This is a supply-chain and reproducibility risk that must be neutralised before production use.Auditor gains actingAs() and currentCauser(). Pre-1.0 semver gives no compatibility promise; expect more of these. Any internal implementation of the contract is a maintenance liability.actingAs($user, fn () => ...) scopes attribution to a callback. Under a coroutine runtime, callback/stack-scoped state is the correct design specifically because static causer state can leak across concurrent requests. The release asserts the mechanism but not its concurrency safety; this must be explicitly tested, since a leak would write wrong actor attribution into audit records — a correctness and compliance failure, not merely a bug.Key questions.
hypervel/components 0.4.x-dev be tagged, and on what timeline? Can we pin to a commit hash today?Auditor ourselves anywhere, or is that a hypothetical third party?Stack fit. This is a Hypervel-only integration. Confirm the runtime decision first; everything below assumes Hypervel is approved. If not, stop and evaluate the Laravel-native alternative — do not attempt to shim hypervel/components into a Laravel app.
Migration path. For a greenfield adoption, the sequence is short. For existing consumers of v0.1.x:
Auditor. If yes, add actingAs() and currentCauser() to it before upgrading — this is the only code change v0.2.0 forces.hypervel/components and PHP versions in composer.lock.Auditor::fake() in the test suite before adopting actingAs() in production code, so the assertions exist to prove attribution works.Compatibility. Two hard constraints to reconcile in a spike: the dev-branch hypervel/components version and the PHP version it transitively imposes. Pin hypervel/components to an explicit commit (or a dev-<branch>#<sha> constraint) and commit the lockfile; treat any movement in that dependency as a reviewable change, not a routine update. Verify our PHP matrix against the resolved constraint rather than the release-note phrasing, which is imprecise.
Sequencing (recommended, ~2 sprints of part-time effort).
actingAs() callbacks to prove no causer bleed. This test is the go/no-go gate.fake()-based assertions to CI.actingAs() used deliberately at console commands, queued jobs, and system-triggered writes where no request user exists — that is its main production value, and it is worth standardising in a team convention rather than leaving to individual judgement.Maintenance. Ongoing effort is dominated by dependency tracking, not by the package's own API. Budget recurring time to watch hypervel/components and the PHP constraint, and to absorb further pre-1.0 contract changes. Mitigate by isolating all Ipsocode\Auditing touchpoints behind a thin internal service so a future swap (or a switch to the Laravel equivalent) is a single-file change rather than a codebase-wide edit. Do not implement the Auditor contract directly if it can be avoided — that is precisely where this release broke consumers.
Support. The project is young and effectively single-maintainer (@dangerdd1 plus @ipsocode). There is no vendor SLA, no LTS branch, and no stated deprecation policy. We own the risk of unanswered issues. The pragmatic mitigation is internal: keep the isolation layer, keep the concurrency and attribution tests, and retain the ability to fork. Do not make this package a hard dependency of a regulated, audit-critical path without that exit option.
Scaling. Audit tables grow monotonically and faster than the business tables they describe — roughly one row per audited write. Plan retention, archival, and partitioning at pilot time, not at 10M rows. Watch write amplification on hot paths and decide deliberately whether audit writes are synchronous (stronger guarantees, added latency) or queued (cheaper, with a window of unaudited activity). The actingAs() scoping also has a scaling dimension: it makes causer propagation explicit per job, which is exactly what you want when fanning work across coroutines and queues, but it means every new entry point must be taught who the actor is.
Failure modes.
composer update changes framework components and PHP version at once, producing failures far from the cause.composer update breaking a custom auditor in production. Prevented by the isolation layer plus a lockfile review step.Ramp-up. Low for application developers — actingAs() and fake() are small, well-named APIs, and teams familiar with Laravel Auditing will be productive in under a day. The real ramp-up cost sits with whoever owns the dependency pinning, the concurrency guarantees, and the storage/retention design; that person needs a half-day with the source, not just the release notes. Document the team convention for where actingAs() is required (console, queue, system) as part of onboarding, since that is the one piece of judgement the API cannot enforce.
How can I help you explore Laravel packages today?