herdr-orchestra 6.17.0 → 6.22.0

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/CHANGELOG.md CHANGED
@@ -2,6 +2,29 @@
2
2
 
3
3
  All notable changes. Versions follow [semantic versioning](https://semver.org).
4
4
 
5
+ ## [6.22.0] - 2026-11-26
6
+
7
+ The board popup (`prefix+a`) now opens in the repo of the pane you were in. Before, it could answer "This folder is not a git repo with an orch run" even while a run was going.
8
+
9
+ Example: you are in the `rupee-flow` space with a run going and press `ctrl+b`, then `a`. The popup used to start in a folder that was not your repo. Now it starts in your pane's folder and shows the run.
10
+
11
+ ### Fixed
12
+ - **The popup started in the wrong folder.** Herdr starts a popup in the plugin's own folder unless it is told otherwise. orch looked for the pane's folder under field names Herdr does not use, found none, and told Herdr nothing. It now reads Herdr's real fields: the focused pane's folder, else the space's folder, else its worktree. It prefers the folder whose repo has an orch run (also from a coder's worktree pane), and always passes the folder to Herdr with `--cwd`.
13
+ - When the popup still is not in a repo, it now says which folder it is in.
14
+ ## [6.20.0] - 2026-11-26
15
+
16
+ The tests run in about 5 minutes instead of about 21. Nothing in orch changed, and no check was removed, skipped or made easier.
17
+
18
+ Example: `bash tests/parallel.sh` runs the 66 sections of `tests/run.sh` side by side, about 8 at a time, each in its own temp folder with its own fake herdr and fake agents. It finished in 300s with 764 checks passed, the same 764 checks by name as `bash tests/run.sh` gives one after another (1265s on the same machine).
19
+
20
+ ### Changed
21
+ - **`tests/parallel.sh`** runs the sections of `tests/run.sh` side by side. Every section runs as written, with the same waits and timeouts, so a timing bug that shows only with slow agents is still caught. Sections that use what the section before them left behind run together in one group (the `JOINS` list). Three sections whose checks compare how long things take (7, 45, 58) run after the others, one at a time, on a quiet machine as in `tests/run.sh` (the `SOLO` list), so the load of the others cannot fail them. The run fails if a check fails, if a group stops early, or if any section did not print its title. `-j N` sets how many groups run at once, `--list` shows the groups, and `bash tests/parallel.sh 45` runs only the group of section 45, for quick runs while you work.
22
+ - **CI and the Release workflow** run `tests/parallel.sh`. `bash tests/run.sh` still runs everything one after another, as before.
23
+
24
+ ### Fixed (tests only)
25
+ - **A check could fail for nothing on a busy machine.** `cmd | grep -q text` stops reading at the first match, so `orch` could hit "Broken pipe" while still printing its help, and `pipefail` then failed the check. All 127 such checks now use `qgrep`, a grep that reads everything. What each check tests is unchanged.
26
+ - Five things several sections use (`P1`, `MPLAN`, `PRS`, `stpy` and the fake agent programs in `$FAKEBIN`) are defined once at the top of `tests/run.sh` instead of inside the first section that used them, so any section can run on its own.
27
+
5
28
  ## [6.17.0] - 2026-11-26
6
29
 
7
30
  A compact that ended quickly always gets its line in `orch story` now. Nothing else about compacting changed.
package/README.md CHANGED
@@ -410,7 +410,9 @@ Tunables: `ORCH_CODER_BUDGET_MIN` (45) · `ORCH_REVIEW_BUDGET_MIN` (15) · `ORCH
410
410
  ## Develop and release
411
411
 
412
412
  ```bash
413
- bash tests/run.sh # end-to-end tests with fake agents (no AI, no network)
413
+ bash tests/parallel.sh # end-to-end tests with fake agents (no AI, no network), sections side by side: ~5 min
414
+ bash tests/parallel.sh 45 # only the group that holds section 45, while you work on it (not a replacement for the full run)
415
+ bash tests/run.sh # the same tests one after another (~20 min)
414
416
  bash tests/live/run.sh claude codex # opt-in: one tiny real run per agent kind (needs herdr and the agents; uses their credits)
