agentic-devtools 0.2.651__py3-none-any.whl → 0.2.652__py3-none-any.whl
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.
- agentic_devtools/_version.py +2 -2
- agentic_devtools/cli/ci/pipeline/lifecycle_reconciliation_support.py +27 -5
- agentic_devtools/cli/ci/pipeline/session_detector.py +18 -8
- {agentic_devtools-0.2.651.dist-info → agentic_devtools-0.2.652.dist-info}/METADATA +1 -1
- {agentic_devtools-0.2.651.dist-info → agentic_devtools-0.2.652.dist-info}/RECORD +8 -8
- {agentic_devtools-0.2.651.dist-info → agentic_devtools-0.2.652.dist-info}/WHEEL +0 -0
- {agentic_devtools-0.2.651.dist-info → agentic_devtools-0.2.652.dist-info}/entry_points.txt +0 -0
- {agentic_devtools-0.2.651.dist-info → agentic_devtools-0.2.652.dist-info}/licenses/LICENSE +0 -0
agentic_devtools/_version.py
CHANGED
|
@@ -18,7 +18,7 @@ version_tuple: tuple[int | str, ...]
|
|
|
18
18
|
commit_id: str | None
|
|
19
19
|
__commit_id__: str | None
|
|
20
20
|
|
|
21
|
-
__version__ = version = '0.2.
|
|
22
|
-
__version_tuple__ = version_tuple = (0, 2,
|
|
21
|
+
__version__ = version = '0.2.652'
|
|
22
|
+
__version_tuple__ = version_tuple = (0, 2, 652)
|
|
23
23
|
|
|
24
24
|
__commit_id__ = commit_id = None
|
|
@@ -3,12 +3,16 @@
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
5
|
import subprocess
|
|
6
|
+
from typing import TYPE_CHECKING
|
|
6
7
|
|
|
7
8
|
from agentic_devtools.cli.ci.agent_task_inventory import inventory_failure_result
|
|
8
|
-
from agentic_devtools.cli.ci.models import AgentTaskInventory, FailureCategory
|
|
9
|
+
from agentic_devtools.cli.ci.models import AgentTaskInventory, AgentTaskInventoryAvailability, FailureCategory
|
|
9
10
|
from agentic_devtools.cli.ci.provider import CIPlatformProvider
|
|
10
11
|
from agentic_devtools.cli.shared.retry import ProviderRateLimitError, RetryableError
|
|
11
12
|
|
|
13
|
+
if TYPE_CHECKING:
|
|
14
|
+
from agentic_devtools.cli.ci.pipeline.session_detector import SessionState
|
|
15
|
+
|
|
12
16
|
LIFECYCLE_RECONCILIATION_EXCEPTIONS = (
|
|
13
17
|
RuntimeError,
|
|
14
18
|
OSError,
|
|
@@ -33,8 +37,26 @@ def read_reconciliation_lifecycle_inventory(
|
|
|
33
37
|
pr_id: int | None,
|
|
34
38
|
head_branch: str,
|
|
35
39
|
head_sha: str,
|
|
36
|
-
) -> AgentTaskInventory:
|
|
40
|
+
) -> AgentTaskInventory | SessionState:
|
|
37
41
|
"""Read the lifecycle inventory directly from the provider for reconciliation."""
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
42
|
+
try:
|
|
43
|
+
if pr_id is None:
|
|
44
|
+
return provider.list_pr_agent_task_lifecycles(pr_number, head_branch=head_branch, head_sha=head_sha)
|
|
45
|
+
return provider.list_pr_agent_task_lifecycles(
|
|
46
|
+
pr_number, pr_id=pr_id, head_branch=head_branch, head_sha=head_sha
|
|
47
|
+
)
|
|
48
|
+
except LIFECYCLE_RECONCILIATION_EXCEPTIONS as exc:
|
|
49
|
+
if isinstance(exc, (RetryableError, ProviderRateLimitError)) and exc.is_rate_limit:
|
|
50
|
+
raise
|
|
51
|
+
category, status = _session_failure_metadata(exc)
|
|
52
|
+
if category is FailureCategory.HTTP_NOT_FOUND and status == 404:
|
|
53
|
+
from agentic_devtools.cli.ci.pipeline.session_detector import SessionOutcome, SessionState
|
|
54
|
+
|
|
55
|
+
return SessionState(
|
|
56
|
+
SessionOutcome.UNKNOWN,
|
|
57
|
+
inventory_availability=AgentTaskInventoryAvailability.UNAVAILABLE,
|
|
58
|
+
failure_category=category,
|
|
59
|
+
http_status=status,
|
|
60
|
+
failure_source="agent-task-lifecycle",
|
|
61
|
+
)
|
|
62
|
+
raise
|
|
@@ -1096,7 +1096,7 @@ def reconcile_agent_task_lifecycles(
|
|
|
1096
1096
|
pr_id: int | None = None,
|
|
1097
1097
|
provider: CIPlatformProvider,
|
|
1098
1098
|
persist_clocks_only: bool = False,
|
|
1099
|
-
) -> None:
|
|
1099
|
+
) -> SessionState | None:
|
|
1100
1100
|
"""Explicitly persist missing clocks and best-effort cancel verified expired attempts.
|
|
1101
1101
|
|
|
1102
1102
|
This mutation phase is separate from action evaluation. Cancellation requires
|
|
@@ -1108,10 +1108,19 @@ def reconcile_agent_task_lifecycles(
|
|
|
1108
1108
|
try:
|
|
1109
1109
|
provider.invalidate_agent_task_inventory(pr_number)
|
|
1110
1110
|
if not head_sha or provider.get_pr_metadata(pr_number).head_sha != head_sha:
|
|
1111
|
-
return
|
|
1111
|
+
return None
|
|
1112
1112
|
inventory = read_reconciliation_lifecycle_inventory(
|
|
1113
1113
|
provider, pr_number, pr_id=pr_id, head_branch=head_branch, head_sha=head_sha
|
|
1114
1114
|
)
|
|
1115
|
+
if isinstance(inventory, SessionState):
|
|
1116
|
+
logger.warning(
|
|
1117
|
+
"PR #%d: Lifecycle reconciliation unavailable from %s (%s, HTTP %s)",
|
|
1118
|
+
pr_number,
|
|
1119
|
+
inventory.failure_source,
|
|
1120
|
+
inventory.failure_category,
|
|
1121
|
+
inventory.http_status,
|
|
1122
|
+
)
|
|
1123
|
+
return inventory
|
|
1115
1124
|
for task in inventory.tasks:
|
|
1116
1125
|
for session_id, _ in _agent_task_clock_requests(task):
|
|
1117
1126
|
provider.get_or_record_agent_task_first_observed_at(
|
|
@@ -1122,15 +1131,15 @@ def reconcile_agent_task_lifecycles(
|
|
|
1122
1131
|
expected_head_sha=head_sha,
|
|
1123
1132
|
)
|
|
1124
1133
|
if persist_clocks_only:
|
|
1125
|
-
return
|
|
1134
|
+
return None
|
|
1126
1135
|
list_runs = getattr(provider, "list_correlated_cloud_writer_runs", None)
|
|
1127
1136
|
cancel_run = getattr(provider, "cancel_workflow_run", None)
|
|
1128
1137
|
if not callable(list_runs) or not callable(cancel_run):
|
|
1129
|
-
return
|
|
1138
|
+
return None
|
|
1130
1139
|
runs = list_runs(pr_number, head_branch=head_branch, tasks=inventory.tasks, head_sha=head_sha)
|
|
1131
1140
|
if isinstance(runs, CloudWriterRunInventory):
|
|
1132
1141
|
if not runs.complete or runs.uncorrelated_runs:
|
|
1133
|
-
return
|
|
1142
|
+
return None
|
|
1134
1143
|
runs = runs.runs
|
|
1135
1144
|
for run in runs:
|
|
1136
1145
|
assessment = _classify_writer_run(run)
|
|
@@ -1139,7 +1148,7 @@ def reconcile_agent_task_lifecycles(
|
|
|
1139
1148
|
try:
|
|
1140
1149
|
provider.invalidate_agent_task_inventory(pr_number)
|
|
1141
1150
|
if provider.get_pr_metadata(pr_number).head_sha != head_sha:
|
|
1142
|
-
return
|
|
1151
|
+
return None
|
|
1143
1152
|
active = is_copilot_session_active_via_agent_task(
|
|
1144
1153
|
repo,
|
|
1145
1154
|
pr_number,
|
|
@@ -1149,7 +1158,7 @@ def reconcile_agent_task_lifecycles(
|
|
|
1149
1158
|
provider=provider,
|
|
1150
1159
|
)
|
|
1151
1160
|
if active is not False:
|
|
1152
|
-
return
|
|
1161
|
+
return None
|
|
1153
1162
|
provider.invalidate_agent_task_inventory(pr_number)
|
|
1154
1163
|
if pr_id is None:
|
|
1155
1164
|
current_inventory = provider.list_pr_agent_task_lifecycles(
|
|
@@ -1164,7 +1173,7 @@ def reconcile_agent_task_lifecycles(
|
|
|
1164
1173
|
)
|
|
1165
1174
|
if isinstance(current_runs, CloudWriterRunInventory):
|
|
1166
1175
|
if not current_runs.complete or current_runs.uncorrelated_runs:
|
|
1167
|
-
return
|
|
1176
|
+
return None
|
|
1168
1177
|
current_runs = current_runs.runs
|
|
1169
1178
|
current_run = next(
|
|
1170
1179
|
(
|
|
@@ -1199,6 +1208,7 @@ def reconcile_agent_task_lifecycles(
|
|
|
1199
1208
|
provider.invalidate_agent_task_inventory(pr_number)
|
|
1200
1209
|
except LIFECYCLE_RECONCILIATION_EXCEPTIONS as exc:
|
|
1201
1210
|
logger.warning("PR #%d: Lifecycle reconciliation unavailable: %s", pr_number, exc)
|
|
1211
|
+
return None
|
|
1202
1212
|
|
|
1203
1213
|
|
|
1204
1214
|
def _classify_writer_run(run: WorkflowRun, *, now: datetime | None = None) -> LifecycleAssessment | None:
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
agentic_devtools/__init__.py,sha256=gvLzsZ6L3Abr4sPHr4OJ_rdZDD8cFzXacaV0LGs8dVc,539
|
|
2
|
-
agentic_devtools/_version.py,sha256=
|
|
2
|
+
agentic_devtools/_version.py,sha256=R2r5rqtMfj0UuZtCpSW5S_Pw0FbTePcd2IwRAU2IkVk,524
|
|
3
3
|
agentic_devtools/agdt_gitignore.py,sha256=vVVqTjBZ_ijn6U3Lnh_JGrARLschYVN-fFal9jDk0Ak,2694
|
|
4
4
|
agentic_devtools/background_tasks.py,sha256=sFgmqOnCdCjclABJ8V__yDwBXDyi45b1Z-MVv3G2zB8,17664
|
|
5
5
|
agentic_devtools/config.py,sha256=DEVxTVZhsQbVQwO9qdB_1h19aBpjMzF6xJY_ePYLGLs,15629
|
|
@@ -341,13 +341,13 @@ agentic_devtools/cli/ci/pipeline/diff_validation.py,sha256=LRf-FB2sIap6kLCcqZIw3
|
|
|
341
341
|
agentic_devtools/cli/ci/pipeline/exceptions.py,sha256=4UXy2weeQZex_lp4sILNxlYfGjetxbR-tjms2ReT4iw,451
|
|
342
342
|
agentic_devtools/cli/ci/pipeline/exclusion.py,sha256=mrOG5G1-m3U-GM4YgtMTuzmoj02TXB6GbNxemRoLtV4,931
|
|
343
343
|
agentic_devtools/cli/ci/pipeline/gate_verdict.py,sha256=-vbp24Kr172wXpB5T-y9lm-7JxiYurixEu3-nuZohgY,44352
|
|
344
|
-
agentic_devtools/cli/ci/pipeline/lifecycle_reconciliation_support.py,sha256=
|
|
344
|
+
agentic_devtools/cli/ci/pipeline/lifecycle_reconciliation_support.py,sha256=R15VC18-xSUEMoTtI8y9z5xYIFLWloWXAvnDPSSPtvM,2405
|
|
345
345
|
agentic_devtools/cli/ci/pipeline/models.py,sha256=jKuSunZ8FDsVFbIUwLkMVZdfVun9bc_SKvcxLW7s9Ls,4501
|
|
346
346
|
agentic_devtools/cli/ci/pipeline/repair_attempts.py,sha256=K9JgsxIW0CjxfV6PMmZRKd6w7qsTYClZvzwFSu7shsA,11054
|
|
347
347
|
agentic_devtools/cli/ci/pipeline/runner.py,sha256=0lXe0sr8GB9VWejOIHZimWy9GF_obRFn9agO-ugCWgM,76902
|
|
348
348
|
agentic_devtools/cli/ci/pipeline/runner_diff_fingerprint.py,sha256=EpasXQX_wUpK3m3jRPTNJCbDU0yDAQQlsg1CynvuKXg,2055
|
|
349
349
|
agentic_devtools/cli/ci/pipeline/runner_diff_parser.py,sha256=T3ofZoUxKGZaGSyx5dF9yc3ddwRh7tKXWRA7lDaT59Y,17369
|
|
350
|
-
agentic_devtools/cli/ci/pipeline/session_detector.py,sha256=
|
|
350
|
+
agentic_devtools/cli/ci/pipeline/session_detector.py,sha256=5M-vxpxu12BVFz-OQEFxyCs_6IoEBzcw8IqeOiXofJU,66633
|
|
351
351
|
agentic_devtools/cli/ci/pipeline/session_evidence_summary.py,sha256=iiTMbv3LjIkmhto0JBP9OxvQPCc3mZGAK0gxKeToRDk,4128
|
|
352
352
|
agentic_devtools/cli/ci/pipeline/snapshot_builder.py,sha256=WxMSAsfK1h1StwkWAOVHgaorvBpKyjeCAcD1ekGHt8g,20116
|
|
353
353
|
agentic_devtools/cli/ci/pipeline/snapshot_ci.py,sha256=nvtqRVSEnjWUSCXLEUVa9-JBmMXV08cOLEczogorNTc,4531
|
|
@@ -1342,8 +1342,8 @@ agentic_devtools/_bundled_skills/skills/speckit-plan/SKILL.md,sha256=qYLpzgLCIZ6
|
|
|
1342
1342
|
agentic_devtools/_bundled_skills/skills/speckit-specify/SKILL.md,sha256=HbHRbdphMqbtNw6fL6NcYCj6sSFmUyk2S4U0bZ9p_l4,13681
|
|
1343
1343
|
agentic_devtools/_bundled_skills/skills/write-github-commit-message/SKILL.md,sha256=Ep1lR8NDN117Iytj172VZgqazFiLpJ56Z7RXgaTnxR8,2626
|
|
1344
1344
|
agentic_devtools/_bundled_skills/skills/write-github-commit-message/commit-types.md,sha256=bTy_t68ZD6R87rFIzq9wybTu8Wudoahb7nB9IWC4bFo,1839
|
|
1345
|
-
agentic_devtools-0.2.
|
|
1346
|
-
agentic_devtools-0.2.
|
|
1347
|
-
agentic_devtools-0.2.
|
|
1348
|
-
agentic_devtools-0.2.
|
|
1349
|
-
agentic_devtools-0.2.
|
|
1345
|
+
agentic_devtools-0.2.652.dist-info/METADATA,sha256=oWvs1mEUa7ySUDOQDxqfCd098Ouvy10-G98cKWG9M3k,35594
|
|
1346
|
+
agentic_devtools-0.2.652.dist-info/WHEEL,sha256=2iZrJkDIkeDh0k9SikKMqFuRP-ua6mb4Ir1AsER4BEw,87
|
|
1347
|
+
agentic_devtools-0.2.652.dist-info/entry_points.txt,sha256=oHUiF-YvDtXSMTUh0E2bwYKGn4hZlIVbBRaQGSFXASc,13696
|
|
1348
|
+
agentic_devtools-0.2.652.dist-info/licenses/LICENSE,sha256=yBEDdICksxhBYLWoERKp9MTqwGnUF6Ryj9BTLwXTc6k,1082
|
|
1349
|
+
agentic_devtools-0.2.652.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|