Repository navigation
test(lifecycle): the lifecycle world and journeys run on Windows - #4414
Merged
Daniel Meppiel (danielmeppiel) merged 11 commits intoNov 21, 2026
Merged
Conversation
…nfig probe fails (#4094) Co-authored-by: copilot-swe-agent[bot] <[email protected]>
…probe (#4094) Co-authored-by: copilot-swe-agent[bot] <[email protected]>
… on a re-run (#4094) Co-authored-by: copilot-swe-agent[bot] <[email protected]>
…$GIT_DIR too big') (#4094) Co-authored-by: copilot-swe-agent[bot] <[email protected]>
…ts fixture CA verifies (#4094) Co-authored-by: copilot-swe-agent[bot] <[email protected]>
…les on Windows (#4094) Co-authored-by: copilot-swe-agent[bot] <[email protected]>
…ng-normalized hash (apm#1952) (#4093) Co-authored-by: copilot-swe-agent[bot] <[email protected]>
…compare paths with '/' separators (#4094, #4110) Co-authored-by: copilot-swe-agent[bot] <[email protected]>
) Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Daniel Meppiel (danielmeppiel)
requested a review
from Sergio Sisternes (sergio-sisternes-epam)
as a code owner
November 20, 2026 16:29
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Unresolved lifecycle fixture issues can alter permissions outside the copied tree, bypass the temporary-directory fallback on allocation failures, and leak directories when template setup fails.
3 open issues
What changed in this PR
This test-only PR adapts the shared lifecycle world and journey runner for Windows. It addresses infrastructure failures while leaving the discovered product bugs to separate PRs.
Changes:
- Add short Windows world paths, fixture-specific TLS configuration, and read-only file cleanup.
- Align integrity checks and journey output comparisons with cross-platform behavior.
- Disconnect child-process stdin to prevent prompts from reading the runner's console.
| File | Description |
|---|---|
tests/utils/apm_lifecycle_runner.py |
Set child-process stdin to DEVNULL. |
tests/lifecycle/world/fixtures.py |
Allocate short Windows world paths and clean them up. |
tests/lifecycle/world/clone.py |
Add cleanup that clears read-only file permissions. |
tests/lifecycle/world/builder.py |
Configure Windows Git TLS and use shared cleanup. |
tests/lifecycle/oracles.py |
Use line-ending-normalized hashes for integrity checks. |
tests/lifecycle/journeys/test_journeys.py |
Use shared cleanup for cold-cache steps. |
tests/lifecycle/journeys/normalize.py |
Normalize Windows path separators for output comparisons. |
tests/lifecycle/conftest.py |
Register the new world-directory fixture. |
Review effort: Balanced
| raise FileNotFoundError(path) | ||
| for root, _dirs, files in os.walk(path): | ||
| for name in files: | ||
| os.chmod(os.path.join(root, name), stat.S_IWRITE | stat.S_IREAD) |
Comment on lines
+38
to
+40
| root.mkdir(parents=True, exist_ok=True) | ||
| except OSError: | ||
| return None |
Comment on lines
+66
to
+73
| template = build_template(base / "world") | ||
| try: | ||
| yield template | ||
| finally: | ||
| template.services.close() | ||
| if parent is not None: | ||
| with contextlib.suppress(OSError): | ||
| remove_tree(base) |
#4417 (#4110) Co-authored-by: copilot-swe-agent[bot] <[email protected]>
…ows (#4110) Co-authored-by: copilot-swe-agent[bot] <[email protected]>
This was referenced Nov 20, 2026
Daniel Meppiel (danielmeppiel)
deleted the
danielmeppiel-t3-world-windows
branch
November 21, 2026 05:24
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.

Description
The lifecycle journeys had never run on Windows. The first 3-OS run (44767346437) errored at fixture setup for every journey. This PR makes the lifecycle world and the journey runner work on Windows. It changes test code only; the product bugs the Windows run found have their own PRs (#4408, #4410, #4413).
Each layer was found from git's own stderr on Windows CI (diagnostic dispatches 44768509484 to 44772582489):
fatal: '$GIT_DIR' too bigfrom APM's repo-scoped git config probe: pytest temp root plus world nesting plusapm_modules\.apm-resolution-staging\...\.gitexceeds Git for Windows' path limitworld/fixtures.py: on Windows the template and each per-test clone live under a short root (<temp drive>:\lw\, overrideAPM_LIFECYCLE_SHORT_ROOT, falling back totmp_path)schannel: the revocation status is unknowncloning through the world's HTTPS proxyworld/builder.py: on Windows the world's global gitconfig setshttp.sslBackend = openssl, which APM inherits by design (#2545), so the fixture CA inGIT_SSL_CAINFOverifiesPermissionError [WinError 5]removing git's read-only pack files (builder scratch, cold-cache steps)world/clone.pyremove_treeclears read-only bits; the builder, fixtures and runner use itoracles.pyI1 uses the product'scompute_file_hash; the lock records line-ending-normalized hashes (apm#1952), so CRLF is not drift<APM_HOME>\apm.yml,build\my-plugin...journeys/normalize.py: on Windows a\between path characters compares as/utils/apm_lifecycle_runner.py: children getstdin=DEVNULL, as in CI (on WindowsNULstill reports a TTY, so J15 needs #4413)apm outdatedmisses the newer annotated tagxfailon new issue #4417 (_WINDOWS_KNOWNintest_journeys.py)After layers 1-5, Windows went from 1 failed + 25 errors to 11 failed, 15 passed. What remained was the product bugs below, the expectations fixed in #4396 (E01 docs, E03, E06, J11, P02), and J05 (routed separately).
Product bugs found here, each with its own PR:
--skill '*'glob-expanded by Click on Windows (J04).init --applyprompts on a console despiteAPM_NON_INTERACTIVE/CI(J15).Issue and approved scope
Issue: Refs #4094, Refs #4110
Human scope-approval comment: Windows journeys triage by the 0.37 Stream T lead and steward (Windows is a hard gate).
Does this PR complete the issue, or what remains? It is partial. J07 is a strict Windows-only expected failure on #4417; J05 is routed separately.
Type of change
Testing
Results:
test_world.pyand the cold-cache paths gave 95 passed, 7 xfailed; the one failure is E01's docs block, fixed in test(lifecycle): journey expectations follow current audit, marketplace and #4171 output #4396.Changelog
## [Unreleased]inCHANGELOG.md.Spec conformance (OpenAPM v0.1)