worktree-controller 1.32.9__tar.gz → 1.32.10__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.32.9 → worktree_controller-1.32.10}/PKG-INFO +5 -5
- {worktree_controller-1.32.9 → worktree_controller-1.32.10}/README.md +4 -4
- {worktree_controller-1.32.9 → worktree_controller-1.32.10}/docs/operations.md +20 -0
- {worktree_controller-1.32.9 → worktree_controller-1.32.10}/docs/reference.md +12 -0
- {worktree_controller-1.32.9 → worktree_controller-1.32.10}/docs/roadmap.md +2 -1
- {worktree_controller-1.32.9 → worktree_controller-1.32.10}/pyproject.toml +1 -1
- {worktree_controller-1.32.9 → worktree_controller-1.32.10}/pyproject.toml.orig +1 -1
- {worktree_controller-1.32.9 → worktree_controller-1.32.10}/src/worktree_controller/__init__.py +1 -1
- {worktree_controller-1.32.9 → worktree_controller-1.32.10}/src/worktree_controller/controller.py +1 -1
- {worktree_controller-1.32.9 → worktree_controller-1.32.10}/src/worktree_controller/lifecycle.py +1 -1
- {worktree_controller-1.32.9 → worktree_controller-1.32.10}/src/worktree_controller/store.py +93 -0
- {worktree_controller-1.32.9 → worktree_controller-1.32.10/src/worktree_controller}/tool_cli_contract.json +1 -1
- {worktree_controller-1.32.9/src/worktree_controller → worktree_controller-1.32.10}/tool_cli_contract.json +1 -1
- {worktree_controller-1.32.9 → worktree_controller-1.32.10}/LICENSE +0 -0
- {worktree_controller-1.32.9 → worktree_controller-1.32.10}/docs/architecture.md +0 -0
- {worktree_controller-1.32.9 → worktree_controller-1.32.10}/docs/client-integration.md +0 -0
- {worktree_controller-1.32.9 → worktree_controller-1.32.10}/docs/daily-workflow.md +0 -0
- {worktree_controller-1.32.9 → worktree_controller-1.32.10}/docs/first-change.md +0 -0
- {worktree_controller-1.32.9 → worktree_controller-1.32.10}/docs/getting-started.md +0 -0
- {worktree_controller-1.32.9 → worktree_controller-1.32.10}/docs/integration-boundaries.md +0 -0
- {worktree_controller-1.32.9 → worktree_controller-1.32.10}/docs/publishing.md +0 -0
- {worktree_controller-1.32.9 → worktree_controller-1.32.10}/docs/scope.md +0 -0
- {worktree_controller-1.32.9 → worktree_controller-1.32.10}/examples/change_task.py +0 -0
- {worktree_controller-1.32.9 → worktree_controller-1.32.10}/examples/client_continuation.py +0 -0
- {worktree_controller-1.32.9 → worktree_controller-1.32.10}/examples/quickstart.py +0 -0
- {worktree_controller-1.32.9 → worktree_controller-1.32.10}/src/worktree_controller/activation_layout.py +0 -0
- {worktree_controller-1.32.9 → worktree_controller-1.32.10}/src/worktree_controller/branch_retirement.py +0 -0
- {worktree_controller-1.32.9 → worktree_controller-1.32.10}/src/worktree_controller/canonical_refresh.py +0 -0
- {worktree_controller-1.32.9 → worktree_controller-1.32.10}/src/worktree_controller/canonical_transition.py +0 -0
- {worktree_controller-1.32.9 → worktree_controller-1.32.10}/src/worktree_controller/cleanup_attempts.py +0 -0
- {worktree_controller-1.32.9 → worktree_controller-1.32.10}/src/worktree_controller/cleanup_evidence.py +0 -0
- {worktree_controller-1.32.9 → worktree_controller-1.32.10}/src/worktree_controller/cleanup_recovery.py +0 -0
- {worktree_controller-1.32.9 → worktree_controller-1.32.10}/src/worktree_controller/cli.py +0 -0
- {worktree_controller-1.32.9 → worktree_controller-1.32.10}/src/worktree_controller/convergence.py +0 -0
- {worktree_controller-1.32.9 → worktree_controller-1.32.10}/src/worktree_controller/delivered_closeout.py +0 -0
- {worktree_controller-1.32.9 → worktree_controller-1.32.10}/src/worktree_controller/disposable.py +0 -0
- {worktree_controller-1.32.9 → worktree_controller-1.32.10}/src/worktree_controller/environment.py +0 -0
- {worktree_controller-1.32.9 → worktree_controller-1.32.10}/src/worktree_controller/frozen_recovery.py +0 -0
- {worktree_controller-1.32.9 → worktree_controller-1.32.10}/src/worktree_controller/git_backend.py +0 -0
- {worktree_controller-1.32.9 → worktree_controller-1.32.10}/src/worktree_controller/governance.py +0 -0
- {worktree_controller-1.32.9 → worktree_controller-1.32.10}/src/worktree_controller/hardlinks.py +0 -0
- {worktree_controller-1.32.9 → worktree_controller-1.32.10}/src/worktree_controller/integration_cleanup.py +0 -0
- {worktree_controller-1.32.9 → worktree_controller-1.32.10}/src/worktree_controller/integration_conflict.py +0 -0
- {worktree_controller-1.32.9 → worktree_controller-1.32.10}/src/worktree_controller/integration_retry.py +0 -0
- {worktree_controller-1.32.9 → worktree_controller-1.32.10}/src/worktree_controller/keyed_document_scope.py +0 -0
- {worktree_controller-1.32.9 → worktree_controller-1.32.10}/src/worktree_controller/lifecycle_history.py +0 -0
- {worktree_controller-1.32.9 → worktree_controller-1.32.10}/src/worktree_controller/lifecycle_observation.py +0 -0
- {worktree_controller-1.32.9 → worktree_controller-1.32.10}/src/worktree_controller/metadata_codec.py +0 -0
- {worktree_controller-1.32.9 → worktree_controller-1.32.10}/src/worktree_controller/metadata_relocation.py +0 -0
- {worktree_controller-1.32.9 → worktree_controller-1.32.10}/src/worktree_controller/models.py +0 -0
- {worktree_controller-1.32.9 → worktree_controller-1.32.10}/src/worktree_controller/mount_diagnostics.py +0 -0
- {worktree_controller-1.32.9 → worktree_controller-1.32.10}/src/worktree_controller/multiple_cleanup_recovery.py +0 -0
- {worktree_controller-1.32.9 → worktree_controller-1.32.10}/src/worktree_controller/namespace_migration.py +0 -0
- {worktree_controller-1.32.9 → worktree_controller-1.32.10}/src/worktree_controller/native_session_recovery.py +0 -0
- {worktree_controller-1.32.9 → worktree_controller-1.32.10}/src/worktree_controller/owner_actions.py +0 -0
- {worktree_controller-1.32.9 → worktree_controller-1.32.10}/src/worktree_controller/policy.py +0 -0
- {worktree_controller-1.32.9 → worktree_controller-1.32.10}/src/worktree_controller/preservation.py +0 -0
- {worktree_controller-1.32.9 → worktree_controller-1.32.10}/src/worktree_controller/preserved_cleanup.py +0 -0
- {worktree_controller-1.32.9 → worktree_controller-1.32.10}/src/worktree_controller/publication_execution.py +0 -0
- {worktree_controller-1.32.9 → worktree_controller-1.32.10}/src/worktree_controller/reconciler.py +0 -0
- {worktree_controller-1.32.9 → worktree_controller-1.32.10}/src/worktree_controller/record_updates.py +0 -0
- {worktree_controller-1.32.9 → worktree_controller-1.32.10}/src/worktree_controller/recovery_guidance.py +0 -0
- {worktree_controller-1.32.9 → worktree_controller-1.32.10}/src/worktree_controller/registration_backfill.py +0 -0
- {worktree_controller-1.32.9 → worktree_controller-1.32.10}/src/worktree_controller/registration_prune.py +0 -0
- {worktree_controller-1.32.9 → worktree_controller-1.32.10}/src/worktree_controller/release_intents.py +0 -0
- {worktree_controller-1.32.9 → worktree_controller-1.32.10}/src/worktree_controller/rendering.py +0 -0
- {worktree_controller-1.32.9 → worktree_controller-1.32.10}/src/worktree_controller/resource_admission.py +0 -0
- {worktree_controller-1.32.9 → worktree_controller-1.32.10}/src/worktree_controller/retirement_adapters.py +0 -0
- {worktree_controller-1.32.9 → worktree_controller-1.32.10}/src/worktree_controller/retirement_execution.py +0 -0
- {worktree_controller-1.32.9 → worktree_controller-1.32.10}/src/worktree_controller/semantics.py +0 -0
- {worktree_controller-1.32.9 → worktree_controller-1.32.10}/src/worktree_controller/session.py +0 -0
- {worktree_controller-1.32.9 → worktree_controller-1.32.10}/src/worktree_controller/session_admission.py +0 -0
- {worktree_controller-1.32.9 → worktree_controller-1.32.10}/src/worktree_controller/source_cleanup.py +0 -0
- {worktree_controller-1.32.9 → worktree_controller-1.32.10}/src/worktree_controller/source_preservation.py +0 -0
- {worktree_controller-1.32.9 → worktree_controller-1.32.10}/src/worktree_controller/source_recovery.py +0 -0
- {worktree_controller-1.32.9 → worktree_controller-1.32.10}/src/worktree_controller/task_workflow.py +0 -0
- {worktree_controller-1.32.9 → worktree_controller-1.32.10}/src/worktree_controller/transaction_scope.py +0 -0
- {worktree_controller-1.32.9 → worktree_controller-1.32.10}/src/worktree_controller/writer_lease.py +0 -0
- {worktree_controller-1.32.9 → worktree_controller-1.32.10}/src/worktree_controller/writer_session.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: worktree-controller
|
|
3
|
-
Version: 1.32.
|
|
3
|
+
Version: 1.32.10
|
|
4
4
|
Summary: Govern Git worktree budgets, authority, ownership, and lifecycle
|
|
5
5
|
License-Expression: Apache-2.0
|
|
6
6
|
License-File: LICENSE
|
|
@@ -23,7 +23,7 @@ It checks repository policy before allocating a worktree, grants writing authori
|
|
|
23
23
|
process, and records handoff, integration, recovery and release evidence. Git remains the source
|
|
24
24
|
of truth for files, branches, commits and registered worktrees.
|
|
25
25
|
|
|
26
|
-
**Current release: 1.32.
|
|
26
|
+
**Current release: 1.32.10 · Linux · Python 3.12 · Apache-2.0**
|
|
27
27
|
|
|
28
28
|
## Install
|
|
29
29
|
|
|
@@ -32,7 +32,7 @@ Use a virtual environment in a new directory:
|
|
|
32
32
|
```bash
|
|
33
33
|
python3.12 -m venv .venv
|
|
34
34
|
. .venv/bin/activate
|
|
35
|
-
python -m pip install worktree-controller==1.32.
|
|
35
|
+
python -m pip install worktree-controller==1.32.10
|
|
36
36
|
worktree-controller --version
|
|
37
37
|
worktree-controller capabilities --json
|
|
38
38
|
```
|
|
@@ -41,7 +41,7 @@ WC requires Git and readable Linux `/proc`. Other operating systems and Python v
|
|
|
41
41
|
supported by this release. Its one runtime dependency is `websockets>=15,<16`.
|
|
42
42
|
On Ubuntu, if creating the environment reports that `ensurepip` is unavailable, install the
|
|
43
43
|
distribution's `python3.12-venv` package first (for example, `sudo apt install python3.12-venv`).
|
|
44
|
-
Software version 1.32.
|
|
44
|
+
Software version 1.32.10 uses CLI contract **61** and storage layout **5**.
|
|
45
45
|
|
|
46
46
|
## Try it in a disposable repository
|
|
47
47
|
|
|
@@ -50,7 +50,7 @@ With the environment above active:
|
|
|
50
50
|
```bash
|
|
51
51
|
git clone https://github.com/xuanheng-tech/worktree-controller.git wc
|
|
52
52
|
cd wc
|
|
53
|
-
git checkout v1.32.
|
|
53
|
+
git checkout v1.32.10
|
|
54
54
|
python examples/quickstart.py --workspace "$HOME/wc-first-run"
|
|
55
55
|
```
|
|
56
56
|
|
|
@@ -6,7 +6,7 @@ It checks repository policy before allocating a worktree, grants writing authori
|
|
|
6
6
|
process, and records handoff, integration, recovery and release evidence. Git remains the source
|
|
7
7
|
of truth for files, branches, commits and registered worktrees.
|
|
8
8
|
|
|
9
|
-
**Current release: 1.32.
|
|
9
|
+
**Current release: 1.32.10 · Linux · Python 3.12 · Apache-2.0**
|
|
10
10
|
|
|
11
11
|
## Install
|
|
12
12
|
|
|
@@ -15,7 +15,7 @@ Use a virtual environment in a new directory:
|
|
|
15
15
|
```bash
|
|
16
16
|
python3.12 -m venv .venv
|
|
17
17
|
. .venv/bin/activate
|
|
18
|
-
python -m pip install worktree-controller==1.32.
|
|
18
|
+
python -m pip install worktree-controller==1.32.10
|
|
19
19
|
worktree-controller --version
|
|
20
20
|
worktree-controller capabilities --json
|
|
21
21
|
```
|
|
@@ -24,7 +24,7 @@ WC requires Git and readable Linux `/proc`. Other operating systems and Python v
|
|
|
24
24
|
supported by this release. Its one runtime dependency is `websockets>=15,<16`.
|
|
25
25
|
On Ubuntu, if creating the environment reports that `ensurepip` is unavailable, install the
|
|
26
26
|
distribution's `python3.12-venv` package first (for example, `sudo apt install python3.12-venv`).
|
|
27
|
-
Software version 1.32.
|
|
27
|
+
Software version 1.32.10 uses CLI contract **61** and storage layout **5**.
|
|
28
28
|
|
|
29
29
|
## Try it in a disposable repository
|
|
30
30
|
|
|
@@ -33,7 +33,7 @@ With the environment above active:
|
|
|
33
33
|
```bash
|
|
34
34
|
git clone https://github.com/xuanheng-tech/worktree-controller.git wc
|
|
35
35
|
cd wc
|
|
36
|
-
git checkout v1.32.
|
|
36
|
+
git checkout v1.32.10
|
|
37
37
|
python examples/quickstart.py --workspace "$HOME/wc-first-run"
|
|
38
38
|
```
|
|
39
39
|
|
|
@@ -31,6 +31,17 @@ uses the public Snapshot Runner package. Context Loader and `tool-skill-sync` ar
|
|
|
31
31
|
|
|
32
32
|
## Concurrent diagnostic reads
|
|
33
33
|
|
|
34
|
+
From 1.32.10, `resource-clean --typed` holds the existing repository lock shared and an
|
|
35
|
+
exclusive lock on the existing transactions directory. Exact closed `lifecycle-history`
|
|
36
|
+
queries continue to validate all metadata and evidence while cleanup runs. Ordinary mutations
|
|
37
|
+
and a second cleanup wait; activation refuses the live cleanup even before its journal exists.
|
|
38
|
+
No lock is released during an action, and cleanup never changes allocation/publication metadata.
|
|
39
|
+
Doctor also takes the cleanup observation gate, so its filesystem and journal diagnostics wait
|
|
40
|
+
for a coherent boundary. A dry-run may observe changing ignored content and refuse; rerun it
|
|
41
|
+
after cleanup. Registered-venv cleanup, checkout release and publication retain their exclusive
|
|
42
|
+
repository lock. This patch improves read availability; it does not promise a faster cleanup or
|
|
43
|
+
bound unrelated publication, release, storage or operating-system waits.
|
|
44
|
+
|
|
34
45
|
`doctor` refreshes Git inventory after acquiring the repository's shared lock and retains that
|
|
35
46
|
lock through metadata, semantic, transaction and retirement diagnostics. Normal Controller
|
|
36
47
|
mutations wait until those reads finish, so a guarded release cannot remove an inspected checkout
|
|
@@ -42,6 +53,15 @@ original exit code and request, and compare the exact repository and checkout us
|
|
|
42
53
|
Git command before concluding that an object was lost. Repeating a diagnostic does not recover a
|
|
43
54
|
lifecycle, replace frozen source evidence or settle another owner's outstanding authorization.
|
|
44
55
|
|
|
56
|
+
If history returns `HISTORY_EVIDENCE_INCOMPLETE` because a release receipt's original plan is
|
|
57
|
+
missing, keep the citation unverified. `reconcile receipts` acknowledges existing publication
|
|
58
|
+
evidence; it does not reconstruct release plans. `release-recovery-inspect` requires both the
|
|
59
|
+
original pending journal and its plan and refuses an already completed receipt. First locate
|
|
60
|
+
trusted original plan bytes and prove their exact identity against the receipt. Existing task,
|
|
61
|
+
branch, ancestry, teardown evidence or a newly generated plan cannot replace that original.
|
|
62
|
+
No original evidence means there is no supported recovery to execute; preserve the receipt and
|
|
63
|
+
report the gap rather than copying metadata by hand or manufacturing completion.
|
|
64
|
+
|
|
45
65
|
## Handoff and integrate
|
|
46
66
|
|
|
47
67
|
Publish the source branch, hand off its exact commit and scope, then enqueue one integration intent.
|
|
@@ -957,6 +957,18 @@ keeps resolving after the move.
|
|
|
957
957
|
|
|
958
958
|
## Unified release plan and disposable resources
|
|
959
959
|
|
|
960
|
+
From 1.32.10, typed cleanup serializes on the existing transactions-directory inode while
|
|
961
|
+
holding `repo.lock` shared. This excludes normal metadata writers and older exclusive cleanup
|
|
962
|
+
implementations for the entire operation, while closed history readers retain their existing
|
|
963
|
+
shared repository lock and full evidence checks. Only the existing atomic cleanup journal,
|
|
964
|
+
append-only action/completion evidence and exact authorized ignored resources may change.
|
|
965
|
+
Allocation, binding, release and publication metadata stay stable. Doctor additionally takes a
|
|
966
|
+
shared transactions-directory gate before its repository lock; activation probes the exclusive
|
|
967
|
+
cleanup gate. The directory is initialized under the normal exclusive repository lock; it adds
|
|
968
|
+
no pathname or storage format. Cleanup gates are process-owned file locks, released by the kernel
|
|
969
|
+
on exit; partial operations retain their original recovery evidence and never gain release authority.
|
|
970
|
+
Registered-venv cleanup and physical checkout release keep their exclusive repository locks.
|
|
971
|
+
|
|
960
972
|
Clean `RETAINED` feature/audit checkouts can use `close-delivered` when their committed
|
|
961
973
|
content is already published. First run `close-delivered --path PATH
|
|
962
974
|
--expected-record-version N --owner-release OWNER --actor ACTOR --dry-run --json`.
|
|
@@ -12,7 +12,8 @@ hashes, file/ancestor checks, limits and refusal codes stay unchanged; mutation
|
|
|
12
12
|
retain their original owners. Release acceptance covers the exact installed candidate, ordinary
|
|
13
13
|
1.32.7 upgrades and historical 1.30.4 restoration. Publication and local activation remain
|
|
14
14
|
separate verified steps. The 1.32.9 patch skips unrelated live Git inventory for closed lifecycle selectors while
|
|
15
|
-
retaining full locked metadata and immutable evidence validation.
|
|
15
|
+
retaining full locked metadata and immutable evidence validation. The 1.32.10 patch keeps closed history readable during typed cleanup while preserving writer,
|
|
16
|
+
cleanup, diagnostic and activation serialization. Software version 1.32.10 retains
|
|
16
17
|
CLI contract 61, the existing capability versions and storage layout 5, and serializes doctor
|
|
17
18
|
snapshot reads with normal Controller mutations. Diagnostics refresh Git inventory after taking
|
|
18
19
|
the shared repository lock, then retain it through semantic, transaction and retirement checks.
|
{worktree_controller-1.32.9 → worktree_controller-1.32.10}/src/worktree_controller/controller.py
RENAMED
|
@@ -1608,7 +1608,7 @@ def doctor(repository_path: Path, *, namespace_pid: int | None = None) -> dict[s
|
|
|
1608
1608
|
try:
|
|
1609
1609
|
# Release/refresh must not invalidate Git paths while the snapshot's
|
|
1610
1610
|
# semantic and transaction evidence is still being read.
|
|
1611
|
-
stack.enter_context(store.
|
|
1611
|
+
stack.enter_context(store.cleanup_observation_lock())
|
|
1612
1612
|
repository = inventory(repository_path)
|
|
1613
1613
|
snapshot = store.load()
|
|
1614
1614
|
except ControllerError as exc:
|
{worktree_controller-1.32.9 → worktree_controller-1.32.10}/src/worktree_controller/lifecycle.py
RENAMED
|
@@ -5002,7 +5002,7 @@ def cleanup_typed_disposable(
|
|
|
5002
5002
|
|
|
5003
5003
|
store = MetadataStore(inventory(repository_path).common_dir)
|
|
5004
5004
|
receipt_id = None
|
|
5005
|
-
with store.lock(exclusive=
|
|
5005
|
+
with (store.lock(exclusive=False) if dry_run else store.cleanup_lock()):
|
|
5006
5006
|
repository = inventory(repository_path)
|
|
5007
5007
|
snapshot = store._load_unlocked()
|
|
5008
5008
|
item, record = _managed_record(repository, snapshot, target)
|
|
@@ -349,6 +349,99 @@ class MetadataStore:
|
|
|
349
349
|
finally:
|
|
350
350
|
os.close(descriptor)
|
|
351
351
|
|
|
352
|
+
@contextmanager
|
|
353
|
+
def cleanup_observation_lock(self) -> Iterator[None]:
|
|
354
|
+
"""Keep filesystem/journal diagnostics coherent with typed cleanup.
|
|
355
|
+
|
|
356
|
+
History needs only repo.lock; doctor also reads the mutable cleanup
|
|
357
|
+
journal and filesystem. Take the directory gate before repo.lock so a
|
|
358
|
+
waiting diagnostic never obstructs the cleanup it is waiting for.
|
|
359
|
+
"""
|
|
360
|
+
with self.lock(exclusive=False):
|
|
361
|
+
if not self.transactions_dir.exists():
|
|
362
|
+
# Cleanup must first take repo.lock exclusively to create it.
|
|
363
|
+
yield
|
|
364
|
+
return
|
|
365
|
+
try:
|
|
366
|
+
descriptor = os.open(
|
|
367
|
+
self.transactions_dir,
|
|
368
|
+
os.O_RDONLY | os.O_DIRECTORY | os.O_NOFOLLOW | os.O_CLOEXEC,
|
|
369
|
+
)
|
|
370
|
+
except OSError as exc:
|
|
371
|
+
raise ControllerError(
|
|
372
|
+
"RESOURCE_CLEANUP_LOCK_UNAVAILABLE", "cleanup journal directory cannot be observed"
|
|
373
|
+
) from exc
|
|
374
|
+
try:
|
|
375
|
+
try:
|
|
376
|
+
fcntl.flock(descriptor, fcntl.LOCK_SH)
|
|
377
|
+
except OSError as exc:
|
|
378
|
+
raise ControllerError(
|
|
379
|
+
"RESOURCE_CLEANUP_LOCK_UNAVAILABLE", "cleanup observation lock cannot be acquired"
|
|
380
|
+
) from exc
|
|
381
|
+
with self.lock(exclusive=False):
|
|
382
|
+
try:
|
|
383
|
+
opened = os.fstat(descriptor)
|
|
384
|
+
named = os.stat(self.transactions_dir, follow_symlinks=False)
|
|
385
|
+
except OSError as exc:
|
|
386
|
+
raise ControllerError(
|
|
387
|
+
"RESOURCE_CLEANUP_LOCK_UNAVAILABLE", "cleanup journal directory disappeared"
|
|
388
|
+
) from exc
|
|
389
|
+
if (opened.st_dev, opened.st_ino) != (named.st_dev, named.st_ino):
|
|
390
|
+
raise ControllerError(
|
|
391
|
+
"RESOURCE_CLEANUP_LOCK_UNAVAILABLE", "cleanup journal directory changed"
|
|
392
|
+
)
|
|
393
|
+
yield
|
|
394
|
+
finally:
|
|
395
|
+
os.close(descriptor)
|
|
396
|
+
|
|
397
|
+
@contextmanager
|
|
398
|
+
def cleanup_lock(self) -> Iterator[None]:
|
|
399
|
+
"""Fence typed filesystem cleanup while keeping metadata readers available.
|
|
400
|
+
|
|
401
|
+
Cleanup changes only its atomic journal, append-only action/completion
|
|
402
|
+
evidence and the authorized ignored trees, never allocation metadata.
|
|
403
|
+
The existing transactions directory serializes these cleanup executions;
|
|
404
|
+
a shared repo.lock excludes every ordinary writer, including old runtimes.
|
|
405
|
+
Both locks stay held through the final scan or failure receipt. There is
|
|
406
|
+
no lock conversion or unlocked action boundary.
|
|
407
|
+
"""
|
|
408
|
+
descriptor = None
|
|
409
|
+
try:
|
|
410
|
+
# Require the real mutation arbiter before initializing the existing
|
|
411
|
+
# journal directory. Never bootstrap a missing repository lock here.
|
|
412
|
+
try:
|
|
413
|
+
with self.lock(exclusive=True):
|
|
414
|
+
self.transactions_dir.mkdir(mode=0o700, exist_ok=True)
|
|
415
|
+
descriptor = os.open(
|
|
416
|
+
self.transactions_dir,
|
|
417
|
+
os.O_RDONLY | os.O_DIRECTORY | os.O_NOFOLLOW | os.O_CLOEXEC,
|
|
418
|
+
)
|
|
419
|
+
fcntl.flock(descriptor, fcntl.LOCK_EX)
|
|
420
|
+
except OSError as exc:
|
|
421
|
+
raise ControllerError(
|
|
422
|
+
"RESOURCE_CLEANUP_LOCK_UNAVAILABLE", "cleanup journal directory cannot be locked"
|
|
423
|
+
) from exc
|
|
424
|
+
with self.lock(exclusive=False):
|
|
425
|
+
if not self.flock_held:
|
|
426
|
+
raise ControllerError("MISSING_REPOSITORY_LOCK", "cleanup requires the repository lock")
|
|
427
|
+
try:
|
|
428
|
+
opened = os.fstat(descriptor)
|
|
429
|
+
named = os.stat(self.transactions_dir, follow_symlinks=False)
|
|
430
|
+
except OSError as exc:
|
|
431
|
+
raise ControllerError(
|
|
432
|
+
"RESOURCE_CLEANUP_LOCK_UNAVAILABLE", "cleanup journal directory disappeared"
|
|
433
|
+
) from exc
|
|
434
|
+
if (opened.st_dev, opened.st_ino, opened.st_mode) != (
|
|
435
|
+
named.st_dev, named.st_ino, named.st_mode
|
|
436
|
+
):
|
|
437
|
+
raise ControllerError(
|
|
438
|
+
"RESOURCE_CLEANUP_LOCK_UNAVAILABLE", "cleanup journal directory changed"
|
|
439
|
+
)
|
|
440
|
+
yield
|
|
441
|
+
finally:
|
|
442
|
+
if descriptor is not None:
|
|
443
|
+
os.close(descriptor)
|
|
444
|
+
|
|
352
445
|
def _decoded(
|
|
353
446
|
self, path: Path | os.DirEntry[str], decode: Callable[[Mapping[str, Any]], _Decoded]
|
|
354
447
|
) -> _Decoded:
|
|
@@ -1071,7 +1071,7 @@
|
|
|
1071
1071
|
"session_launcher_entrypoint": "worktree-session",
|
|
1072
1072
|
"session_entrypoint": "worktree-session-end",
|
|
1073
1073
|
"tool_name": "worktree-controller",
|
|
1074
|
-
"tool_version": "1.32.
|
|
1074
|
+
"tool_version": "1.32.10",
|
|
1075
1075
|
"delivered_closeout_version": 1,
|
|
1076
1076
|
"retained_archive_version": 1,
|
|
1077
1077
|
"retention_convergence_version": 2,
|
|
@@ -1071,7 +1071,7 @@
|
|
|
1071
1071
|
"session_launcher_entrypoint": "worktree-session",
|
|
1072
1072
|
"session_entrypoint": "worktree-session-end",
|
|
1073
1073
|
"tool_name": "worktree-controller",
|
|
1074
|
-
"tool_version": "1.32.
|
|
1074
|
+
"tool_version": "1.32.10",
|
|
1075
1075
|
"delivered_closeout_version": 1,
|
|
1076
1076
|
"retained_archive_version": 1,
|
|
1077
1077
|
"retention_convergence_version": 2,
|
|
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.32.9 → worktree_controller-1.32.10}/src/worktree_controller/convergence.py
RENAMED
|
File without changes
|
|
File without changes
|
{worktree_controller-1.32.9 → worktree_controller-1.32.10}/src/worktree_controller/disposable.py
RENAMED
|
File without changes
|
{worktree_controller-1.32.9 → worktree_controller-1.32.10}/src/worktree_controller/environment.py
RENAMED
|
File without changes
|
|
File without changes
|
{worktree_controller-1.32.9 → worktree_controller-1.32.10}/src/worktree_controller/git_backend.py
RENAMED
|
File without changes
|
{worktree_controller-1.32.9 → worktree_controller-1.32.10}/src/worktree_controller/governance.py
RENAMED
|
File without changes
|
{worktree_controller-1.32.9 → worktree_controller-1.32.10}/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.32.9 → worktree_controller-1.32.10}/src/worktree_controller/metadata_codec.py
RENAMED
|
File without changes
|
|
File without changes
|
{worktree_controller-1.32.9 → worktree_controller-1.32.10}/src/worktree_controller/models.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{worktree_controller-1.32.9 → worktree_controller-1.32.10}/src/worktree_controller/owner_actions.py
RENAMED
|
File without changes
|
{worktree_controller-1.32.9 → worktree_controller-1.32.10}/src/worktree_controller/policy.py
RENAMED
|
File without changes
|
{worktree_controller-1.32.9 → worktree_controller-1.32.10}/src/worktree_controller/preservation.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{worktree_controller-1.32.9 → worktree_controller-1.32.10}/src/worktree_controller/reconciler.py
RENAMED
|
File without changes
|
{worktree_controller-1.32.9 → worktree_controller-1.32.10}/src/worktree_controller/record_updates.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{worktree_controller-1.32.9 → worktree_controller-1.32.10}/src/worktree_controller/rendering.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{worktree_controller-1.32.9 → worktree_controller-1.32.10}/src/worktree_controller/semantics.py
RENAMED
|
File without changes
|
{worktree_controller-1.32.9 → worktree_controller-1.32.10}/src/worktree_controller/session.py
RENAMED
|
File without changes
|
|
File without changes
|
{worktree_controller-1.32.9 → worktree_controller-1.32.10}/src/worktree_controller/source_cleanup.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{worktree_controller-1.32.9 → worktree_controller-1.32.10}/src/worktree_controller/task_workflow.py
RENAMED
|
File without changes
|
|
File without changes
|
{worktree_controller-1.32.9 → worktree_controller-1.32.10}/src/worktree_controller/writer_lease.py
RENAMED
|
File without changes
|
{worktree_controller-1.32.9 → worktree_controller-1.32.10}/src/worktree_controller/writer_session.py
RENAMED
|
File without changes
|