fix(#1058): cross-reference install manifest in validate agents to catch .md/.toml pair drift (#1079)
* fix(#1058): cross-reference install manifest in validate agents to catch pair drift `validate agents` considered an agent installed if ANY supported file format was present on disk. The Codex installer generates a per-agent PAIR (agents/gsd-*.md AND agents/gsd-*.toml) and records both in gsd-file-manifest.json, so a partial generated install — one side of the pair missing — was reported as healthy (agents_found: true, missing: []), masking an incomplete Codex agent install. checkAgentsInstalled now cross-references the install manifest beside the agents dir (path.dirname(agentsDir)/gsd-file-manifest.json): for each expected agent, if the manifest tracks files for it and any tracked file is absent on disk, the agent is reported in a new `incomplete` list and agents_found becomes false. The check no-ops when no manifest is present (preserves bundled/claude behavior) and is scoped to expected agents so retired/stale manifest entries cannot false-flag. Regression cases added to tests/agent-install-validation.test.cjs cover the drift case, the complete-pair (no false positive), and the no-manifest no-op. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * docs(#1058): add changeset for validate-agents manifest pair-drift fix Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -1107,6 +1107,20 @@ function cmdValidateHealth(
|
||||
`No GSD agents found in ${agentStatus.agents_dir} — Task(subagent_type="gsd-*") will fall back to general-purpose`,
|
||||
`Run the GSD installer: npx ${PACKAGE_NAME}@latest`,
|
||||
);
|
||||
} else if ((agentStatus.incomplete_agents).length > 0 && (agentStatus.missing_agents).length === 0) {
|
||||
addIssue(
|
||||
'warning',
|
||||
'W010',
|
||||
`Incomplete agent installs (missing generated file): ${(agentStatus.incomplete_agents).join(', ')} — affected workflows may fall back to general-purpose`,
|
||||
`Re-run the GSD installer to complete the install: npx ${PACKAGE_NAME}@latest`,
|
||||
);
|
||||
} else if ((agentStatus.incomplete_agents).length > 0) {
|
||||
addIssue(
|
||||
'warning',
|
||||
'W010',
|
||||
`Missing ${(agentStatus.missing_agents).length} GSD agents: ${(agentStatus.missing_agents).join(', ')}; incomplete agent installs (missing generated file): ${(agentStatus.incomplete_agents).join(', ')} — affected workflows will fall back to general-purpose`,
|
||||
`Run the GSD installer: npx ${PACKAGE_NAME}@latest`,
|
||||
);
|
||||
} else {
|
||||
addIssue(
|
||||
'warning',
|
||||
@@ -1624,6 +1638,7 @@ function cmdValidateAgents(cwd: string, raw: boolean): void {
|
||||
agents_found: agentStatus.agents_installed,
|
||||
installed: agentStatus.installed_agents,
|
||||
missing: agentStatus.missing_agents,
|
||||
incomplete: agentStatus.incomplete_agents,
|
||||
expected,
|
||||
},
|
||||
raw,
|
||||
|
||||
Reference in New Issue
Block a user