fix(release): harden the native cask verification observer

Open
#8,257 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
48/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
go, macos, zsh
Domain
devops, testing-qa

Research direction

Start by locating the native cask verification observer and its tests for the brew shellenv fixture and process ownership cleanup; the issue does not name file paths. Read the existing control that prevents killing processes with unknown ownership, then run the focused verification tests. Done means the empty-output fixture completes Tab using the fixture prefix and persistent query failures stop all observer-owned descendants before profile removal without signaling outside the observer's boundary.

Written by the indexing model from the issue text.

Description

🤖 Generated by the Agentic Engineer

Problem

The native cask verification — the optional, dispatch-only macOS trial that installs the published cask and checks a real zsh Tab — has two known weak spots. CodeRabbit raised both on #8162 after the PR's scope was fixed.

  1. If brew shellenv succeeds but prints nothing (Homebrew can do this when the shell is already set up), the trial profile never adds Homebrew's share/zsh/site-functions to fpath. Tab then fails to complete, so the trial reports a failure that is not real. This is a false failure, never a false pass.
  2. When process queries keep failing until the cleanup deadline, the observer stops only its own script parent. Closing the terminal hangs up its session, which ends the probe's zsh, but a descendant that ignores SIGHUP and SIGTERM can outlive the temporary profile. Stopping it needs a reliable ownership boundary (for example a dedicated process group or session the observer creates itself); the observer must never signal a process it cannot show is its own.

Neither affects the shipped binary or the cask; both live in the verification tooling only.

Acceptance criteria

  • With brew shellenv succeeding with empty output and _ksail only under the fixture prefix, the trial adds the prefix's site-functions to fpath and Tab completes; the non-empty case is unchanged.
  • When ownership queries fail persistently, every descendant the observer started has stopped before the profile is removed, with no signal sent to a process outside the observer's own boundary; the existing "unknown ownership cannot authorize unrelated kills" control still passes.
Dominant language
Go
Stars
166
Forks
13
Avg merge
7h 4m
Merged PRs (30d)
388

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from devantler-tech/ksail

All issues in devantler-tech/ksail

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.