brainpick 0.8.2__tar.gz → 0.8.3__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.
Files changed (124) hide show
  1. {brainpick-0.8.2 → brainpick-0.8.3}/PKG-INFO +1 -1
  2. {brainpick-0.8.2 → brainpick-0.8.3}/pyproject.toml +1 -1
  3. {brainpick-0.8.2 → brainpick-0.8.3}/src/brainpick/__init__.py +1 -1
  4. {brainpick-0.8.2 → brainpick-0.8.3}/src/brainpick/_releases/releases.yaml +32 -0
  5. {brainpick-0.8.2 → brainpick-0.8.3}/src/brainpick/cli.py +8 -2
  6. {brainpick-0.8.2 → brainpick-0.8.3}/src/brainpick/federation.py +5 -3
  7. {brainpick-0.8.2 → brainpick-0.8.3}/src/brainpick/sync.py +4 -2
  8. {brainpick-0.8.2 → brainpick-0.8.3}/src/brainpick.egg-info/PKG-INFO +1 -1
  9. {brainpick-0.8.2 → brainpick-0.8.3}/tests/test_cli.py +22 -0
  10. {brainpick-0.8.2 → brainpick-0.8.3}/tests/test_sync.py +27 -0
  11. {brainpick-0.8.2 → brainpick-0.8.3}/README.md +0 -0
  12. {brainpick-0.8.2 → brainpick-0.8.3}/setup.cfg +0 -0
  13. {brainpick-0.8.2 → brainpick-0.8.3}/src/brainpick/__main__.py +0 -0
  14. {brainpick-0.8.2 → brainpick-0.8.3}/src/brainpick/_ritual/RITUAL.md +0 -0
  15. {brainpick-0.8.2 → brainpick-0.8.3}/src/brainpick/_skill/SKILL.md +0 -0
  16. {brainpick-0.8.2 → brainpick-0.8.3}/src/brainpick/_static/assets/Editor-K9XANZX_.js +0 -0
  17. {brainpick-0.8.2 → brainpick-0.8.3}/src/brainpick/_static/assets/index-DOjNNQV2.js +0 -0
  18. {brainpick-0.8.2 → brainpick-0.8.3}/src/brainpick/_static/assets/index-Dn6TTKMy.css +0 -0
  19. {brainpick-0.8.2 → brainpick-0.8.3}/src/brainpick/_static/assets/virtual_pwa-register-vAnKLON8.js +0 -0
  20. {brainpick-0.8.2 → brainpick-0.8.3}/src/brainpick/_static/assets/workbox-window.prod.es5-BBnX5xw4.js +0 -0
  21. {brainpick-0.8.2 → brainpick-0.8.3}/src/brainpick/_static/assets/worker-CVB4_RMu.js +0 -0
  22. {brainpick-0.8.2 → brainpick-0.8.3}/src/brainpick/_static/icons/apple-touch-icon.png +0 -0
  23. {brainpick-0.8.2 → brainpick-0.8.3}/src/brainpick/_static/icons/favicon.svg +0 -0
  24. {brainpick-0.8.2 → brainpick-0.8.3}/src/brainpick/_static/icons/icon-192.png +0 -0
  25. {brainpick-0.8.2 → brainpick-0.8.3}/src/brainpick/_static/icons/icon-512.png +0 -0
  26. {brainpick-0.8.2 → brainpick-0.8.3}/src/brainpick/_static/icons/icon-maskable-512.png +0 -0
  27. {brainpick-0.8.2 → brainpick-0.8.3}/src/brainpick/_static/index.html +0 -0
  28. {brainpick-0.8.2 → brainpick-0.8.3}/src/brainpick/_static/manifest.webmanifest +0 -0
  29. {brainpick-0.8.2 → brainpick-0.8.3}/src/brainpick/_static/sw.js +0 -0
  30. {brainpick-0.8.2 → brainpick-0.8.3}/src/brainpick/_static/workbox-a3c94b52.js +0 -0
  31. {brainpick-0.8.2 → brainpick-0.8.3}/src/brainpick/auth.py +0 -0
  32. {brainpick-0.8.2 → brainpick-0.8.3}/src/brainpick/compile/__init__.py +0 -0
  33. {brainpick-0.8.2 → brainpick-0.8.3}/src/brainpick/compile/conventions.py +0 -0
  34. {brainpick-0.8.2 → brainpick-0.8.3}/src/brainpick/compile/pipeline.py +0 -0
  35. {brainpick-0.8.2 → brainpick-0.8.3}/src/brainpick/compile/similarity_gaps.py +0 -0
  36. {brainpick-0.8.2 → brainpick-0.8.3}/src/brainpick/compile/skills.py +0 -0
  37. {brainpick-0.8.2 → brainpick-0.8.3}/src/brainpick/compile/t1.py +0 -0
  38. {brainpick-0.8.2 → brainpick-0.8.3}/src/brainpick/compile/t2.py +0 -0
  39. {brainpick-0.8.2 → brainpick-0.8.3}/src/brainpick/compile/t3.py +0 -0
  40. {brainpick-0.8.2 → brainpick-0.8.3}/src/brainpick/compile/todos.py +0 -0
  41. {brainpick-0.8.2 → brainpick-0.8.3}/src/brainpick/config.py +0 -0
  42. {brainpick-0.8.2 → brainpick-0.8.3}/src/brainpick/core/__init__.py +0 -0
  43. {brainpick-0.8.2 → brainpick-0.8.3}/src/brainpick/core/bundle.py +0 -0
  44. {brainpick-0.8.2 → brainpick-0.8.3}/src/brainpick/core/canonical.py +0 -0
  45. {brainpick-0.8.2 → brainpick-0.8.3}/src/brainpick/core/frontmatter.py +0 -0
  46. {brainpick-0.8.2 → brainpick-0.8.3}/src/brainpick/core/fs.py +0 -0
  47. {brainpick-0.8.2 → brainpick-0.8.3}/src/brainpick/core/links.py +0 -0
  48. {brainpick-0.8.2 → brainpick-0.8.3}/src/brainpick/deltas.py +0 -0
  49. {brainpick-0.8.2 → brainpick-0.8.3}/src/brainpick/detect.py +0 -0
  50. {brainpick-0.8.2 → brainpick-0.8.3}/src/brainpick/embed.py +0 -0
  51. {brainpick-0.8.2 → brainpick-0.8.3}/src/brainpick/integrate.py +0 -0
  52. {brainpick-0.8.2 → brainpick-0.8.3}/src/brainpick/kg.py +0 -0
  53. {brainpick-0.8.2 → brainpick-0.8.3}/src/brainpick/kgadapt/__init__.py +0 -0
  54. {brainpick-0.8.2 → brainpick-0.8.3}/src/brainpick/kgadapt/algorithmic.py +0 -0
  55. {brainpick-0.8.2 → brainpick-0.8.3}/src/brainpick/kgadapt/protocol.py +0 -0
  56. {brainpick-0.8.2 → brainpick-0.8.3}/src/brainpick/llm.py +0 -0
  57. {brainpick-0.8.2 → brainpick-0.8.3}/src/brainpick/mcp_server.py +0 -0
  58. {brainpick-0.8.2 → brainpick-0.8.3}/src/brainpick/merge.py +0 -0
  59. {brainpick-0.8.2 → brainpick-0.8.3}/src/brainpick/migrate.py +0 -0
  60. {brainpick-0.8.2 → brainpick-0.8.3}/src/brainpick/query/__init__.py +0 -0
  61. {brainpick-0.8.2 → brainpick-0.8.3}/src/brainpick/query/half_life.py +0 -0
  62. {brainpick-0.8.2 → brainpick-0.8.3}/src/brainpick/query/keyword.py +0 -0
  63. {brainpick-0.8.2 → brainpick-0.8.3}/src/brainpick/query/present.py +0 -0
  64. {brainpick-0.8.2 → brainpick-0.8.3}/src/brainpick/query/router.py +0 -0
  65. {brainpick-0.8.2 → brainpick-0.8.3}/src/brainpick/query/vectors.py +0 -0
  66. {brainpick-0.8.2 → brainpick-0.8.3}/src/brainpick/releases.py +0 -0
  67. {brainpick-0.8.2 → brainpick-0.8.3}/src/brainpick/scaffold.py +0 -0
  68. {brainpick-0.8.2 → brainpick-0.8.3}/src/brainpick/serve/__init__.py +0 -0
  69. {brainpick-0.8.2 → brainpick-0.8.3}/src/brainpick/serve/app.py +0 -0
  70. {brainpick-0.8.2 → brainpick-0.8.3}/src/brainpick/serve/live.py +0 -0
  71. {brainpick-0.8.2 → brainpick-0.8.3}/src/brainpick/serve/rest.py +0 -0
  72. {brainpick-0.8.2 → brainpick-0.8.3}/src/brainpick/serve/state.py +0 -0
  73. {brainpick-0.8.2 → brainpick-0.8.3}/src/brainpick/serve/watcher.py +0 -0
  74. {brainpick-0.8.2 → brainpick-0.8.3}/src/brainpick/skill_cmd.py +0 -0
  75. {brainpick-0.8.2 → brainpick-0.8.3}/src/brainpick/timeline.py +0 -0
  76. {brainpick-0.8.2 → brainpick-0.8.3}/src/brainpick/update.py +0 -0
  77. {brainpick-0.8.2 → brainpick-0.8.3}/src/brainpick/vectorstore.py +0 -0
  78. {brainpick-0.8.2 → brainpick-0.8.3}/src/brainpick.egg-info/SOURCES.txt +0 -0
  79. {brainpick-0.8.2 → brainpick-0.8.3}/src/brainpick.egg-info/dependency_links.txt +0 -0
  80. {brainpick-0.8.2 → brainpick-0.8.3}/src/brainpick.egg-info/entry_points.txt +0 -0
  81. {brainpick-0.8.2 → brainpick-0.8.3}/src/brainpick.egg-info/requires.txt +0 -0
  82. {brainpick-0.8.2 → brainpick-0.8.3}/src/brainpick.egg-info/top_level.txt +0 -0
  83. {brainpick-0.8.2 → brainpick-0.8.3}/tests/test_auth.py +0 -0
  84. {brainpick-0.8.2 → brainpick-0.8.3}/tests/test_bundle.py +0 -0
  85. {brainpick-0.8.2 → brainpick-0.8.3}/tests/test_config.py +0 -0
  86. {brainpick-0.8.2 → brainpick-0.8.3}/tests/test_conformance.py +0 -0
  87. {brainpick-0.8.2 → brainpick-0.8.3}/tests/test_conventions.py +0 -0
  88. {brainpick-0.8.2 → brainpick-0.8.3}/tests/test_deltas.py +0 -0
  89. {brainpick-0.8.2 → brainpick-0.8.3}/tests/test_detect.py +0 -0
  90. {brainpick-0.8.2 → brainpick-0.8.3}/tests/test_e2e_mcp.py +0 -0
  91. {brainpick-0.8.2 → brainpick-0.8.3}/tests/test_e2e_serve.py +0 -0
  92. {brainpick-0.8.2 → brainpick-0.8.3}/tests/test_federation.py +0 -0
  93. {brainpick-0.8.2 → brainpick-0.8.3}/tests/test_frontmatter.py +0 -0
  94. {brainpick-0.8.2 → brainpick-0.8.3}/tests/test_half_life.py +0 -0
  95. {brainpick-0.8.2 → brainpick-0.8.3}/tests/test_integrate.py +0 -0
  96. {brainpick-0.8.2 → brainpick-0.8.3}/tests/test_keyword.py +0 -0
  97. {brainpick-0.8.2 → brainpick-0.8.3}/tests/test_kg.py +0 -0
  98. {brainpick-0.8.2 → brainpick-0.8.3}/tests/test_links.py +0 -0
  99. {brainpick-0.8.2 → brainpick-0.8.3}/tests/test_llm.py +0 -0
  100. {brainpick-0.8.2 → brainpick-0.8.3}/tests/test_mcp_tools.py +0 -0
  101. {brainpick-0.8.2 → brainpick-0.8.3}/tests/test_merge.py +0 -0
  102. {brainpick-0.8.2 → brainpick-0.8.3}/tests/test_migrate.py +0 -0
  103. {brainpick-0.8.2 → brainpick-0.8.3}/tests/test_pipeline.py +0 -0
  104. {brainpick-0.8.2 → brainpick-0.8.3}/tests/test_present.py +0 -0
  105. {brainpick-0.8.2 → brainpick-0.8.3}/tests/test_releases.py +0 -0
  106. {brainpick-0.8.2 → brainpick-0.8.3}/tests/test_report.py +0 -0
  107. {brainpick-0.8.2 → brainpick-0.8.3}/tests/test_router.py +0 -0
  108. {brainpick-0.8.2 → brainpick-0.8.3}/tests/test_scaffold.py +0 -0
  109. {brainpick-0.8.2 → brainpick-0.8.3}/tests/test_serve_state.py +0 -0
  110. {brainpick-0.8.2 → brainpick-0.8.3}/tests/test_similarity_gaps.py +0 -0
  111. {brainpick-0.8.2 → brainpick-0.8.3}/tests/test_similarity_gaps_stage.py +0 -0
  112. {brainpick-0.8.2 → brainpick-0.8.3}/tests/test_skills.py +0 -0
  113. {brainpick-0.8.2 → brainpick-0.8.3}/tests/test_t1.py +0 -0
  114. {brainpick-0.8.2 → brainpick-0.8.3}/tests/test_t2_chunker.py +0 -0
  115. {brainpick-0.8.2 → brainpick-0.8.3}/tests/test_t2_embed.py +0 -0
  116. {brainpick-0.8.2 → brainpick-0.8.3}/tests/test_t2_stage.py +0 -0
  117. {brainpick-0.8.2 → brainpick-0.8.3}/tests/test_t2_store.py +0 -0
  118. {brainpick-0.8.2 → brainpick-0.8.3}/tests/test_t3_algorithmic.py +0 -0
  119. {brainpick-0.8.2 → brainpick-0.8.3}/tests/test_t3_backend.py +0 -0
  120. {brainpick-0.8.2 → brainpick-0.8.3}/tests/test_t3_export.py +0 -0
  121. {brainpick-0.8.2 → brainpick-0.8.3}/tests/test_t3_stage.py +0 -0
  122. {brainpick-0.8.2 → brainpick-0.8.3}/tests/test_timeline.py +0 -0
  123. {brainpick-0.8.2 → brainpick-0.8.3}/tests/test_todos.py +0 -0
  124. {brainpick-0.8.2 → brainpick-0.8.3}/tests/test_update.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: brainpick
