wording fixes

This commit is contained in:
Roberto Treviño Cervantes
2026-11-17 02:17:24 -06:00
parent 2834fac85c
commit dc37c54938
11 changed files with 304 additions and 7 deletions
+7
View File
@@ -32,6 +32,13 @@ export class GovernanceApi {
return this.http.post<ModelVersion>(`/governance/model-versions/${domain}/${scenario}/${version}/promote`, {});
}
/** Exports the scenario's latest dbt cohort build, trains a PROD version and tries to promote it, the same
* one-shot pipeline the `entrenar` compose profile runs. 409 when it trained but needs its reports attached
* before it can be promoted; 503 with no dbt manifest configured or an operational failure. */
trainModelVersion(domain: string, scenario: string): Observable<{ output: string }> {
return this.http.post<{ output: string }>(`/governance/model-versions/${domain}/${scenario}/train`, {});
}
retireModelVersion(domain: string, scenario: string, version: string): Observable<ModelVersion> {
return this.http.post<ModelVersion>(`/governance/model-versions/${domain}/${scenario}/${version}/retire`, {});
}
@@ -0,0 +1,29 @@
import { HttpClient } from '@angular/common/http';
import { Injectable, inject } from '@angular/core';
import { Observable } from 'rxjs';
import { PendingRiskBatch } from './risk-batches.types';
/** `/<domain>/riesgos/lotes`: risk batches a model produced and nobody has reviewed yet (ADR-MD-008). Only `cacu`
* is served today. */
@Injectable({ providedIn: 'root' })
export class RiskBatchesApi {
private readonly http = inject(HttpClient);
listPending(domain: string): Observable<PendingRiskBatch[]> {
return this.http.get<PendingRiskBatch[]>(`/${domain}/riesgos/lotes`);
}
/** Moves every current evaluation of the batch to `final`: it becomes the one patient records read. */
confirm(domain: string, loteId: number, reason: string): Observable<{ lote_id: number; evaluaciones_cambiadas: number }> {
return this.http.post<{ lote_id: number; evaluaciones_cambiadas: number }>(
`/${domain}/riesgos/lotes/${loteId}/confirmar`, { reason },
);
}
/** Moves every current evaluation of the batch to `entered-in-error` instead. */
void(domain: string, loteId: number, reason: string): Observable<{ lote_id: number; evaluaciones_cambiadas: number }> {
return this.http.post<{ lote_id: number; evaluaciones_cambiadas: number }>(
`/${domain}/riesgos/lotes/${loteId}/anular`, { reason },
);
}
}
@@ -0,0 +1,9 @@
/** A risk batch waiting for someone to confirm or void it (ADR-MD-008); invisible to patient records until
* confirmed. */
export interface PendingRiskBatch {
lote_id: number;
modelo_nombre: string;
modelo_version: string;
evaluado_en: string;
n_evaluaciones: number;
}