From f235e7c629cf8ad250d2ab687943f06faddea5f0 Mon Sep 17 00:00:00 2001 From: Snider Date: Sat, 8 Aug 2026 13:23:29 +0100 Subject: [PATCH] docs: name the 110 tests that cannot pass here, and who owns them MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 110 of the Module suite's failures are not defects in this package. They are tests referencing classes owned by other packages — and every one of those packages already requires dappcore/php: dappcore/php-tenant requires dappcore/php: * dappcore/agent requires dappcore/php: * So no dependency could make them pass here. They cannot be fixed inside this repository by any amount of work; they need to move to the repository that owns what they test. Naming them is the only useful thing this repo can do with them, which is what docs/misfiled-tests.md does — by owner, by file, with counts. php-tenant 82 failures, 13 files Core\Tenant\Models\User (78), Core\Tenant\Rules\ResourceStatusRule (4) agent 25 failures, 1 file and wrong twice: it names Core\Agentic\Services\AgentDetection, while the class lives at Core\Mod\Agentic\Services — a namespace the ecosystem has moved away from, in a package that cannot be depended on from here. Fixing the namespace alone would not make it pass. host.uk.com 3 failures, 1 file Website\Host\Mail\ContactFormSubmission lives in the application, not in any package. A framework package testing its consumer's mailable. Most of the php-tenant ones want a User only to authenticate a request, and the note says so: where that is all they need, a fixture user this package owns is cheaper than moving the file. Where the test genuinely exercises tenancy, it belongs in php-tenant. That distinction is theirs to make, not mine to guess. The module-debt job's comment now points at the document rather than repeating a summary that would drift from it. No code changed. No test moved or deleted — deleting them here would erase the findings their owners need. python3 yaml.safe_load .github/workflows/tests.yml valid vendor/bin/pint --test pass Co-Authored-By: Virgil --- .github/workflows/tests.yml | 14 ++++--- docs/misfiled-tests.md | 83 +++++++++++++++++++++++++++++++++++++ 2 files changed, 91 insertions(+), 6 deletions(-) create mode 100644 docs/misfiled-tests.md diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 76f73d6..4e66eb3 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -59,12 +59,14 @@ jobs: # The Module suite — src/**/*Test.php — reported, never gating. # # It carries known failures, and the number is worth seeing rather than - # hiding: 448 at the time of writing, and they are not 448 bugs. Roughly 114 - # are class-not-found for classes owned by sibling packages (Core\Tenant\Models, - # Core\Agentic\Services) — tests that cannot pass in this repository at all; - # about 30 are one real defect, StorageUrlResolver being handed a CdnUrlBuilder - # where it wants a BunnyStorageService; the rest are ordinary assertion and - # status-code failures. + # hiding — but it is not one number. 110 of them are tests referencing classes + # owned by dappcore/php-tenant, dappcore/agent, or the consuming application, + # and since every one of those already requires dappcore/php, no dependency + # could make them pass here. They are in the wrong repository rather than + # broken. docs/misfiled-tests.md names them by owner and file. + # + # The rest are this package's own: assertion mismatches, status codes, and a + # missing offload:migrate command registration. # # continue-on-error rather than `|| true`, and the difference matters: this # way the step's own result is visible in the run, so the count can be driven diff --git a/docs/misfiled-tests.md b/docs/misfiled-tests.md new file mode 100644 index 0000000..d2e7812 --- /dev/null +++ b/docs/misfiled-tests.md @@ -0,0 +1,83 @@ +# Tests in this repository that cannot pass in this repository + +110 of the Module suite's failures are not defects in `dappcore/php`. They are +tests that reference classes owned by other packages — classes this package +cannot depend on, because **every one of those packages already depends on this +one**. + +``` +dappcore/php-tenant requires dappcore/php: * +dappcore/agent requires dappcore/php: * +dappcore/service requires dappcore/php: * +``` + +Adding any of them to `composer.json` closes a loop. So these tests cannot be +made to pass where they are, by any amount of work inside this repository. They +need to move to the repository that owns what they test. + +This document names them so their owners inherit findings rather than +archaeology. It is deliberately not a fix list for this repo. + +## By owner + +### `dappcore/php-tenant` — 82 failures, 13 files + +Referencing `Core\Tenant\Models\User` (78) and `Core\Tenant\Rules\ResourceStatusRule` (4). +Both exist, in `php-tenant/Models/User.php` and `php-tenant/Rules/ResourceStatusRule.php`. + +``` +src/Core/Config/Tests/Feature/ConfigServiceTest.php +src/Core/Tests/Feature/DatabaseMigrationTest.php +src/Core/Tests/Feature/ValidationRulesTest.php +src/Core/Tests/Feature/PerformanceBaselineTest.php +src/Core/Tests/Feature/SecurityHeadersTest.php +src/Core/Tests/Feature/ErrorPagesTest.php +src/Core/Tests/Feature/SecurityFixesTest.php +src/Core/Tests/Feature/ImageOptimizerTest.php +src/Core/Tests/Feature/AdminRouteSmokeTest.php +src/Mod/Trees/Tests/Feature/SignupReferralTest.php +src/Mod/Trees/Tests/Feature/SubscriberMonthlyCommandTest.php +src/Mod/Trees/Tests/Feature/DailyLimitAndBonusTest.php +src/Mod/Trees/Tests/Feature/TreePlantingTest.php +``` + +Most of these want a `User` only to authenticate a request. Where that is all +they need, the cheaper fix than moving the file is a test user this package +owns — a fixture model, or Testbench's own — rather than the tenant package's. +Where the test genuinely exercises tenancy, it belongs in `php-tenant`. + +### `dappcore/agent` — 25 failures, 1 file + +``` +src/Mod/Trees/Tests/Unit/AgentDetectionTest.php +``` + +It references `Core\Agentic\Services\AgentDetection` and +`Core\Agentic\Support\AgentIdentity`. **Both names are also stale**: the classes +exist in `dappcore/agent` under `Core\Mod\Agentic\Services` and +`Core\Mod\Agentic\Support`. So this file is wrong twice — a namespace the +ecosystem has moved away from, in a package that cannot be depended on from here. +Correcting the namespace alone would not make it pass. + +### host.uk.com — 3 failures, 1 file + +``` +src/Core/Tests/Feature/MailConfigurationTest.php +``` + +References `Website\Host\Mail\ContactFormSubmission`, which lives in the +**application**, not in any package: `app/Website/Host/Mail/ContactFormSubmission.php` +in host.uk.com. A framework package testing its consumer's mailable. There is no +dependency that could make this work; the test belongs in the application. + +## Why this is worth writing down + +The Module suite reports one number, and one number invites one explanation. +These 110 have nothing wrong with them as tests — several look well written. They +are in the wrong repository, which is a different problem with a different owner +and a different fix, and it does not get solved by anyone driving a failure count +down inside this package. + +The remaining Module-suite failures are ordinary: assertion mismatches, status +codes, a missing `offload:migrate` command registration. Those are this +repository's own and are being worked separately.