forgexa-cli 1.58.2__tar.gz → 1.58.3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (29) hide show
  1. {forgexa_cli-1.58.2 → forgexa_cli-1.58.3}/PKG-INFO +1 -1
  2. {forgexa_cli-1.58.2 → forgexa_cli-1.58.3}/forgexa_cli/__init__.py +1 -1
  3. {forgexa_cli-1.58.2 → forgexa_cli-1.58.3}/forgexa_cli/daemon.py +44 -3
  4. {forgexa_cli-1.58.2 → forgexa_cli-1.58.3}/forgexa_cli.egg-info/PKG-INFO +1 -1
  5. {forgexa_cli-1.58.2 → forgexa_cli-1.58.3}/pyproject.toml +1 -1
  6. {forgexa_cli-1.58.2 → forgexa_cli-1.58.3}/README.md +0 -0
  7. {forgexa_cli-1.58.2 → forgexa_cli-1.58.3}/forgexa_cli/_build_config.py +0 -0
  8. {forgexa_cli-1.58.2 → forgexa_cli-1.58.3}/forgexa_cli/_local_bind.py +0 -0
  9. {forgexa_cli-1.58.2 → forgexa_cli-1.58.3}/forgexa_cli/agent_core.py +0 -0
  10. {forgexa_cli-1.58.2 → forgexa_cli-1.58.3}/forgexa_cli/autoupgrade.py +0 -0
  11. {forgexa_cli-1.58.2 → forgexa_cli-1.58.3}/forgexa_cli/main.py +0 -0
  12. {forgexa_cli-1.58.2 → forgexa_cli-1.58.3}/forgexa_cli/py.typed +0 -0
  13. {forgexa_cli-1.58.2 → forgexa_cli-1.58.3}/forgexa_cli/runtime_evidence.py +0 -0
  14. {forgexa_cli-1.58.2 → forgexa_cli-1.58.3}/forgexa_cli/zcode_protocol.py +0 -0
  15. {forgexa_cli-1.58.2 → forgexa_cli-1.58.3}/forgexa_cli.egg-info/SOURCES.txt +0 -0
  16. {forgexa_cli-1.58.2 → forgexa_cli-1.58.3}/forgexa_cli.egg-info/dependency_links.txt +0 -0
  17. {forgexa_cli-1.58.2 → forgexa_cli-1.58.3}/forgexa_cli.egg-info/entry_points.txt +0 -0
  18. {forgexa_cli-1.58.2 → forgexa_cli-1.58.3}/forgexa_cli.egg-info/requires.txt +0 -0
  19. {forgexa_cli-1.58.2 → forgexa_cli-1.58.3}/forgexa_cli.egg-info/top_level.txt +0 -0
  20. {forgexa_cli-1.58.2 → forgexa_cli-1.58.3}/setup.cfg +0 -0
  21. {forgexa_cli-1.58.2 → forgexa_cli-1.58.3}/tests/test_auth_and_runtime_commands.py +0 -0
  22. {forgexa_cli-1.58.2 → forgexa_cli-1.58.3}/tests/test_autoupgrade.py +0 -0
  23. {forgexa_cli-1.58.2 → forgexa_cli-1.58.3}/tests/test_check_command.py +0 -0
  24. {forgexa_cli-1.58.2 → forgexa_cli-1.58.3}/tests/test_expiry_warnings_and_revoke.py +0 -0
  25. {forgexa_cli-1.58.2 → forgexa_cli-1.58.3}/tests/test_local_bind_commands.py +0 -0
  26. {forgexa_cli-1.58.2 → forgexa_cli-1.58.3}/tests/test_runtime_credentials.py +0 -0
  27. {forgexa_cli-1.58.2 → forgexa_cli-1.58.3}/tests/test_session_credentials.py +0 -0
  28. {forgexa_cli-1.58.2 → forgexa_cli-1.58.3}/tests/test_silent_install.py +0 -0
  29. {forgexa_cli-1.58.2 → forgexa_cli-1.58.3}/tests/test_upgrade_observability.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: forgexa-cli
3
- Version: 1.58.2
3
+ Version: 1.58.3
4
4
  Summary: Forgexa CLI — command-line client and AI agent runtime for the Forgexa platform
5
5
  Author-email: Jason Sun <dev.winds@gmail.com>
6
6
  License-Expression: MIT
@@ -1,2 +1,2 @@
1
1
  """forgexa-cli — Forgexa command-line client."""
2
- __version__ = "1.58.2"
2
+ __version__ = "1.58.3"
@@ -1058,6 +1058,32 @@ except (ImportError, ModuleNotFoundError):
1058
1058
  def GIT_CLONE_TIMEOUT(self) -> int:
1059
1059
  return int(os.environ.get("GIT_CLONE_TIMEOUT", "1800"))
1060
1060
 
