agentic-devtools 0.2.653__py3-none-any.whl → 0.2.655__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/agent_task_lifecycle.py +3 -1
- agentic_devtools/cli/ci/agent_task_pr_identity.py +74 -0
- agentic_devtools/cli/ci/pipeline/writer_outcome.py +38 -0
- {agentic_devtools-0.2.653.dist-info → agentic_devtools-0.2.655.dist-info}/METADATA +1 -1
- {agentic_devtools-0.2.653.dist-info → agentic_devtools-0.2.655.dist-info}/RECORD +9 -7
- {agentic_devtools-0.2.653.dist-info → agentic_devtools-0.2.655.dist-info}/WHEEL +0 -0
- {agentic_devtools-0.2.653.dist-info → agentic_devtools-0.2.655.dist-info}/entry_points.txt +0 -0
- {agentic_devtools-0.2.653.dist-info → agentic_devtools-0.2.655.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.655'
|
|
22
|
+
__version_tuple__ = version_tuple = (0, 2, 655)
|
|
23
23
|
|
|
24
24
|
__commit_id__ = commit_id = None
|
|
@@ -3,11 +3,12 @@
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
5
|
from collections.abc import Iterable, Mapping
|
|
6
|
-
from dataclasses import dataclass, replace
|
|
6
|
+
from dataclasses import dataclass, field, replace
|
|
7
7
|
from datetime import UTC, datetime
|
|
8
8
|
|
|
9
9
|
from .agent_task_inventory import AgentTaskInventoryLoadResult
|
|
10
10
|
from .agent_task_lifecycle_raw_evidence import raw_lifecycle_artifact_scope_matches
|
|
11
|
+
from .agent_task_pr_identity import AgentTaskPrIdentity
|
|
11
12
|
|
|
12
13
|
|
|
13
14
|
@dataclass(frozen=True)
|
|
@@ -38,6 +39,7 @@ class AgentTaskLifecycle:
|
|
|
38
39
|
workflow_run_id: str = ""
|
|
39
40
|
started_at: str = ""
|
|
40
41
|
idle_at: str = ""
|
|
42
|
+
pr_identity: AgentTaskPrIdentity = field(default_factory=AgentTaskPrIdentity)
|
|
41
43
|
|
|
42
44
|
|
|
43
45
|
@dataclass(frozen=True)
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
"""Typed PR identity provenance for Agent Task lifecycle evidence."""
|
|
2
|
+
|
|
3
|
+
from dataclasses import dataclass
|
|
4
|
+
from enum import StrEnum
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class AgentTaskPrIdentityKind(StrEnum):
|
|
8
|
+
"""How an Agent Task is associated with a requested pull request."""
|
|
9
|
+
|
|
10
|
+
PR_NUMBER = "pr_number"
|
|
11
|
+
PR_DATABASE_ID = "pr_database_id"
|
|
12
|
+
BRANCH_ONLY = "branch_only"
|
|
13
|
+
NONE = "none"
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
@dataclass(frozen=True)
|
|
17
|
+
class AgentTaskPrIdentity:
|
|
18
|
+
"""Correlation details without treating branch-only evidence as verified identity."""
|
|
19
|
+
|
|
20
|
+
kind: AgentTaskPrIdentityKind = AgentTaskPrIdentityKind.NONE
|
|
21
|
+
correlates: bool = False
|
|
22
|
+
task_pr_number: int | None = None
|
|
23
|
+
task_branch: str = ""
|
|
24
|
+
|
|
25
|
+
@property
|
|
26
|
+
def is_verified_pr_identity(self) -> bool:
|
|
27
|
+
"""Return whether exact PR-number or database-ID evidence matched."""
|
|
28
|
+
return self.kind in {
|
|
29
|
+
AgentTaskPrIdentityKind.PR_NUMBER,
|
|
30
|
+
AgentTaskPrIdentityKind.PR_DATABASE_ID,
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
def resolve_agent_task_pr_identity(
|
|
35
|
+
*,
|
|
36
|
+
requested_pr_number: int,
|
|
37
|
+
task_pr_number: int | None,
|
|
38
|
+
requested_pr_database_id: int | None,
|
|
39
|
+
task_pr_database_id: int | str | None,
|
|
40
|
+
requested_head_branch: str,
|
|
41
|
+
task_branch: str,
|
|
42
|
+
) -> AgentTaskPrIdentity:
|
|
43
|
+
"""Classify exact PR identity, branch-only correlation, or no match."""
|
|
44
|
+
normalized_task_branch = task_branch.removeprefix("refs/heads/")
|
|
45
|
+
normalized_task_pr_database_id = task_pr_database_id
|
|
46
|
+
if isinstance(task_pr_database_id, str) and task_pr_database_id.isascii() and task_pr_database_id.isdigit():
|
|
47
|
+
try:
|
|
48
|
+
normalized_task_pr_database_id = int(task_pr_database_id)
|
|
49
|
+
except ValueError:
|
|
50
|
+
normalized_task_pr_database_id = None
|
|
51
|
+
|
|
52
|
+
if type(requested_pr_number) is int and type(task_pr_number) is int and task_pr_number == requested_pr_number:
|
|
53
|
+
kind = AgentTaskPrIdentityKind.PR_NUMBER
|
|
54
|
+
elif (
|
|
55
|
+
type(requested_pr_database_id) is int
|
|
56
|
+
and type(normalized_task_pr_database_id) is int
|
|
57
|
+
and normalized_task_pr_database_id == requested_pr_database_id
|
|
58
|
+
):
|
|
59
|
+
kind = AgentTaskPrIdentityKind.PR_DATABASE_ID
|
|
60
|
+
elif requested_head_branch and normalized_task_branch == requested_head_branch.removeprefix("refs/heads/"):
|
|
61
|
+
kind = AgentTaskPrIdentityKind.BRANCH_ONLY
|
|
62
|
+
else:
|
|
63
|
+
kind = AgentTaskPrIdentityKind.NONE
|
|
64
|
+
|
|
65
|
+
normalized_pr_number = task_pr_number
|
|
66
|
+
if kind is AgentTaskPrIdentityKind.PR_DATABASE_ID:
|
|
67
|
+
normalized_pr_number = requested_pr_number
|
|
68
|
+
|
|
69
|
+
return AgentTaskPrIdentity(
|
|
70
|
+
kind=kind,
|
|
71
|
+
correlates=kind is not AgentTaskPrIdentityKind.NONE,
|
|
72
|
+
task_pr_number=normalized_pr_number,
|
|
73
|
+
task_branch=normalized_task_branch,
|
|
74
|
+
)
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"""Classify writer delivery from commit identities and caller-supplied evidence."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import re
|
|
6
|
+
from collections.abc import Iterable
|
|
7
|
+
from enum import StrEnum
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class WriterOutcome(StrEnum):
|
|
11
|
+
"""Outcome of a completed writer session."""
|
|
12
|
+
|
|
13
|
+
PUSHED_WITH_EVIDENCE = "PUSHED_WITH_EVIDENCE"
|
|
14
|
+
PUSHED_WITHOUT_EVIDENCE = "PUSHED_WITHOUT_EVIDENCE"
|
|
15
|
+
NO_PUSH = "NO_PUSH"
|
|
16
|
+
UNKNOWN = "UNKNOWN"
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
def classify_writer_outcome(
|
|
20
|
+
*,
|
|
21
|
+
dispatch_head_sha: str,
|
|
22
|
+
current_head_sha: str,
|
|
23
|
+
session_finished: bool,
|
|
24
|
+
evidence_head_shas: Iterable[str],
|
|
25
|
+
) -> WriterOutcome:
|
|
26
|
+
"""Classify a finished writer without authenticating evidence provenance."""
|
|
27
|
+
evidence = list(evidence_head_shas)
|
|
28
|
+
supplied_shas = [dispatch_head_sha, current_head_sha, *evidence]
|
|
29
|
+
valid_shas = [re.fullmatch(r"[0-9A-Fa-f]{40}", sha) is not None for sha in supplied_shas]
|
|
30
|
+
normalized_shas = [sha.lower() for sha in supplied_shas]
|
|
31
|
+
if not session_finished or not all(valid_shas):
|
|
32
|
+
return WriterOutcome.UNKNOWN
|
|
33
|
+
dispatch_head, current_head, *normalized_evidence = normalized_shas
|
|
34
|
+
if dispatch_head == current_head:
|
|
35
|
+
return WriterOutcome.NO_PUSH
|
|
36
|
+
if current_head in normalized_evidence:
|
|
37
|
+
return WriterOutcome.PUSHED_WITH_EVIDENCE
|
|
38
|
+
return WriterOutcome.PUSHED_WITHOUT_EVIDENCE
|
|
@@ -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=iev7Po7j5mwsHwstN-rRAFbHqjdlmreNStzCGHWAx6E,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
|
|
@@ -235,9 +235,10 @@ agentic_devtools/cli/ci/ado_provider_repair_dispatch.py,sha256=HqZ-AhIx8OAB_0yz5
|
|
|
235
235
|
agentic_devtools/cli/ci/agent_assignment.py,sha256=xALWk47PMo2uW44kgMm6K7EXfQN5NCv3zyyzWScIAfE,46026
|
|
236
236
|
agentic_devtools/cli/ci/agent_task_diagnostics.py,sha256=7kVeBKqHn3h4yOXO3sTskOW1NuRj2uMAUYuhIAXRlGE,4306
|
|
237
237
|
agentic_devtools/cli/ci/agent_task_inventory.py,sha256=62vNJb45du4TvDmiCfizwB3K56jcYvA7MM1TBbsSzIo,15516
|
|
238
|
-
agentic_devtools/cli/ci/agent_task_lifecycle.py,sha256=
|
|
238
|
+
agentic_devtools/cli/ci/agent_task_lifecycle.py,sha256=yCbQT2C4gJp750PugtAw03VVGcaGG6q3dFkgzAjTFz8,19206
|
|
239
239
|
agentic_devtools/cli/ci/agent_task_lifecycle_assessment.py,sha256=wZLwtt0oDjksaTE7Ail5nI20arxjYrVZmDE9Ew-B3AQ,3007
|
|
240
240
|
agentic_devtools/cli/ci/agent_task_lifecycle_raw_evidence.py,sha256=LGCmZ4zpxNWXP8X5uJR5lpdmPof6R_v5_whnDc--fwo,2703
|
|
241
|
+
agentic_devtools/cli/ci/agent_task_pr_identity.py,sha256=kFAiSlBPD18YhsV3mdhho8KEGhUjEfa-jXMrmmolv64,2674
|
|
241
242
|
agentic_devtools/cli/ci/approver_preflight.py,sha256=uM_LF0qrf_nMyGJT8CUvdqh0comD_AAsS9Sw_9HqBTA,5865
|
|
242
243
|
agentic_devtools/cli/ci/canonical_dispatch_identity.py,sha256=VmWs3eHBs6HU2IRV_ngMUzk24pZJVE1KBFahtTvGZPA,2799
|
|
243
244
|
agentic_devtools/cli/ci/commands.py,sha256=REVb_t8Ei4F37JmAn57FafIwzBa_u7PNhKkJHvchx5o,27282
|
|
@@ -361,6 +362,7 @@ agentic_devtools/cli/ci/pipeline/suggestions.py,sha256=s2FB-y1gd73R3P_5X2CSQJfZP
|
|
|
361
362
|
agentic_devtools/cli/ci/pipeline/summary.py,sha256=bsfmYci7xiMrQC8UkCUm_weWqOHLg3Lri7NAcCZmLpg,20676
|
|
362
363
|
agentic_devtools/cli/ci/pipeline/title_utils.py,sha256=eDkE79WMJdiQ157VEs4NmG0M5FUKtazfDyHXNhMWNfo,708
|
|
363
364
|
agentic_devtools/cli/ci/pipeline/validation_evidence.py,sha256=6fInkdE_0AaQICUgHsb89ISebb35yb0SOaiJNKL7Ywk,6842
|
|
365
|
+
agentic_devtools/cli/ci/pipeline/writer_outcome.py,sha256=Dzp_NqOB5q8IL8CHO8xnZlLxHTbtJfNIeau7kj2bTmM,1333
|
|
364
366
|
agentic_devtools/cli/ci/pipeline/actions/__init__.py,sha256=sqt2dc9zoLEz5U3GVEBMwbPlFtKnayWmx_E5by_oyrM,1844
|
|
365
367
|
agentic_devtools/cli/ci/pipeline/actions/apply_suggestions.py,sha256=CIPMgfFSEEQfUnE9bv3tK7mKpVtgVbmcasuqcp4n8xY,24147
|
|
366
368
|
agentic_devtools/cli/ci/pipeline/actions/approval_entry.py,sha256=G6nR120RmuOL2lf8Hi8EczER-r94lGWyzXnbCeA-YJY,1911
|
|
@@ -1342,8 +1344,8 @@ agentic_devtools/_bundled_skills/skills/speckit-plan/SKILL.md,sha256=qYLpzgLCIZ6
|
|
|
1342
1344
|
agentic_devtools/_bundled_skills/skills/speckit-specify/SKILL.md,sha256=HbHRbdphMqbtNw6fL6NcYCj6sSFmUyk2S4U0bZ9p_l4,13681
|
|
1343
1345
|
agentic_devtools/_bundled_skills/skills/write-github-commit-message/SKILL.md,sha256=Ep1lR8NDN117Iytj172VZgqazFiLpJ56Z7RXgaTnxR8,2626
|
|
1344
1346
|
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.
|
|
1347
|
+
agentic_devtools-0.2.655.dist-info/METADATA,sha256=MKu83RP3QwvuZfbvtzlJwy18SY3WKa9s4oXL6UndPA8,35594
|
|
1348
|
+
agentic_devtools-0.2.655.dist-info/WHEEL,sha256=2iZrJkDIkeDh0k9SikKMqFuRP-ua6mb4Ir1AsER4BEw,87
|
|
1349
|
+
agentic_devtools-0.2.655.dist-info/entry_points.txt,sha256=oHUiF-YvDtXSMTUh0E2bwYKGn4hZlIVbBRaQGSFXASc,13696
|
|
1350
|
+
agentic_devtools-0.2.655.dist-info/licenses/LICENSE,sha256=yBEDdICksxhBYLWoERKp9MTqwGnUF6Ryj9BTLwXTc6k,1082
|
|
1351
|
+
agentic_devtools-0.2.655.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|