[#121] Add end-to-end lifecycle integration tests#259
Merged
Conversation
d2bd9dc to
cf04342
Compare
301f1c7 to
7d37597
Compare
cf04342 to
39bbae3
Compare
7d37597 to
f544cec
Compare
39bbae3 to
0fd9d16
Compare
f544cec to
8af23f7
Compare
0fd9d16 to
43538aa
Compare
4ed4d95 to
bb29b5d
Compare
- Add `environment` property to DoctorRunner and 10 check structs (CommandCheck, MCPServerCheck, PluginCheck, HookCheck, GitignoreCheck, ProjectIndexCheck, PackGitignoreCheck, ExternalCommandExistsCheck, ExternalHookEventExistsCheck, ExternalSettingsKeyEqualsCheck), replacing all hardcoded `Environment()` calls - Add `projectRootOverride` to DoctorRunner to bypass ProjectDetector.findProjectRoot() in tests - Flow environment through DerivedDoctorChecks and standaloneDoctorChecks
- Thread environment from DoctorCommand to DoctorRunner - Pass environment to PackGitignoreCheck in artifactChecks() - Remove redundant environment parameter from private standaloneDoctorChecks()
- Add `environment` property to DoctorRunner and 10 check structs (CommandCheck, MCPServerCheck, PluginCheck, HookCheck, GitignoreCheck, ProjectIndexCheck, PackGitignoreCheck, ExternalCommandExistsCheck, ExternalHookEventExistsCheck, ExternalSettingsKeyEqualsCheck), replacing all hardcoded `Environment()` calls - Add `projectRootOverride` to DoctorRunner to bypass ProjectDetector.findProjectRoot() in tests - Flow environment through DerivedDoctorChecks and standaloneDoctorChecks
- Thread environment from DoctorCommand to DoctorRunner - Pass environment to PackGitignoreCheck in artifactChecks() - Remove redundant environment parameter from private standaloneDoctorChecks()
- Add 6 lifecycle scenarios covering the full sync -> doctor -> remove pipeline with sandbox isolation - Scenario 1: Single-pack configure/doctor/drift/fix/remove - Scenario 2: Multi-pack convergence with selective removal - Scenario 3: Pack update with template v1 -> v2 change - Scenario 4: Component exclusion and re-inclusion - Scenario 5: Global scope sync and doctor - Scenario 6: Stale artifact cleanup on pack update (A,B,C -> A,D)
…x tests - Add MCP server registration/removal assertions to scenario 1 - Add hook settings auto-derive verification to scenario 1 - Scenario 7: Template dependency filtering (exclude component removes dependent template sections, re-include restores) - Scenario 8: Global scope exclusion + doctor - Scenario 9: Doctor fix restores tampered section content via re-sync
bb29b5d to
fb49678
Compare
- Add component factory methods (hookComponent, skillComponent, settingsComponent, mcpComponent) to LifecycleTestBed - Add runDoctor/runGlobalDoctor convenience methods - Add settingsEnv() helper to reduce JSON assertion boilerplate - Add MCP scope assertion (local) in Scenario 1 - Rename Scenario 9 from "Doctor fix" to "Re-sync restores" to accurately reflect that re-sync (not doctor --fix) restores content
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add the main deliverable for #121: end-to-end lifecycle integration tests that exercise the full sync → state → doctor → remove pipeline. Each scenario chains
Configurator.configure()withDoctorRunner.run()in a fully sandboxed environment, verifying cross-component interactions that were previously untested.Final PR in the #121 stacked series (builds on #256, #261, #258).
Closes #121
Changes
LifecycleIntegrationTests.swiftwithLifecycleTestBedhelper and 9 scenario tests:~/.claude/→ doctor passesTest plan
swift testpasses locally (782 tests in 92 suites, 0 failures)swiftformat --lint .andswiftlintpass without violationsmcs sync,mcs doctor)