fix(tasks): fail loud when the abstract seam is mounted directly
Review finding (Codex round 1): abstract erases at runtime and @deepseek-ai/dsh-tasks used to be the mountable registry, so a stale composition row would register a ctx.tasks with no method implementations and fail far from the misconfiguration. The seam constructor now rejects direct mounts with a load-time pointer at dsh-tasks-local; the seam suite pins the fence, the Agent Note cost paragraph records the actual behavior, and the stale tool-pty README requirement line names the implementation package.
This commit is contained in:
@@ -79,4 +79,10 @@ describe('TaskService seam', () => {
|
||||
class SecondTaskService extends StubTaskService {}
|
||||
await expect(ctx.plugin(SecondTaskService)).rejects.toThrow(/service "tasks" has been registered/)
|
||||
})
|
||||
|
||||
it('mounting the abstract seam directly fails loudly at load (stale-composition fence)', async () => {
|
||||
const ctx = new Context()
|
||||
await expect(ctx.plugin(TaskService as unknown as typeof StubTaskService))
|
||||
.rejects.toThrow(/abstract task registry seam; load an implementation such as @deepseek-ai\/dsh-tasks-local/)
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user