G0~G8 성과·동맹 측정 OS 작업 일괄 고정
8월 7일까지 워킹트리에만 남아 있던 미커밋 작업을 커밋한다. 여러 사본 폴더(worktree·clone)에 흩어져 있던 중간 스냅샷을 정리하기 전에 원본을 git 이력으로 고정하는 것이 목적이다. - contracts/routes/services: measurement, outcome_trajectory, rupture_repair, deliberate_practice, calibration_transfer, supervision_research, multimodal_alliance, continuous_improvement 계열 신규 모듈과 테스트 - infra/db/init: 07~16 마이그레이션(측정 기반~calibration transfer 실행) - apps/web: 세션 리뷰 카드·관리 화면·E2E 스펙 추가 - docs/ops: G0~G8 라이브 통합·배포·롤백 증거 문서와 evidence JSON/PNG - scripts: smoke·ledger·릴리스 에이전트·NAS 프리뷰 운영 스크립트 engine.public 로그 .bak과 apps/web/test-results 산출물은 커밋에서 제외했다.
This commit is contained in:
parent
93dd8f82d7
commit
16e791e044
390 changed files with 243188 additions and 499 deletions
|
|
@ -440,6 +440,20 @@
|
|||
font-size: 10px;
|
||||
}
|
||||
|
||||
.aic-table td.aic-cost-cell span,
|
||||
.aic-table td.aic-cost-cell small,
|
||||
.aic-table td.aic-token-cell span,
|
||||
.aic-table td.aic-token-cell small {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.aic-table td.aic-cost-cell small,
|
||||
.aic-table td.aic-token-cell small {
|
||||
margin-top: 1px;
|
||||
color: var(--text-muted);
|
||||
font: 700 9px/1.3 var(--font-sans);
|
||||
}
|
||||
|
||||
.aic-share {
|
||||
display: inline-block;
|
||||
width: 36px;
|
||||
|
|
|
|||
1149
apps/web/src/pages/admin/continuous-improvement.css
Normal file
1149
apps/web/src/pages/admin/continuous-improvement.css
Normal file
File diff suppressed because it is too large
Load diff
243
apps/web/src/pages/admin/continuousImprovementApi.ts
Normal file
243
apps/web/src/pages/admin/continuousImprovementApi.ts
Normal file
|
|
@ -0,0 +1,243 @@
|
|||
import { api } from "../../lib/api";
|
||||
import type { components } from "../../lib/api.gen";
|
||||
|
||||
type GeneratedSchemas = components["schemas"];
|
||||
type GeneratedOrFallback<Name extends string, Fallback> =
|
||||
Name extends keyof GeneratedSchemas ? GeneratedSchemas[Name] : Fallback;
|
||||
|
||||
export type ContinuousImprovementTargetKind =
|
||||
| "content_qualification"
|
||||
| "model_change_gate"
|
||||
| "release_gate";
|
||||
|
||||
export type ContinuousImprovementGateKind = Exclude<
|
||||
ContinuousImprovementTargetKind,
|
||||
"content_qualification"
|
||||
>;
|
||||
|
||||
interface ContentQualificationViewFallback {
|
||||
qualification_id: string;
|
||||
pipeline_id: string;
|
||||
catalog_entry_id: string;
|
||||
payload_sha256: string;
|
||||
content_kind: "case" | "rupture" | "practice" | "benchmark";
|
||||
difficulty_level: number;
|
||||
synthetic_identity_id: string;
|
||||
source_count: number;
|
||||
red_team_review_count: number;
|
||||
benchmark_variant_count: number;
|
||||
benchmark_pass_rate: number;
|
||||
source_provenance_uris: string[];
|
||||
draft_payload?: CatalogVisiblePayloadFallback | null;
|
||||
gate_state: "pending_human_approval";
|
||||
created_at: string;
|
||||
}
|
||||
|
||||
interface CatalogVisiblePayloadFallback {
|
||||
title: string;
|
||||
synthetic_profile: string;
|
||||
scenario: string;
|
||||
rupture_or_challenge: string;
|
||||
learner_task: string;
|
||||
success_criteria: string[];
|
||||
source_refs: string[];
|
||||
grounded_claims: Array<{ claim: string; source_ref: string }>;
|
||||
}
|
||||
|
||||
interface ModelChangeGateViewFallback {
|
||||
gate_id: string;
|
||||
gate_decision: "promote" | "rollback" | "quarantine";
|
||||
reasons: string[];
|
||||
state: "pending_human_approval";
|
||||
created_at: string;
|
||||
}
|
||||
|
||||
interface ReleaseGateViewFallback {
|
||||
gate_id: string;
|
||||
release_id: string;
|
||||
qualified: boolean;
|
||||
state: "pending_human_approval";
|
||||
created_at: string;
|
||||
}
|
||||
|
||||
interface GateArtifactViewFallback {
|
||||
artifact_record_id: string;
|
||||
owner_kind: ContinuousImprovementGateKind;
|
||||
owner_id: string;
|
||||
artifact_kind: "baseline" | "threshold" | "provenance" | "rollback";
|
||||
artifact_id: string;
|
||||
content_sha256: string;
|
||||
provenance_uri: string;
|
||||
created_at: string;
|
||||
}
|
||||
|
||||
interface HumanApprovalViewFallback {
|
||||
approval_event_id: string;
|
||||
target_kind: ContinuousImprovementTargetKind;
|
||||
target_id: string;
|
||||
decision:
|
||||
| "approve_content"
|
||||
| "approve_promotion"
|
||||
| "authorize_rollback"
|
||||
| "reject"
|
||||
| "keep_quarantine";
|
||||
reason_code: string;
|
||||
evidence_refs: string[];
|
||||
created_at: string;
|
||||
}
|
||||
|
||||
interface CatalogEntryViewFallback {
|
||||
catalog_record_id: string;
|
||||
qualification_id: string;
|
||||
catalog_entry_id: string;
|
||||
status: "approved";
|
||||
clinical_claim_allowed: false;
|
||||
created_at: string;
|
||||
}
|
||||
|
||||
interface LifecycleEventViewFallback {
|
||||
lifecycle_event_id: string;
|
||||
target_kind: ContinuousImprovementGateKind;
|
||||
target_id: string;
|
||||
event_type: "promotion" | "rollback" | "monitor";
|
||||
event_status:
|
||||
| "approved"
|
||||
| "requested"
|
||||
| "executed"
|
||||
| "failed"
|
||||
| "healthy"
|
||||
| "drift_detected"
|
||||
| "rollback_recommended"
|
||||
| "rollback_verified";
|
||||
evidence_refs: string[];
|
||||
created_at: string;
|
||||
}
|
||||
|
||||
interface OperationalIncidentViewFallback {
|
||||
incident_record_id: string;
|
||||
incident_id: string;
|
||||
error_fingerprint: string;
|
||||
affected_contract: string;
|
||||
evidence_refs: string[];
|
||||
pii_included: false;
|
||||
created_at: string;
|
||||
}
|
||||
|
||||
interface RegressionDagNodeViewFallback {
|
||||
node_record_id: string;
|
||||
incident_record_id: string;
|
||||
node_id: string;
|
||||
node_type: "reproduction_test" | "implementation" | "e2e" | "runtime_proof";
|
||||
depends_on_record_ids: string[];
|
||||
evidence_ref?: string | null;
|
||||
node_status: "pending" | "passed" | "failed";
|
||||
created_at: string;
|
||||
}
|
||||
|
||||
interface ContinuousImprovementViewResponseFallback {
|
||||
content_qualifications: ContentQualificationViewFallback[];
|
||||
model_change_gates: ModelChangeGateViewFallback[];
|
||||
release_gates: ReleaseGateViewFallback[];
|
||||
gate_artifacts: GateArtifactViewFallback[];
|
||||
approvals: HumanApprovalViewFallback[];
|
||||
catalog_entries: CatalogEntryViewFallback[];
|
||||
lifecycle_events: LifecycleEventViewFallback[];
|
||||
incidents: OperationalIncidentViewFallback[];
|
||||
regression_dag_nodes: RegressionDagNodeViewFallback[];
|
||||
data_classification: "synthetic_replay_red_team_coverage_drift";
|
||||
silent_auto_promotion_allowed: false;
|
||||
raw_transcript_included: false;
|
||||
pii_included: false;
|
||||
clinical_claim_allowed: false;
|
||||
}
|
||||
|
||||
interface HumanApprovalRequestFallback {
|
||||
submission_id: string;
|
||||
approval_event_id: string;
|
||||
effect_record_id: string;
|
||||
target_kind: ContinuousImprovementTargetKind;
|
||||
target_id: string;
|
||||
decision: HumanApprovalViewFallback["decision"];
|
||||
reason_code: string;
|
||||
evidence_refs: string[];
|
||||
}
|
||||
|
||||
interface HumanApprovalResponseFallback {
|
||||
submission_id: string;
|
||||
approval_event_id: string;
|
||||
target_kind: string;
|
||||
target_id: string;
|
||||
decision: string;
|
||||
effect_record_id: string;
|
||||
idempotent_replay: boolean;
|
||||
}
|
||||
|
||||
interface ApprovedCatalogConsumerResponseFallback {
|
||||
entries: Array<{
|
||||
catalog_record_id: string;
|
||||
qualification_id: string;
|
||||
catalog_entry_id: string;
|
||||
payload_sha256: string;
|
||||
content_kind: "case" | "rupture" | "practice" | "benchmark";
|
||||
difficulty_level: number;
|
||||
synthetic_identity_id: string;
|
||||
source_provenance_uris: string[];
|
||||
payload: CatalogVisiblePayloadFallback;
|
||||
status: "approved";
|
||||
clinical_claim_allowed: false;
|
||||
approved_at: string;
|
||||
}>;
|
||||
data_classification: "synthetic_replay_red_team_coverage_drift";
|
||||
human_approval_required: true;
|
||||
raw_transcript_included: false;
|
||||
pii_included: false;
|
||||
clinical_claim_allowed: false;
|
||||
}
|
||||
|
||||
/** main OpenAPI 재생성 전에도 빌드되며, 스키마가 생기는 즉시 생성 타입으로 승격된다. */
|
||||
export type ContinuousImprovementViewResponse = GeneratedOrFallback<
|
||||
"ContinuousImprovementViewResponse",
|
||||
ContinuousImprovementViewResponseFallback
|
||||
>;
|
||||
export type HumanApprovalRequest = GeneratedOrFallback<
|
||||
"HumanApprovalRequest",
|
||||
HumanApprovalRequestFallback
|
||||
>;
|
||||
export type HumanApprovalResponse = GeneratedOrFallback<
|
||||
"HumanApprovalResponse",
|
||||
HumanApprovalResponseFallback
|
||||
>;
|
||||
export type ApprovedCatalogConsumerResponse = GeneratedOrFallback<
|
||||
"ApprovedCatalogConsumerResponse",
|
||||
ApprovedCatalogConsumerResponseFallback
|
||||
>;
|
||||
|
||||
export type ContentQualificationView =
|
||||
ContinuousImprovementViewResponse["content_qualifications"][number];
|
||||
export type ModelChangeGateView =
|
||||
ContinuousImprovementViewResponse["model_change_gates"][number];
|
||||
export type ReleaseGateView =
|
||||
ContinuousImprovementViewResponse["release_gates"][number];
|
||||
export type GateArtifactView =
|
||||
ContinuousImprovementViewResponse["gate_artifacts"][number];
|
||||
export type HumanApprovalView =
|
||||
ContinuousImprovementViewResponse["approvals"][number];
|
||||
export type LifecycleEventView =
|
||||
ContinuousImprovementViewResponse["lifecycle_events"][number];
|
||||
export type OperationalIncidentView =
|
||||
ContinuousImprovementViewResponse["incidents"][number];
|
||||
export type RegressionDagNodeView =
|
||||
ContinuousImprovementViewResponse["regression_dag_nodes"][number];
|
||||
|
||||
export const continuousImprovementApi = {
|
||||
read: (signal?: AbortSignal) =>
|
||||
api.get<ContinuousImprovementViewResponse>("/continuous-improvement", {
|
||||
signal,
|
||||
}),
|
||||
readCatalog: (signal?: AbortSignal) =>
|
||||
api.get<ApprovedCatalogConsumerResponse>("/continuous-improvement/catalog", {
|
||||
signal,
|
||||
}),
|
||||
appendApproval: (body: HumanApprovalRequest) =>
|
||||
api.post<HumanApprovalResponse>("/continuous-improvement/approvals", body),
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue