Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 0.47.21 - 2026-11-16

- Keep status without fetch, check with --no-fetch, and worktree list observational on control metadata. Skip implicit startup maintenance, authorization nonce creation or cleanup, and persistent patch-ID cache writes while preserving manifest selection checks and explicit fetch behavior.

## 0.47.20 - 2026-11-16

- Validate the complete proposed integration before capturing commits into a stack. Keep capture preflight observational and require explicit recovery for pending control operations, so projection refusals do not leave manifest commits or ledger events. Capture no longer stages or commits tracked control metadata automatically.
Expand Down
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Keep many long-lived pull requests clean, rebuildable, and publishable from one
manifest.

Current version: `0.47.20`
Current version: `0.47.21`

`syncwheel` is a small CLI and workflow model for maintainers who carry several
PR branches against an upstream repository and need those branches to stay
Expand Down Expand Up @@ -477,6 +477,12 @@ lanes that need attention and `--json` adds a count per health code. It is
read-only. When more than three lanes need attention, other commands print one
summary line with those counts instead of one warning per lane.

`status` without `--fetch`, `check --no-fetch`, and `worktree list` preserve
control metadata, including authorization records, persistent caches and
startup state. They do not start update maintenance or clean up stale authorization records. Delivery
validation can still calculate projections using temporary Git objects and
checkouts; explicit fetch remains a separate, requested operation.

To retire a known dead or abandoned lane deliberately, preview the operation
first and provide a durable reason:

Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.47.20
0.47.21
3 changes: 3 additions & 0 deletions docs/ai-agents.md
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,9 @@ active-active channel must use the coordination remote.
use explicit tracking configuration when exclusions need updating
- read-only diagnostics remain usable when the primary is dirty; treat their yellow
dirty-primary warning as foreign work, not permission to repair it
- use `status` without `--fetch`, `check --no-fetch`, or `worktree list` to
preserve control metadata and skip startup maintenance and authorization
cleanup; delivery validation may still calculate temporary Git projections
- for uncommitted tracked primary changes, identify their owning stack and use
`syncwheel stack absorb <stack> <paths> -N -m "message"`. Default amend refuses
an empty stack; it must not amend the base commit
Expand Down
4 changes: 2 additions & 2 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1826,7 +1826,7 @@
<div class="hero-stage" id="top">
<section class="hero" aria-labelledby="hero-heading">
<div class="hero-copy">
<span class="eyebrow"><span class="ai-sigil" aria-hidden="true"></span>AI-ready Git coordination <span class="hero-version">v<!-- syncwheel-version:start -->0.47.20<!-- syncwheel-version:end --></span></span>
<span class="eyebrow"><span class="ai-sigil" aria-hidden="true"></span>AI-ready Git coordination <span class="hero-version">v<!-- syncwheel-version:start -->0.47.21<!-- syncwheel-version:end --></span></span>
<h1 id="hero-heading"><span class="title-line">Move at</span><span class="title-line">machine speed.</span><span class="title-line accent">Stay in control.</span></h1>
<p class="subhead">Syncwheel coordinates every Git lane used by humans, AI agents, CI and delivery systems—without sacrificing review, safety or recovery.</p>
<div class="actions">
Expand Down Expand Up @@ -2602,7 +2602,7 @@ <h2 class="section-title">Your first verified plan in minutes.</h2>
</main>

