{
  "title": "M6 R3.1 四工作流队列积压观测与长历史访问路径",
  "recordedAt": "2026-11-03T03:36:15.987194+00:00",
  "fagoCommit": "a65e02a84a88162664ed5a3109d43c9ba70c5417",
  "schemaVersion": 48,
  "changes": [
    "public trusted-only core snapshot returning fixed queue/state numeric aggregates",
    "all workflow queues join existing app read-only consistent snapshot and three-second total deadline",
    "MySQL fixed catalog-first join plus existing index binding avoids completed-history scan; no new migration/index/dependency",
    "late SQL failure retains previous whole snapshot; scrape remains memory-only; actual cmd/api metrics listener verified"
  ],
  "queues": {
    "workflow_commands": [
      "pending",
      "leased",
      "dead"
    ],
    "workflow_ready": [
      "pending",
      "leased",
      "blocked",
      "dead"
    ],
    "workflow_timers": [
      "pending",
      "leased",
      "dead"
    ],
    "workflow_external": [
      "pending",
      "leased",
      "dead"
    ]
  },
  "semantics": [
    "fixed13 queries independent of instance count; zero samples retained",
    "due=max(schedule,lease_until), only pending/leased",
    "timer schedule=ready_at, not immutable due_at",
    "ready blocked only diagnostic total, not ready due/retry",
    "retry_waiting=pending with attempts>0, whether now due or future",
    "dead visible but never counted automatically claimable",
    "command acceptance age uses original created_at",
    "no tenant/runtime/job/actor/body/lease labels"
  ],
  "testBoundary": "Real forms/definitions/start create real FK-bound jobs; metadata injected only for observation boundaries, not natural execution/recovery certification. Actual cmd/api metrics port uses a prepared pending start and no worker dispatch.",
  "databaseMatrix": {
    "mysql": {
      "result": ".cache/m6-r31/integration-20261103T032934Z/mysql-result.json",
      "applicationFilter": "^TestIntegrationWorkflowBacklog|^TestIntegrationBackgroundMetrics",
      "status": "passed",
      "cleanup": true,
      "applicationTopLevelPassed": 7,
      "stateSubtestsPassed": 4,
      "migrationTopLevelPassed": 18,
      "race": true,
      "actualAPIProcessMetricsPort": true
    },
    "postgres": {
      "result": ".cache/m6-r31/integration-20261103T033150Z/postgres-result.json",
      "applicationFilter": "^TestIntegrationWorkflowBacklog|^TestIntegrationBackgroundMetrics",
      "status": "passed",
      "cleanup": true,
      "applicationTopLevelPassed": 7,
      "stateSubtestsPassed": 4,
      "migrationTopLevelPassed": 18,
      "race": true,
      "actualAPIProcessMetricsPort": true
    }
  },
  "measurement": {
    "mysql": {
      "syntheticCompletedHistory": 20000,
      "firstSnapshotMs": 8.458,
      "planCost": 1,
      "planCostUnit": "actual job iterator rows",
      "index": "ix_wfcjob_due",
      "queriesPerSnapshot": 13,
      "warmRounds": 20,
      "p50Ms": 7.526,
      "p95Ms": 8.236,
      "sameDataUnhintedActualRows": 20001,
      "sameDataHintedActualRows": 1
    },
    "postgres": {
      "syntheticCompletedHistory": 20000,
      "firstSnapshotMs": 11.848,
      "planCost": 5,
      "planCostUnit": "actual shared buffer accesses",
      "index": "ix_wfcjob_due",
      "queriesPerSnapshot": 13,
      "warmRounds": 20,
      "p50Ms": 5.284,
      "p95Ms": 6.863
    }
  },
  "environment": {
    "go": "go1.27.3",
    "os": "darwin",
    "arch": "arm64",
    "logicalCPUs": 10,
    "hostSample": "queried after final serial database runs; no machine/user identity recorded",
    "GOMAXPROCS": "not separately captured inside test process",
    "race": true,
    "databaseImages": {
      "mysql": "mysql:8.4.13",
      "postgres": "postgres:16.6"
    },
    "method": "drivers measured serially after workspace/independent tools completed; SQL read-only aggregate only;20 warm rounds; shared local host/Docker; no production SLA or HTTP/worker throughput claim"
  },
  "checks": {
    "workspace": "26 modules race/vet passed; default linker; integration disabled here",
    "independent": "workflow-core/server full-package GOWORKoff race passed; fresh cache/source copies, default linker and checksum verification retained",
    "moduleBoundaries": "28 metadata modules explicit requires/DAG/internal passed;26 workspace modules",
    "style": "gofmt/new-file120-character/4-or-more-argument AST/diff checks passed",
    "review": "self-review; no new agent review claimed",
    "golangciLint": "not installed; not claimed passed",
    "frontendContractDM": "unchanged and not rerun; no new certification"
  },
  "failedAndDiagnosticRuns": [
    {
      "directory": ".cache/m6-r31/integration-20261103T031544Z",
      "reason": "four states passed; late failure injection checked SQL before builder; corrected to fixed join metadata",
      "results": [
        {
          "driver": "postgres",
          "status": "failed",
          "cleanup": true
        }
      ]
    },
    {
      "directory": ".cache/m6-r31/integration-20261103T031745Z",
      "reason": "Postgres late-failure diagnostic passed; not final matrix",
      "results": [
        {
          "driver": "postgres",
          "status": "passed",
          "cleanup": true
        }
      ]
    },
    {
      "directory": ".cache/m6-r31/integration-20261103T031821Z",
      "reason": "initial dual diagnostics: Postgres history plan/state/legacy tests passed; MySQL full scan revealed",
      "results": [
        {
          "driver": "mysql",
          "status": "failed",
          "cleanup": true
        },
        {
          "driver": "postgres",
          "status": "passed",
          "cleanup": true
        }
      ]
    },
    {
      "directory": ".cache/m6-r31/integration-20261103T032019Z",
      "reason": "MySQL plain join estimated19723 rows; actual dispatch index not chosen",
      "results": [
        {
          "driver": "mysql",
          "status": "failed",
          "cleanup": true
        }
      ]
    },
    {
      "directory": ".cache/m6-r31/integration-20261103T032123Z",
      "reason": "join-order-only constraint still full scan",
      "results": [
        {
          "driver": "mysql",
          "status": "failed",
          "cleanup": true
        }
      ]
    },
    {
      "directory": ".cache/m6-r31/integration-20261103T032250Z",
      "reason": "diagnostic confirmed ordered join and available dispatch index but full scan remained",
      "results": [
        {
          "driver": "mysql",
          "status": "failed",
          "cleanup": true
        }
      ]
    },
    {
      "directory": ".cache/m6-r31/integration-20261103T032407Z",
      "reason": "index binding selected ref; estimated19723 rows still misleading; changed verification to actual ANALYZE",
      "results": [
        {
          "driver": "mysql",
          "status": "failed",
          "cleanup": true
        }
      ]
    },
    {
      "directory": ".cache/m6-r31/integration-20261103T032504Z",
      "reason": "MySQL actual unhinted20001 versus hinted1; final full/serial matrix recorded separately",
      "results": [
        {
          "driver": "mysql",
          "status": "passed",
          "cleanup": true
        }
      ]
    }
  ],
  "limitations": [
    "actual long completed history plan measured for command queue only; other queues have real state/transaction/port coverage, not same long-history scale proof",
    "synthetic20000 completed rows are not20000 real executions",
    "race-enabled snapshot20-round p95 is not production latency, throughput, maximum capacity or a statistically tested speedup",
    "end-to-end backlog/lockwait/recovery/capacity baseline and full W01-W12 audit remain",
    "browser product/docs acceptance pending; no new DM/seven-database/production certification"
  ],
  "references": [
    "https://dev.mysql.com/doc/refman/8.4/en/join.html",
    "https://dev.mysql.com/doc/refman/8.4/en/explain.html",
    "https://docs.oracle.com/cd/E17952_01/mysql-8.4-en/index-hints.html"
  ],
  "logs": [
    {
      "path": ".cache/m6-r31/workflow-backlog-mysql-release.log",
      "sha256": "9c6680766193b0a8744314d5d9de438d3c5bed440f37b1c00394fd49769da9ba"
    },
    {
      "path": ".cache/m6-r31/workflow-backlog-postgres-release.log",
      "sha256": "cb47f0227a80a70c02503eb92b7de743a15ead875ed9a00bb30db1fb71e4ac11"
    },
    {
      "path": ".cache/m6-r31/workflow-backlog-workspace-release.log",
      "sha256": "9db5a8ac17fb1d71748480f831ca515455780faa62fcd03f83cefa37c443959e"
    },
    {
      "path": ".cache/m6-r31/workflow-backlog-independent-release.log",
      "sha256": "218cbb48aef5ccd24a6df0705f5c617e2cbf8249779d10fd2bd6ad59a26d8a91"
    },
    {
      "path": ".cache/m6-r31/workflow-backlog-modules.log",
      "sha256": "8afe1703dadeefd6535ed863a7416cf0ceef22315318c5303f1803ee139c5b90"
    },
    {
      "path": ".cache/m6-r31/workflow-backlog-style.log",
      "sha256": "4caadc32e73d5a6a55adc6f253acf0bb5a50fbe404a914ea2df7b406e18b4b58"
    }
  ],
  "privacy": "Only fixed queue/state/counts and scope/plan-cost/timing/log digests published; no raw SQL/plan, business payloads, credentials, job/process identities or original Redis/environment recovery materials."
}
