feat: migrate audit to query-lib schema objects - #206
Conversation
|
@greptile-apps review |
|
@greptileai review the current head 394aa7f. The September 4 request using the older bot handle did not start a review; this uses the currently documented trigger. |
|
@greptileai review |
The schema assertions pinned attribute counts, array positions, column types, sizes, filters, index types and index column ordering straight off the adapter's getAttributes()/getIndexes(). That mirrors the source rather than testing it: the repository requires observable behaviour, and these lines only ever compared the schema definition against a second copy of itself. Every deleted property is already covered through the public API, proven by breaking each one and watching a behavioural test go red: dropping the json filter on data, dropping the datetime filter on time, making idx_userId_event unique and making userId required each fail the existing write/read tests. Index column ordering is the one property with no observable behaviour at all -- swapping it reaches the real DDL and every test still passes -- so no assertion can guard it. userId's size was the only property not otherwise reachable, so it is replaced rather than dropped: testUserIdAcceptsFullKeyLength writes a key-length user id and reads it back, which fails once the column shrinks. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
@greptileai review |
d7bd655 to
4e53dd5
Compare
|
Both findings addressed at Finding 1 — tests mirror schema internals: fixed.
That last row is the interesting one. The swap reaches the real DDL ( One property was not otherwise reachable, so it is replaced rather than dropped: The ClickHouse geo flags are fully subsumed by the existing Finding 2 — The premise is right (nothing under // vendor/utopia-php/database/src/Database/Database.php:1442
private function getEventContext(): int
{
$context = Coroutine::getCid();
I pushed the removal first and CI proved it: The real fix belongs upstream (guard line 1442 like 2848, or declare Verified at |
|
@greptileai review |
Summary
Canonical continuation of utopia-php/audit#133 in
packages/audit, following the approved move to the monorepo.dev-feat-query-libVCS branch without an inline alias; declare PDO MySQL and Swoole test extensions.Verification
Both registry and linked modes passed:
Pint, PHPStan, Rector, Composer validation and monorepo validation passed.
Hosted CI and PR review remain pending. No package split, release, tag or merge has been performed.