3
- Version: 0.8.2
3
+ Version: 0.8.3
4
4
  Summary: A turn-key brain stack for agents: compile an OKF markdown bundle into a queryable, servable, visualizable brain.
5
5
  Author: Benquemax
6
6
  License: MIT
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "brainpick"
7
- version = "0.8.2"
7
+ version = "0.8.3"
8
8
  description = "A turn-key brain stack for agents: compile an OKF markdown bundle into a queryable, servable, visualizable brain."
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.10"
@@ -1,4 +1,4 @@
1
1
  """brainpick — a turn-key brain stack for agents."""
2
2
 
3
- __version__ = "0.8.2"
3
+ __version__ = "0.8.3"
4
4
  SPEC_VERSION = "0.1"
@@ -15,6 +15,38 @@
15
15
  # area: brain | cli | mcp | search | config | compile | webui | docs
16
16
 
17
17
  releases:
18
+ - version: 0.8.3
19
+ date: 2026-09-25
20
+ brain_format: 3
21
+ summary: >-
22
+ Two more places where one path meant two roots. `brainpick register REPO`
23
+ now registers the bundle a repo-root `brainpick.toml` points at, and
24
+ `brain_push` runs `henxels check --all` instead of handing henxels the
25
+ bundle directory as if it were a file.
26
+ agent_action: >-
27
+ If a registry entry shows `bundle_path = ""` for a repo whose config has
28
+ `[bundle] root`, remove it and register again (`brainpick register REPO
29
+ --remove`, then `brainpick register REPO --cortex`), and delete any
30
+ `index.md` or `.brainpick/` the old entry left at the repo root. Upgrade
31
+ henxels to 0.19.2 as well: it now expands a directory argument, so both
32
+ sides of brain_push agree.
33
+ changes:
34
+ - kind: fixed
35
+ area: cli
36
+ text: >-
37
+ `register` and `register --from-hosts` resolve `[bundle] root` before
38
+ writing the entry, and the bundle id is read from the repo's config.
39
+ A repo-root path used to be stored as the bundle, so the registry-mode
40
+ server compiled the whole repo as the brain and wrote its artifacts
41
+ at the repo root.
42
+ - kind: fixed
43
+ area: mcp
44
+ text: >-
45
+ `brain_push` verifies the contract with `henxels check --all` — the
46
+ same run the pre-commit hook does, repo-level henxels included. With
47
+ the bundle path as the argument, henxels before 0.19.2 judged the
48
+ directory entry as a file ("_brain — should be .md") and refused
49
+ every push of a subdirectory bundle.
18
50
  - version: 0.8.2