415
417
  bash install.sh # install your checkout (vX.Y.Z at a tag, vX.Y.Z-dev otherwise)
416
418
  ```
package/VERSION CHANGED
@@ -1 +1 @@
1
- 6.17.0
1
+ 6.22.0
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "herdr-orchestra",
3
- "version": "6.17.0",
3
+ "version": "6.22.0",
4
4
  "description": "Orchestrate AI coding agents (Claude Code, Codex, OpenCode, Amp, Pi) as one team: a lead plans, coders build, a reviewer checks, you get one PR. Runs in Herdr panes, or in one Pi window with subagents.",
5
5
  "license": "MIT",
6
6
  "bin": {
@@ -3,6 +3,6 @@
3
3
  orch=$(command -v orch || echo "$HOME/.local/bin/orch")
4
4
  [ -x "$orch" ] || { echo "orch not found on PATH — install herdr-orchestra (npx herdr-orchestra@latest)"; sleep 5; exit 1; }
5
5
  if ! git rev-parse --show-toplevel >/dev/null 2>&1; then
6
- echo "This folder is not a git repo with an orch run. Open the board from a pane inside the repo."; sleep 5; exit 1
6
+ echo "This folder ($(pwd)) is not a git repo with an orch run. Open the board from a pane inside the repo."; sleep 5; exit 1
7
7
  fi
8
8
  exec "$orch" board
@@ -1,23 +1,29 @@
1
1
  #!/bin/sh
2
- # Opens the board popup in the folder of the pane you were in (that is where the run's repo is).
2
+ # Opens the board popup in the repo of the pane you were in. Herdr starts a popup in the plugin's own folder unless
3
+ # told otherwise, so the folder is passed with --cwd: the focused pane's folder, else the space's folder, else its worktree.
3
4
  dir=$(python3 - <<'PY' 2>/dev/null
4
- import json, os
5
- def find(o, keys):
6
- if isinstance(o, dict):
7
- for k in keys:
8
- if isinstance(o.get(k), str) and os.path.isdir(o[k]):
9
- return o[k]
10
- o = list(o.values())
11
- if isinstance(o, list):
12
- for v in o:
13
- r = find(v, keys)
14
- if r:
15
- return r
16
- return None
5
+ import json, os, subprocess
17
6
  try:
18
- print(find(json.loads(os.environ.get("HERDR_PLUGIN_CONTEXT_JSON") or "{}"), ("foreground_cwd", "cwd", "path")) or "")
7
+ ctx = json.loads(os.environ.get("HERDR_PLUGIN_CONTEXT_JSON") or "{}")
19
8
  except ValueError:
20
- print("")
9
+ ctx = {}
10
+ wt = ctx.get("worktree") if isinstance(ctx.get("worktree"), dict) else {}
11
+ cands = [c for c in (ctx.get("focused_pane_cwd"), ctx.get("workspace_cwd"), wt.get("path")) if isinstance(c, str) and os.path.isdir(c)]
12
+
13
+ def toplevel(d):
14
+ r = subprocess.run(["git", "-C", d, "rev-parse", "--show-toplevel"], capture_output=True, text=True)
15
+ return r.stdout.strip() if r.returncode == 0 else None
16
+
17
+ def has_run(d):
18
+ # a worktree's pane has its own top level; the run lives in the main repo (the git common dir's parent)
19
+ r = subprocess.run(["git", "-C", d, "rev-parse", "--git-common-dir"], capture_output=True, text=True)
20
+ if r.returncode != 0:
21
+ return False
22
+ common = os.path.normpath(os.path.join(d, r.stdout.strip()))
23
+ return os.path.isfile(os.path.join(os.path.dirname(common), ".orchestrate", "state.json"))
24
+
25
+ pick = next((c for c in cands if has_run(c)), None) or next((c for c in cands if toplevel(c)), None) or (cands[0] if cands else "")
26
+ print(pick)
21
27
  PY
22
28
  )
23
29
  herdr=${HERDR_BIN_PATH:-herdr}