6 Commits

Author SHA1 Message Date
khalil 787a094c59 fix(api,frontend): delete is the true inverse of adopt, no reseed
CI/CD Pipeline / test (push) Successful in 10s
CI/CD Pipeline / build-push-deploy (push) Successful in 9s
/creatures/:id/delete now just removes the row, matching how
POST /creatures (adopt) just inserts one — no side effects on anything
else. The auto-reseed was scope creep for a feature that only ever made
sense as a public marketing-site action; now that delete lives in the app
itself as a per-creature control, that safety net isn't needed.

Adds a Delete button next to Feed/Play/Sleep/Revive on every creature
card, same creatureAction() plumbing as the existing actions.
2026-08-13 21:17:15 +00:00
khalil bc7f93a22f feat(api): kill and delete endpoints for the Chaos Button demo
CI/CD Pipeline / test (push) Successful in 9s
CI/CD Pipeline / build-push-deploy (push) Successful in 8s
POST /creatures/:id/kill poisons a creature (is_alive=false), the same
state natural decay reaches — feeds tamagotchi_creatures_dead_total and
therefore the real TamagotchiCreatureDied -> Alertmanager -> n8n revival
chain. Deliberately app-level, not a pod action.

POST /creatures/:id/delete permanently removes a creature and immediately
reseeds a replacement. Does not touch the dead gauge on purpose: it
demonstrates the app defending its own roster rather than the monitoring
chain, so a public unauthenticated action can't empty it out over time.
2026-08-13 12:48:55 +00:00
khalil 1939c36dfb fix(api): move FILTER onto the aggregate in /api/stats
CI/CD Pipeline / test (push) Successful in 1m38s
CI/CD Pipeline / build-push-deploy (push) Successful in 23s
PostgreSQL only accepts FILTER on an aggregate call. It was attached to
ROUND, so the whole query was rejected and /api/stats answered 500. The
showcase reads that endpoint for its live creature stats, which meant the
homepage displayed five dashes instead of numbers.

FILTER now sits on AVG, with the rounding applied to the result.
2026-08-11 10:28:23 +00:00
khalil 83ed8f6876 chore: fix OCI source label URL to match canonical domain
CI/CD Pipeline / test (push) Successful in 8s
CI/CD Pipeline / build-push-deploy (push) Successful in 6s
2026-07-04 18:42:34 +00:00
khalil ac4f37c8b5 chore: liaison des images docker au dépôt Gitea
CI/CD Pipeline / test (push) Successful in 1m54s
CI/CD Pipeline / scan (push) Successful in 19s
CI/CD Pipeline / build-push-deploy (push) Successful in 47s
2026-07-04 18:22:30 +00:00
Khalil 23baded882 Initial commit 2026-07-04 10:19:23 +00:00