19
51
  date: 2026-09-25
20
52
  brain_format: 3
@@ -488,7 +488,12 @@ def _cmd_register(args: argparse.Namespace) -> int:
488
488
  print(f"registry: {registry}")
489
489
  return 0
490
490
 
491
- root = Path(args.path).resolve()
491
+ from brainpick.config import resolve_bundle
492
+
493
+ # PATH may be a repo root above its bundle ([bundle] root, spec/80) — register
494
+ # the bundle it governs, as `mcp --root` would, or the registry-mode server
495
+ # compiles the whole repo as the brain and reads its config from nowhere.
496
+ root, _ = resolve_bundle(args.path, env)
492
497
  if args.remove:
493
498
  if unregister_brain(root, registry):
494
499
  print(f"removed {root} from {registry}")
@@ -513,6 +518,7 @@ def _register_from_hosts(args: argparse.Namespace, registry, env, shown_alias) -
513
518
  """spec/75: the one-command migration — every `mcp --root DIR` in the agent
514
519
  host configs becomes a registry entry; then ONE replacement entry is shown.
515
520
  Never edits a host config."""
521
+ from brainpick.config import resolve_bundle
516
522
  from brainpick.federation import entry_root, load_registry, register_brain, scan_hosts
517
523
  from brainpick.scaffold import brainpick_command
