Reader subagents on Capy stop sending telemetry, error runs report their error class, and test fixtures stop reading the owner's settings (#4597)

On a Capy machine, a shell that never loaded gstack's launch file (such
as a review subagent's) now sends no usage data instead of falling back
to the machine setting, as the privacy doc already promised.

Error runs now fill the existing error_class field from their exit
reason, and each setup step and outcome is reported at most once a day
per install, so a loop rerunning setup no longer floods the counts.

Tests no longer inherit the owner's preferences file, skill loadout or
plugin state, which caused false failures.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Review-Finding: p1/red-team#1 reader=red-team
Review-Finding: p1/specialist-batched#1 reader=testing
Review-Finding: p1/outside-voice#1 reader=outside-voice
This commit is contained in:
Garry Tanandcapy-ai[bot] authored and GitHub committed 2026-11-21 08:11:54 +00:00
1 parent 09bd0fad0f
commit 19069a9810
13 files changed
+140 -8

No files matched your search

+3 -1
View File
@@ -23,7 +23,7 @@ import { FIXTURE_MARKER } from './lib/fixture-marker';
import { CAPY_LAUNCH_MARKERS } from './scripts/lib/shard-engine';
// State-root hermeticity (docs/state-root.md). Tests isolate state with
// GSTACK_HOME, but GSTACK_STATE_ROOT and GSTACK_STATE_DIR outrank or join it
// GSTACK_HOME, but GSTACK_STATE_ROOT, GSTACK_STATE_DIR and CLAUDE_PLUGIN_DATA outrank or join it
// in the chain, so an ambient value from the parent shell would redirect
// every test's state. Strip them before any test module loads. The merged
// privacy keys also read $HOME/.gstack; point that second root at a
@@ -36,6 +36,8 @@ for (const name of ['GSTACK_STATE_ROOT', 'GSTACK_STATE_DIR']) {
delete process.env[name];
process.stderr.write(`test-setup: stripped inherited ${name}; tests isolate state via GSTACK_HOME\n`);
}
// The chain's plugin link (CLAUDE_PLUGIN_DATA) goes too; no test runs as a Claude plugin.
delete process.env.CLAUDE_PLUGIN_DATA;
// The Capy installer's launch markers (GSTA-99, GSTA-104): a focused `bun test`
// run from a shell that sourced the launch file would hand every product child
// an unattended Capy session it never set up. The shard engine strips the same