mirror of
https://github.com/affaan-m/ECC.git
synced 2026-11-23 00:05:27 +00:00
fix(antigravity): keep doctor reporting when one target root is unsafe
An Antigravity home whose workflows directory resolves outside the trusted config root made resolveTrustedRoots throw out of the doctor loop, hiding results for every other installed target. Report it as an unsafe-trusted-root error for that target instead, with a regression. Also align the README support row with the pinned CLI 1.3.5 validation and leave the shipped 2.2.0 release notes unchanged.
This commit is contained in:
4 files changed
+31
-5
No files matched your search
@@ -1331,7 +1331,7 @@ Treat `stable`, `beta`, `experimental`, and `instruction-only` below as capabili
|
||||
|---|---|---|---|
|
||||
| Claude Code | Stable primary | Plugin or selective installer | The plugin advertises the installed catalog to the model; use a selective/manual profile when context footprint matters. Optional shell-backed skills are not portable to every OS. |
|
||||
| Codex | Supported native plugin | Codex marketplace plugin or repo config | Native hooks require an explicit trust decision and do not use Claude's hook profiles. The legacy sync is compatibility-only. |
|
||||
| Antigravity | Native plugin adapter | Antigravity 2.0/IDE plugin (`~/.gemini/config/plugins/ecc`) or project `.agents/` | Profile-gated lifecycle hooks, rules, workflows, skills, and memory MCP. CLI 1.2.9 validates local import; authenticated native tool and Stop execution remain unverified. |
|
||||
| Antigravity | Native plugin adapter | Antigravity 2.0/IDE plugin (`~/.gemini/config/plugins/ecc`) or project `.agents/` | Profile-gated lifecycle hooks, rules, workflows, skills, and memory MCP. CLI 1.3.5 validates local import; authenticated native tool and Stop execution remain unverified. |
|
||||
| Qoder | Supported native plugin | Local plugin directory in Qoder CLI or ZIP upload in Qoder IDE | Loads the canonical skills, agents, commands, and MCP config; only the reviewed SessionStart hook is enabled, and Node.js 18+ must be on the non-interactive PATH. |
|
||||
| Cursor | Beta project adapter | Selective installer into `.cursor/` | Agent discovery varies by Cursor build; hook events use profile-gated dispatchers, but full Claude feature parity is not claimed. |
|
||||
| OpenCode | Beta built plugin | Build plugin, then selective installer | ECC ships a subset of the catalog; connect a provider and select a model in OpenCode ([#2617](https://github.com/affaan-m/ECC/issues/2617)). |
|
||||
|
||||
@@ -32,7 +32,7 @@ Install or update the published package, then run the same ECC install command y
|
||||
|
||||
```bash
|
||||
npm install -g ecc-universal@2.2.0
|
||||
ecc install --target antigravity --profile full --enable-hooks
|
||||
ecc install --target antigravity --profile full
|
||||
```
|
||||
|
||||
Use `ecc doctor --target <target>` after installation. For Antigravity, start a new conversation and verify workspace skills under Settings > Customizations.
|
||||
|
||||
@@ -1127,8 +1127,15 @@ function collectTargetPathIssues(record, state, issues) {
|
||||
}
|
||||
|
||||
function collectOperationHealthIssues(record, context, state, issues) {
|
||||
const trustedRoots = getInstallTargetAdapter(record.adapter.id || record.adapter.target)
|
||||
.resolveTrustedRoots(context);
|
||||
let trustedRoots;
|
||||
try {
|
||||
trustedRoots = getInstallTargetAdapter(record.adapter.id || record.adapter.target)
|
||||
.resolveTrustedRoots(context);
|
||||
} catch (error) {
|
||||
// Report an unsafe root for this target without aborting the other targets.
|
||||
issues.push(buildIssue('error', 'unsafe-trusted-root', error.message));
|
||||
return;
|
||||
}
|
||||
const operationHealth = summarizeManagedOperationHealth(
|
||||
context.repoRoot,
|
||||
record.targetRoot,
|
||||
|
||||
@@ -90,6 +90,25 @@ try {
|
||||
const externalContent = fs.readFileSync(externalWorkflow, 'utf8');
|
||||
|
||||
assert.throws(() => applyInstallPlan(symlinkPlan), /outside|symlink|trusted/i);
|
||||
// One unsafe target root must not hide doctor results for other targets.
|
||||
applyInstallPlan(withHookConsent(createManifestInstallPlan({
|
||||
profileId: 'core',
|
||||
target: 'antigravity',
|
||||
homeDir: symlinkHome,
|
||||
projectRoot: symlinkProject,
|
||||
}), 'enabled'));
|
||||
const unsafeRootDoctor = buildDoctorReport({
|
||||
repoRoot,
|
||||
homeDir: symlinkHome,
|
||||
projectRoot: symlinkProject,
|
||||
targets: ['antigravity-home', 'antigravity'],
|
||||
}).results;
|
||||
const homeDoctor = unsafeRootDoctor.find(result => result.adapter.target === 'antigravity-home');
|
||||
const projectDoctor = unsafeRootDoctor.find(result => result.adapter.target === 'antigravity');
|
||||
assert.strictEqual(homeDoctor.status, 'error');
|
||||
assert.ok(homeDoctor.issues.some(issue => issue.code === 'unsafe-trusted-root'));
|
||||
assert.ok(projectDoctor, 'project target must still be reported');
|
||||
assert.notStrictEqual(projectDoctor.status, 'error');
|
||||
const rootSymlinkRepair = repairInstalledStates({
|
||||
repoRoot,
|
||||
homeDir: symlinkHome,
|
||||
@@ -128,7 +147,7 @@ try {
|
||||
if (previousHome === undefined) delete process.env.HOME;
|
||||
else process.env.HOME = previousHome;
|
||||
}
|
||||
console.log('Results: Passed: 6, Failed: 0');
|
||||
console.log('Results: Passed: 7, Failed: 0');
|
||||
} finally {
|
||||
fs.rmSync(fixtureRoot, { recursive: true, force: true });
|
||||
}
|
||||
Reference in new issue
Block a user