Skip to content

test(e2e): verify the herdr flow end to end + fix nix run .#e2e on macOS#30

Closed
jakemassoth wants to merge 1 commit into
herdr-tuifrom
herdr-e2e
Closed

test(e2e): verify the herdr flow end to end + fix nix run .#e2e on macOS#30
jakemassoth wants to merge 1 commit into
herdr-tuifrom
herdr-e2e

Conversation

@jakemassoth

Copy link
Copy Markdown
Owner

What this is

A verification/QA pass proving the new herdr session/TUI flow (PR #29) works end to end, plus one trivial fix uncovered along the way.

All testing ran in a fully isolated sandbox — a unique herdr session (yt-e2e-9021), a private XDG_CONFIG_HOME and YESCHEF_HOME under /tmp, never the live yeschef brigade or the shared config home. The live brigade was confirmed running and untouched before and after.

The one fix (this branch's only diff)

nix run .#e2e — the documented e2e command (DEVELOPMENT.md) and a CI step — failed on macOS before running a single test:

error: linking with `cc` failed: ... note: error: tool 'clang' not found
error: could not compile `serde_core` (build script) ...

Root cause: the e2e app's runtimeInputs shipped only rustToolchain + herdr + git. The pinned rust toolchain needs a C compiler/linker to build proc-macro build scripts and link the test binary; on macOS there is no ambient nix cc-wrapper on PATH, so the link fails. (Linux CI has a system cc, which masks it.) Fix: add pkgs.stdenv.cc — the same clang-wrapper the devShell already pulls in.

  • Before: nix run .#e2etool 'clang' not found, 0 tests run.
  • After: nix run .#e2e → compiles, 19/19 tests pass.
  • nix flake check → fmt / nixfmt / lint / unit tests all ✅.

What was verified (end to end)

Automated: the full e2e suite passes 19/19 (via nix run .#e2e after the fix, and via the devShell).

Manual walkthrough against a throwaway git repo + a dummy --agent shell loop (no real coding agent, no external services), with captured evidence for every stage:

Stage Result
init home + yeschef.db + AGENTS.md created
project add / list bare clone made, origin/main resolves, project listed
spawn git worktree created & tracking origin/main; prompt file written outside the worktree (status preamble + verbatim brief); herdr workspace demo/widget created; agent launched via the short "read the brief" indirection
peek pane read returned the marker + the file-indirection launch instruction
send one-line steer reached the pane (echoed back by the cook)
status ticket table joins the registry with herdr's live agent_status + self-reported task status
ticket status-set task status persisted (NEW → IN_PROGRESS → DONE) and reflected in status
restart herdr server bounced; both workspaces restored from herdr's persisted session state (headchef + demo/widget), server back up on the isolated socket
kill --rm-worktree workspace closed, worktree removed, ticket deregistered
cleanup (dry-run) correctly flagged "merged and status DONE", removed nothing
cleanup --yes reaped the ticket (workspace closed, worktree + branch removed, deregistered)

What does NOT work / notes

  • tui / attach are interactive passthroughs to herdr's native UI (they hand over the terminal / block on a TTY), so they were verified by code inspection + the fact that the server they attach to is proven working — not exercised headlessly.
  • restart restores workspace shape for our dummy agent, not the process (expected — our sleep/cat stand-in isn't a herdr-recognized agent, so resume_agents_on_restore doesn't apply; real Claude Code cooks resume natively).
  • herdr reports our dummy agents as STATE = unknown (expected — sh/cat aren't recognized coding agents).

No other defects found. The herdr flow works as designed.

…2e` links on macOS

The e2e app's runtimeInputs shipped only rustToolchain + herdr + git. The
pinned rust toolchain needs a C compiler/linker to build proc-macro build
scripts and link the test binary; on macOS there's no ambient nix cc-wrapper on
PATH, so `nix run .#e2e` failed with "tool 'clang' not found" before any test
ran. (Linux CI happens to have a system cc, masking it.) Add pkgs.stdenv.cc —
the same clang-wrapper the devShell already pulls in — so the documented e2e
command links and runs the suite (19/19) on macOS too.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant