Skip to content

Host labelling follow-ups: spawned-hook test for unknown, stderr noise, hosts on dashboard warning rows #449

Done

Description

@kevintseng

Three low-severity leftovers from #448 (host labelling, #447). None changes a stored value; they are about test depth and diagnostic output.

  1. No spawned-hook test for host: unknown. tests/core/hook-host.test.ts covers detectHookHost returning unknown at the function level. No test runs a real hook with an unresolvable PLUGIN_ROOT and asserts host: unknown in hook-outcomes.jsonl, so the wiring in scripts/hooks/_shared.js (pluginRootIsHookRoot(env) passed into detectHookHost) is proven only by manual runs. Suggested: a runHook('session-start', …, { PLUGIN_ROOT: '/no/such/dir' }) case in tests/hooks/hook-outcomes.test.ts.
  2. The stderr line prints even when the run is then labelled claude-code. A shell that exports a stale PLUGIN_ROOT makes every hook process print PLUGIN_ROOT could not be resolved, including Claude Code runs that are then labelled claude-code from CLAUDE_PROJECT_DIR. The hooks exit 0, so the model never sees it, but it is noise in hook logs. Option: print only when the answer is actually unknown.
  3. The dashboard does not show which hosts were recorded on warning rows. memesh doctor adds Hosts recorded: … to the capture-liveness summary. The dashboard draws coded warn/fail rows from i18n templates (dashboard/src/components/DoctorBanner.tsx), so the sentence appears there only on the passing row. The CLI and --json show it on every row. Fixing this needs a hosts param on the coded rows and the translated strings.

Refs #447, #325.

Activity

  1. kevintseng commented on Dec 2, 2026

    @kevintseng
    CollaboratorAuthor

    Spawned-hook tests confirm the unknown host in the outcome log and suppress the stale-root warning for an identified Claude host. The former dashboard is retired here. Verified on the open PR #650.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions