Skip to content

feat(openide): lay the run configuration out like PhpStorm's, with its own interpreter - #130

Closed
roxblnfk wants to merge 27 commits into
j-plugins:mainfrom
roxblnfk:feat/openide-run-form
Closed

roxblnfk wants to merge 27 commits into
j-plugins:mainfrom
roxblnfk:feat/openide-run-form

Conversation

@roxblnfk

@roxblnfk roxblnfk commented Oct 11, 2026 •

Copy link
Copy Markdown
Collaborator

What was changed

  • The OpenIDE run configuration form follows the PHPUnit one: Test Runner with the scope as radio buttons and only that scope's fields, then Command Line — Interpreter, Interpreter options, Testo executable, working directory, environment — then the Testo options (Filter, Reports, Coverage, Mutation Testing).
  • Each configuration has its own PHP interpreter; empty means the project default, so existing configurations keep following the active profile. A deleted profile fails the configuration check and the run instead of falling back. Every launch path resolves it: run, debug, coverage, mutation, Rerun Failed Tests and Infection's tool environment.
  • Interpreter options go right after php, before the plugin's own debug / PCOV options.
  • The Command field is gone; a saved command still loads and runs, as on PhpStorm.
  • The Filter tags are labelled Suites / Groups / Exclude groups, no longer clashing with the Suite scope.
  • The Type filter is a tag list on both PhpStorm and OpenIDE, one --type per tag (Testo ORs them, !name excludes). A single type saved by earlier builds is folded into the list on load.