<footer>
<span>syncwheel v<!-- syncwheel-version:start -->0.47.20<!-- syncwheel-version:end --> · MIT · a NestDevLab project</span>
<span>syncwheel v<!-- syncwheel-version:start -->0.47.21<!-- syncwheel-version:end --> · MIT · a NestDevLab project</span>
<a class="logo-link" href="https://www.nestdev.it/" aria-label="NestDevLab">
<img src="https://www.nestdev.it/assets/logo-nestdev.png" width="22" height="22" alt="">
</a>
Expand Down
2 changes: 1 addition & 1 deletion openpack.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"schemaVersion": 2,
"name": "NestDevLab/syncwheel",
"version": "0.47.20",
"version": "0.47.21",
"provides": [
{
"type": "skills",
Expand Down
68 changes: 55 additions & 13 deletions scripts/syncwheel.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import argparse
import copy
import contextlib
from contextvars import ContextVar
import datetime
import errno
import fnmatch
Expand Down Expand Up @@ -506,6 +507,7 @@
MANAGED_PUSH_AUTH_ENV = 'SYNCWHEEL_PUSH_AUTH_FILE'
MANAGED_PUSH_SECRET_ENV = 'SYNCWHEEL_PUSH_AUTH_SECRET'
MANAGED_PUSH_AUTH_TTL_SECONDS = 60
_READONLY_DIAGNOSTICS = ContextVar('readonly_diagnostics', default=False)
SYNCWHEEL_OWNS_REF_MOVES = False
SYNCWHEEL_REF_AUTH_REPO = None
SYNCWHEEL_REF_AUTH_TTL_SECONDS = 30
Expand Down Expand Up @@ -601,10 +603,14 @@ def managed_process_env(extra=None, authorize=True):
process_env = os.environ.copy()
for name in AMBIENT_GIT_LOCATION_ENV:
process_env.pop(name, None)
if authorize and SYNCWHEEL_OWNS_REF_MOVES and SYNCWHEEL_REF_AUTH_REPO:
diagnostics = _READONLY_DIAGNOSTICS.get()
if not diagnostics and authorize and SYNCWHEEL_OWNS_REF_MOVES and SYNCWHEEL_REF_AUTH_REPO:
process_env[MANAGED_REF_MOVE_AUTH_ENV] = authorize_ref_move(SYNCWHEEL_REF_AUTH_REPO)
if extra:
process_env.update(extra)
if diagnostics:
process_env.pop(MANAGED_REF_MOVE_AUTH_ENV, None)
process_env.update(GIT_NO_LAZY_FETCH='1', GIT_ALLOW_PROTOCOL='')
return process_env


Expand Down Expand Up @@ -3278,6 +3284,9 @@ def commit_patch_ids(repo_root, commits):
commits = list(dict.fromkeys(commits))
if not commits:
return {}
if _READONLY_DIAGNOSTICS.get():
# The shared SQLite cache API creates directories, schema and rows.
return batch_uncached_patch_ids(repo_root, commits)
semantics = patch_id_semantics_key(repo_root)
found = {}
try:
Expand Down Expand Up @@ -3712,7 +3721,9 @@ def primary_checkout_state(repo_root, manifest):
primary_path = Path(primary['path']) if primary.get('path') else None
shared_manifest = primary_path / '.syncwheel' / 'manifest.json' if primary_path else None
shared_expected = None
if shared_manifest and shared_manifest.exists():
if shared_manifest and _READONLY_DIAGNOSTICS.get():
shared_expected = primary_guard_branch(read_primary_authority_manifest(shared_manifest))
elif shared_manifest and shared_manifest.exists():
try:
shared_expected = primary_guard_branch(json.loads(shared_manifest.read_text()))
except (OSError, ValueError):
Expand Down Expand Up @@ -6624,9 +6635,9 @@ def governed_worktree_warning_lines(repo_root, manifest, manifest_path=None):
)


def emit_governed_worktree_warnings(repo_root, manifest, json_mode=False, manifest_path=None):
def emit_governed_worktree_warnings(repo_root, manifest, json_mode=False, manifest_path=None, *, lanes=None):
return _governed_worktrees(repo_root).emit_governed_worktree_warnings(
manifest, json_mode, manifest_path,
manifest, json_mode, manifest_path, lanes=lanes,
)


Expand Down Expand Up @@ -10057,7 +10068,9 @@ def collect_repo_snapshot(repo_root, manifest):
worktrees = get_worktrees(repo_root)
stashes = git(repo_root, 'stash', 'list', check=False).stdout.splitlines()
remotes = git(repo_root, 'remote', '-v', check=False).stdout.splitlines()
status_short = git(repo_root, 'status', '--short', '--branch', check=False).stdout.splitlines()
status_short = git(
repo_root, 'status', '--short', '--branch', check=False, env={'GIT_OPTIONAL_LOCKS': '0'},
).stdout.splitlines()
return {
'repo_root': str(repo_root),
'current_branch': current_branch,
Expand Down Expand Up @@ -11890,7 +11903,11 @@ def command_coordination_compose(args):
def command_worktree_list(args):
"""List governed lanes and their health without changing anything."""
repo_root = resolve_repo_root(args.repo)
manifest, manifest_path = require_manifest(repo_root, args.repo, args.manifest, args.personal)
manifest, manifest_path = load_diagnostic_manifest(repo_root, args)
if manifest is None:
raise SyncwheelError(f'manifest not found: {manifest_path}')
if manifest.get('repository_mode') == 'journal':
raise SyncwheelError('worktree is forbidden for repository_mode="journal"; use journal commands')
diagnostics = governed_worktree_diagnostics(repo_root, manifest, manifest_path)
lanes = [
lane for lane in diagnostics['lanes']
Expand Down Expand Up @@ -12495,19 +12512,33 @@ def command_replay_mode(args):
return 0


def load_diagnostic_manifest(repo_root, args):
path = resolve_manifest_path(repo_root, args.repo, args.manifest, args.personal)
if getattr(args, 'fetch', False):
return _manifest_storage.load_manifest(repo_root, path)
shared = primary_authority_manifest_path(repo_root)
shared_manifest = read_primary_authority_manifest(shared)
if Path(os.path.abspath(path)) == shared or path.resolve() == shared:
return shared_manifest, path
return _manifest_storage.load_manifest(repo_root, path)


def command_status(args):
repo_root = resolve_repo_root(args.repo)
if args.fetch:
git(repo_root, 'fetch', '--all', '--prune', '--quiet', check=False)
manifest_path = resolve_manifest_path(repo_root, args.repo, args.manifest, args.personal)
manifest, manifest_path = _manifest_storage.load_manifest(repo_root, manifest_path)
manifest, manifest_path = load_diagnostic_manifest(repo_root, args)
snapshot = collect_repo_snapshot(repo_root, manifest)
output = {'snapshot': snapshot, 'manifest_path': str(manifest_path), 'manifest_present': manifest is not None}
if manifest:
validation = validate_manifest(repo_root, manifest, manifest_path)
output['validation'] = validation
output['plan'] = build_plan(repo_root, manifest, validation)
output['governed_worktrees'] = governed_worktree_diagnostics(repo_root, manifest, manifest_path)
if _READONLY_DIAGNOSTICS.get():
emit_governed_worktree_warnings(
repo_root, manifest, args.json, manifest_path, lanes=output['governed_worktrees']['lanes'],
)
output['authority'], output['authority_provenance'] = resolve_repository_authority(
repo_root, manifest, manifest_path,
)
Expand Down Expand Up @@ -12635,8 +12666,7 @@ def command_check(args):
repo_root = resolve_repo_root(args.repo)
if args.fetch:
git(repo_root, 'fetch', '--all', '--prune', '--quiet', check=False)
manifest_path = resolve_manifest_path(repo_root, args.repo, args.manifest, args.personal)
manifest, manifest_path = _manifest_storage.load_manifest(repo_root, manifest_path)
manifest, manifest_path = load_diagnostic_manifest(repo_root, args)
if not manifest:
raise SyncwheelError(f'manifest not found: {manifest_path}')
snapshot = collect_repo_snapshot(repo_root, manifest)
Expand All @@ -12645,6 +12675,8 @@ def command_check(args):
plan = build_plan(repo_root, manifest, validation)
diagnostics = [] if journal else integration_commit_diagnostics(repo_root, manifest, validation)
governed = governed_worktree_diagnostics(repo_root, manifest, manifest_path)
if _READONLY_DIAGNOSTICS.get():
emit_governed_worktree_warnings(repo_root, manifest, args.json, manifest_path, lanes=governed['lanes'])
readiness_blockers = []
if validation['errors']:
readiness_blockers.append('validation_errors')
Expand Down Expand Up @@ -20416,7 +20448,16 @@ def main():
command_hooks_ref_guard,
}
global SYNCWHEEL_OWNS_REF_MOVES, SYNCWHEEL_REF_AUTH_REPO
readonly_diagnostics = args.func == command_worktree_list or (
args.func in {command_status, command_check} and not args.fetch
)
try:
if readonly_diagnostics:
diagnostic_scope = _READONLY_DIAGNOSTICS.set(True)
try:
return args.func(args)
finally:
_READONLY_DIAGNOSTICS.reset(diagnostic_scope)
if args.func in {command_repo_tracking_set, command_repo_tracking_status}:
args.repo = args.repo or os.environ.get(ENV_REPO)
if args.func == command_repo_tracking_set:
Expand Down Expand Up @@ -20496,9 +20537,10 @@ def main():
print(f'error: {exc}', file=sys.stderr)
return 2
finally:
if SYNCWHEEL_REF_AUTH_REPO:
clear_ref_authorizations(SYNCWHEEL_REF_AUTH_REPO)
SYNCWHEEL_REF_AUTH_REPO = None
if not readonly_diagnostics:
if SYNCWHEEL_REF_AUTH_REPO:
clear_ref_authorizations(SYNCWHEEL_REF_AUTH_REPO)
SYNCWHEEL_REF_AUTH_REPO = None


class _JournalRepository:
Expand Down
5 changes: 3 additions & 2 deletions scripts/syncwheel_worktrees.py
Original file line number Diff line number Diff line change
Expand Up @@ -590,8 +590,9 @@ def governed_worktree_warning_lines(self, manifest, manifest_path=None, lanes=No
)
return lines

def emit_governed_worktree_warnings(self, manifest, json_mode=False, manifest_path=None):
lanes = self.governed_worktree_diagnostics(manifest, manifest_path)['lanes']
def emit_governed_worktree_warnings(self, manifest, json_mode=False, manifest_path=None, *, lanes=None):
if lanes is None:
lanes = self.governed_worktree_diagnostics(manifest, manifest_path)['lanes']
lines = self.governed_worktree_warning_lines(manifest, manifest_path, lanes=lanes)
if not lines:
return lines
Expand Down
Loading
Loading