Factory docs, home

A record from the Factory repository, docs/marketing-workflow-job-correction-r2-draft.json, shown exactly as committed. Every hash, date and count is as recorded. The build review says what the Factory's receipts support.

{
  "schema": "software-factory-marketing-workflow-job-correction-draft/1",
  "disposition": "corrected-awaiting-independent-source-review",
  "packet": "W2-08-MARKETING-2 (W33 step 2), review round 2",
  "supersedes": "docs/marketing-workflow-job-correction-draft.json for the files listed here; that draft and docs/marketing-workflow-job-draft.json are kept unchanged",
  "implementer": "Opus 5.5 (Claude Code); not an independent review",
  "source": {
    "reviewed": "faa1061",
    "branch": "claude/w2-08-marketing-2",
    "commit": "the commit that adds this file"
  },
  "findings": [
    {
      "finding": "P1: a drafter reply holding a rejected native Promise (for example {template: Promise.reject(...)}) was refused as not-plain-json without observing the rejection, so Node exited 1 under --unhandled-rejections=strict",
      "fix": "src/promise-observation.ts holds one bounded observation helper (issue #58; the Operational signal intake's bounded walker with #58's settlement observation), and the job passes every value a caller port hands it through it first: a reply, a fulfilled or late reply, a rejection reason, a thrown value, a clock reading and a Journal error. A strict-mode subprocess test runs nine such cases and exits 0",
      "notFixed": "the throwing-constructor branch: a native Promise whose constructor lookup throws cannot have a reaction attached by any part of ECMAScript (then, await, Promise.resolve, resolve functions and the combinators all perform the species or constructor lookup first), so its rejection stays unhandled unless the job mutated the drafter's object, which it does not; the call is still settled unknown/threw. Documented as a limit, with the drafter being in-process code that can always leave its own rejection unhandled"
    },
    {
      "finding": "P2: refusal records could overflow the Journal's 1 MiB state limit despite a valid Budget (64 blocks of uncited figures failed on call 22 and left the call dispatched)",
      "fix": "before a settlement is written, the job record holding it, with room for the largest text-free record in every undecided block, the largest debits and a pack digest, must fit the limit; otherwise the result is recorded whole as invalid/over-limit at its measured size, without text or refusals. Regression: the 64-block case completes with 21 refused and 43 over-limit blocks"
    },
    {
      "finding": "P2: a well-formed timestamp naming no real instant (month 13, hour 25) from the clock or in a stored record raised a raw RangeError",
      "fix": "instantOk checks that parsing yields a finite instant before formatting: INVALID/clock from the clock, CORRUPT/shape when stored; a first start whose deadline would pass year 9999 is INVALID/clock and writes nothing"
    },
    {
      "finding": "P2: the reference and source comments claimed that deadline expiry proves no live call remains",
      "fix": "the agent reference, the guide, and the source comments now say cancellation is cooperative and a call settled unknown may still be running; a regression test shows a drafter that ignores its signal running on after the job completes, its late reply writing nothing and never used"
    }
  ],
  "closure": "promise-observation.ts (node:util only) joins the Marketing job runtime closure and the marketing-workflow Intelligence declaration; test/module-graph.test.ts pins both",
  "files": {
    "docs/agents/marketing-workflow.md": "8f443aa19c6cbca7ee24753643956e530cb876fcea6c04d388330500e63d1538",
    "docs/build-review.md": "c78bf27f3f813c7c0445448c20dc3a70785f36ab4c3c5255d3b73e16870ba6d8",
    "docs/guide/marketing-workflow.md": "c0d77cd9ce18c2175e884e0ca348bc46f4f83ed035ced8db856ef23ebe9260b7",
    "docs/implementation-packets.md": "603b31290d2bbad38065df93f0678a143c7907831a426568378de788a67efd38",
    "src/intelligence.ts": "440d5f8aa70f36e340f0e543733d2715649c02e892d8b47920fb88425ed954ba",
    "src/marketing-job.ts": "60e35dde53d6829cefad53e27c9bf1d382d00bf02681c0b93fa02e9de72b89f9",
    "src/promise-observation.ts": "c3bb981217e8caf80cdd12138b00c1559a0f45de3daf00484e0db367ffbf15c1",
    "test/fixtures/marketing-job-strict.ts": "547fb72519632382d2e3e7695ee28e511752b4df13695cc6bfbc676bc4b870e5",
    "test/marketing-job.test.ts": "3fe6a0539f3a34e43be16ec58f20f14e475eeb472dd85f1470bc6f782c000f2f",
    "test/module-graph.test.ts": "ecd7173586541fb9ba77401a2022081a058589a9f30cefa7bd2b757d13b041f2",
    "test/promise-observation.test.ts": "616e3044fe30814e894ee42fa006e3aa1e1a9f93b4c1fba6a942f26b90024428"
  },
  "environment": {
    "node": "v26.8.1",
    "platform": "darwin",
    "architecture": "arm64"
  },
  "checks": [
    {
      "command": "npm run typecheck",
      "result": "pass"
    },
    {
      "command": "node --test test/marketing-job.test.ts test/promise-observation.test.ts",
      "result": "24 of 24 pass; the strict-mode, record-size and timestamp regression tests each fail against the reviewed revision faa1061 of src/ (restored from git into a scratch tree); the cooperative-cancellation test documents behaviour and passes on both"
    },
    {
      "command": "node --test test/marketing-job.test.ts test/promise-observation.test.ts test/marketing-workflow.test.ts test/module-graph.test.ts test/delivery-boundaries.test.ts test/intelligence.test.ts test/intelligence-lifecycle.test.ts test/observability-catalogue.test.ts test/documentation.test.ts test/docs-site.test.ts test/design-tokens.test.ts test/readability.test.ts test/style-lint.test.ts test/receipt-check.test.ts test/website.test.ts",
      "result": "281 of 281 pass"
    },
    {
      "command": "rm -rf site && npm run docs",
      "result": "site/ regenerated and committed"
    }
  ],
  "notRun": [
    "npm run check (full suite; shared-machine rule: coordinator only)",
    "test/distribution.test.ts (shared-machine rule)"
  ],
  "notEstablished": [
    "independent source review of the corrected revision",
    "coordinator integration and full checks",
    "acceptance",
    "observation of a native Promise whose constructor lookup throws (not possible without mutating the drafter's object)",
    "observation beyond 64 levels or 16,384 steps",
    "that a drafter has stopped once its call is settled unknown (cancellation is cooperative)",
    "moving the other modules' Promise walkers onto the shared helper (issue #58, whose open correction edits those files)",
    "a live model drafter or any provider call",
    "publication adapter (W33 step 3)",
    "installed external consumer",
    "E33 or E21 acceptance"
  ]
}

Source: docs/marketing-workflow-job-correction-r2-draft.json