Repository navigation
[architecture] Extract testing: PHPUnit execution, extensions, coverage and PR feedback #380
Description
Proposal / validation gate: this issue records an extraction design for maintainer validation. Repository/package names are candidates. Approve the boundary and migration plan before implementation; this task does not authorize creating repositories, implementing the extraction, releases or consumer rollout.
Problem and proposal
Propose php-fast-forward/testing / fast-forward/testing for test execution and results, separate from formatting/docs rendering. Existing TestsCommand, src/PhpUnit/*, phpunit.xml and tests workflow currently depend on the entire DevTools runtime.
Scope and contracts
Own PHPUnit argument/bootstrap resolution, DevToolsExtension, BypassFinals and notification subscribers, event tracer, ergebnis agent reporter integration, coverage threshold/summary and JUnit/HTML artifacts. Preserve caller test code and custom configuration. Notifications and final bypass remain explicit profiles, not forced in all consumers.
Own test-specific Actions/workflows, test matrix adapters, test-summary/coverage PR feedback and phpunit-tests portable skill. Generic review-request comments and project/label policy belong to repository-governance. Documentation #367 assembles supplied coverage artifacts; it does not run PHPUnit. DevTools orchestrates combined reports.
Concrete tasks / acceptance
- Define result schema: exact source SHA, suite/runtime, outcome versus valid skip/no-tests, thresholds, JUnit/coverage locations, stable exit codes and stderr diagnostics. Never represent missing coverage as success/zero by accident.
- Inventory consumers importing FastForward\DevTools\PhpUnit classes/configs and direct PHPUnit/Prophecy APIs. Decide public testing-extension API versus execution-only runtime; retain unscoped API dependencies where required. Do not promise a scoped PHAR/CPX removes class collisions.
- Reuse completed Integrate ergebnis/phpunit-agent-reporter into agent-aware PHPUnit runs #327/[tests] Structure agent-driven PHPUnit JSON results #329 reporter behavior; compare real agent and non-agent output. Preserve coverage metadata rules and bootstrap resolution in local/global/isolated installations.
- Reconcile Add --parallel support to tests command for safe, zero-workaround parallel PHPUnit execution #8 parallel testing, Add Infection command integration to evaluate mutation testing coverage #262 mutation tests and Resolve PHP test matrix from Composer constraints and setup-php stable availability #246 matrix discovery as separate unfinished capabilities, not prerequisites or automatically completed items.
- Build/test on untrusted PR code with read-only permissions; trusted feedback publisher consumes validated bounded artifacts tied to repository/PR/head SHA, never executes artifact contents. One sticky comment per test context; no unrelated review duplication.
- Validate passing/failing/skipped/empty/guide-only suites, threshold failures, unavailable coverage drivers, malformed/stale artifacts, incompatible public APIs and fork PRs.
- Pilot small library then a custom-extension/coverage consumer; preserve required-check identities or document coordinated protection change before adoption.
Alternatives
A phpunit-extension package alone omits runner/report contracts; a separate report-generation repository duplicates test result interpretation. Start one testing domain, split an extension package only if a real compatibility/release boundary requires it.
Delivery and migration gates
- One domain owner for library/CLI, relevant reusable workflow/Action, portable skill, tests and versioned docs; adapters call the same implementation. Do not create a surface solely for symmetry.
- No production dependency back to DevTools; no generic Actions repository as mandatory runtime. CPX/external execution does not isolate PHPUnit/config classes loaded in the same PHP process.
- Preserve project overrides, exit codes, JSON contracts, working directory/cache/color options, and PHP consumer compatibility. Distinguish tool runtime from application minimum.
- Validate Composer archives, runtime resources and skill provenance outside the source checkout; no host-cache absolute paths in consumer files.
- Release availability, exact workflow/runtime/skill compatibility, then pilot consumer PRs and rollback are separate gates. Never point consumers at a not-yet-published version. No release/merge/deploy/repository creation is performed by this planning issue.
- Root architecture tracking: [architecture] Plan domain-owned tooling extraction and DevTools orchestration #240; release-safe refs Define release-safe refs for consumer workflow wrappers and checked-out actions #238; open distribution redesign PR feat!: distribute DevTools through CPX and portable skills #376 must be revalidated before implementation. Evidence baseline: DevTools main 35d27ee (2026-10-21), not an assertion that PR feat!: distribute DevTools through CPX and portable skills #376 is merged.
Architectural / Isolation Criteria
- MUST: Core logic MUST live in dedicated services; commands/controllers only orchestrate.
- MUST: Separate input resolution, domain transformations and rendering; keep CLI/framework I/O out of reusable behavior.
- MUST: Support reuse/extensibility without major refactoring and deterministic, testable exits/output.
- MUST: Separate gathering/transformation from writes/publishing; repeated execution MUST be idempotent or explicitly bounded.
- MUST: Update README, command/config docs, skill references and synchronized consumer examples with the actual new ownership.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsBacklog
Activity
coisa commentedon Oct 25, 2026
Testing extraction: initial custody, assessment and next gate — 2026-10-25
The forwarded maintainer direction starts the implementation lane for this existing issue, while retaining separate repository-creation, release and consumer-adoption gates. This executor retains DevTools #376 and the Testing lane; Code Standards and consumer/framework executors keep their existing scopes. No additional implementer or card is introduced.
Verified evidence
4f3cf00517fb64adbaa26689b64431d27b40266d, base84e154046e07cafa6ac09a9e12434b1ff5dcb5e0.php-fast-forward/testingAPI lookup returned 404. This means the proposed destination is not accessible through this connection, not proof that no differently named/private destination exists.Bounded implementation plan
TestsCommand,src/PhpUnit/{Bootstrap,Coverage,Runner,Event}, their tests,phpunit.xml, testing-owned workflow/feedback sections andresources/skills/fast-forward-phpunit-tests. Keep aggregate reports and site publication with their current owners.Scenarios and observed results
Untrusted PR execution stays read-only. Any trusted feedback publisher must validate bounded artifacts against repository/PR/head SHA and never execute their contents. Serialized PHP coverage remains a trusted local API concern, not a trusted feedback artifact format.
Exact pending actions
No code changes, new repository/PR, merge, release or consumer rollout were performed in this assessment. Issue type, labels, assignee, milestone and project fields are unchanged; existing links provide coordination without another card.
coisa commentedon Oct 25, 2026
Local Testing preparation: imports/API inventory and executable bootstrap fixture — 2026-10-25
Continuing the authorized local lane without waiting for a remote repository. This is a tested local preparation patch, not an extracted package or publication approval.
Source: DevTools #376 at
4f3cf00517fb64adbaa26689b64431d27b40266d. Work is isolated; existing staged profiles/optional-skills and Code Standards/consumer checkouts were preserved.Inventory and concrete constraints
The implementation boundary contains TestsCommand (645 lines) and eight PhpUnit files (775 lines), plus XML, DI, reporter/process environment, workflow and artifact contracts. They are not safe mechanical deletions.
coverage.phpand expects its own CodeCoverage class: cross-major serialized objects are a concrete compatibility boundary. Keep this trusted-local API separate from normalized process results and trusted feedback artifacts.src/testsfound no directFastForward\\DevTools\\PhpUnitimports. This bounded local observation is not remote or active-worktree inventory. The consumer owner's fresher matrix remains authoritative for that lane.Actual local patch and results
Added only
tests/PhpUnit/Bootstrap/BootstrapShimExecutionTest.php; final file SHA-256:07dcd8f58ed6563cc869cbb78766876eaaea1ae3cf6b57a662fe7bc3e0555d1e.Used PHP 8.5.12, PHPUnit 12.5.40, php-code-coverage 12.5.8 and Symfony Console/Process 7.4.21 from an existing donor runtime, with test bootstrap remapping source/tests to the isolated worktree. No new package was installed. An initial Composer setup could not write a generated lock under filesystem restrictions, so the bounded tests reused the existing donor; there is no fresh-install claim. An existing selected test needed a writable worktree fixture directory; the same scope passed with permitted filesystem execution. No hook, policy or credentials changed.
Not executed: full DevTools quality/report/coverage gate; PHP 8.3/8.4 matrix; cross-PHPUnit-major coverage compatibility; extracted Composer archive/install; fork feedback publisher; Code Standards adoption; consumer lifecycle or namespace isolation. Focused tests do not establish those claims.
Supplier role/sync reconciliation
Read the framework lifecycle audit. At the current supplier candidate, changelog-maintainer already declares
fast-forward-changelog, and SyncCommand has no skills/agents synchronization reference. The installed legacy supplier is different. This does not prove upgrade/removal safety there; the existing consumer owner keeps the lifecycle patch and verification. No consumer edit or duplicate implementation was made.Next precise actions
Continue separating bootstrap/runtime inputs and result interpretation from Console I/O, following the real Changelog invocable POPO pattern without copying its PHP 8.5/Symfony 8.1 floor blindly. Keep public extensions and local configs compatible; bypass/notifications remain opt-in in the extracted contract. #8/#262/#246 remain separate.
Canonical Testing destination is still needed for a standalone PR, not for local inventory/fixtures. A valid exact-SHA review/publication flow is needed before publishing this patch; the suspended pipeline was not restarted or bypassed. No commit, push, PR, repository creation, merge, release or consumer rollout occurred. Existing issue metadata is unchanged.
coisa commentedon Oct 25, 2026
Local implementation cut: bootstrap runtime input and result interpretation — 2026-10-25
Implemented the next bounded local cut from the previous fixture/inventory assessment, without creating a standalone repository or resuming publication.
Baseline commit:
4f3cf00517fb64adbaa26689b64431d27b40266d(#376). This is an uncommitted local patch, not a new commit SHA or published package.Behavior and API
src/PhpUnit/Result/ProcessResultInterpreter.php: final readonly invocable POPO, accepting captured string + integer exit status and returning the existing payload. It has no Console/process/filesystem dependency. The parser was moved from TestsCommand without changing legacy semantics.runtimeAutoloadinput. Existing two-argument callers keep the same DevTools runtime resolution and consumer-first content. An explicit caller-owned runtime can now be passed without changing the consumer configuration or public namespace.Final local identity
Manifest SHA-256 across the seven files:
c128b72864f1dee2ce71ef8e748957cb88155e8aced369cea2c8058fb0ada5d7.Algorithm: sort repository-relative paths; concatenate each
path + NUL + lowercase file SHA-256 + LF; SHA-256 the concatenation. This identifies local file contents, not a Git commit/tree.df94ef64cb1839d5937d69ee2983ab2394e5ca6da92b2671566097a8287cca2d1d5e386a58f9a84d84e7f8f6d7fb231e4b9d1c4c78b7955f3aa46a23054ea2e2de067737bf5cfb3c31275488299fc4a1b8f346939751a32f0333c4abab85ec5014ca8247be4a881e1f45b098af34a25c3e7c49e26bb7ca01a55f24196dc05da710888ae82e103b23f7fc2c10f86f0ef807cb6a68ed58d893483237cf13e2d12212882d6d358c49b41171b738113cc69b2834b921db3d71fc4235041f03a3e517665d648213bd0a232363f6d907135e5c9b54293bb93a24c04a5e32995e2630a9Actual validation, sequential and focused
Not executed: full DevTools gate/coverage reports, full PHP 8.3/8.4 runtime matrix, cross-major PHPUnit coverage compatibility, extracted archive/install, fork publisher, consumer lifecycle/adoption, Code Standards integration. No release-style result schema/source-SHA fields or namespace isolation are claimed.
Remaining precise work and boundaries
Continue resolving the existing public extension/bootstrap and coverage-object compatibility constraints before a standalone extraction. Canonical remote destination remains necessary for its PR, while this local implementation does not depend on creating one. Code Standards release/skill integration stays coordinated with its exclusive owner; consumer/framework checkouts were untouched.
The publication gate remains suspended. No code commit/push/PR, repository creation, merge/release, hook alteration, policy/credential change or pipeline retry occurred. Existing profiles/skills staged work and issue metadata remain unchanged. #8/#262/#246 are still separate capabilities.