Skip to content

Force the Containment Signal in test_install's In-Process Registration Checks #2462

Closed

Description

@ptr727

What happens

On a host without a systemd user manager, which includes every Windows and macOS host, 11 TestRegistration cases in host-setup/agent-safety/claude/test_install.py fail with the same extra problem:

CLAUDE_CODE_SHELL_PREFIX names a containment prefix where it cannot contain (win32 has no systemd user manager), so re-run the installer to correct it

The affected cases are test_a_longer_sweep_timeout_is_not_reported_as_a_defect, test_a_matcher_every_bash_call_reaches_is_not_a_defect, test_a_registration_is_read_however_its_path_is_quoted, and test_a_wrapper_merely_containing_a_stem_is_not_the_kits_registration, across their subtests.

Why

The install runs as a subprocess through run(), which forces AGENT_SAFETY_CONTAINMENT_OVERRIDE=1 by default, so it registers the containment prefix. Each of these cases then calls install.registration_problems() in-process, where no override is set. That call judges containment against the host's real capability. A Linux host with a systemd user manager agrees with the forced install and passes, and any other host reports the prefix as stale.

Until #2458's fix, these cases failed earlier, at the guard's self-test step, which hid this on Windows.

Done means

The in-process registration_problems() calls judge containment the same way the forced install did, and test_install.py passes natively on Windows with no failure.

Activity

  1. added
    bug
    agents
    pre-existing
    on Oct 7, 2026
  2. added a commit that references this issue on Oct 7, 2026
    4539946
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

    agentsbugpre-existing

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions