Add CLAUDE.md and fix pre-existing failing tests - #3
Conversation
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01USW8fwgTtvVAHu1UzF4a9d
There was a problem hiding this comment.
Code Review
This pull request introduces CLAUDE.md, a guidance file for Claude Code detailing the project's architecture, Docker-only development environment, multi-tenancy structure, scheduler core loop, outbound HTTP safety, and secrets management. The review feedback points out a contradiction in the frontend testing instructions, where running npm directly on the host is suggested despite a strict Docker-only requirement, and recommends sticking exclusively to the containerized wrapper command.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
|
|
||
| Frontend tests/build (Vitest + `vue-tsc`) run from `frontend/`: | ||
| ```bash | ||
| ./scripts/tc.sh npm --prefix frontend run test # or: cd frontend && npm test |
There was a problem hiding this comment.
The alternative command cd frontend && npm test contradicts the strict instruction in line 13: "Do not install or run PHP, Composer, Node, or npm on the host."
To maintain a strictly Docker-only workflow, we should avoid suggesting running npm directly on the host. Instead, we can suggest using the wrapper script from the frontend directory if supported, or stick exclusively to the root-level wrapper command.
| ./scripts/tc.sh npm --prefix frontend run test # or: cd frontend && npm test | |
| ./scripts/tc.sh npm --prefix frontend run test |
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01USW8fwgTtvVAHu1UzF4a9d
- BootstrapFirstAdmin: fall back to getenv() for BOOTSTRAP_ADMIN_* since Laravel's cached env repository does not observe putenv() set after boot. - config/auth: point the user provider at the canonical Infrastructure User model so password-reset notifications are sent to the same class the app uses (fixes Notification::assertSentTo class mismatch). - MemberFeatureTest: assert validation errors against the API's error.details envelope produced by ApiErrorRenderer instead of the default errors key. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01USW8fwgTtvVAHu1UzF4a9d
…racking Document two non-negotiable project rules in CLAUDE.md: - The app must stay deployable on commodity shared hosting (PHP + MySQL + per-minute cron) with no dependency on always-on workers/brokers (Redis, RabbitMQ, etc.) or a paid cloud service / VPS; async work uses the existing MySQL-backed claiming + cron pattern. - All work items (requests, user stories, plans, tasks, bugs) must be tracked and kept current as GitHub issues. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01USW8fwgTtvVAHu1UzF4a9d
Summary
Adds a
CLAUDE.mdguidance file for future Claude Code sessions, and fixes 5 pre-existing failing tests that CI surfaced (unrelated to the docs but blocking a green build).CLAUDE.md
Orients future sessions to the actual project — derived from README,
scripts/tc.sh,composer.json,phpunit.xml,bootstrap/app.php, routes, provider bindings, and theapp/layering (no invented conventions):tcwrapper, including how to run a single backend/frontend test, and the CI steps to mirror locally.app/Infrastructure/Persistence/Eloquent/, and where DI bindings + policies are wired.scheduler:*commands, DB-backed claiming with lock + claim-token leases, at-least-once delivery, stale-claim recovery).Test fixes
The baseline suite was failing 5/86; all now pass (86/86 locally). Each was a genuine defect, not a test workaround:
BootstrapFirstAdmin—ensureExists()readBOOTSTRAP_ADMIN_*viaenv(), but Laravel's cached env repository does not observe values exported into the process environment (putenv/deploy-time exports) after boot. Added agetenv()fallback so deploy-time env vars are honored. FixesPhase0BootstrapAdminTest.config/auth.php— the user provider still pointed at the defaultApp\Models\Userskeleton class while the app's canonical model isApp\Infrastructure\Persistence\Eloquent\User. Password-reset notifications were therefore delivered to a different class than the app uses, breakingNotification::assertSentTo. Repointed the provider to the Infrastructure model. Fixes the member-invite notification test.MemberFeatureTest— the threeassertJsonValidationErrorscalls used Laravel's defaulterrorsresponse key, but this API'sApiErrorRenderernests validation errors undererror.details. Pointed the assertions at the actual contract ('error.details'), matching how the rest of the API responds.Verification
php artisan test→ 86 passed (was 5 failed / 81 passed).🤖 Generated with Claude Code