518
524
 
@@ -526,7 +532,7 @@ def _register_from_hosts(args: argparse.Namespace, registry, env, shown_alias) -
526
532
  registered = 0
527
533
  for item in found:
528
534
  via = ", ".join(item.hosts)
529
- root = item.root.resolve()
535
+ root, _ = resolve_bundle(item.root, env) # a `--root` repo root → its bundle (spec/80)
530
536
  if root in existing:
531
537
  print(f" already registered {root} ({via})")
532
538
  continue
@@ -225,10 +225,12 @@ def _split_root(root: Path) -> tuple[str, str]:
225
225
  return str(repo), root.relative_to(repo).as_posix()
226
226
 
227
227
 
228
- def _bundle_id(root: Path) -> str:
228
+ def _bundle_id(config_root: Path) -> str:
229
+ """`[bundle] id` from the config that governs the bundle — at the repo, not
230
+ the bundle, when they differ — else a fresh id."""
229
231
  from brainpick.config import generate_bundle_id, load_config
230
232
 
231
- return load_config(root).bundle.id or generate_bundle_id()
233
+ return load_config(config_root).bundle.id or generate_bundle_id()
232
234
 
233
235
 
234
236
  def register_brain(root: str | Path, path: str | Path | None = None, alias: str | None = None,
@@ -248,7 +250,7 @@ def register_brain(root: str | Path, path: str | Path | None = None, alias: str
248
250
  while port in used_ports:
249
251
  port += 1
250
252
  entry = dict(existing) if existing else {
251
- "id": _bundle_id(root), "repo": repo, "bundle_path": bundle_path, "port": port,
253
+ "id": _bundle_id(Path(repo)), "repo": repo, "bundle_path": bundle_path, "port": port,
252
254
  "enabled": True, "host": DEFAULT_HOST,
253
255
  }
254
256
  if alias:
@@ -327,9 +327,11 @@ def run_contract(root: str | Path, config=None) -> tuple[str, str | None]:
327
327
  "`uv tool install henxels` — or commit and push from a shell where it is "
328
328
  "available. Refusing to publish an unverified commit.")
329
329
  cwd = contract.parent if contract is not None else root
330
- target = os.path.relpath(root, cwd) or "."
330
+ # `--all`, not the bundle path: a push verifies the whole contract the way the
331
+ # pre-commit hook does (repo-level henxels included), and henxels given a
332
+ # directory argument tests the directory entry itself as a file.
331
333
  try:
332
- proc = subprocess.run([executable, "check", target], cwd=cwd,
334
+ proc = subprocess.run([executable, "check", "--all"], cwd=cwd,
333
335
  capture_output=True, text=True, timeout=120)
334
336
  except subprocess.TimeoutExpired:
335
337
  return "fail", "henxels check timed out after 120s — nothing was committed"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: brainpick
3
- Version: 0.8.2
3
+ Version: 0.8.3
4
4
  Summary: A turn-key brain stack for agents: compile an OKF markdown bundle into a queryable, servable, visualizable brain.
5
5
  Author: Benquemax
6
6
  License: MIT
@@ -1,4 +1,5 @@
1
1
  """CLI wiring: the serve/mcp/compile/init/doctor subcommands exist and describe themselves."""
2
+ import subprocess
2
3
  import io
3
4
  import json
4
5
 
@@ -344,3 +345,24 @@ def test_compile_prints_the_update_notice_when_one_is_known(kotiaurinko, capsys,
344
345
  assert main(["compile", "--root", str(kotiaurinko)]) == 0
345
346
  out = capsys.readouterr().out
346
347
  assert "note: brainpick 9.9.9 is available" in out and "pip install -U brainpick" in out
348
+
349
+
350
+ def test_cli_register_resolves_a_repo_root_to_its_bundle(kotiaurinko, tmp_path, monkeypatch, capsys):
351
+ # `register REPO` where REPO/brainpick.toml points at a subdirectory bundle must
352
+ # store the bundle (repo + bundle_path), like `mcp --root REPO` resolves it — or
353
+ # the registry-mode server compiles the whole repo as the brain and serves every
354
+ # .md in it, with its config read from nowhere.
355
+ from brainpick.federation import entry_root, load_registry
356
+
357
+ registry = tmp_path / "brains.toml"
358
+ monkeypatch.setenv("BRAINPICK_REGISTRY", str(registry))
359
+ repo = kotiaurinko.parent
360
+ (repo / "brainpick.toml").write_text('[bundle]\nroot = "kotiaurinko"\n', encoding="utf-8")
361
+ subprocess.run(["git", "init", "-q", str(repo)], check=True) # repo + bundle_path needs a repo above
362
+ assert main(["register", str(repo), "--cortex"]) == 0
363
+ capsys.readouterr()
364
+ entries = load_registry(registry)
365
+ assert entries[0]["bundle_path"] == "kotiaurinko"
366
+ assert entry_root(entries[0]) == kotiaurinko.resolve()
367
+ assert main(["register", str(repo), "--remove"]) == 0 # the same spelling removes it
368
+ assert load_registry(registry) == []
@@ -526,3 +526,30 @@ def test_contract_optional_requirements_never_fail_the_whole(tmp_path):
526
526
  fmt = next(r for r in payload["requirements"] if r["id"] == "brain-format")
527
527
  assert fmt["required"] is False
528
528
  assert payload["satisfied"] is True # satisfied tracks the REQUIRED floor
529
+
530
+
531
+ def test_push_runs_the_whole_contract_not_the_bundle_path(tmp_path, monkeypatch):
532
+ """brain_push verifies the contract the way the pre-commit hook does — every
533
+ henxel, over the whole tree — so it must call `henxels check --all`. Passing
534
+ the bundle directory as a path made henxels test the directory entry itself
535
+ as a file ("_brain — should be .md"), which failed every push of a
536
+ subdirectory bundle governed by a repo-root contract."""
537
+ import subprocess as sp
538
+
539
+ local, _ = make_pair(tmp_path)
540
+ (local / "henxels.yaml").write_text("henxels: []\n", encoding="utf-8")
541
+ (local / "uusi.md").write_text("---\ntype: Concept\n---\n\n# U\n", encoding="utf-8")
542
+ monkeypatch.setattr("brainpick.sync.find_henxels", lambda *a, **k: "henxels")
543
+ seen = []
544
+ real_run = sp.run
545
+
546
+ def fake_run(argv, **kwargs): # intercept henxels only; git still runs for real
547
+ if argv[0] != "henxels":
548
+ return real_run(argv, **kwargs)
549
+ seen.append(argv)
550
+ return sp.CompletedProcess(argv, 0, stdout="", stderr="")
551
+
552
+ monkeypatch.setattr("brainpick.sync.subprocess.run", fake_run)
553
+ result = push_brain(state_for(local), "add uusi")
554
+ assert result["contract"] == "pass"
555
+ assert seen and seen[0][1:] == ["check", "--all"]
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