fix: address Phase 1 code-quality review findings

- Generator feature templates emit ctx-arg signatures + updated checklist
- signUpUseCase test for bus=undefined path
- di-explainer.html: bind-dev-seed no-arg → ctx
- data-flow-explainer.html: tradeoff card → ctx
- BindContextBase no longer exported
- CLAUDE.md binder bullet: drop vestigial cast guidance

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-09 13:17:04 +02:00
parent ca2e7d8c10
commit 723729dd9e
8 changed files with 34 additions and 19 deletions

View File

@@ -60,6 +60,21 @@ describe("signUpUseCase", () => {
);
});
it("works without an event bus (welcome email skipped silently)", async () => {
const users = new MockUsersRepository([]);
const auth = new MockAuthenticationService(users);
const useCase = signUpUseCase(users, auth, undefined);
const result = await useCase({
username: "frank",
password: "secret_password",
confirmPassword: "secret_password",
});
expect(result.session.userId).toBeTruthy();
expect(result.cookie.name).toBe("session");
});
it("does NOT publish when sign-up fails (username taken)", async () => {
const users = new MockUsersRepository([]);
const auth = new MockAuthenticationService(users);