1061
+ @property
1062
+ def GIT_WORKTREE_TIMEOUT(self) -> int:
1063
+ """Timeout (seconds) for `git worktree add` operations.
1064
+
1065
+ `worktree add` materialises a full checkout of the target branch
1066
+ into the new worktree. On large repos (e.g. HP SI) or busy disks
1067
+ this easily exceeds the 120 s default for ordinary git commands
1068
+ (SI-1181: a fresh-start worktree add timed out after 120 s and
1069
+ failed the node even though the checkout was still progressing).
1070
+
1071
+ Precedence:
1072
+ 1. GIT_WORKTREE_TIMEOUT env var (explicit override)
1073
+ 2. GIT_CLONE_TIMEOUT env var (backwards compat — an operator
1074
+ who raised the clone timeout for a huge repo wants local
1075
+ checkouts to get comparable headroom)
1076
+ 3. 600 s default (10 min — local disk I/O only, no network,
1077
+ so shorter than the clone/fetch/push ceiling)
1078
+ """
1079
+ env_worktree = os.environ.get("GIT_WORKTREE_TIMEOUT")
1080
+ if env_worktree:
1081
+ return int(env_worktree)
1082
+ env_clone = os.environ.get("GIT_CLONE_TIMEOUT")
1083
+ if env_clone:
1084
+ return int(env_clone)
1085
+ return 600
1086
+
1061
1087
  @property
1062
1088
  def GIT_FETCH_TIMEOUT(self) -> int:
1063
1089
  """Timeout (seconds) for incremental git fetch operations.
@@ -1170,7 +1196,7 @@ except (ImportError, ModuleNotFoundError):
1170
1196
  # DAEMON_VERSION is the protocol/logic version of the daemon code.
1171
1197
  # Kept in sync with pyproject.toml version via bump-version.sh.
1172
1198
  # CLIENT_TYPE identifies which packaging/distribution this daemon runs in.
1173
- DAEMON_VERSION = "1.58.2"
1199
+ DAEMON_VERSION = "1.58.3"
1174
1200
 
1175
1201
 
1176
1202
  def _detect_client_type() -> str:
@@ -5436,7 +5462,8 @@ class WorkspaceManager:
5436
5462
  ) from recovery_exc
5437
5463
  self._safe_rmtree(ws_path)
5438
5464
  raise RuntimeError(
5439
- f"Failed to create clean fresh worktree for branch '{branch_name}'. "
5465
+ f"Failed to create clean fresh worktree for branch '{branch_name}': "
5466
+ f"{self._summarize_git_error(exc)}. "
5440
5467
  "Refusing to reuse a stale local branch."
5441
5468
  ) from exc
5442
5469
  else:
@@ -5472,13 +5499,18 @@ class WorkspaceManager:
5472
5499
  """Optional cleanup after task. For now, keep workspaces for debugging."""
5473
5500
  pass
5474
5501
 
5475
- async def _git(self, *args: str, cwd: Path | str | None = None, timeout: int = 120,
5502
+ async def _git(self, *args: str, cwd: Path | str | None = None, timeout: int | None = None,
5476
5503
  project_key: str | None = None) -> str:
5477
5504
  """Run a git command safely using exec (no shell injection).
5478
5505
 
5479
5506
  If a project SSH key is registered, remote-touching commands
5480
5507
  (clone, fetch, pull, push) will use GIT_SSH_COMMAND.
5481
5508
 
5509
+ Timeout resolution (SI-1181): when ``timeout`` is None the default
5510
+ is 120 s for ordinary git commands, but `worktree add` — which
5511
+ materialises a full checkout of the branch — gets the dedicated
5512
+ GIT_WORKTREE_TIMEOUT (default 600 s) instead.
5513
+
5482
5514
  Process-group isolation: git is started in its own session so that
5483
5515
  SIGKILL on timeout propagates to all of git's children (especially
5484
5516
  the ssh subprocess that git forks for remote operations). Without
@@ -5491,6 +5523,15 @@ class WorkspaceManager:
5491
5523
  accepts but never sends the git protocol banner) is detected within
5492
5524
  ~90 s rather than waiting forever.
5493
5525
  """
5526
+ if timeout is None:
5527
+ # `git worktree add` is a full checkout of the target branch;
5528
+ # on large repos (e.g. HP SI) or busy disks it legitimately
5529
+ # exceeds the 120 s default for ordinary git commands.
5530
+ timeout = (
5531
+ settings.GIT_WORKTREE_TIMEOUT
5532
+ if args[:2] == ("worktree", "add")
5533
+ else 120
5534
+ )
5494
5535
  env = None
5495
5536
  git_prefix_args: list[str] = []
5496
5537
  # Inject SSH key for commands that touch the remote
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: forgexa-cli
3
- Version: 1.58.2
3
+ Version: 1.58.3
4
4
  Summary: Forgexa CLI — command-line client and AI agent runtime for the Forgexa platform
5
5
  Author-email: Jason Sun <dev.winds@gmail.com>
6
6
  License-Expression: MIT
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "forgexa-cli"
3
- version = "1.58.2"
3
+ version = "1.58.3"
4
4
  description = "Forgexa CLI — command-line client and AI agent runtime for the Forgexa platform"
5
5
  requires-python = ">=3.9"
6
6
  license = "MIT"
File without changes
File without changes