Commit Graph
7 Commits
Author SHA1 Message Date
ricoromaandClaude Opus 5.5 d5a44ecc59 fix: check leftover containers in failure stand cleanup
cleanup() now also requires that no container of the failure project is
left, not only volumes. REPORT.md says where uv is needed (run_dev and
the own test commands), the hook notes that CACHE_KEY_PREFIX is a copy,
and the student-tests spec names the sessions capability consistently.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 00:17:46 +03:00
ricoromaandClaude Opus 5.5 b0357468ff docs: add failure checks evidence and report
Evidence from 5b65051: make failure_checks passes 12 checks in 45 s and
leaves the working stand untouched (same StartedAt and row counts);
make test_isolated reports 98 of 108 scenarios tested, 13 of them by the
failure checks. REPORT.md gets the level 4 rows for automatic expiry,
database and Valkey checks and the chat creation rollback. The spec and
rule note that two failure check runs must not overlap.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-01 23:39:39 +03:00
ricoromaandClaude Opus 5.5 5b65051a60 test: add automatic failure checks on a separate stand
make failure_checks brings up a throwaway compose project with its own
PostgreSQL and Valkey, a default and a tight API (2 s sessions, pool of
one), and runs the pytest tests marked fault through an explicit hook:
session expiry, database stop and return, pool exhaustion, chat creation
rollback, readiness, Valkey stop, hang, return and flush. The stand and
its volume are removed on any outcome; the working stand is untouched.
Regular runs deselect the fault tests, and 13 coverage exclusions go away.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-01 23:20:34 +03:00
ricoromaandClaude Opus 5.5 cae4b09147 feat: cache chat cards in Valkey
Valkey 9.1 in compose caches the immutable chat card (title, members,
created_at) used by GET /chats/{id} and by the membership check of the
message endpoints. Cache-aside with a write after commit, keys per
database, TTL plus allkeys-lru, persistence off. redis-py runs without
retries; on failure the cache is skipped for a few seconds and requests
go to PostgreSQL. Readiness does not depend on Valkey.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-01 21:17:55 +03:00
ricoromaandClaude Opus 5.5 ae4154eaf5 feat: add password login and bearer sessions
- Argon2id password hashes, KDF in a thread with its own limit
- POST /auth/sessions with Basic, DELETE /auth/sessions/current
- Bearer sessions in PostgreSQL, X-User-Id ignored
- migration drops lab 1 data without passwords
- student-tests on tokens, sessions spec and synced specs

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-01 18:50:42 +03:00
ricoromaandClaude Opus 5.5 2d0a7c83e9 feat: finish postgres-storage change
- keep engine and session factory in src/infra/db/session.py
- sync delta specs into openspec/specs, add db-migrations spec
- update rules, AGENTS.md and run skill for lab 2 storage
- fill REPORT.md for the storage part

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-01 16:20:49 +03:00
ricoromaandClaude Opus 5.5 7b775a29a9 chore: carry over lab 1 solution into lab 2 skeleton
Copy the committed lab 1 sources as-is: src/, student-tests/, bench/,
Dockerfile, docker-compose.yml, pyproject.toml, uv.lock,
.python-version, config_example.toml, AGENTS.md, CLAUDE.md, .claude/,
openspec/, .graphifyignore and KNOWN_ISSUES.md. Lab 1 evidence stays
in the lab 1 repository.

Merge the new skeleton files with own sections: Makefile (lab 2
targets plus own run, docker, bench and common targets), .gitignore,
.dockerignore and .env.example. Rename the image to
mtusi-messenger:lab2 and point AGENTS.md at lab 2.

The application is still the in-memory lab 1 implementation.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 22:11:46 +03:00