fix: make Windows updates and CE personas reliable (#2340)

## Summary

Windows installs with slow native dependencies now get five minutes to
finish, and a real timeout is reported as an actionable terminal retry
instead of a wall of preceding npm deprecation warnings. Registry
`ETIMEDOUT` errors keep their network diagnosis, including after the
legacy-bin `--force` retry.

Compound Engineering personas are now included in the published CLI
bundle, with complete source-to-staged coverage for all persona
definitions and a clear startup error if the bundled assets are missing
or empty.

The PostgreSQL statement visible in the report was validated by the
existing real-Postgres schema reapply test. Its actual `caused by`
detail was truncated, so this PR deliberately makes no speculative
database change.

## Validation

- Dashboard updater tests: 22 passed
- CLI updater tests: 16 passed
- CE persona installer tests: 7 passed
- Published bundle persona assertion: passed against every source
persona
- CLI and CE plugin typechecks: passed
- Changed production/config lint and strict changeset validation: passed
- Real PostgreSQL schema reapply integration test: passed

---

[![Compound
Engineering](https://img.shields.io/badge/Built_with-Compound_Engineering-6366f1)](https://github.com/EveryInc/compound-engineering-plugin)


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Bug Fixes**
* Windows CLI and dashboard updates now allow up to five minutes for
installation and restore Compound Engineering agent personas during npm
installs.
* Update failures now surface clearer, terminal timeout guidance (while
preserving specific network connection diagnostics) and avoid misleading
“deprecated”/generic timeout text.
* Persona assets are reliably included in plugin builds and bunded
persona installation now errors clearly when definitions are missing or
empty.
* **Tests**
* Expanded update and bundling coverage for the new 5-minute timeout and
error-handling scenarios.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
gsxdsm
2026-07-19 12:16:12 -07:00
committed by GitHub
parent b2a7425c76
commit aa401123ea
9 changed files with 257 additions and 12 deletions

View File

@@ -38,6 +38,25 @@ describe("compound engineering bundled agent-persona install", () => {
}
});
it("fails loudly when a published package omits all bundled persona defs", () => {
const missingSourceRoot = join(tmp, "missing-agents");
expect(() => installBundledCeAgents({
sourceRoot: missingSourceRoot,
targetRoot: join(tmp, ".fusion-ce-agents"),
})).toThrow(/bundled agent persona source.*missing/i);
});
it("fails loudly when the bundled persona directory is empty", () => {
const emptySourceRoot = join(tmp, "empty-agents");
mkdirSync(emptySourceRoot);
expect(() => installBundledCeAgents({
sourceRoot: emptySourceRoot,
targetRoot: join(tmp, ".fusion-ce-agents"),
})).toThrow(/contains no markdown definitions/i);
});
it("is idempotent when the plugin-local install provenance is current", () => {
const targetRoot = join(tmp, ".fusion-ce-agents");
const first = installBundledCeAgents({ targetRoot });

View File

@@ -141,9 +141,23 @@ export function installBundledCeAgents(
const sourceRoot = options.sourceRoot ? resolve(options.sourceRoot) : resolveBundledAgentsRoot();
const installIsCurrent = isCurrentInstalledProvenance(targetRoot);
const sourceFiles = existsSync(sourceRoot)
? readdirSync(sourceRoot).filter((f) => f.endsWith(".md"))
: [];
let sourceFiles: string[];
/*
FNXC:CompoundEngineeringAgents 2026-07-19-09:50:
A published package without bundled persona definitions is corrupt. Fail at plugin startup instead of silently installing zero agents and breaking later skill fanout.
*/
try {
sourceFiles = readdirSync(sourceRoot).filter((file) => file.endsWith(".md"));
} catch (error) {
const code = (error as NodeJS.ErrnoException).code;
if (code === "ENOENT" || code === "ENOTDIR") {
throw new Error(`Bundled agent persona source directory is missing: ${sourceRoot}`, { cause: error });
}
throw error;
}
if (sourceFiles.length === 0) {
throw new Error(`Bundled agent persona source directory contains no markdown definitions: ${sourceRoot}`);
}
const results = sourceFiles.map<CeAgentInstallResult>((file) => {
const agentId = file.replace(/\.md$/, "");