{
  "date": "2026-11-03",
  "scope": "M6 R3.1 / W11 participant history and original resource reads",
  "schemaVersion": 45,
  "status": "backend increment validated; R3.1 active",
  "contracts": {
    "historyPermission": "workflow:history:read",
    "resourcePermission": "bpm:form:history-read",
    "readContract": "workflow-original-resource-v1",
    "formContract": "scalar-form-original-v1",
    "legacyExecutionManifests": "unchanged; no compile/execution capability added",
    "originalMeaning": "immutable original submitted content rendered with original schema and original node readFields; never current variables, final outcome, latest draft or complete node-time input snapshot"
  },
  "authorization": {
    "initiator": "participant metadata and private instance entries; full own original submission only after resource owner/purpose/current permission checks",
    "pastMetadataActor": "actual decisions or claim/transfer/delegate/return; excludes candidate/assignment reception/reassign/ready/cancelled",
    "currentParticipant": "explicit complete activation/task/version; current history and task permissions in same snapshot plus original source/current qualification; no Resolve expansion; coarse assignee/delegator/original single-candidate check before model/version; eligible before conflict; preauthorization restoration diagnosis normalized then denied403",
    "privateEntry": "initiator or original entry actor; ownership constrained before reading private SQL columns",
    "originalTaskBody": "exact actor and recorded decision/return task version only, original node readFields, independent current form history permission",
    "manager": "metadata permission and global form/history roles alone do not establish participation or body access",
    "accountSource": "current existing system/SSO/session/auth-mode guard; no Actor/header/tenant synthesis"
  },
  "implementation": [
    "independent history service has no current kernel/catalog/bundle dependency",
    "stored definition/instance/runtime manifest digests verified; known pure historical compiler restores original node only",
    "metadata query/timeline in one repeatable-read read-only transaction",
    "each of execution/decision/task source <=51 rows, bounded merge =>50, canonical tenant/instance/time/source/id cursor",
    "original body read uses current identity transaction and short-lived tx+call digest permit; success/error/panic invalidate permit",
    "resource original/purpose/form version binding and schema/value digest verified; body projected before encoding",
    "two-domain no-body read audit atomic; repeated requestID reauthorizes rather than replays body receipt",
    "no slot/grant/current draft/variable/outcome restoration or instance/task version advancement",
    "current-participant coarse scope checked before stored definition interpretation; restoration diagnostics opaque until complete qualification",
    "raw ORM missing-record error normalized before deciding availability; final not-found diagnosis becomes403 in current preauthorization branch",
    "workspace use modules explicitly map own v0.1.0 metadata to source; no third-party or private go.sum changes; independent GOWORK=off unaffected"
  ],
  "http": {
    "base": "/api/admin/v1/workflow/participant-instances/:id",
    "get": [
      "",
      "/history?before",
      "/history/decision|task/:entry",
      "/original",
      "/activations/:activation/tasks/:task/original?taskVersion"
    ],
    "currentScopeQueries": [
      "activationId",
      "taskId",
      "taskVersion"
    ],
    "protocols": [
      "plain",
      "rsa-aes",
      "sm2-sm4"
    ],
    "proof": "real HTTP current-to-past flow, own private opinion, projected original amount10 after output20, full original for initiator, cross-tenant404 and malformed/empty/duplicate scope400002"
  },
  "databaseMatrix": {
    "mysql": {
      "directory": ".cache/m6-r31/integration-20261102T180820Z",
      "applicationPassed": 8,
      "migrationPassed": 15,
      "race": true,
      "cleanup": true,
      "applicationFilter": "^TestIntegrationWorkflow(ParticipantHistory$|History|APIHTTP$)",
      "scope": "8-case baseline after coarse scope/order guard; before final restoration-diagnostic normalization"
    },
    "postgres": {
      "directory": ".cache/m6-r31/integration-20261102T180923Z",
      "applicationPassed": 8,
      "migrationPassed": 15,
      "race": true,
      "cleanup": true,
      "applicationFilter": "^TestIntegrationWorkflow(ParticipantHistory$|History|APIHTTP$)",
      "scope": "8-case baseline after coarse scope/order guard; before final restoration-diagnostic normalization"
    }
  },
  "tests": [
    "TestIntegrationWorkflowParticipantHistory",
    "TestIntegrationWorkflowHistoryCurrentQualification",
    "TestIntegrationWorkflowHistoryTransferDelegate",
    "TestIntegrationWorkflowHistoryLegacyFields",
    "TestIntegrationWorkflowHistoryPaging",
    "TestIntegrationWorkflowHistoryTimelineIndex",
    "TestIntegrationWorkflowHistoryFailures",
    "TestIntegrationWorkflowAPIHTTP",
    "TestIntegrationWorkflowParticipantHistoryUpgrade"
  ],
  "queryProof": {
    "smallAnd50RowHistorySQL": 3,
    "realTransferCount": 55,
    "sameTimestampBoundary": "fixture timestamps deliberately equal; merged source/id pairs complete and unique",
    "privateColumnsExcludedFromTimeline": [
      "values_json",
      "opinion_text",
      "reason_text",
      "work_id",
      "work_fence"
    ],
    "indexSchema": "five additive indexes: three instance/time/id and two participant indexes",
    "syntheticLifecycleRows": 10000,
    "mysql": {
      "metric": "EXPLAIN ANALYZE leaf actual rows",
      "before": 10003,
      "after": 51,
      "index": "ix_wfe_timeline"
    },
    "postgres": {
      "metric": "EXPLAIN ANALYZE actual shared hit+read blocks",
      "before": 268,
      "after": 6,
      "index": "ix_wfe_timeline"
    },
    "limits": "ID/time access path only; not full metadata fetch, merged HTTP latency, production p95, index-build window or capacity"
  },
  "failureProof": [
    "current role source revoked while preserving task/history permission rejects",
    "later member cannot inherit original task",
    "transfer metadata participation does not grant original body",
    "delegation return uses exact after-return recorded version; wrong version rejects",
    "legacy compiler-v3 lacks ReadFields => processor original body409003",
    "finished workflow grant/slot stay empty after historical reads",
    "real drain/admission-disable/retire then freshly built standalone reader reads original without old bundle; no cross-process rolling claim",
    "revoked original session returns401002 and zero body",
    "resource history permission removed with old context retained =>403 and zero body",
    "two audit failure points roll back both domains and return zero body",
    "modified callback fields rejected; escaped callback permit invalid after success/failure",
    "corrupt stored output outside node outputs returns500 and no partial opinion/values",
    "all/single unrelated stale task and corrupt definition =>404",
    "valid current stale version =>409001 only after full qualification",
    "original role source revoked: healthy/corrupt model/corrupt manifest/injected missing restoration record all403",
    "raw gorm.ErrRecordNotFound unit maps403 before exposing normalized not-found"
  ],
  "checks": {
    "workspace26RaceVet": "passed FINAL source and explicit workspace development metadata mapping",
    "independent26FreshCache": "initial complete fresh-cache26 baseline passed; FINAL26 GOWORK=off passed with local fago module cache rebuilt and locked external cache reused",
    "nilness5ChangedModules": "passed five modules; final diagnostic normalization additionally core race/vet and module-wide workspace checks",
    "goCallStyle": "gofmt and AST checks passed; >=4 arguments each own line",
    "golangciLint": "not installed/not run",
    "dm": "actual API/worker + migration build/unit passed; no DM real database",
    "docs": "61-page sync/check/build/check passed; 8 generated HTML pages/new sections/linked anchors/four books/evidence source-public-dist equality verified; browser disabled",
    "browser": "disabled by Work settings; no browser or real Vben page acceptance",
    "coreFinalRaceVet": "passed including raw missing-record diagnostic regression"
  },
  "readonlyReview": "source review found version/model diagnosis distinctions and raw ORM fallback classification; both fixed and re-reviewed, no confirmed remaining diagnosis/qualification bypass; review is not execution proof",
  "logSHA256": {
    "history-core-unit.log": "a37b54bee6656adacdc03476b19a7095a2944db79c08753e78ce3548f3efcf0c",
    "history-workspace.log": "df6aded7636b4c08b170ca5ade9ae32075cdb2852c2a106d31d6e1df7e70d314",
    "history-independent.log": "95b231ddbfec7ffd3247d13ed6f78ebde5b6f572527c9a7f0966e1a079535eed",
    "history-nilness.log": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
    "history-app-final.log": "ad83a44317fcd81be1ba8fd538fba4ec6ace5c5aa08caadc9c493e47f07bb74e",
    "history-dm.log": "5874ac1c4b126292041dbc02dc6896fde27da10f3cc1e0eb26dc7ca1ec05a237",
    "history-workspace-release.log": "3c74324d0d5c6976815876a75c89e4d31123a550fb3788ced3b0e9f0f262a2ad",
    "history-independent-release.log": "e79116a008a5c69db514ec73c10320378b36cc8d00fba63a3feb60dffd61e136",
    "history-nilness-release.log": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
    "history-dm-release.log": "66639f1a0277c2fdffb40fb7ffbea40b71e0a8d0dc89f362e350ce9767ed672c",
    "history-core-final.log": "ee78a708a653f0e26c0528edd9b520326000d3f1743a1e7c0b1b93ff78aeeb91"
  },
  "failureHistory": [
    {
      "directory": "integration-20261102T171144Z",
      "issue": "test used same action name from execution source as private task entry; corrected source/id selection",
      "cleanup": true
    },
    {
      "directory": "integration-20261102T171426Z",
      "issue": "same source-selection test plus invalid LIMIT cost expectation using MySQL estimate",
      "cleanup": true
    },
    {
      "directory": "integration-20261102T171834Z",
      "issue": "MySQL ordinary EXPLAIN estimated4791/4984 with chosen index does not measure LIMIT early-stop; replaced by actual leaf scan measurement",
      "cleanup": true
    },
    {
      "directory": "integration-20261102T175931Z",
      "issue": "workspace cached development metadata conflicted with old private go.mod checksum pins after local cache rebuild; no application cases passed; exact workspace replacements fixed graph source",
      "cleanup": true
    },
    {
      "log": "history-workspace-complete.log / history-independent-complete.log",
      "issue": "new mapper unit used []int for contracts.Code; corrected explicit type; final26 checks passed"
    }
  ],
  "environment": {
    "dedicatedTestResources": "all cleaned",
    "originalServices": "Postgres/Redis healthy and RustFS running; original stopped fagoM0 services remain stopped; no original restart by this increment",
    "redisOriginalBackup": "retained; never read into or published in evidence",
    "reclaimedRebuildableOnly": {
      "stoppedM4M5TestExecutables": 64,
      "executableBytes": 1467320928,
      "ownedEphemeralGoCacheObjects": 1310,
      "cacheBytes": 1165768709,
      "scope": "exact known test binary names/Mach-O magic and no matching running process; cache objects contain owned temporary verification path; no broad shared-cache prune"
    },
    "cacheRecovery": "Only task-local fago module cache rebuilt; explicit workspace replacements prevent stale metadata graph. go.sum untouched; external dependency verification retained."
  },
  "remainingFullScope": [
    "actual Vben approval center and menus",
    "personal non-vote activity inbox for claim/transfer/delegate/return; per-instance actions already in timeline",
    "W08 other accepted command kinds",
    "W07 other resources",
    "full W10/W12 rolling/backlog/lockwait/recovery/capacity and combined acceptance",
    "production/DM real database and vendor remote certification remain unproven"
  ],
  "fagoCommit": "73b3afa4ee2868b0e8dcf867847f204b9014076d",
  "finalDiagnosticMatrix": {
    "mysql": {
      "directory": ".cache/m6-r31/integration-20261102T182314Z",
      "applicationPassed": 2,
      "migrationPassed": 15,
      "cleanup": true,
      "race": true,
      "scope": "FINAL current qualification all/single + actual three-protocol APIHTTP. Overlaps baseline; not additive."
    },
    "postgres": {
      "directory": ".cache/m6-r31/integration-20261102T182119Z",
      "applicationPassed": 2,
      "migrationPassed": 15,
      "cleanup": true,
      "race": true,
      "scope": "FINAL current qualification all/single + actual three-protocol APIHTTP. Overlaps baseline; not additive."
    }
  }
}
