worktree-controller 1.34.1__tar.gz → 1.34.2__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.
- {worktree_controller-1.34.1 → worktree_controller-1.34.2}/PKG-INFO +1 -1
- {worktree_controller-1.34.1 → worktree_controller-1.34.2}/pyproject.toml +1 -1
- {worktree_controller-1.34.1 → worktree_controller-1.34.2}/pyproject.toml.orig +1 -1
- {worktree_controller-1.34.1 → worktree_controller-1.34.2}/src/worktree_controller/__init__.py +1 -1
- {worktree_controller-1.34.1 → worktree_controller-1.34.2}/src/worktree_controller/cli.py +6 -0
- {worktree_controller-1.34.1 → worktree_controller-1.34.2}/src/worktree_controller/lifecycle.py +29 -13
- {worktree_controller-1.34.1 → worktree_controller-1.34.2}/src/worktree_controller/record_updates.py +9 -1
- {worktree_controller-1.34.1 → worktree_controller-1.34.2}/src/worktree_controller/tool_cli_contract.json +2 -1
- {worktree_controller-1.34.1 → worktree_controller-1.34.2}/tool_cli_contract.json +2 -1
- {worktree_controller-1.34.1 → worktree_controller-1.34.2}/LICENSE +0 -0
- {worktree_controller-1.34.1 → worktree_controller-1.34.2}/README.md +0 -0
- {worktree_controller-1.34.1 → worktree_controller-1.34.2}/docs/architecture.md +0 -0
- {worktree_controller-1.34.1 → worktree_controller-1.34.2}/docs/build-resources.md +0 -0
- {worktree_controller-1.34.1 → worktree_controller-1.34.2}/docs/client-integration.md +0 -0
- {worktree_controller-1.34.1 → worktree_controller-1.34.2}/docs/daily-workflow.md +0 -0
- {worktree_controller-1.34.1 → worktree_controller-1.34.2}/docs/first-change.md +0 -0
- {worktree_controller-1.34.1 → worktree_controller-1.34.2}/docs/getting-started.md +0 -0
- {worktree_controller-1.34.1 → worktree_controller-1.34.2}/docs/integration-boundaries.md +0 -0
- {worktree_controller-1.34.1 → worktree_controller-1.34.2}/docs/operations.md +0 -0
- {worktree_controller-1.34.1 → worktree_controller-1.34.2}/docs/publishing.md +0 -0
- {worktree_controller-1.34.1 → worktree_controller-1.34.2}/docs/reference.md +0 -0
- {worktree_controller-1.34.1 → worktree_controller-1.34.2}/docs/roadmap.md +0 -0
- {worktree_controller-1.34.1 → worktree_controller-1.34.2}/docs/scope.md +0 -0
- {worktree_controller-1.34.1 → worktree_controller-1.34.2}/examples/change_task.py +0 -0
- {worktree_controller-1.34.1 → worktree_controller-1.34.2}/examples/client_continuation.py +0 -0
- {worktree_controller-1.34.1 → worktree_controller-1.34.2}/examples/quickstart.py +0 -0
- {worktree_controller-1.34.1 → worktree_controller-1.34.2}/src/worktree_controller/activation_layout.py +0 -0
- {worktree_controller-1.34.1 → worktree_controller-1.34.2}/src/worktree_controller/branch_retirement.py +0 -0
- {worktree_controller-1.34.1 → worktree_controller-1.34.2}/src/worktree_controller/build_preservation.py +0 -0
- {worktree_controller-1.34.1 → worktree_controller-1.34.2}/src/worktree_controller/build_resources.py +0 -0
- {worktree_controller-1.34.1 → worktree_controller-1.34.2}/src/worktree_controller/canonical_refresh.py +0 -0
- {worktree_controller-1.34.1 → worktree_controller-1.34.2}/src/worktree_controller/canonical_transition.py +0 -0
- {worktree_controller-1.34.1 → worktree_controller-1.34.2}/src/worktree_controller/cleanup_attempts.py +0 -0
- {worktree_controller-1.34.1 → worktree_controller-1.34.2}/src/worktree_controller/cleanup_evidence.py +0 -0
- {worktree_controller-1.34.1 → worktree_controller-1.34.2}/src/worktree_controller/cleanup_recovery.py +0 -0
- {worktree_controller-1.34.1 → worktree_controller-1.34.2}/src/worktree_controller/controller.py +0 -0
- {worktree_controller-1.34.1 → worktree_controller-1.34.2}/src/worktree_controller/convergence.py +0 -0
- {worktree_controller-1.34.1 → worktree_controller-1.34.2}/src/worktree_controller/delivered_closeout.py +0 -0
- {worktree_controller-1.34.1 → worktree_controller-1.34.2}/src/worktree_controller/disposable.py +0 -0
- {worktree_controller-1.34.1 → worktree_controller-1.34.2}/src/worktree_controller/environment.py +0 -0
- {worktree_controller-1.34.1 → worktree_controller-1.34.2}/src/worktree_controller/frozen_recovery.py +0 -0
- {worktree_controller-1.34.1 → worktree_controller-1.34.2}/src/worktree_controller/git_backend.py +0 -0
- {worktree_controller-1.34.1 → worktree_controller-1.34.2}/src/worktree_controller/governance.py +0 -0
- {worktree_controller-1.34.1 → worktree_controller-1.34.2}/src/worktree_controller/hardlinks.py +0 -0
- {worktree_controller-1.34.1 → worktree_controller-1.34.2}/src/worktree_controller/integration_cleanup.py +0 -0
- {worktree_controller-1.34.1 → worktree_controller-1.34.2}/src/worktree_controller/integration_conflict.py +0 -0
- {worktree_controller-1.34.1 → worktree_controller-1.34.2}/src/worktree_controller/integration_retry.py +0 -0
- {worktree_controller-1.34.1 → worktree_controller-1.34.2}/src/worktree_controller/keyed_document_scope.py +0 -0
- {worktree_controller-1.34.1 → worktree_controller-1.34.2}/src/worktree_controller/lifecycle_history.py +0 -0
- {worktree_controller-1.34.1 → worktree_controller-1.34.2}/src/worktree_controller/lifecycle_observation.py +0 -0
- {worktree_controller-1.34.1 → worktree_controller-1.34.2}/src/worktree_controller/metadata_codec.py +0 -0
- {worktree_controller-1.34.1 → worktree_controller-1.34.2}/src/worktree_controller/metadata_relocation.py +0 -0
- {worktree_controller-1.34.1 → worktree_controller-1.34.2}/src/worktree_controller/models.py +0 -0
- {worktree_controller-1.34.1 → worktree_controller-1.34.2}/src/worktree_controller/mount_diagnostics.py +0 -0
- {worktree_controller-1.34.1 → worktree_controller-1.34.2}/src/worktree_controller/multiple_cleanup_recovery.py +0 -0
- {worktree_controller-1.34.1 → worktree_controller-1.34.2}/src/worktree_controller/namespace_migration.py +0 -0
- {worktree_controller-1.34.1 → worktree_controller-1.34.2}/src/worktree_controller/native_session_recovery.py +0 -0
- {worktree_controller-1.34.1 → worktree_controller-1.34.2}/src/worktree_controller/owner_actions.py +0 -0
- {worktree_controller-1.34.1 → worktree_controller-1.34.2}/src/worktree_controller/policy.py +0 -0
- {worktree_controller-1.34.1 → worktree_controller-1.34.2}/src/worktree_controller/preservation.py +0 -0
- {worktree_controller-1.34.1 → worktree_controller-1.34.2}/src/worktree_controller/preserved_cleanup.py +0 -0
- {worktree_controller-1.34.1 → worktree_controller-1.34.2}/src/worktree_controller/publication_execution.py +0 -0
- {worktree_controller-1.34.1 → worktree_controller-1.34.2}/src/worktree_controller/reconciler.py +0 -0
- {worktree_controller-1.34.1 → worktree_controller-1.34.2}/src/worktree_controller/recovery_guidance.py +0 -0
- {worktree_controller-1.34.1 → worktree_controller-1.34.2}/src/worktree_controller/registration_backfill.py +0 -0
- {worktree_controller-1.34.1 → worktree_controller-1.34.2}/src/worktree_controller/registration_prune.py +0 -0
- {worktree_controller-1.34.1 → worktree_controller-1.34.2}/src/worktree_controller/release_intents.py +0 -0
- {worktree_controller-1.34.1 → worktree_controller-1.34.2}/src/worktree_controller/rendering.py +0 -0
- {worktree_controller-1.34.1 → worktree_controller-1.34.2}/src/worktree_controller/resource_admission.py +0 -0
- {worktree_controller-1.34.1 → worktree_controller-1.34.2}/src/worktree_controller/retirement_adapters.py +0 -0
- {worktree_controller-1.34.1 → worktree_controller-1.34.2}/src/worktree_controller/retirement_execution.py +0 -0
- {worktree_controller-1.34.1 → worktree_controller-1.34.2}/src/worktree_controller/semantics.py +0 -0
- {worktree_controller-1.34.1 → worktree_controller-1.34.2}/src/worktree_controller/session.py +0 -0
- {worktree_controller-1.34.1 → worktree_controller-1.34.2}/src/worktree_controller/session_admission.py +0 -0
- {worktree_controller-1.34.1 → worktree_controller-1.34.2}/src/worktree_controller/source_cleanup.py +0 -0
- {worktree_controller-1.34.1 → worktree_controller-1.34.2}/src/worktree_controller/source_preservation.py +0 -0
- {worktree_controller-1.34.1 → worktree_controller-1.34.2}/src/worktree_controller/source_recovery.py +0 -0
- {worktree_controller-1.34.1 → worktree_controller-1.34.2}/src/worktree_controller/store.py +0 -0
- {worktree_controller-1.34.1 → worktree_controller-1.34.2}/src/worktree_controller/task_workflow.py +0 -0
- {worktree_controller-1.34.1 → worktree_controller-1.34.2}/src/worktree_controller/transaction_scope.py +0 -0
- {worktree_controller-1.34.1 → worktree_controller-1.34.2}/src/worktree_controller/writer_lease.py +0 -0
- {worktree_controller-1.34.1 → worktree_controller-1.34.2}/src/worktree_controller/writer_session.py +0 -0
|
@@ -896,6 +896,10 @@ def build_parser() -> argparse.ArgumentParser:
|
|
|
896
896
|
reopen_parser.add_argument("--path", type=Path, required=True)
|
|
897
897
|
reopen_parser.add_argument("--expected-record-version", type=int, required=True)
|
|
898
898
|
reopen_parser.add_argument("--owner", required=True)
|
|
899
|
+
reopen_parser.add_argument(
|
|
900
|
+
"--drifted-head",
|
|
901
|
+
help="exact observed HEAD of a frozen checkout that gained commits after its handoff",
|
|
902
|
+
)
|
|
899
903
|
|
|
900
904
|
for recovery_command in ("recover-handoff", "recover-published"):
|
|
901
905
|
recovery_parser = commands.add_parser(
|
|
@@ -1065,6 +1069,7 @@ def _main(argv: list[str] | None) -> int:
|
|
|
1065
1069
|
"retained_typed_cleanup_version": 1,
|
|
1066
1070
|
"aborted_integration_preserved_cleanup_version": 2,
|
|
1067
1071
|
"aborted_integration_branch_retirement_version": 1,
|
|
1072
|
+
"drifted_handoff_reopen_version": 1,
|
|
1068
1073
|
"terminal_preserved_cleanup_version": 1,
|
|
1069
1074
|
"preservation_leaf_version": 1,
|
|
1070
1075
|
"integration_publication_execution_version": 1,
|
|
@@ -1831,6 +1836,7 @@ def _main(argv: list[str] | None) -> int:
|
|
|
1831
1836
|
target=parsed.path,
|
|
1832
1837
|
expected_record_version=parsed.expected_record_version,
|
|
1833
1838
|
owner=parsed.owner,
|
|
1839
|
+
drifted_head=parsed.drifted_head,
|
|
1834
1840
|
)
|
|
1835
1841
|
elif parsed.command in {"binding-add", "binding-remove", "binding-transfer"}:
|
|
1836
1842
|
payload = update_external_binding(
|
{worktree_controller-1.34.1 → worktree_controller-1.34.2}/src/worktree_controller/lifecycle.py
RENAMED
|
@@ -3107,6 +3107,7 @@ def reopen(
|
|
|
3107
3107
|
target: Path,
|
|
3108
3108
|
expected_record_version: int,
|
|
3109
3109
|
owner: str,
|
|
3110
|
+
drifted_head: str | None = None,
|
|
3110
3111
|
) -> dict[str, Any]:
|
|
3111
3112
|
repository_initial = inventory(repository_path)
|
|
3112
3113
|
store = MetadataStore(repository_initial.common_dir)
|
|
@@ -3139,19 +3140,33 @@ def reopen(
|
|
|
3139
3140
|
raise ControllerError(
|
|
3140
3141
|
"INTERRUPTED_TRANSACTION", "archive release transaction needs recovery"
|
|
3141
3142
|
)
|
|
3142
|
-
|
|
3143
|
-
record.handoff_commit is None
|
|
3144
|
-
|
|
3145
|
-
|
|
3146
|
-
|
|
3147
|
-
|
|
3148
|
-
|
|
3149
|
-
|
|
3150
|
-
|
|
3151
|
-
|
|
3152
|
-
|
|
3143
|
+
frozen_complete = (
|
|
3144
|
+
record.handoff_commit is not None
|
|
3145
|
+
and record.finalizer_record_id is not None
|
|
3146
|
+
and record.task_commit == record.handoff_commit
|
|
3147
|
+
and record.finalizer_commit == record.handoff_commit
|
|
3148
|
+
)
|
|
3149
|
+
drift_detail: dict[str, Any] | None = None
|
|
3150
|
+
if drifted_head is not None:
|
|
3151
|
+
# Commits made in a frozen checkout after its handoff: the owner names the
|
|
3152
|
+
# exact observed HEAD, which must strictly descend from the frozen identity.
|
|
3153
|
+
if archived or record.lifecycle != "HANDOFF_READY":
|
|
3154
|
+
raise ControllerError(
|
|
3155
|
+
"INVALID_LIFECYCLE", "drifted reopen requires a HANDOFF_READY allocation"
|
|
3153
3156
|
)
|
|
3154
|
-
|
|
3157
|
+
if (
|
|
3158
|
+
not frozen_complete
|
|
3159
|
+
or drifted_head != item.head
|
|
3160
|
+
or item.head == record.handoff_commit
|
|
3161
|
+
or not is_ancestor(repository.canonical_path, str(record.handoff_commit), item.head)
|
|
3162
|
+
):
|
|
3163
|
+
raise ControllerError(
|
|
3164
|
+
"IDENTITY_MISMATCH",
|
|
3165
|
+
"drifted reopen requires the exact observed HEAD descending from the frozen handoff",
|
|
3166
|
+
)
|
|
3167
|
+
drift_detail = {"frozen_handoff_commit": record.handoff_commit, "observed_head": item.head}
|
|
3168
|
+
elif not archived and (
|
|
3169
|
+
not frozen_complete or record.handoff_commit != item.head
|
|
3155
3170
|
):
|
|
3156
3171
|
raise ControllerError(
|
|
3157
3172
|
"IDENTITY_MISMATCH", "reopen requires the exact frozen handoff identity"
|
|
@@ -3181,7 +3196,8 @@ def reopen(
|
|
|
3181
3196
|
if archived
|
|
3182
3197
|
else _updated_record(
|
|
3183
3198
|
record,
|
|
3184
|
-
"REOPENED",
|
|
3199
|
+
"REOPENED_AFTER_DRIFT" if drift_detail else "REOPENED",
|
|
3200
|
+
event_detail=drift_detail,
|
|
3185
3201
|
lifecycle="ACTIVE",
|
|
3186
3202
|
handoff_commit=None,
|
|
3187
3203
|
finalizer_record_id=None,
|
{worktree_controller-1.34.1 → worktree_controller-1.34.2}/src/worktree_controller/record_updates.py
RENAMED
|
@@ -14,7 +14,13 @@ from .models import IntegrationIntent, MetadataRecord
|
|
|
14
14
|
from .store import now_iso
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
def updated_record(
|
|
17
|
+
def updated_record(
|
|
18
|
+
record: MetadataRecord,
|
|
19
|
+
event: str,
|
|
20
|
+
*,
|
|
21
|
+
event_detail: dict[str, Any] | None = None,
|
|
22
|
+
**changes: Any,
|
|
23
|
+
) -> MetadataRecord:
|
|
18
24
|
payload = record_to_dict(record)
|
|
19
25
|
before = record.lifecycle
|
|
20
26
|
timestamp = now_iso()
|
|
@@ -41,6 +47,8 @@ def updated_record(record: MetadataRecord, event: str, **changes: Any) -> Metada
|
|
|
41
47
|
if len(changed) != 1:
|
|
42
48
|
raise ValueError("a disposable resource event must identify exactly one transition")
|
|
43
49
|
history[-1]["disposable_resource"] = dict(changed[0])
|
|
50
|
+
if event_detail:
|
|
51
|
+
history[-1].update(event_detail)
|
|
44
52
|
payload["history"] = history
|
|
45
53
|
return record_from_dict(payload)
|
|
46
54
|
|
|
@@ -1087,7 +1087,7 @@
|
|
|
1087
1087
|
"session_launcher_entrypoint": "worktree-session",
|
|
1088
1088
|
"session_entrypoint": "worktree-session-end",
|
|
1089
1089
|
"tool_name": "worktree-controller",
|
|
1090
|
-
"tool_version": "1.34.
|
|
1090
|
+
"tool_version": "1.34.2",
|
|
1091
1091
|
"delivered_closeout_version": 1,
|
|
1092
1092
|
"retained_archive_version": 1,
|
|
1093
1093
|
"retention_convergence_version": 2,
|
|
@@ -1541,6 +1541,7 @@
|
|
|
1541
1541
|
"retained_typed_cleanup_version": 1,
|
|
1542
1542
|
"aborted_integration_preserved_cleanup_version": 2,
|
|
1543
1543
|
"aborted_integration_branch_retirement_version": 1,
|
|
1544
|
+
"drifted_handoff_reopen_version": 1,
|
|
1544
1545
|
"aborted_integration_preserved_cleanup_contract": {
|
|
1545
1546
|
"contract": "aborted-integration-preserved-cleanup/v1",
|
|
1546
1547
|
"entrypoints": ["integration-abort", "python -m worktree_controller.preservation", "resource-clean --typed", "release", "integration-claim"],
|
|
@@ -1087,7 +1087,7 @@
|
|
|
1087
1087
|
"session_launcher_entrypoint": "worktree-session",
|
|
1088
1088
|
"session_entrypoint": "worktree-session-end",
|
|
1089
1089
|
"tool_name": "worktree-controller",
|
|
1090
|
-
"tool_version": "1.34.
|
|
1090
|
+
"tool_version": "1.34.2",
|
|
1091
1091
|
"delivered_closeout_version": 1,
|
|
1092
1092
|
"retained_archive_version": 1,
|
|
1093
1093
|
"retention_convergence_version": 2,
|
|
@@ -1541,6 +1541,7 @@
|
|
|
1541
1541
|
"retained_typed_cleanup_version": 1,
|
|
1542
1542
|
"aborted_integration_preserved_cleanup_version": 2,
|
|
1543
1543
|
"aborted_integration_branch_retirement_version": 1,
|
|
1544
|
+
"drifted_handoff_reopen_version": 1,
|
|
1544
1545
|
"aborted_integration_preserved_cleanup_contract": {
|
|
1545
1546
|
"contract": "aborted-integration-preserved-cleanup/v1",
|
|
1546
1547
|
"entrypoints": ["integration-abort", "python -m worktree_controller.preservation", "resource-clean --typed", "release", "integration-claim"],
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{worktree_controller-1.34.1 → worktree_controller-1.34.2}/src/worktree_controller/build_resources.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{worktree_controller-1.34.1 → worktree_controller-1.34.2}/src/worktree_controller/controller.py
RENAMED
|
File without changes
|
{worktree_controller-1.34.1 → worktree_controller-1.34.2}/src/worktree_controller/convergence.py
RENAMED
|
File without changes
|
|
File without changes
|
{worktree_controller-1.34.1 → worktree_controller-1.34.2}/src/worktree_controller/disposable.py
RENAMED
|
File without changes
|
{worktree_controller-1.34.1 → worktree_controller-1.34.2}/src/worktree_controller/environment.py
RENAMED
|
File without changes
|
{worktree_controller-1.34.1 → worktree_controller-1.34.2}/src/worktree_controller/frozen_recovery.py
RENAMED
|
File without changes
|
{worktree_controller-1.34.1 → worktree_controller-1.34.2}/src/worktree_controller/git_backend.py
RENAMED
|
File without changes
|
{worktree_controller-1.34.1 → worktree_controller-1.34.2}/src/worktree_controller/governance.py
RENAMED
|
File without changes
|
{worktree_controller-1.34.1 → worktree_controller-1.34.2}/src/worktree_controller/hardlinks.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{worktree_controller-1.34.1 → worktree_controller-1.34.2}/src/worktree_controller/metadata_codec.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{worktree_controller-1.34.1 → worktree_controller-1.34.2}/src/worktree_controller/owner_actions.py
RENAMED
|
File without changes
|
|
File without changes
|
{worktree_controller-1.34.1 → worktree_controller-1.34.2}/src/worktree_controller/preservation.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{worktree_controller-1.34.1 → worktree_controller-1.34.2}/src/worktree_controller/reconciler.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{worktree_controller-1.34.1 → worktree_controller-1.34.2}/src/worktree_controller/release_intents.py
RENAMED
|
File without changes
|
{worktree_controller-1.34.1 → worktree_controller-1.34.2}/src/worktree_controller/rendering.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{worktree_controller-1.34.1 → worktree_controller-1.34.2}/src/worktree_controller/semantics.py
RENAMED
|
File without changes
|
{worktree_controller-1.34.1 → worktree_controller-1.34.2}/src/worktree_controller/session.py
RENAMED
|
File without changes
|
|
File without changes
|
{worktree_controller-1.34.1 → worktree_controller-1.34.2}/src/worktree_controller/source_cleanup.py
RENAMED
|
File without changes
|
|
File without changes
|
{worktree_controller-1.34.1 → worktree_controller-1.34.2}/src/worktree_controller/source_recovery.py
RENAMED
|
File without changes
|
|
File without changes
|
{worktree_controller-1.34.1 → worktree_controller-1.34.2}/src/worktree_controller/task_workflow.py
RENAMED
|
File without changes
|
|
File without changes
|
{worktree_controller-1.34.1 → worktree_controller-1.34.2}/src/worktree_controller/writer_lease.py
RENAMED
|
File without changes
|
{worktree_controller-1.34.1 → worktree_controller-1.34.2}/src/worktree_controller/writer_session.py
RENAMED
|
File without changes
|