every libs/*.py and hooks/*.py now starts with a one-line module docstring; every bin/* script starts with a `# purpose:` header. discovery-by-`ls`-and-read instead of by index. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
8 lines
382 B
Python
8 lines
382 B
Python
"""skip_local_nodes: skip apply on `localhost` nodes whose metadata `id` doesn't match this host's local_id."""
|
|
|
|
from bundlewrap.exceptions import SkipNode
|
|
|
|
def node_apply_start(repo, node, interactive, **kwargs):
|
|
if node.hostname == 'localhost':
|
|
if node.metadata.get('id') != repo.libs.local.id():
|
|
raise SkipNode('bw is not currently running on this node')
|