Merge origin/main into sid/onboarding (#130430 long paths)

This commit is contained in:
alt-glitch
2026-10-07 06:41:41 +05:30
32 changed files with 808 additions and 100 deletions

View File

@@ -451,6 +451,22 @@ _E2E_LANES: dict[str, tuple[str, ...]] = {
"hermes_cli/web_routers/status.py",
),
}
def _with_package_inits(paths: tuple[str, ...]) -> tuple[str, ...]:
"""Importing a/b/c.py runs a/__init__.py and a/b/__init__.py first, so a routed module
routes the package inits above it. A shared hub's inits run whenever the hub is imported, so
they are routed too; only an init that is itself a hub stays out."""
root = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
inits = [f"{'/'.join(parts[:i])}/__init__.py"
for p in (*paths, *sorted(_SHARED_HUBS)) if p.endswith(".py")
for parts in [p.split("/")[:-1]] for i in range(1, len(parts) + 1)]
return tuple(dict.fromkeys([*paths, *(i for i in inits if i not in _SHARED_HUBS
and os.path.isfile(os.path.join(root, i)))]))
for _lane in ("e2e_upgrade", "e2e_desktop_update"):
_E2E_LANES[_lane] = _with_package_inits(_E2E_LANES[_lane])
# The upgrade journeys are their own lane; editing one does not start ``e2e``.
# The update suite shares apps/desktop/e2e/ with the core suite but not its specs.
_E2E_LANE_EXCLUDES = {