{
  "ticket": "U65 #102",
  "startedAt": "2026-10-28T18:32:46.574807+08:00",
  "finishedAt": "2026-10-28T18:33:12.434627+08:00",
  "input": "python3 labs/deploy-gate/run.py（本机 Homebrew nginx 1.31.8 独立 prefix；不用 Docker）",
  "exitCode": 0,
  "environment": {
    "jdk": "openjdk version \"21.0.11\" 2026-04-21 LTS\nOpenJDK Runtime Environment (build 21.0.11+11-LTS)\nOpenJDK 64-Bit Server VM (build 21.0.11+11-LTS, mixed mode, sharing)",
    "maven": "Apache Maven 3.9.9 (8e8579a9e76f7d015ee5ec7bfcdc97d260186937)\nMaven home: /Users/gaochao/develop/maven-3.9.9\nJava version: 21.0.11, vendor: BellSoft, runtime: /Library/Java/JavaVirtualMachines/liberica-jdk-21.jdk/Contents/Home\nDefault locale: zh_CN_#Hans, platform encoding: UTF-8\nOS name: \"mac os x\", version: \"27.2\", arch: \"aarch64\", family: \"mac\"",
    "nginx": "nginx version: nginx/1.31.8",
    "os": "macOS-27.2-arm64-arm-64bit",
    "arch": "arm64",
    "python": "3.9.6",
    "dockerCli": "/usr/local/bin/docker",
    "dockerDaemonUp": false
  },
  "artifacts": {
    "v1": "23a50a6dd8cd08d7c69629a14dee66a4cd37b4ecda4f79d51cc87d9973692723",
    "v2": "1e60450f7957e8c3f00c1f85297d081055eb264d95299a8ff69aab39e6f69132",
    "hardCopy": "23a50a6dd8cd08d7c69629a14dee66a4cd37b4ecda4f79d51cc87d9973692723"
  },
  "checks": [
    {
      "check": "reproducible-builds",
      "passed": true,
      "detail": "v1=23a50a6dd8cd rebuild=23a50a6dd8cd v2=1e60450f7957"
    },
    {
      "check": "nginx-config-valid",
      "passed": true,
      "detail": "nginx: configuration file /Users/gaochao/.cache/software-engineering-study/java-depth-impl/u65/runtime/20261028-183246/nginx/nginx.conf test is successful"
    },
    {
      "check": "nginx-proxy",
      "passed": true,
      "detail": "status=200 body={\"version\":\"1.0.0\",\"capabilities\":[\"deploy\"]}"
    },
    {
      "check": "nginx-timeout-504",
      "passed": true,
      "detail": "slow status=504"
    },
    {
      "check": "readiness-up-before",
      "passed": true,
      "detail": "status=200"
    },
    {
      "check": "readiness-down-liveness-up",
      "passed": true,
      "detail": "readiness=503 liveness=200"
    },
    {
      "check": "readiness-probe-via-nginx-503",
      "passed": true,
      "detail": "via nginx=503"
    },
    {
      "check": "oss-nginx-no-active-check",
      "passed": true,
      "detail": "business still=200 (readiness gate needs orchestrator)"
    },
    {
      "check": "orchestrator-drain-502",
      "passed": true,
      "detail": "drained status=502"
    },
    {
      "check": "readiness-restored",
      "passed": true,
      "detail": "back to 200"
    },
    {
      "check": "orchestrator-restore-200",
      "passed": true,
      "detail": "restored status=200"
    },
    {
      "check": "graceful-shutdown-drains",
      "passed": true,
      "detail": "inflight=200 exit=143 elapsed=1.09s"
    },
    {
      "check": "upstream-down-502",
      "passed": true,
      "detail": "after stop status=502"
    },
    {
      "check": "kill9-resets-connection",
      "passed": true,
      "detail": "kill -9 in-flight=502"
    },
    {
      "check": "deploy-v2-behavior",
      "passed": true,
      "detail": "{\"version\":\"2.0.0\",\"capabilities\":[\"deploy\",\"canary\"]}"
    },
    {
      "check": "rollback-v1-behavior",
      "passed": true,
      "detail": "{\"version\":\"1.0.0\",\"capabilities\":[\"deploy\"]}"
    },
    {
      "check": "app-runs-as-current-user",
      "passed": true,
      "detail": "user=gaochao"
    },
    {
      "check": "secret-not-in-logs",
      "passed": true,
      "detail": "logBytes=134 accessLines=1 tokenPresent=False"
    },
    {
      "check": "secret-not-in-response",
      "passed": true,
      "detail": "response clean"
    },
    {
      "check": "env-endpoint-not-exposed",
      "passed": true,
      "detail": "/actuator/env status=404"
    },
    {
      "check": "dependency-scan-executed",
      "passed": true,
      "detail": "scanned=[('org.apache.tomcat.embed:tomcat-embed-core', '11.0.27'), ('org.springframework.boot:spring-boot', '4.0.9'), ('org.springframework:spring-core', '7.0.10'), ('org.springframework:spring-webmvc', '7.0.10'), ('org.yaml:snakeyaml', '2.5'), ('tools.jackson.core:jackson-databind', '3.1.7')] queryFailures=[]"
    },
    {
      "check": "no-known-vulnerabilities",
      "passed": true,
      "detail": "vulns=[]"
    },
    {
      "check": "docker-image-build",
      "passed": false,
      "blocked": true,
      "reason": "Docker daemon 未运行且用户未授权启动（AGENTS.md）",
      "basis": "OCI image spec / Dockerfile reference；配置推演见正文第五节"
    },
    {
      "check": "docker-container-runtime",
      "passed": false,
      "blocked": true,
      "reason": "同上：容器网络/卷/资源限制/信号与 PID 1 语义未验证",
      "basis": "U14 信号页的容器 stop 推导 + Docker 官方文档；未实跑"
    }
  ],
  "results": [
    {
      "stage": "nginx",
      "signal": "SIGTERM",
      "exitCode": 0
    },
    {
      "stage": "nginx-drained",
      "signal": "SIGTERM",
      "exitCode": 0
    },
    {
      "stage": "app-v1",
      "signal": "SIGTERM",
      "exitCode": 143
    },
    {
      "stage": "nginx-restored",
      "signal": "SIGTERM",
      "exitCode": 0
    },
    {
      "stage": "app-hard",
      "signal": "SIGKILL",
      "exitCode": -9
    },
    {
      "stage": "nginx-hard",
      "signal": "SIGTERM",
      "exitCode": 0
    },
    {
      "stage": "app-v2",
      "signal": "SIGTERM",
      "exitCode": 143
    },
    {
      "stage": "nginx-v2",
      "signal": "SIGTERM",
      "exitCode": 0
    }
  ],
  "nginx": {
    "config": "/Users/gaochao/.cache/software-engineering-study/java-depth-impl/u65/runtime/20261028-183246/nginx/nginx.conf",
    "accessLog": "/Users/gaochao/.cache/software-engineering-study/java-depth-impl/u65/runtime/20261028-183246/nginx/access.log"
  },
  "logs": "/Users/gaochao/.cache/software-engineering-study/java-depth-impl/u65/runtime/20261028-183246",
  "cleanup": {
    "processes": "app/nginx 全部 TERM+wait（kill -9 负例只对临时副本）；nginx -s stop 由 TERM 兜底",
    "nginx": "独立 prefix 与配置，不改系统 nginx；结束后进程退出"
  },
  "limits": [
    "Docker daemon 未运行且用户未授权启动：镜像构建、容器网络/卷/资源限制、容器内信号与 PID 1 语义全部受阻未验证",
    "生产 TLS 终止、Kubernetes、服务网格、生产负载均衡未运行",
    "Nginx 开源版无主动健康检查；实验的摘流是编排器式动作（upstream 标记 down + reload），不是 max_fails 被动检查",
    "OSV 查询结果只反映查询时刻的数据库；不构成供应链审计"
  ]
}
