Skip to content

Decouple PHP integrations from the shared core - #116

Merged
roxblnfk merged 14 commits into
j-plugins:open-idefrom
revenant20:shared-core
Oct 10, 2026
Merged

roxblnfk merged 14 commits into
j-plugins:open-idefrom
revenant20:shared-core

Conversation

@revenant20

Copy link
Copy Markdown
Contributor

Related to #115.

Shared Testo features currently reference PhpStorm's PHP APIs directly. Introduce PHP and tool-environment contracts, move implementation-specific classes and registrations to src/phpstorm, and retain the existing 252/262 builds and saved configuration formats.

Project guidance is maintained in CLAUDE.md, with AGENTS.md forwarding to it.

The shared code owns run selections, command arguments, navigation hints, coverage and mutation lifecycle. Contract tests, behavior snapshots and an isolation check cover the boundary. The changes also make data-provider ordering deterministic, keep temporary rerun filters out of saved configurations, preserve stopped mutation reruns and protect active archives during cleanup. Test fixtures normalize temporary paths on macOS.

Validation on 0dac21972c4a76bec3144dea2e2b4842a356c1ad: check buildPlugin passed on both 252 and 262, with 728 tests per variant and no failures or skips. The packaged contents match the builds verified as compatible with IU 252.28539.97, 253.33813.55, 261.27258.48, 262.10968.63 and 263.6259.32. Plugin Verifier reports deprecated, scheduled-for-removal and experimental API usages, but no compatibility problems.

Base: upstream main at 0b8c04e47c21dabcae4143c9e0c1bb3d12d3fc01.

The runtime sources, tests and build configuration at 449feb246eb2bd0e7b0103cfafbc7ad1245db9ac are unchanged from the tested revision 0dac21972c4a76bec3144dea2e2b4842a356c1ad. The documentation update was checked for links and consistency with the source layout.

@revenant20 revenant20 mentioned this pull request Oct 3, 2026
@roxblnfk
roxblnfk changed the base branch from main to open-ide October 8, 2026 15:55
…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>

@roxblnfk roxblnfk left a comment •

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this — it is a large piece of work, and the move itself holds up. I compared main against this branch area by area: the producer, the PSI predicates and indexes, line markers and location hints, the command line and coverage flags, the descriptors and every persisted id. Those are equivalent, down to the bytecode where the PHP API is involved; no index version needs a bump, and no saved id or XML name changed.

The behaviour changes riding along with the refactor are now settled; every inline thread names the commit that addressed it (the rerun-filter one was my mistake and is retracted). I pushed these commits:

  • d937227: the missing-interpreter error goes through the bundle again, the unused toRemoteIfMapped is gone, two tests compare local paths the way the host spells them, CLAUDE.md points at the new names.
  • d0c4f64: the Coverage view's Mutate resolves the environment off the EDT, Infection starts without the Testo run's (possibly Debug) environment, Apply/Revert are offered only where they can write.
  • f02004f: the Unreleased changelog keeps only user-visible changes.
  • 42b6554: a mutation directory without a finished summary pins its Testo run for the grace period, not forever.
  • 8f74286: a stop that went unconfirmed blocks no further run; a run that then fails says an earlier process may still be alive, and in-session Stop retry stays.
  • f035993: an archived run is deleted outside the archive lock the EDT waits on.

These keep the guarantees #117 relies on (inputs of an uncertain process are not deleted while it may still read them, Stop can be retried in the session that owns it). Rebasing #117 conflicts only in CHANGELOG.md (keep its Added, drop Changed) and gradle/libs.versions.toml (from the earlier merge of main).

