# Delivery Reconciliation Reporter v0.1.0

Free, manual n8n module. The workflow code and accompanying documentation are licensed under the [MIT License](n8n-delivery-reconciliation-reporter-LICENSE.txt); see [rights and scope notice](n8n-delivery-reconciliation-reporter-NOTICE.md). Screenshots, image fixtures, supplied documents and third-party marks/software retain their separate rights. The premium commercial licence is unchanged.

## Scope

Offline, manual, inactive, credential-free n8n snapshot classifier. It makes no GitHub, deployment, URL, Search Console, model or paid API call. It never writes a branch, retries a delivery, merges, schedules, sends a message or publishes. `retry_allowed` and `release_approved` are always false, including when explicit absence is reported. Unknown is never interpreted as missing.

Output `publication_verified: true` means the supplied snapshot contains consistent exact production-deployment and URL-content assertions. The observations are caller-supplied and unauthenticated: `observations_authenticated: false` is always present. This is not independent live verification. A forged or stale snapshot can lie. Supply a trusted, fresh adapter snapshot and preserve provenance externally before making operational decisions. This module does not implement that adapter.

## Input contract

`content_id` and `request_id`: 1–100 ASCII letters/digits/dot/underscore/hyphen, first character alphanumeric. `slug`: lowercase hyphen-separated ASCII words, maximum 180 characters. `source_sha256`: 64 lowercase hex characters. `receipt`: null only for explicit absence, otherwise an object containing `content_id`, `slug`, `request_id`, `branch: editorial/auto-{slug}`, `article_sha256` matching source_sha256, `delivered_markdown_sha256`, and state (`awaiting_merge`, `partial_delivery`, `review_closed`, `merged`, `published`). Optional receipt `pr_number` must agree with observations.

`observed` requires matching content_id, slug, request_id, source_sha256 and branch; explicit `read_error: false`; branch_exists (boolean or unknown), pr_state (none/open/closed/unknown), and pr_merged (boolean or unknown). A PR requires an integer pr_number (1–1,000,000,000). A merged PR requires pr_state closed and a 40-character lowercase hex merge_commit_sha. A branch can legitimately disappear after merge.

Publication proof additionally requires expected_production_url (clean HTTPS URL, maximum 500 characters); deployment object with status success, deployment_id, environment production, commit_sha equal to the exact merge commit, source_sha256, content_id, slug and matching production_url; production_url object with the same url/deployment_id/commit_sha/source_sha256/content_id/slug, receipt-matching delivered_markdown_sha256, http_status 200 and content_matches true. Missing or contradictory proof does not yield published. No URL is fetched. Metadata-only HTTP 200 does not prove content, deployment or indexing.

The production WF07 receipt lacks this full reporter identity envelope. A future reviewed read-only adapter must attach independently observed IDs and source associations; do not invent them to make validation pass. Snapshot freshness/authenticity, branch contents and deployment provenance remain adapter responsibilities.

## States and recovery

- Open unmerged PR: awaiting_review / review_existing_pr
- Existing branch without PR: partial_delivery / inspect_branch_manually
- Closed unmerged PR: review_closed / review_closed_pr_manually (the fictional closed case mirrors the shape of PR52, not a live observation)
- Merged without exact successful deployment + URL proof: merged_unverified
- Exact supplied production proof: published, indexing still unknown
- Read failure, missing identity, contradictory receipt or uncertain observation: unknown / reconcile_evidence_manually
- Explicit successful absence snapshot, null receipt, no PR/commit/deployment: missing / confirm_delivery_plan_manually

Do not delete branches or retry paid generation automatically. Reconcile receipt and observations manually and rerun with a fresh trusted snapshot. Caller-supplied indexing fields are ignored; this module always reports indexing unknown. Google states that recrawl requests do not guarantee indexing: https://developers.google.com/search/docs/crawling-indexing/ask-google-to-recrawl

## Demonstration

Import into a new inactive workflow. The fictional input returns awaiting_review. Change receipt.slug to another-demo: expect unknown and retry_allowed false. Restore demo-article: awaiting_review returns. The export contains no pinned execution data, real IDs, credentials or private URL.

Check timezone and execution-data retention after import. The fresh n8n 2.41.4 import retained default Etc/UTC and Default Save for failed, successful and manual executions despite the source JSON. Source settings are not runtime readback proof; no full settings/export roundtrip is claimed. Avoid private input until settings are explicitly reviewed.

A fresh isolated import on n8n 2.41.4 passed the valid, mismatched-receipt negative and restored cases on 30 September 2026. The fictional input was saved, reloaded and compared exactly with the canonical fixture before the final recovery run. No production workflow was changed. Exact evidence is in docs/delivery-package-candidates-2026-09-30.json. Local checks: `node --test automation/editorial/delivery-reconciliation.test.cjs automation/editorial/delivery-package-packages.test.cjs`.

n8n export/import reference: https://docs.n8n.io/build/manage-workflows/export-and-import
GitHub PR semantics reference: https://docs.github.com/en/rest/pulls/pulls

This module is publicly downloadable. Its licence does not authorize publishing supplied content or sharing credentials. Complete the separately required editorial, rights, security and release reviews for any package you process.
