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:
@@ -67,7 +67,7 @@ def create_account(
|
||||
# Planul cerut: pastram doar valori valide; orice altceva -> NULL (defensiv).
|
||||
req_plan = requested_plan if requested_plan in VALID_TIERS else None
|
||||
try:
|
||||
# Trial Pro automat la creare (PRD 5.17 US-001): tier='free' + trial_until=now+30z.
|
||||
# Trial Pro automat la creare: tier='free' + trial_until=now+30z.
|
||||
trial_until = (
|
||||
(datetime.now(timezone.utc) + timedelta(days=30)).strftime("%Y-%m-%d %H:%M:%S")
|
||||
)
|
||||
@@ -151,7 +151,7 @@ def set_status(conn: sqlite3.Connection, account_id: int, status: str) -> None:
|
||||
|
||||
|
||||
def get_auto_send(conn: sqlite3.Connection, account_id: int) -> bool:
|
||||
"""Comutatorul Auto per cont (PRD 5.19 US-001): `accounts.auto_send_enabled` ca bool.
|
||||
"""Comutatorul Auto per cont: `accounts.auto_send_enabled` ca bool.
|
||||
|
||||
Cont inexistent -> False (Auto OFF: sigur, tine randurile). Nu comita (ca set_active).
|
||||
"""
|
||||
@@ -164,7 +164,7 @@ def get_auto_send(conn: sqlite3.Connection, account_id: int) -> bool:
|
||||
|
||||
|
||||
def set_auto_send(conn: sqlite3.Connection, account_id: int, enabled: bool) -> None:
|
||||
"""Comuta `accounts.auto_send_enabled` (PRD 5.19 US-001). Idempotent (set pe aceeasi
|
||||
"""Comuta `accounts.auto_send_enabled`. Idempotent (set pe aceeasi
|
||||
valoare nu arunca). Scoped pe cont. Nu comita — respecta conventia fisierului (apelantul
|
||||
comita, ca la set_active/set_status). Cont inexistent -> UPDATE fara efect (no-op sigur).
|
||||
"""
|
||||
@@ -175,8 +175,8 @@ def set_auto_send(conn: sqlite3.Connection, account_id: int, enabled: bool) -> N
|
||||
|
||||
|
||||
def held_for_account(conn: sqlite3.Connection, account_id: int) -> int:
|
||||
"""Snapshot-ul `held` la ingestie (PRD 5.19 US-001). SURSA UNICA (chokepoint) folosita de
|
||||
TOATE situ-rile de ingestie care scriu `status='queued'` (US-002).
|
||||
"""Snapshot-ul `held` la ingestie. SURSA UNICA (chokepoint) folosita de
|
||||
TOATE situ-rile de ingestie care scriu `status='queued'`.
|
||||
|
||||
Intoarce 0 (nu tine) daca `accounts.auto_send_enabled=1`, altfel 1 (tine randul). Cont
|
||||
inexistent -> 1 (sigur: tine randul, nu-l trimite fara comutator explicit).
|
||||
@@ -215,7 +215,7 @@ def set_tier(
|
||||
"UPDATE accounts SET tier=?, trial_until=? WHERE id=?",
|
||||
(tier, trial_until, account_id),
|
||||
)
|
||||
# Audit in app_events (decizie PRD 5.17 US-008, fara PII nou)
|
||||
# Audit in app_events (fara PII nou)
|
||||
try:
|
||||
from .observ import log_event
|
||||
log_event(
|
||||
|
||||
Reference in New Issue
Block a user