{
  "kind": "preregistered-controlled-workflow-checks",
  "registeredAt": "2026-11-01T14:02:52.614964+00:00",
  "scope": "Original constructed files,real local code execution; not live accounts,readers,customers or new formal research-piece credit.",
  "join": {
    "sourceUnit": "one post in one account/observation context",
    "posts": [
      {
        "post_id": "P01",
        "impressions": 100,
        "response_events": 5,
        "age_hours": 24
      },
      {
        "post_id": "P02",
        "impressions": 200,
        "response_events": 10,
        "age_hours": 24
      },
      {
        "post_id": "P03",
        "impressions": 0,
        "response_events": 0,
        "age_hours": 24
      }
    ],
    "tags": [
      {
        "post_id": "P01",
        "tag": "A"
      },
      {
        "post_id": "P01",
        "tag": "B"
      },
      {
        "post_id": "P02",
        "tag": "A"
      }
    ],
    "expected": {
      "sourceRows": 3,
      "sourceImpressions": 300,
      "sourceResponseEvents": 15,
      "leftJoinRows": 4,
      "naiveJoinedImpressions": 400,
      "naiveJoinedResponseEvents": 20,
      "distinctPostKeys": 3,
      "unmatchedPostKeys": [
        "P03"
      ],
      "tagATotal": 300,
      "tagBTotal": 100
    },
    "extraChecks": [
      "Duplicate post keys fail a declared one-row-per-post contract.",
      "Missing/blank keys are rejected rather than matched by name.",
      "Scope-mismatched account/period keys do not match.",
      "An inner join drops P03;zero impressions and absent tag remain different."
    ]
  },
  "restore": {
    "intendedVersion": "V2",
    "requiredFiles": [
      "draft.md",
      "metrics.csv",
      "chart-brief.json",
      "sources/source-note.md",
      "README.md"
    ],
    "expectedCsvHeader": [
      "post_id",
      "impressions",
      "age_hours"
    ],
    "originals": "All UTF-8 source material authored for this exercise;never restore into a real working folder.",
    "plannedCases": [
      {
        "id": "A",
        "change": "Exact complete V2",
        "expectManifestBytes": true,
        "expectTaskReady": true
      },
      {
        "id": "B",
        "change": "Complete V1 with internally matching manifest",
        "expectManifestBytes": true,
        "expectTaskReady": false
      },
      {
        "id": "C",
        "change": "Declared metrics.csv missing from archive",
        "expectManifestBytes": false,
        "expectTaskReady": false
      },
      {
        "id": "D",
        "change": "metrics.csv bytes differ from its manifest",
        "expectManifestBytes": false,
        "expectTaskReady": false
      },
      {
        "id": "E",
        "change": "Needed source-note omitted from both archive and manifest",
        "expectManifestBytes": true,
        "expectTaskReady": false
      },
      {
        "id": "F",
        "change": "CSV headers wrong but manifest matches those bytes",
        "expectManifestBytes": true,
        "expectTaskReady": false
      },
      {
        "id": "G",
        "change": "Proposed destination already contains an owned working marker",
        "expectRestoreExecuted": false,
        "expectExistingMarkerPreserved": true
      }
    ],
    "denominator": "Six archive cases A\u2013F with actual separate-target copies;G is a separate destination guard with no extraction. Report every planned case,including failed/unexecuted outcomes.",
    "taskGate": "Declared bytes pass AND intended version matches AND required dependency list is present AND original draft/text and expected CSV/header/row meanings can actually be read. This gate does not certify truth,rights,security,professional application compatibility or reader success."
  },
  "noOutcomeChangesOrPaidServices": true,
  "noRealReaderOrCustomerInference": true
}
