@vibelord/lanes 1.7.0 → 1.7.1

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vibelord/lanes",
3
- "version": "1.7.0",
3
+ "version": "1.7.1",
4
4
  "description": "Installer for Lanes: shared agent terminals over SSH with Zellij views, registry sync, uploads and a phone interface.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -1 +1 @@
1
- 1.7.0
1
+ 1.7.1
@@ -5434,6 +5434,9 @@ def cmd_doctor(_args):
5434
5434
  if registry:
5435
5435
  errors = [(w['id'], e) for w in registry['workspaces'] for e in w['errors']]
5436
5436
  check(not errors, 'registry clean', '; '.join(f'{w}: {e}' for w, e in errors))
5437
+ hook = site_hook_old()
5438
+ if hook:
5439
+ print(f'⚠ {hook} (Linear BEY-6912)')
5437
5440
  # Stale registry check: any terminals.json newer than the last sync? A lane's `source` is the container's
5438
5441
  # spelling; doctor runs on the host, so it stats the file under the container's home volume.
5439
5442
  sys.path.insert(0, str(L.REPO / 'libexec'))
@@ -5899,11 +5902,39 @@ def cmd_names(args):
5899
5902
  return 1 if counts.get('failed') else 0
5900
5903
 
5901
5904
 
5905
+ def site_hook_old():
5906
+ """A site hook that replaced `lanes_lib.build_registry` with a callable written for a Lanes before 1.7.0 (no
5907
+ `strict`; rd-control's federation hook, Linear BEY-6912) -> one line saying so, else None. Read from the callable's
5908
+ signature only: a `**kwargs` wrapper that forwards to the real function counts as current."""
5909
+ import inspect
5910
+ try:
5911
+ params = inspect.signature(L.build_registry).parameters
5912
+ except (TypeError, ValueError):
5913
+ return None
5914
+ if 'strict' in params or any(p.kind is inspect.Parameter.VAR_KEYWORD for p in params.values()):
5915
+ return None
5916
+ who = getattr(L.build_registry, '__qualname__', None) or 'something'
5917
+ return (f'{who} replaces lanes_lib.build_registry without `strict` (a site hook written for a Lanes before 1.7.0): '
5918
+ 'two lanes on one address refuse instead of being listed')
5919
+
5920
+
5921
+ def build_site_registry(previous, strict=True):
5922
+ """`L.build_registry(previous, strict=…)`, or the older call when a site hook replaced it (site_hook_old): then a
5923
+ `strict=False` caller is told on stderr once, and a duplicate address raises as it did before 1.7.0 — the verb
5924
+ still runs instead of dying on a TypeError (BEY-6912)."""
5925
+ why = site_hook_old()
5926
+ if why is None:
5927
+ return L.build_registry(previous, strict=strict)
5928
+ if not strict:
5929
+ print(f'lanes: {why} (Linear BEY-6912)', file=sys.stderr)
5930
+ return L.build_registry(previous)
5931
+
5932
+
5902
5933
  def site_check():
5903
5934
  """`lanes sync`'s validation without publishing: the registry built from the site as it is now (two lanes on one
5904
5935
  address left in place, `strict=False`) -> (registry, None), or (None, why) when the site cannot be built at all."""
5905
5936
  try:
5906
- return L.build_registry(L.read_json(L.STATE / 'registry.json'), strict=False), None
5937
+ return build_site_registry(L.read_json(L.STATE / 'registry.json'), strict=False), None
5907
5938
  except (L.LanesError, OSError, ValueError, KeyError) as error:
5908
5939
  return None, str(error)
5909
5940
 
@@ -2956,6 +2956,13 @@ LANES_MEASURE_CODEX=1 python3 -c 'import sys; sys.path.insert(0, "lanes/tests/un
2956
2956
 
2957
2957
  then run the unit suite in a managed job; a Codex that renamed a method or a field reds the contract's live leg.
2958
2958
 
2959
+ **A site hook written before 1.7.0 (BEY-6912).** A site that replaces `lanes_lib.build_registry` (rd-control's
2960
+ federation hook does, to fold the guests' lanes in) with a callable that has no `strict` parameter would have made
2961
+ `lanes migrate addresses` and `lanes doctor` die on a `TypeError`. Since 1.7.1 `site_check` reads the callable's
2962
+ signature: without `strict` (and without `**kwargs`) it makes the older call and says so once on stderr — two lanes
2963
+ on one address then refuse, as before 1.7.0, instead of being listed — and `lanes doctor` prints the same as a `⚠`.
2964
+ The hook's fix is to forward keyword arguments (`def build_registry(previous=None, **kw)`), after which nothing is said.
2965
+
2959
2966
  ## Safety rules baked into the code (do not remove)
2960
2967
 
2961
2968
  - tmux is always called with `-N` (`attach-session`, `new-session` and `start-server` on a missing socket start
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@vibelord/lanes",
3
- "version": "1.7.0",
4
- "commit": "ab92ab1f68fe6318e61ad95e391dbd111b94c88f",
5
- "digest": "sha256:bfba2370ea18c443593159de7894f290334bd6a9ebe766df9258a01b5201c4f0",
3
+ "version": "1.7.1",
4
+ "commit": "b32aa72925d9859bc473dc8a3a0116812511b7b9",
5
+ "digest": "sha256:dd086a1c1f42e8775099808bec2be1bac3ca5d0a149901f488b5d06ed9ec4014",
6
6
  "executables": [
7
7
  "bin/lanes",
8
8
  "client/ghostty/lanes-themed-window",