πŸ”οΈAPEX
πŸ§ͺ
TestOSβ„’
Portfolio QA & Release Command Center
CONTROL PLANE ONLY
Integrity Rules: No fake results. No fake screenshots. No coverage claims without evidence. External tools show NOT CONNECTED until evidence received.
βš™οΈ TestOSβ„’ Reference
Code Implementation Guide
Document 2 of 2 β€” Entity schemas, backend functions, frontend patterns, and build checklist

πŸ“Š 1. Entity Schemas (JSON Schema)

Create these 12 entities in base44/entities/. Each is a JSON schema file. Built-in fields (id, created_date, updated_date, created_by_id) are automatic β€” do NOT declare them.

// ── AppRegistry ──────────────────────────────────────────
// base44/entities/AppRegistry.jsonc
{
  "name": "AppRegistry",
  "type": "object",
  "properties": {
    "name": { "type": "string" },
    "app_id": { "type": "string", "description": "Base44 app ID" },
    "description": { "type": "string" },
    "category": { "type": "string" },
    "preview_url": { "type": "string" },
    "production_url": { "type": "string" },
    "status": { "type": "string", "enum": ["complete","partial","not-started","archived"], "default": "partial" },
    "lifecycle_stage": { "type": "string", "enum": ["idea","prototype","mvp","beta","live","dormant","sunset"], "default": "prototype" },
    "completeness": { "type": "number", "minimum": 0, "maximum": 100, "default": 0 },
    "readiness_score": { "type": "number", "minimum": 0, "maximum": 100, "default": 0 },
    "portfolio_wave": { "type": "string", "enum": ["P0_LAUNCH","P1_INCUBATE","P2_LAB","ARCHIVE"], "default": "P2_LAB" },
    "criticality": { "type": "string", "enum": ["low","medium","high","critical"], "default": "medium" },
    "qa_owner": { "type": "string" },
    "release_owner": { "type": "string" },
    "last_tested_at": { "type": "string", "format": "date-time" },
    "latest_build_id": { "type": "string" },
    "latest_commit_id": { "type": "string" },
    "overall_qa_score": { "type": "number", "minimum": 0, "maximum": 100, "default": 0 },
    "current_release_status": { "type": "string", "enum": ["GO","CONDITIONAL_GO","NO_GO","NOT_ASSESSED"], "default": "NOT_ASSESSED" }
  },
  "required": ["name"]
}

// ── TestRun ─────────────────────────────────────────────
// base44/entities/TestRun.jsonc
{
  "name": "TestRun",
  "type": "object",
  "properties": {
    "run_id": { "type": "string" },
    "app_id": { "type": "string" },
    "app_name": { "type": "string" },
    "environment": { "type": "string", "default": "preview" },
    "build": { "type": "string" },
    "commit": { "type": "string" },
    "source": { "type": "string", "enum": ["BASE44_VERIFICATION","BASE44_TESTING_AGENT","MANUAL_UAT","PLAYWRIGHT","VISUAL_REGRESSION","ACCESSIBILITY","API","NETWORK","BROWSER_DEVICE","PERFORMANCE","SECURITY"], "default": "MANUAL_UAT" },
    "browser": { "type": "string" },
    "device": { "type": "string" },
    "role": { "type": "string" },
    "started_at": { "type": "string", "format": "date-time" },
    "finished_at": { "type": "string", "format": "date-time" },
    "duration_ms": { "type": "number" },
    "total": { "type": "number", "default": 0 },
    "passed": { "type": "number", "default": 0 },
    "failed": { "type": "number", "default": 0 },
    "skipped": { "type": "number", "default": 0 },
    "result": { "type": "string", "enum": ["PASS","FAIL","WARNING","NOT_EXECUTED"], "default": "NOT_EXECUTED" },
    "release_impact": { "type": "string", "enum": ["NO_IMPACT","LOW","MEDIUM","HIGH","BLOCKER"], "default": "NO_IMPACT" },
    "idempotency_key": { "type": "string" }
  },
  "required": ["app_id", "app_name", "source"]
}

// ── Defect ──────────────────────────────────────────────
// base44/entities/Defect.jsonc
{
  "name": "Defect",
  "type": "object",
  "properties": {
    "defect_id": { "type": "string" },
    "app_id": { "type": "string" },
    "app_name": { "type": "string" },
    "status": { "type": "string", "enum": ["NEW","TRIAGED","ASSIGNED","FIX_IN_PROGRESS","READY_FOR_RETEST","RETEST_FAILED","VERIFIED","CLOSED","DEFERRED","ACCEPTED_RISK"], "default": "NEW" },
    "severity": { "type": "string", "enum": ["S0_BLOCKER","S1_CRITICAL","S2_HIGH","S3_MEDIUM","S4_LOW"], "default": "S3_MEDIUM" },
    "title": { "type": "string" },
    "expected_behavior": { "type": "string" },
    "actual_behavior": { "type": "string" },
    "repro_steps": { "type": "array", "items": { "type": "string" } },
    "environment": { "type": "string" },
    "role": { "type": "string" },
    "browser": { "type": "string" },
    "device": { "type": "string" },
    "screenshot_url": { "type": "string" },
    "trace_url": { "type": "string" },
    "console_error": { "type": "string" },
    "network_error": { "type": "string" },
    "test_result_id": { "type": "string" },
    "fix_prompt": { "type": "string" },
    "ai_analysis": { "type": "string" },
    "error_incident_id": { "type": "string" }
  },
  "required": ["app_id", "app_name", "title", "status", "severity"]
}
TestOSβ„’ Reference β€” Code Implementation Guide Β· See Document 1 (Architecture Summary) for feature overview