Two notes on the tests remain:

  • The baselines are recorded from the refactored code: they arrive in the same commit and import com.github.xepozz.testo.phpstorm.*, so they cannot run on main. They pin future behaviour, but they do not show that this refactor preserves main's, and they cover no remote interpreter, clone(), rerun filters or Debug run.
  • On Windows, 8 baseline tests fail: local paths come back with \ (the platform's own setters and local path processor, as on main), and CommandBaselineTest stands in for php with a /bin/sh script. CI runs on Linux, so this is low priority.

Comment thread src/main/kotlin/com/github/xepozz/testo/infection/TestoMutationArchive.kt Outdated
Comment thread src/main/kotlin/com/github/xepozz/testo/infection/TestoMutationService.kt Outdated
Comment thread src/main/kotlin/com/github/xepozz/testo/coverage/TestoCoverageMutation.kt Outdated
Comment thread src/main/kotlin/com/github/xepozz/testo/infection/TestoMutationArchive.kt Outdated
Comment thread src/main/kotlin/com/github/xepozz/testo/infection/TestoMutationApply.kt Outdated
Comment thread CHANGELOG.md Outdated
…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>
@roxblnfk
roxblnfk marked this pull request as ready for review October 10, 2026 13:29
@roxblnfk
roxblnfk requested a balanced review from Copilot October 10, 2026 13:29

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Both modified file-based indexes retain their old versions, preventing guaranteed rebuilds after indexing logic changes.

2 open findings
What changed in this PR

Decouples shared Testo functionality from PhpStorm APIs through PHP/tool contracts while preserving existing behavior and configuration formats.

Changes:

  • Introduces shared run, PHP, path, coverage, and tool-environment contracts.
  • Moves PhpStorm implementations and registrations into dedicated source sets.
  • Adds isolation, compatibility, lifecycle, ordering, and behavior-snapshot tests.
File Description
AGENTS.md Points contributors to project guidance.
CHANGELOG.md Documents ordering and mutation fixes.
CLAUDE.md Updates project architecture guidance.
build.gradle.kts Adds PhpStorm source sets and test normalization.
src/​main/​kotlin/​com/​github/​xepozz/​testo/​TestoAttributes.kt Extracts shared group-name parsing.
src/​main/​kotlin/​com/​github/​xepozz/​testo/​TestoContext.kt Uses the PHP contract for template context.
src/​main/​kotlin/​com/​github/​xepozz/​testo/​TestoUtil.kt Delegates framework detection to the adapter.
src/​main/​kotlin/​com/​github/​xepozz/​testo/​coverage/​TestoCoverageEngine.kt Generalizes coverage to contract configurations.
src/​main/​kotlin/​com/​github/​xepozz/​testo/​coverage/​TestoCoverageMutation.kt Uses contract-based mutation configurations.
src/​main/​kotlin/​com/​github/​xepozz/​testo/​coverage/​TestoCoverageSourcePaths.kt Delegates source-path mapping.
src/​main/​kotlin/​com/​github/​xepozz/​testo/​coverage/​editor/​TestoCoveringTestsLineMarkerProvider.kt Uses PHP declaration views.
src/​main/​kotlin/​com/​github/​xepozz/​testo/​coverage/​perTest/​TestoCoveringTestsLauncher.kt Launches through shared configuration contracts.
src/​main/​kotlin/​com/​github/​xepozz/​testo/​coverage/​perTest/​TestoTestIdentityMapper.kt Resolves tests through the PHP adapter.
src/​main/​kotlin/​com/​github/​xepozz/​testo/​index/​PhpInputFilter.kt Adds implementation-neutral PHP filtering.
src/​main/​kotlin/​com/​github/​xepozz/​testo/​index/​TestoDataProviderUtils.kt Adds deterministic provider usage ordering.
src/​main/​kotlin/​com/​github/​xepozz/​testo/​index/​TestoDataProvidersIndex.kt Migrates indexing to PHP views.
src/​main/​kotlin/​com/​github/​xepozz/​testo/​index/​TestoGroupsIndex.kt Migrates group indexing to PHP views.
src/​main/​kotlin/​com/​github/​xepozz/​testo/​infection/​TestoInfectionArguments.kt Reads shared run selections.
src/​main/​kotlin/​com/​github/​xepozz/​testo/​infection/​TestoInfectionCommand.kt Uses the tool-environment contract.
src/​main/​kotlin/​com/​github/​xepozz/​testo/​infection/​TestoMutationActions.kt Updates process and edit-state actions.
src/​main/​kotlin/​com/​github/​xepozz/​testo/​infection/​TestoMutationApply.kt Restricts edits to project content.
src/​main/​kotlin/​com/​github/​xepozz/​testo/​infection/​TestoMutationArchive.kt Protects active and unconfirmed archives.
src/​main/​kotlin/​com/​github/​xepozz/​testo/​infection/​TestoMutationCell.kt Connects mutation recipes to contracts.
src/​main/​kotlin/​com/​github/​xepozz/​testo/​infection/​TestoMutationEditorMarks.kt Applies project-aware mutation checks.
src/​main/​kotlin/​com/​github/​xepozz/​testo/​infection/​TestoMutationExecutor.kt Extracts implementation-neutral archive hooks.
src/​main/​kotlin/​com/​github/​xepozz/​testo/​infection/​TestoMutationIgnore.kt Uses adapter-based statement discovery.
src/​main/​kotlin/​com/​github/​xepozz/​testo/​infection/​TestoMutationModel.kt Tracks unconfirmed process ownership.
src/​main/​kotlin/​com/​github/​xepozz/​testo/​infection/​TestoMutationPanel.kt Displays unconfirmed and failed outcomes.
src/​main/​kotlin/​com/​github/​xepozz/​testo/​infection/​TestoMutationService.kt Manages prepared tools and protected inputs.
src/​main/​kotlin/​com/​github/​xepozz/​testo/​infection/​TestoMutationToolWindow.kt Preserves tabs holding processes.
src/​main/​kotlin/​com/​github/​xepozz/​testo/​infection/​TestoToolProcess.kt Implements tool lifecycle observation.
src/​main/​kotlin/​com/​github/​xepozz/​testo/​launch/​TestoCommandLine.kt Centralizes Testo CLI argument generation.
src/​main/​kotlin/​com/​github/​xepozz/​testo/​launch/​TestoConfiguration.kt Defines the shared configuration contract.
src/​main/​kotlin/​com/​github/​xepozz/​testo/​launch/​TestoConfigurationNames.kt Extracts configuration naming rules.
src/​main/​kotlin/​com/​github/​xepozz/​testo/​launch/​TestoCoverageArguments.kt Extracts coverage argument generation.
src/​main/​kotlin/​com/​github/​xepozz/​testo/​launch/​TestoReportLocation.kt Defines report-path contracts.
src/​main/​kotlin/​com/​github/​xepozz/​testo/​launch/​TestoRunContexts.kt Centralizes context-to-run decisions.
src/​main/​kotlin/​com/​github/​xepozz/​testo/​launch/​TestoRunSelection.kt Models shared persisted run selections.
src/​main/​kotlin/​com/​github/​xepozz/​testo/​mixin.kt Migrates test detection to PHP views.
src/​main/​kotlin/​com/​github/​xepozz/​testo/​php/​TestoPhp.kt Defines the PHP integration contract.
src/​main/​kotlin/​com/​github/​xepozz/​testo/​php/​TestoToolEnvironment.kt Defines tool process lifecycle contracts.
src/​main/​kotlin/​com/​github/​xepozz/​testo/​runs/​TestoRunArchiver.kt Archives contract-based interpreter metadata.
src/​main/​kotlin/​com/​github/​xepozz/​testo/​runs/​TestoRunHistoryActions.kt Restores runs through adapter factories.
src/​main/​kotlin/​com/​github/​xepozz/​testo/​runs/​TestoRunReplayProfile.kt Replays shared configurations.
src/​main/​kotlin/​com/​github/​xepozz/​testo/​runs/​TestoRunStore.kt Uses safe archive deletion.
src/​main/​kotlin/​com/​github/​xepozz/​testo/​tests/​TestoConsoleProperties.kt Captures shared paths and tool environments.
src/​main/​kotlin/​com/​github/​xepozz/​testo/​tests/​TestoLocationHints.kt Extracts location parsing.
src/​main/​kotlin/​com/​github/​xepozz/​testo/​tests/​TestoStackTraceParser.kt Uses shared path mappings.
src/​main/​kotlin/​com/​github/​xepozz/​testo/​tests/​TestoTestLocator.kt Removes the core PhpStorm locator.
src/​main/​kotlin/​com/​github/​xepozz/​testo/​tests/​TestoTestRunLineMarkerProvider.kt Uses PHP views and shared hints.
src/​main/​kotlin/​com/​github/​xepozz/​testo/​tests/​actions/​TestoRerunWithExecutorAction.kt Accepts shared configurations.
src/​main/​kotlin/​com/​github/​xepozz/​testo/​tests/​actions/​TestoRunCommandAction.kt Creates configurations through the adapter.
src/​main/​kotlin/​com/​github/​xepozz/​testo/​tests/​console/​TestoConsoleAugmenter.kt Uses shared path translation.
src/​main/​kotlin/​com/​github/​xepozz/​testo/​tests/​inspections/​TestoGroupNameProblems.kt Extracts pure inspection logic.
src/​main/​kotlin/​com/​github/​xepozz/​testo/​tests/​inspections/​TestoInspectionSuppressor.kt Delegates PHP call resolution.
src/​main/​kotlin/​com/​github/​xepozz/​testo/​tests/​run/​TestoRunConfigurationHandler.kt Removes the core PhpStorm handler.
src/​main/​kotlin/​com/​github/​xepozz/​testo/​tests/​run/​TestoRunConfigurationProducer.kt Removes the core PhpStorm producer.
src/​main/​kotlin/​com/​github/​xepozz/​testo/​tests/​run/​TestoRunPaths.kt Owns the default configuration filename.
src/​main/​kotlin/​com/​github/​xepozz/​testo/​ui/​TestoCoverageByTestCodeVisionProvider.kt Uses PHP function views.
src/​main/​kotlin/​com/​github/​xepozz/​testo/​ui/​TestoHistoryCodeVisionProvider.kt Uses PHP function views.
src/​main/​kotlin/​com/​github/​xepozz/​testo/​ui/​TestoIconProvider.kt Uses adapter-neutral PHP files and classes.
src/​main/​kotlin/​com/​github/​xepozz/​testo/​util/​ExitStatementsVisitor.kt Removes PHP visitor inheritance.
src/​main/​kotlin/​com/​github/​xepozz/​testo/​util/​PsiUtil.kt Uses adapter-backed attributes.
src/​main/​resources/​META-INF/​coverage.xml Includes PHP-specific coverage registrations.
src/​main/​resources/​META-INF/​plugin.xml Includes the PHP adapter descriptor.
src/​main/​resources/​messages/​TestoBundle.properties Adds mutation lifecycle messages.
src/​phpstorm/​kotlin/​com/​github/​xepozz/​testo/​phpstorm/​PhpStormConsole.kt Builds PhpStorm console properties.
src/​phpstorm/​kotlin/​com/​github/​xepozz/​testo/​phpstorm/​PhpStormRunSelection.kt Maps selections to persisted settings.
src/​phpstorm/​kotlin/​com/​github/​xepozz/​testo/​phpstorm/​PhpStormTestoPhp.kt Implements the PHP contract.
src/​phpstorm/​kotlin/​com/​github/​xepozz/​testo/​phpstorm/​PhpStormToolEnvironment.kt Implements tool preparation.
src/​phpstorm/​kotlin/​com/​github/​xepozz/​testo/​phpstorm/​PhpToolLauncher.kt Moves the PhpStorm launcher implementation.
src/​phpstorm/​kotlin/​com/​github/​xepozz/​testo/​phpstorm/​TestoComposerConfig.kt Moves Composer integration.
src/​phpstorm/​kotlin/​com/​github/​xepozz/​testo/​phpstorm/​actions/​TestoGenerateMethodActionBase.kt Moves PHP generation support.
src/​phpstorm/​kotlin/​com/​github/​xepozz/​testo/​phpstorm/​actions/​TestoGenerateTestMethodAction.kt Moves the PHP generation action.
src/​phpstorm/​kotlin/​com/​github/​xepozz/​testo/​phpstorm/​coverage/​TestoCoverageProgramRunner.kt Moves the PhpStorm coverage runner.
src/​phpstorm/​kotlin/​com/​github/​xepozz/​testo/​phpstorm/​coverage/​TestoMutationProgramRunner.kt Adds the PhpStorm mutation runner.
src/​phpstorm/​kotlin/​com/​github/​xepozz/​testo/​phpstorm/​tests/​TestoFrameworkType.kt Moves the PHP framework type.
src/​phpstorm/​kotlin/​com/​github/​xepozz/​testo/​phpstorm/​tests/​TestoTestCreateInfo.kt Moves PHP test creation.
src/​phpstorm/​kotlin/​com/​github/​xepozz/​testo/​phpstorm/​tests/​TestoTestDescriptor.kt Moves the PHP test descriptor.
src/​phpstorm/​kotlin/​com/​github/​xepozz/​testo/​phpstorm/​tests/​TestoTestLocator.kt Implements PhpStorm navigation.
src/​phpstorm/​kotlin/​com/​github/​xepozz/​testo/​phpstorm/​tests/​TestoVersionDetector.kt Moves PHP version detection.
src/​phpstorm/​kotlin/​com/​github/​xepozz/​testo/​phpstorm/​tests/​actions/​TestoNewTestFromClassAction.kt Moves PHP test creation action.
src/​phpstorm/​kotlin/​com/​github/​xepozz/​testo/​phpstorm/​tests/​actions/​TestoRerunFailedTestsAction.kt Moves failed-test reruns.
src/​phpstorm/​kotlin/​com/​github/​xepozz/​testo/​phpstorm/​tests/​inspections/​TestoGroupNameInspection.kt Moves the PHP inspection wrapper.
src/​phpstorm/​kotlin/​com/​github/​xepozz/​testo/​phpstorm/​tests/​overrides/​PhpRunInheritorsListCellRenderer.kt Moves the PHP chooser renderer.
src/​phpstorm/​kotlin/​com/​github/​xepozz/​testo/​phpstorm/​tests/​run/​TestoDebugRunner.kt Moves the PhpStorm debug runner.
src/​phpstorm/​kotlin/​com/​github/​xepozz/​testo/​phpstorm/​tests/​run/​TestoReportTarget.kt Implements report locations.
src/​phpstorm/​kotlin/​com/​github/​xepozz/​testo/​phpstorm/​tests/​run/​TestoRunConfiguration.kt Implements shared Testo configuration.
src/​phpstorm/​kotlin/​com/​github/​xepozz/​testo/​phpstorm/​tests/​run/​TestoRunConfigurationFactory.kt Moves the configuration factory.
src/​phpstorm/​kotlin/​com/​github/​xepozz/​testo/​phpstorm/​tests/​run/​TestoRunConfigurationHandler.kt Adapts shared CLI generation.
src/​phpstorm/​kotlin/​com/​github/​xepozz/​testo/​phpstorm/​tests/​run/​TestoRunConfigurationProducer.kt Adapts shared context decisions.
src/​phpstorm/​kotlin/​com/​github/​xepozz/​testo/​phpstorm/​tests/​run/​TestoRunConfigurationSettings.kt Moves PHP configuration settings.
src/​phpstorm/​kotlin/​com/​github/​xepozz/​testo/​phpstorm/​tests/​run/​TestoRunConfigurationType.kt Moves the configuration type.
src/​phpstorm/​kotlin/​com/​github/​xepozz/​testo/​phpstorm/​tests/​run/​TestoRunnerSettings.kt Preserves settings and transient filters.
src/​phpstorm/​kotlin/​com/​github/​xepozz/​testo/​phpstorm/​tests/​run/​TestoTestRunConfigurationEditor.kt Moves the PhpStorm editor.
src/​phpstorm/​kotlin/​com/​github/​xepozz/​testo/​phpstorm/​tests/​run/​TestoTestRunnerSettingsValidator.kt Moves PHP validation.
src/​phpstorm/​resources/​META-INF/​testo-php-coverage.xml Registers PHP coverage runners.
src/​phpstorm/​resources/​META-INF/​testo-php.xml Registers the PhpStorm adapter.
src/​phpstormTest/​kotlin/​com/​github/​xepozz/​testo/​baseline/​TestoProjectSetUp.kt Supplies PhpStorm baseline setup.
src/​phpstormTest/​kotlin/​com/​github/​xepozz/​testo/​phpstorm/​PhpStormRegistrationTest.kt Verifies included registrations.
src/​phpstormTest/​kotlin/​com/​github/​xepozz/​testo/​phpstorm/​PhpStormRunSelectionTest.kt Tests selection/settings round trips.
src/​phpstormTest/​kotlin/​com/​github/​xepozz/​testo/​phpstorm/​PhpStormViewsTest.kt Tests PHP view fidelity.
src/​phpstormTest/​kotlin/​com/​github/​xepozz/​testo/​phpstorm/​PhpToolLauncherStagingTest.kt Moves launcher staging tests.
src/​phpstormTest/​kotlin/​com/​github/​xepozz/​testo/​phpstorm/​TestoFrameworkTypeTest.kt Moves framework type tests.
src/​phpstormTest/​kotlin/​com/​github/​xepozz/​testo/​phpstorm/​TestoGroupNameInspectionPsiTest.kt Moves inspection PSI tests.
src/​phpstormTest/​kotlin/​com/​github/​xepozz/​testo/​phpstorm/​TestoGroupNameInspectionTest.kt Tests inspection registration.
src/​phpstormTest/​kotlin/​com/​github/​xepozz/​testo/​phpstorm/​TestoInfectionSettingsSerializationTest.kt Tests mutation settings persistence.
src/​phpstormTest/​kotlin/​com/​github/​xepozz/​testo/​phpstorm/​TestoRerunFailedTestsActionTest.kt Moves rerun action tests.
src/​phpstormTest/​kotlin/​com/​github/​xepozz/​testo/​phpstorm/​TestoRunConfigurationHandlerTest.kt Moves handler tests.
src/​phpstormTest/​kotlin/​com/​github/​xepozz/​testo/​phpstorm/​TestoRunConfigurationProducerPsiTest.kt Moves producer PSI tests.
src/​phpstormTest/​kotlin/​com/​github/​xepozz/​testo/​phpstorm/​TestoRunnerSettingsCoverageEngineTest.kt Moves coverage settings tests.
src/​phpstormTest/​kotlin/​com/​github/​xepozz/​testo/​phpstorm/​TestoRunnerSettingsSerializationTest.kt Moves serialization tests.
src/​phpstormTest/​kotlin/​com/​github/​xepozz/​testo/​phpstorm/​TestoRunnerSettingsTest.kt Moves runner settings tests.
src/​phpstormTest/​kotlin/​com/​github/​xepozz/​testo/​phpstorm/​TestoTestDescriptorTest.kt Moves descriptor tests.
src/​phpstormTest/​kotlin/​com/​github/​xepozz/​testo/​phpstorm/​TestoTestLocatorTest.kt Moves locator tests.
src/​phpstormTest/​kotlin/​com/​github/​xepozz/​testo/​phpstorm/​TestoTestRunConfigurationEditorCompanionTest.kt Moves editor helper tests.
src/​phpstormTest/​kotlin/​com/​github/​xepozz/​testo/​phpstorm/​TestoVersionDetectorTest.kt Moves version detector tests.
src/​phpstormTest/​kotlin/​com/​github/​xepozz/​testo/​phpstorm/​baseline/​BaselineSettings.kt Adds baseline configuration helpers.
src/​phpstormTest/​kotlin/​com/​github/​xepozz/​testo/​phpstorm/​baseline/​Baselines.kt Adds PhpStorm baseline serialization.
src/​phpstormTest/​kotlin/​com/​github/​xepozz/​testo/​phpstorm/​baseline/​CommandBaselineTest.kt Snapshots command construction.
src/​phpstormTest/​kotlin/​com/​github/​xepozz/​testo/​phpstorm/​baseline/​ContextAndInspectionBaselineTest.kt Snapshots context and inspection behavior.
src/​phpstormTest/​kotlin/​com/​github/​xepozz/​testo/​phpstorm/​baseline/​LocationBaselineTest.kt Snapshots navigation behavior.
src/​phpstormTest/​kotlin/​com/​github/​xepozz/​testo/​phpstorm/​baseline/​NamesBaselineTest.kt Snapshots configuration names.
src/​phpstormTest/​kotlin/​com/​github/​xepozz/​testo/​phpstorm/​baseline/​PersistenceBaselineTest.kt Snapshots persisted XML.
src/​phpstormTest/​kotlin/​com/​github/​xepozz/​testo/​phpstorm/​baseline/​ProducerBaselineTest.kt Snapshots producer behavior.
src/​phpstormTest/​kotlin/​com/​github/​xepozz/​testo/​phpstorm/​baseline/​TreeNodeBaselineTest.kt Snapshots tree rerun targets.
src/​phpstormTest/​kotlin/​com/​github/​xepozz/​testo/​phpstorm/​coverage/​TestoCoverageArgumentsTest.kt Moves coverage argument tests.
src/​phpstormTest/​kotlin/​com/​github/​xepozz/​testo/​phpstorm/​tests/​run/​TestoReportTargetPsiTest.kt Moves report target PSI tests.
src/​phpstormTest/​kotlin/​com/​github/​xepozz/​testo/​phpstorm/​tests/​run/​TestoReportTargetTest.kt Moves report target tests.
src/​test/​kotlin/​com/​github/​xepozz/​testo/​CoreIsolationTest.kt Enforces the shared-core boundary.
src/​test/​kotlin/​com/​github/​xepozz/​testo/​ExitStatementsVisitorTest.kt Adapts exit-statement tests.
src/​test/​kotlin/​com/​github/​xepozz/​testo/​MixinPsiTest.kt Tests adapter-backed test detection.
src/​test/​kotlin/​com/​github/​xepozz/​testo/​PhpTestPsi.kt Adds implementation-neutral PSI helpers.
src/​test/​kotlin/​com/​github/​xepozz/​testo/​TestoContextTest.kt Tests template highlighting.
src/​test/​kotlin/​com/​github/​xepozz/​testo/​TestoDataProviderUsagesOrderTest.kt Tests deterministic provider ordering.
src/​test/​kotlin/​com/​github/​xepozz/​testo/​TestoGroupNameProblemsTest.kt Tests pure group validation.
src/​test/​kotlin/​com/​github/​xepozz/​testo/​TestoGroupsIndexPsiTest.kt Adapts group index tests.
src/​test/​kotlin/​com/​github/​xepozz/​testo/​TestoLateChannelConverterPsiTest.kt Uses contract-created console properties.
src/​test/​kotlin/​com/​github/​xepozz/​testo/​TestoLineMarkerPsiTest.kt Tests contract-backed gutter behavior.
src/​test/​kotlin/​com/​github/​xepozz/​testo/​TestoReportConverterPsiTest.kt Uses contract-created console properties.
src/​test/​kotlin/​com/​github/​xepozz/​testo/​baseline/​BaselineFiles.kt Adds controlled snapshot matching.
src/​test/​kotlin/​com/​github/​xepozz/​testo/​baseline/​BaselineFixture.kt Defines shared behavior fixtures.
src/​test/​kotlin/​com/​github/​xepozz/​testo/​baseline/​RunContextsBaselineTest.kt Snapshots shared run contexts.
src/​test/​kotlin/​com/​github/​xepozz/​testo/​infection/​TestoInfectionCommandTest.kt Tests tool-environment command preparation.
src/​test/​kotlin/​com/​github/​xepozz/​testo/​infection/​TestoInfectionTest.kt Adapts mutation argument tests.
src/​test/​kotlin/​com/​github/​xepozz/​testo/​infection/​TestoMutationApplyPsiTest.kt Tests project-scoped mutation edits.
src/​test/​kotlin/​com/​github/​xepozz/​testo/​infection/​TestoMutationArchiveTest.kt Tests archive protection and restoration.
src/​test/​kotlin/​com/​github/​xepozz/​testo/​infection/​TestoMutationBoundariesPsiTest.kt Tests mutation statement boundaries.
src/​test/​kotlin/​com/​github/​xepozz/​testo/​infection/​TestoMutationIgnorePsiTest.kt Tests mutation safety and undo.
src/​test/​kotlin/​com/​github/​xepozz/​testo/​infection/​TestoToolProcessTest.kt Tests process lifecycle outcomes.
src/​test/​kotlin/​com/​github/​xepozz/​testo/​launch/​TestoCommandLineTest.kt Tests shared CLI generation.
src/​test/​kotlin/​com/​github/​xepozz/​testo/​launch/​TestoConfigurationNamesTest.kt Tests shared naming logic.
src/​test/​kotlin/​com/​github/​xepozz/​testo/​launch/​TestoCoverageArgumentsCoreTest.kt Tests shared coverage arguments.
src/​test/​kotlin/​com/​github/​xepozz/​testo/​launch/​TestoLocationHintsTest.kt Tests location parsing.
src/​test/​kotlin/​com/​github/​xepozz/​testo/​launch/​TestoTreeTargetTest.kt Tests tree-target selection updates.
src/​test/​kotlin/​com/​github/​xepozz/​testo/​php/​TestoPhpContractTest.kt Verifies adapter semantics.
src/​test/​testData/​baseline/​command-coverage.txt Records coverage command behavior.
src/​test/​testData/​baseline/​command-run.txt Records run command behavior.
src/​test/​testData/​baseline/​group-name-inspection.txt Records inspection behavior.
src/​test/​testData/​baseline/​gutter.txt Records gutter behavior.
src/​test/​testData/​baseline/​live-template-context.txt Records template context behavior.
src/​test/​testData/​baseline/​locations.txt Records navigation behavior.
src/​test/​testData/​baseline/​names.txt Records configuration naming.
src/​test/​testData/​baseline/​persistence-legacy.txt Records legacy migration.
src/​test/​testData/​baseline/​persistence.txt Records current persistence.
src/​test/​testData/​baseline/​producer.txt Records producer behavior.
src/​test/​testData/​baseline/​run-contexts.txt Records shared context behavior.
src/​test/​testData/​baseline/​tree-nodes.txt Records tree-node behavior.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/main/kotlin/com/github/xepozz/testo/index/TestoGroupsIndex.kt
… 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>
@roxblnfk

Copy link
Copy Markdown
Collaborator

A follow-up pass over the whole PR turned up a few more races around mutation processes and archive deletion. I pushed the fixes into the branch after approving:

  • 3a7cf2d: a mutant rerun is refused while the run still holds a process whose stop went unconfirmed. Otherwise the rerun would overwrite that process's Stop and input protection. This is a stopgap; the proper fix is a per-launch process state, which I'll file separately.
  • 19e10b0: the grace period of an unconfirmed stop is now measured from the stop itself (unconfirmedAt), not from the run's finishedAt. Measured from finishedAt, a rerun's unconfirmed stop could expire immediately.
  • 317af4d: mutation inputs are protected before the run directory is created, and refused with infection.error.runDeleted once the Testo run is gone. writeSummary no longer writes into a run claimed for deletion or a missing directory, so it cannot recreate a deleted run.
  • ff53a6d: the restored "unconfirmed stop" message no longer promises the files are kept for a day. Docker staging copies are never swept, which I'll also file separately.

Known limitation, left as is: TestoContext no longer extends PhpTemplateContextType, so PHP-specific macros may not be offered in user templates in the Testo context. The bundled templates only use complete(), and keeping the context in the core suits #117.

check buildPlugin passes on 262, apart from the known Windows-only baseline failures; the trial merge with #117 still conflicts only in CHANGELOG.md and gradle/libs.versions.toml.

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.

3 participants