Review notes

  • PhpTestFrameworks.binaryPath/configFile always answer for the active profile, and since PHP for OpenIDE 0.9.7 the Testo binary and config can be set per profile. TestoLaunch reads the chosen profile's entry through PhpTestFrameworkSettings.resolved and PhpTestFrameworkDetector, which are @ApiStatus.Internal (the verifier reports them as internal API usages, still Compatible). Each call falls back to the public facade on a LinkageError.

  • PHP for OpenIDE 0.9.4 publishes no way from a profile id to its launch environment: PhpLaunchEnvironments.of is Kotlin-internal, ProfileLaunchEnvironment is @ApiStatus.Internal, and PhpLaunchEnvironment.allOf(project) carries no ids. TestoRunConfiguration.profileEnvironment matches the saved id by position (active profile first, then the registry order), checks the display name, and refuses a list that does not line up. Worth asking upstream for a public lookup.

  • Not done: interpreter options do not reach the Testo process Infection spawns; the shared options panel stays per implementation (the PhpStorm editor wraps the PHP plugin's form and works on TestoRunnerSettings).

Checklist

roxblnfk and others added 23 commits October 12, 2026 00:39
…launch

refactor(run): drop the unused toRemoteIfMapped helper
test: compare local paths the way the host spells them
docs: point CLAUDE.md at TestoLocationHints, groupNamesOf and the tool environment

The local path processor returns OS-native separators, so the two tests failed on Windows while passing on Linux CI.

Assisted-By: Claude Opus 5.5 <noreply@anthropic.com>
…the EDT

fix(infection): start Infection without the Testo run's environment
fix(infection): offer Apply and Revert only where they can write
docs: describe the mutation launch independently of the PHP implementation

A Debug run's environment carries its Xdebug session into every mutant process.

Assisted-By: Claude Opus 5.5 <noreply@anthropic.com>
Assisted-By: Claude Opus 5.5 <noreply@anthropic.com>
… within the grace period

A missing or unfinished mutation.json kept the whole Testo run from retention and Clear history forever; main leaves such directories behind whenever a mutation run fails to start. The protection now lasts as long as TestoRunStore's own for a run without a manifest.

Assisted-By: Claude Opus 5.5 <noreply@anthropic.com>
…ation run

A new mutation run has its own work directory, input copy and staging, so nothing an unconfirmed process holds is shared with it. After a restart the flag could never clear, which locked the Testo run out of mutation and out of retention for good. The run now starts; if it fails while an earlier process may be alive, the failure says so. The inputs of that process stay protected for the same grace period as an incomplete run.

Assisted-By: Claude Opus 5.5 <noreply@anthropic.com>
The whole Testo run directory was deleted while holding the lock that Mutate, the mutation history and the Coverage view's MSI wait for on the EDT. The decision and a deleting mark are taken under the lock; the files go after it, and input protection refuses a run being deleted.

Assisted-By: Claude Opus 5.5 <noreply@anthropic.com>
… unconfirmed

A rerun takes the run's single process slot, so it dropped the unconfirmed process: its Stop retry was lost and, once the rerun ended, so was the protection of its inputs. A new full run is still allowed; reruns wait until the earlier process confirms.

Assisted-By: Claude Opus 5.5 <noreply@anthropic.com>
…run's finish

A mutant rerun never finishes the run, so its unconfirmed stop was measured from the run's own finishedAt and could fall out of the grace period at once: after a restart its inputs were neither protected nor reported. Summaries written before keep falling back to finishedAt.

Assisted-By: Claude Opus 5.5 <noreply@anthropic.com>
…run being deleted

Inputs are protected before the run's directory is created, and refused once the Testo
run is gone; a summary is never written into a run claimed for deletion or a missing directory.

Assisted-By: Claude Opus 5.5 <noreply@anthropic.com>
…d run's files

Assisted-By: Claude Opus 5.5 <noreply@anthropic.com>
…rators

Each implementation spells a local path its own way on Windows; the contract only pins the path.

Assisted-By: Claude Opus 5.5 <noreply@anthropic.com>
Assisted-By: Claude Opus 5.5 <noreply@anthropic.com>
Assisted-By: Claude Opus 5.5 <noreply@anthropic.com>
… rebase

Assisted-By: Claude Opus 5.5 <noreply@anthropic.com>
Until startNotify, destroyProcess only queues the destruction, so a launch whose console or debug session
failed to come up left its PHP process running.

Assisted-By: Claude Opus 5.5 <noreply@anthropic.com>
…cannot see

As PhpStorm does, the run goes ahead without --log-html/--log-junit and says so once per interpreter and
configuration, so a Docker Compose profile can run with the defaults. Coverage still refuses an unreachable report.

Assisted-By: Claude Opus 5.5 <noreply@anthropic.com>
Assisted-By: Claude Opus 5.5 <noreply@anthropic.com>
@roxblnfk
roxblnfk force-pushed the feat/openide-run-form branch from b17d45d to 3104c35 Compare October 12, 2026 05:28
Since 0.9.7 the PHP plugin's description is in Russian; the Plugin Verifier wants 40 Latin characters first (DescriptionNotStartingWithLatinCharacters) and otherwise drops the dependency as "Unavailable", so the copy staged for verifyPlugin gets a Latin opening sentence.

Assisted-By: Claude Opus 5.5 <noreply@anthropic.com>
…s own interpreter

docs(changelog): note the Coverage view's mutation launch leaving the EDT

PHP for OpenIDE publishes no way from a profile id to its launch environment (`PhpLaunchEnvironments.of` is internal), so a saved interpreter is matched by position in `PhpLaunchEnvironment.allOf`, checked against the display name; a list that does not line up is refused instead of running on the wrong interpreter.

Closes j-plugins#129

Assisted-By: Claude Opus 5.5 <noreply@anthropic.com>
Testo reads --type repeatedly (included types ORed, a ! prefix excludes, exclusion wins), so the Type filter becomes a tag list in both forms, next to Suites and Groups. The single type saved by earlier builds (testo_type on PhpStorm, testoType on OpenIDE) is folded into the list on load. A selection of several types is never the configuration of an attribute or node context, which always carries one.

Assisted-By: Claude Opus 5.5 <noreply@anthropic.com>
@roxblnfk
roxblnfk force-pushed the feat/openide-run-form branch from fb94db7 to 10a64e2 Compare October 12, 2026 06:19
…orks settings

Since PHP for OpenIDE 0.9.7 the Testo binary and configuration file can be set per interpreter profile, but the public PhpTestFrameworks facade always answers for the active profile, so a configuration on another interpreter ran the active profile's Testo. The chosen profile's entry is only reachable through internal API; each call is guarded and falls back to the facade if a later version no longer links with it.

Assisted-By: Claude Opus 5.5 <noreply@anthropic.com>
@roxblnfk

Copy link
Copy Markdown
Collaborator Author

Moved to #135: the branch now lives in this repository and targets open-ide, where the OpenIDE work continues.

@roxblnfk roxblnfk closed this Oct 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

OpenIDE: align the run configuration form with PhpStorm's (interpreter field, no Command field)

2 participants