refactor: comentarii strict functionale, fara referinte PRD/stories
Curatare globala a comentariilor si docstring-urilor (app, tools, teste, scripturi): eliminate referintele la PRD-uri, US-xxx, task-uri istorice si review-uri; pastrata doar informatia functionala, formulata scurt. Regula adaugata in CLAUDE.md (sectiunea Stil). Fara modificari de cod sau comportament. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -1,12 +1,10 @@
|
||||
"""Teste PRD 5.19 US-003 + US-008 — worker respecta flag `held`.
|
||||
"""Teste worker: respecta flag `held`.
|
||||
|
||||
US-003: claim_one sare peste randurile `queued AND held=1` (tinute manual).
|
||||
US-008: expire_held expira randurile tinute mai vechi de `held_retention_days`
|
||||
(default 90) -> status 'error', rar_error='TINUT_EXPIRAT', purge_after
|
||||
DIRECT la momentul expirarii (NU +30z retentie blocati -> nu 120z total),
|
||||
apoi purge_expired le sterge (PII purjat).
|
||||
|
||||
TDD: testele se scriu INAINTE de modificarea worker-ului.
|
||||
claim_one sare peste randurile `queued AND held=1` (tinute manual).
|
||||
expire_held expira randurile tinute mai vechi de `held_retention_days`
|
||||
(default 90) -> status 'error', rar_error='TINUT_EXPIRAT', purge_after
|
||||
DIRECT la momentul expirarii (NU +30z retentie blocati -> nu 120z total),
|
||||
apoi purge_expired le sterge (PII purjat).
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
@@ -65,7 +63,7 @@ def _row_status(conn, sid):
|
||||
return r["status"] if r else None
|
||||
|
||||
|
||||
# --- US-003: claim_one sare peste randurile tinute ---
|
||||
# --- claim_one sare peste randurile tinute ---
|
||||
|
||||
def test_claim_sare_rand_tinut(env):
|
||||
"""queued, held=1, cont activ, send on -> claim_one intoarce None; ramane queued."""
|
||||
@@ -116,7 +114,7 @@ def test_eliberarea_deblocheaza_claim(env):
|
||||
assert _row_status(conn, sid) == "sending"
|
||||
|
||||
|
||||
# --- US-008: expirare randuri tinute ---
|
||||
# --- expirare randuri tinute ---
|
||||
|
||||
def test_expire_held_expira_rand_vechi(env):
|
||||
"""queued, held=1, created_at vechi (>90z) -> error + TINUT_EXPIRAT + purge_after ~now."""
|
||||
@@ -179,7 +177,7 @@ def test_expire_held_ignora_rand_neted_vechi(env):
|
||||
|
||||
def test_expire_held_apoi_purge_sterge_randul(env):
|
||||
"""Lant complet ACELASI CICLU: expire_held (purge_after=now-1s) -> purge_expired
|
||||
sterge randul imediat (PII purjat), fara sa astepte ciclul urmator (fix /code-review #6)."""
|
||||
sterge randul imediat (PII purjat), fara sa astepte ciclul urmator."""
|
||||
from app.accounts import create_account
|
||||
from app.worker.__main__ import expire_held, purge_expired
|
||||
|
||||
|
||||
Reference in New Issue
Block a user