fix(coding): remediate ML-07 plugin authority

This commit is contained in:
2026-08-27 20:40:58 +08:00
parent 9407c67df2
commit cf13aa7eba
29 changed files with 1008 additions and 214 deletions

View File

@@ -81,6 +81,22 @@ describe('ProjectPluginService', () => {
await expect(stat(selectionPath(root))).rejects.toMatchObject({ code: 'ENOENT' });
});
it('does not turn a new Skill assignment into legacy plugin enablement', async () => {
const root = await project();
const service = new ProjectPluginService();
await expect(service.readSelection(root)).resolves.toMatchObject({
source: 'none', enabledPluginIds: [],
});
await createCodingProjectAgent(root, {
id: 'builder', avatarId: 'avatar-01', roleName: 'Builder', name: 'Builder',
model: null, modelResolution: 'required', skillIds: ['data-service'],
responsibility: { mission: 'Build', owns: [], boundaries: [], collaborators: [], principles: [] },
});
await expect(service.readSelection(root)).resolves.toMatchObject({
source: 'none', enabledPluginIds: [], legacyProjectedPluginIds: [],
});
});
it('writes deterministic, atomic selection and preserves unknown IDs', async () => {
const root = await project();
await writeFile(selectionPath(root), JSON.stringify({