chore: gate canonical ECC release identity (#1991)

This commit is contained in:
Affaan Mustafa
2026-05-19 06:42:17 -04:00
committed by GitHub
parent af9b2c1c4c
commit 8141f6904f
31 changed files with 206 additions and 113 deletions

View File

@@ -134,6 +134,11 @@ test('agent.yaml version matches package.json', () => {
assert.strictEqual(match[1], expectedVersion);
});
test('agent.yaml uses canonical ECC identity', () => {
const agentYamlSource = fs.readFileSync(agentYamlPath, 'utf8');
assert.ok(/^name:\s*ecc$/m.test(agentYamlSource), 'Expected agent.yaml to use the ecc name');
});
test('VERSION file matches package.json', () => {
const versionFile = fs.readFileSync(versionFilePath, 'utf8').trim();
assert.ok(versionFile, 'Expected VERSION file to be non-empty');
@@ -149,7 +154,7 @@ test('docs/SELECTIVE-INSTALL-ARCHITECTURE.md repoVersion example matches package
test('.opencode/plugins/ecc-hooks.ts active plugin banner matches package.json', () => {
const source = fs.readFileSync(opencodeHooksPluginPath, 'utf8');
const match = source.match(new RegExp(`## Active Plugin: Everything Claude Code v(${semverPattern})`));
const match = source.match(new RegExp(`## Active Plugin: ECC v(${semverPattern})`));
assert.ok(match, 'Expected .opencode/plugins/ecc-hooks.ts to declare an active plugin banner');
assert.strictEqual(match[1], expectedVersion);
});
@@ -346,6 +351,11 @@ test('codex plugin.json has interface.displayName', () => {
);
});
test('codex plugin.json uses canonical ECC repo and display name', () => {
assert.strictEqual(codexPlugin.repository, 'https://github.com/affaan-m/ECC');
assert.strictEqual(codexPlugin.interface.displayName, 'ECC');
});
// ── .mcp.json at plugin root ──────────────────────────────────────────────────
// Per official docs: keep .mcp.json at plugin root, NOT inside .codex-plugin/
console.log('\n=== .mcp.json (plugin root) ===\n');
@@ -522,6 +532,10 @@ test('.codex-plugin README uses current marketplace add flow', () => {
readme.includes('codex plugin marketplace add'),
'Expected .codex-plugin README to document codex plugin marketplace add',
);
assert.ok(
readme.includes('codex plugin marketplace add affaan-m/ECC'),
'Expected .codex-plugin README to document the canonical ECC repo marketplace source',
);
assert.ok(
readme.includes('Official Plugin Directory publishing is coming soon'),
'Expected .codex-plugin README to document current official directory status',