Commit graph

370 commits

Author SHA1 Message Date
8d46a4158e
fix caveman json file 2026-05-01 11:14:09 +03:00
cd2f688372
remove unused import 2026-05-01 10:58:23 +03:00
38d72ba1a8
Merge branch 'today-scheduled-nodes-page' 2026-05-01 10:54:51 +03:00
7091eefd4a
add caveman ai plugin config 2026-05-01 10:52:56 +03:00
ed4440eec2
test scheduled node controller returns 404 when user missing 2026-05-01 10:25:24 +03:00
f315db6d00
wrap get todays schedule in try catch 2026-05-01 10:25:00 +03:00
659f9b88f1
test scheduled node controller surfaces date error from use case 2026-05-01 10:24:43 +03:00
2eafe67f31
test scope schedule to requesting user 2026-05-01 10:19:03 +03:00
3711840669
test exclude future scheduled nodes 2026-05-01 10:18:47 +03:00
54e33f9b03
test empty schedule returns empty array 2026-05-01 10:18:32 +03:00
c0f35c88b7
throw on missing user in get todays schedule 2026-05-01 10:18:19 +03:00
dd217e4142
test get todays schedule missing user 2026-05-01 10:18:02 +03:00
120e5ee9a1
validate get todays schedule user id 2026-05-01 10:17:49 +03:00
6d0b5d61e1
test get todays schedule null user id 2026-05-01 10:17:38 +03:00
f0fd076fb9
validate get todays schedule date 2026-05-01 10:17:24 +03:00
4e2904a2b4
test get todays schedule null date 2026-05-01 10:17:10 +03:00
c9f1379496
remove default values from test helpers 2026-05-01 10:05:07 +03:00
8b5767e6f4
add no default parameters rule
Forcing every call site to be explicit eliminates a class of bugs where an unintended default silently slips through. Codifies the convention already established by prior commits (cd40483, b41652a, 8eb0f23).
2026-05-01 10:04:32 +03:00
4294521dfc
add scheduled nodes endpoint 2026-05-01 09:59:18 +03:00
636d2dc517
test get scheduled nodes endpoint 2026-05-01 09:58:28 +03:00
0c76773ef0
opencode config 2026-05-01 09:57:20 +03:00
7ec91e3869
reformat ai files 2026-05-01 09:56:25 +03:00
669bcf8d5e
style 2026-05-01 09:56:14 +03:00
e04931ac08
test that todays schedule only returns uncompleted nodes 2026-05-01 09:06:13 +03:00
8eeff2c4fe
add update method to fake scheduled node repo 2026-05-01 09:05:55 +03:00
1b2e44389c
add completed bool to scheduled node 2026-05-01 09:04:18 +03:00
f2840a3eb1
add find by user method in json scheduled node repo 2026-05-01 09:03:52 +03:00
07e34ffd46
add find by user method in plan repo 2026-05-01 09:02:34 +03:00
ec4dca87a6
test that all nodes up until given date are returned 2026-04-28 22:48:25 +03:00
2047cd72e7
test get todays schedule and use case with request 2026-04-28 22:38:43 +03:00
0ea300f4d2
add find by user method for scheduled nodes 2026-04-28 22:37:28 +03:00
a9265abeae
add node to scheduled node 2026-04-27 09:28:43 +03:00
d47a0235d2
add node to scheduled node entity and dto 2026-04-27 09:10:40 +03:00
46d01aa813
test today page lists scheduled nodes 2026-04-26 21:24:56 +03:00
6314f1c38c
add link to today page on home 2026-04-26 21:24:55 +03:00
bfacb5b62c
add today view route and template 2026-04-26 21:24:35 +03:00
0b4d7238af
add today page cypress spec 2026-04-26 20:50:52 +03:00
8eb0f2366b
remove missed default value 2026-04-26 20:43:27 +03:00
041590da15
Merge branch 'auth-and-admin' 2026-04-26 20:05:31 +03:00
b41652af71
remove default value in fake token generator 2026-04-26 10:51:03 +03:00
cd40483cd4
remove default values from user constructors
Forcing every call site to be explicit about admin status and
password eliminates a class of bugs where an unintended
isAdmin=false or empty passwordHash could silently slip through.
The CreateUserTest case that asserted the isAdmin default is
dropped since the default no longer exists.
2026-04-26 10:46:07 +03:00
f95adddaaf
fix code style in test files 2026-04-26 10:45:57 +03:00
13da7c311a
return utc from clock 2026-04-26 10:32:08 +03:00
2fe41a5fe7
no need to test concrete implementations 2026-04-26 10:23:57 +03:00
a65c9259fa
dont cast email to string, use new value method 2026-04-26 10:19:38 +03:00
099883a13d
change em dashes to hyphen and add rule outlawing emdashes 2026-04-26 10:15:03 +03:00
40726c3984
loosen commit granularity rule in prompts
Replace the strict "one commit per file" guidance with grouping by
related changes, while keeping the small-and-focused intent. Add
explicit guidance on when to include a commit body and how to format
it (blank line separator, ~72 col wrap).

Applied to both backend and frontend prompt templates.
2026-04-26 10:11:23 +03:00
bb6bd7cbb3
use FakePasswordHasher in tests to eliminate bcrypt cost
Add a trivial prefix-based PasswordHasher fake and inject it into the
three test files that exercise CreateUser or AuthenticateUser. Drops
the full phpunit suite from ~7.4s to ~30ms (about 224x) without
losing coverage: the round-trip through hash/verify still validates
that CreateUser stores something other than the plaintext and that
AuthenticateUser only succeeds on a matching hash.

CreateUserTest is also refactored to use a setUp method, matching
the pattern already used in AuthenticateUserTest and AuthControllerTest.
2026-04-26 09:06:26 +03:00
632085f5b6
inject PasswordHasher into CreateUser and AuthenticateUser
Replace direct password_hash and password_verify calls with the
injected PasswordHasher so the bcrypt cost can be substituted out
in tests. Production wiring is handled by the container's autowiring
of BcryptPasswordHasher.

This commit alone breaks the test suite because the existing tests
construct these use cases without the new dependency; the next
commit restores green by introducing FakePasswordHasher.
2026-04-26 09:06:21 +03:00
b1247d2fa1
add PasswordHasher interface with bcrypt implementation
Introduce an injectable abstraction over password_hash and
password_verify so callers can be swapped for a fast fake in tests
without paying bcrypt's CPU cost. The bcrypt implementation is a
direct passthrough using PASSWORD_DEFAULT, matching the prior inline
behavior, so existing stored hashes continue to verify.

Wired into the DI container alongside the other auth primitives
(Clock, TokenGenerator). No callers reference it yet, so production
behavior is unchanged.
2026-04-26 09:06:17 +03:00