xjxandlilei 2844e08037 test: strip sibling env overrides from isolated generation-lifecycle children (#55)
## Summary

Fixes the intermittent `integration_b` failure observed under parallel
load (once on 2026-08-23 local validation; the same class was last seen
in CI on 2026-08-18 and partially addressed by #46).

**Root cause.** `generation_lifecycle` tests run in child processes
spawned by `run_in_isolated_process`, which strips a fixed key list from
the child environment. A sibling `app_server_transport` test
(`turn_event_stdout_eof_fails_immediately`) sets
`APC_TEST_PET_STUDIO_TURN_TIMEOUT_MS=5000` process-wide in the shared
parent via `EnvGuard`. When a lifecycle spawn happened inside that
window, the child inherited the 5-second override, the fake app-server
turn hit `turn did not complete within 5000 ms`, the edit job landed in
`recoverable_error`/`Failed`, and the test then waited 180 s for a
`generation_failed` terminal message that never came — surfacing as an
unrelated timeout panic far from the real trigger.

## Changes
(`crates/petcore/tests/integration_b/generation_lifecycle.rs`, +93
lines, no production code)

- Extend `ISOLATED_ENV_KEYS` from 5 to 17 keys: every process-wide
override any sibling integration_b test can hold (`APC_TEST_*`
timing/count/path hooks and the skill-source strictness gates).
- Take `test_support::lock_process_state()` around the isolated-child
spawn so no sibling holds an override while the child environment is
captured.
- Add
`isolated_child_environment_strips_every_sibling_process_wide_override`:
parses the sibling suite source and fails if any `EnvGuard::set` key is
missing from the strip list (drift guard in both directions).
- Add `isolated_child_spawn_clears_leaked_studio_turn_timeout_override`:
reproduces the exact leak (parent holds the 5 s override, spawns child)
and asserts the child does not observe it.
- Changelog fragment under `changes/unreleased/`.

## Validation

- New tests: both pass; parity test verified to fail against the pre-fix
list.
- Leak-window stress (EOF test holding the override, concurrent with all
lifecycle isolated spawns, 8 threads × 8 rounds): 8/8 pass.
- Full `integration_b` × 3: 3/3 pass (42 tests each). `integration_a`
96, `integration_c` 66, `integration_d` 164, petcore lib 301, CLI +
types: all pass.
- `cargo fmt --check` clean, `clippy --all-targets` zero warnings,
`script/validate_pre_push.sh --base origin/main` passed.
- No production code changed; runtime behavior is untouched (test-only
env gating already existed).

## Development claim / 开发声明

- Domain: `release-control-plane`
- Claim: `engineering-speedup`
- Base commit: `ee53d683413b2c4ba6a308dc5e7d76293ca0cf6f`
- Release preparation: `no`
- Focused validation:
  - `python3 script/tests/test_validation_tooling.py`
  - `./script/validate_build_scripts_safety.sh --static-only`

<!-- apc-engineering-coordination-v1
{"claim_overlap_rejections":1,"merge_tree_conflicts":0,"schema_version":"apc.engineering-coordination.v1","task_created_at":"2026-08-24T01:52:17Z","train_conflict_resolutions":0}
-->

---------

Co-authored-by: lilei <lilei@xmfunny.com>
2026-08-24 18:12:31 +08:00
2026-08-11 12:08:39 +08:00
2026-07-07 18:29:21 +08:00

Agent Pet Companion mark

Agent Pet Companion

简体中文 | English

Know what your coding agents are doing without constantly watching the terminal.

Agent Pet Companion is a native macOS desktop pet for people who work with one or more coding agents. Pet animations and message bubbles show whether an Agent is thinking, using tools, waiting for you, or finished. When it is time to return, an available session destination appears right in the bubble.

Download the latest release · macOS 14 or later · Apple silicon and Intel Macs

Agent Pet Companion showing three bundled pets with collapsed, expanded, and Agent-grouped session bubbles

What it does for you

  • Switch windows less often — see Agent activity on your desktop without repeatedly opening a terminal or Agent app.
  • Notice tasks that need you — get a clear visual response when an Agent needs input, finishes, or fails.
  • Follow several Agents together — bring activity from Codex, Claude Code, Pi Coding Agent, OpenCode, and DeepSeek Harness into one place.
  • Get back to work quickly — when routing is available, open the relevant session, Agent app, or terminal from the bubble.
  • Make the pet yours — use one of three bundled pets, import a .petpack, or create and edit your own pet with AI Pet Maker.
  • Keep data centered on your Mac — pets, settings, limited session summaries, and diagnostics remain local. The App does not read Agent credentials, tokens, cookies, or API keys.

Agent Pet Companion control center with its five navigation areas and the Pet Library

Get started in three steps

  1. Download and install the App from GitHub Releases.
  2. Follow the first-run guide to choose a pet and set up the Agents you use.
  3. Start a task in your Agent as usual. The pet will automatically show its status and any available return destination.

On first launch, choose 星雾团子, Bytebud 字节芽, or 桃蕾. After setup, the pet stays on your desktop even when the control center is closed.

Everyday use

What you want to do Where to do it
View tasks or expand and collapse messages Click the pet
Move the pet and its bubble Drag the pet
Switch, import, or export pets Pet Library
Create or edit your own pet AI Pet Maker
Change pet size, bubble text, or attention behavior Pet Configuration
Check, install, or repair Agent integrations Agent Connections
Inspect status or troubleshoot a problem Service & Diagnostics

Agent Connections is organized by Agent and session, so you do not need to configure every project directory. The App manages only the connection components it installed and leaves custom configuration it cannot safely attribute untouched.

Create your own pet

In AI Pet Maker, describe the appearance, style, and important traits you want to keep. The App uses locally available Codex capabilities to create a new pet or edit an existing one.

AI Pet Maker creation workspace in Agent Pet Companion

  • In-App creation supports low and standard resolution.
  • Creation progress is retained, and you can answer questions inside the App when a task needs your input.
  • The Universal Pet Maker Skill button installs and manages the provider-neutral agent-pet-maker workflow at ~/agent/skills/agent-pet-maker. The App shows its requirements and version but leaves Agent directory discovery for you to confirm.
  • You can also import compatible .petpack V3 packages, including high-resolution packages made by external workflows.
  • The three bundled pets are read-only defaults. Customizing one creates a new pet instead of replacing the original.

Install a release

  1. Open GitHub Releases.
  2. Download the ZIP for your Mac:
    • Apple silicon Mac: macos-arm64
    • Intel Mac: macos-x86_64
  3. Extract the ZIP and move the App to /Applications.
  4. On first launch, Control-click or right-click the App in Finder and choose Open, or use System Settings → Privacy & Security → Open Anyway.

Official releases are currently ad-hoc signed rather than Developer ID signed or Apple-notarized, so macOS asks you to approve the first launch. You do not need to disable Gatekeeper or remove quarantine from the command line.

Optional: verify your download

Download the release's SHA256SUMS.txt, then run:

grep 'macos-arm64.zip' AgentPetCompanion-*-SHA256SUMS.txt | shasum -a 256 -c -

For an Intel build, replace macos-arm64.zip with macos-x86_64.zip.

After a healthy launch, the App checks for the latest stable release at most once per day. It only notifies you; it never downloads or installs updates automatically. Quit the old version and replace the App in /Applications to update.

Privacy

Everyday activity display accepts only bounded task status, titles, and message summaries. It does not copy full conversations or read Agent sign-in credentials. When you use AI Pet Maker, the descriptions and reference images you submit are passed to the locally available Codex workflow for generation; everyday Agent activity and AI creation remain separate flows.

For developers

Building from source requires macOS 14+, Apple Command Line Tools with Swift 6 and a macOS SDK, the Rust toolchain pinned by rust-toolchain.toml, and Python 3. Full Xcode is optional.

git clone https://github.com/xjxtree/agent-pet-companion.git
cd agent-pet-companion
./script/build_app_bundle.sh

The development App is written to dist/. To rebuild and launch it:

./script/build_and_run.sh --run

The SwiftUI/AppKit App owns the control center, menu bar, desktop overlay, and rendering. Rust PetCore owns pets, settings, Agent events, connections, creation tasks, and diagnostics. They communicate through local JSON-RPC.

License

Agent Pet Companion is available under the MIT License.

S
Description
Native macOS AI desktop pet companion for coding agents
Readme MIT
108 MiB
0 Stars 1 Watchers 0 Forks
Languages
Rust 41.4%
Swift 41.3%
Python 10%
Shell 5.3%
Go Template 1.2%
Other 0.8%