{
  "version": "riddle-proof.profile.v1",
  "name": "neon-step-sequencer-ratchet-loop-approved-candidate-from-review-packet",
  "target": {
    "route": "/games/drum-sequencer?song=monkberry-moon-delight-tab&mix=profile&view=trainer&instrument=bass",
    "viewports": [
      {
        "name": "desktop",
        "width": 1440,
        "height": 1000
      }
    ],
    "auth": "none",
    "timeout_sec": 360,
    "wait_for_selector": ".drum-sequencer h1",
    "setup_actions": [
      {
        "type": "window_eval",
        "force": false,
        "label": "capture-neon-contract",
        "script": "const contract=window.__NEON_MIX_PROOF__; const diagnostic=contract?.captureDiagnostic?.(); window.__neonMixProof={...(window.__neonMixProof||{}),contract:{available:Boolean(contract),diagnostic}}; return window.__neonMixProof.contract;",
        "store_return_to": "__neonMixProof.contract",
        "return_summary_fields": [
          {
            "path": "available"
          },
          {
            "path": "diagnostic.selectedSong.selectedSong"
          }
        ],
        "timeout_ms": 10000,
        "reload": false,
        "optional": false,
        "continue_on_failure": false
      },
      {
        "type": "assert_window_value",
        "force": false,
        "path": "__neonMixProof.contract.available",
        "until_expected_value": true,
        "expected_value": true,
        "timeout_ms": 10000,
        "reload": false,
        "optional": false,
        "continue_on_failure": false
      },
      {
        "type": "window_call",
        "force": false,
        "label": "apply-approved-claim-candidate",
        "path": "__NEON_MIX_PROOF__.runRatchetLoop",
        "args": [
          {
            "intent": "apply reviewed candidate: guitar -0.05",
            "strategy": "mix-level-search",
            "focusTracks": [
              "guitar"
            ],
            "maxIterations": 1,
            "monitorProfile": "smallSpeaker",
            "sectionHeuristics": {
              "enabled": true,
              "loudnessStyle": "rms_dbfs_estimate",
              "requiredRmsFloor": 0.0005,
              "requiredPeakFloor": 0.001,
              "requiredTotalEnergyFloor": 0.000001,
              "minHeadroomDb": 0.5
            },
            "restore": true,
            "applyBest": true,
            "approval": {
              "mode": "mixing_canon_surrogate",
              "approvedBy": "codex",
              "basis": "Conservative mixing-canon development surrogate: review candidate guitar -0.05 sets guitar from 0.6 to 0.55 with absolute level delta <= 0.12 after objective receipts, section-energy guardrails, clipping/headroom/low-level checks, and state-restoration checks passed. This keeps development moving and still requires listening review before treating the result as a subjective mix preference."
            },
            "candidates": [
              {
                "track": "guitar",
                "from": 0.6,
                "value": 0.55,
                "label": "guitar -0.05",
                "claim": "Apply the reviewed guitar level candidate from 0.60 to 0.55 and verify it still preserves Neon proof invariants.",
                "expectedReceipts": [
                  "mixer_edit_accepted",
                  "contract_mixer_level_reflects_action",
                  "rendered_target_metric_changed",
                  "required_instruments_preserved",
                  "no_clipping",
                  "no_low_level_proof_window"
                ],
                "metadata": {
                  "delta": -0.05
                }
              }
            ]
          }
        ],
        "store_return_to": "__neonMixProof.approvedCandidateLoop",
        "return_summary_fields": [
          {
            "path": "ok"
          },
          {
            "path": "status"
          },
          {
            "path": "best.claimVerdict.status"
          },
          {
            "path": "best.claimCandidate.action.track"
          },
          {
            "path": "appliedCandidateReceipt.ok"
          },
          {
            "path": "humanReviewPacket.status"
          },
          {
            "path": "humanReviewPacket.request.approval.mode"
          },
          {
            "path": "humanReviewPacket.ranking.role"
          },
          {
            "path": "humanReviewPacket.ranking.metric"
          },
          {
            "path": "humanReviewPacket.recommendation.candidate.sectionEnergyComparison.requiredSectionEnergyFloorsPreserved"
          },
          {
            "path": "humanReviewPacket.recommendation.candidate.sectionEnergyComparison.guardrailsPreserved"
          }
        ],
        "timeout_ms": 240000,
        "reload": false,
        "optional": false,
        "continue_on_failure": false
      },
      {
        "type": "assert_window_value",
        "force": false,
        "path": "__neonMixProof.approvedCandidateLoop.ok",
        "until_expected_value": true,
        "expected_value": true,
        "timeout_ms": 10000,
        "reload": false,
        "optional": false,
        "continue_on_failure": false
      },
      {
        "type": "assert_window_value",
        "force": false,
        "path": "__neonMixProof.approvedCandidateLoop.appliedCandidateReceipt.ok",
        "until_expected_value": true,
        "expected_value": true,
        "timeout_ms": 10000,
        "reload": false,
        "optional": false,
        "continue_on_failure": false
      },
      {
        "type": "assert_window_value",
        "force": false,
        "path": "__neonMixProof.approvedCandidateLoop.humanReviewPacket.status",
        "until_expected_value": "candidate_applied_for_listening_review",
        "expected_value": "candidate_applied_for_listening_review",
        "timeout_ms": 10000,
        "reload": false,
        "optional": false,
        "continue_on_failure": false
      },
      {
        "type": "assert_window_value",
        "force": false,
        "path": "__neonMixProof.approvedCandidateLoop.humanReviewPacket.request.candidateActionsAreTransient",
        "until_expected_value": false,
        "expected_value": false,
        "timeout_ms": 10000,
        "reload": false,
        "optional": false,
        "continue_on_failure": false
      },
      {
        "type": "assert_window_value",
        "force": false,
        "path": "__neonMixProof.approvedCandidateLoop.humanReviewPacket.guardrails.approvedCandidateApplied",
        "until_expected_value": true,
        "expected_value": true,
        "timeout_ms": 10000,
        "reload": false,
        "optional": false,
        "continue_on_failure": false
      },
      {
        "type": "screenshot",
        "full_page": false,
        "force": false,
        "label": "neon-step-sequencer-ratchet-loop-approved-candidate",
        "reload": false,
        "optional": false,
        "continue_on_failure": false
      }
    ]
  },
  "checks": [
    {
      "type": "route_loaded",
      "expected_path": "/games/drum-sequencer",
      "run_direct_routes": true,
      "run_clickthroughs": true,
      "run_all_viewports": false,
      "require_unique_routes": true,
      "allow_unexpected_routes": false,
      "save_route_screenshots": false
    },
    {
      "type": "selector_visible",
      "selector": ".drum-sequencer h1",
      "run_direct_routes": true,
      "run_clickthroughs": true,
      "run_all_viewports": false,
      "require_unique_routes": true,
      "allow_unexpected_routes": false,
      "save_route_screenshots": false
    },
    {
      "type": "no_horizontal_overflow",
      "run_direct_routes": true,
      "run_clickthroughs": true,
      "run_all_viewports": false,
      "require_unique_routes": true,
      "allow_unexpected_routes": false,
      "save_route_screenshots": false
    },
    {
      "type": "no_fatal_console_errors",
      "run_direct_routes": true,
      "run_clickthroughs": true,
      "run_all_viewports": false,
      "require_unique_routes": true,
      "allow_unexpected_routes": false,
      "save_route_screenshots": false
    }
  ],
  "artifacts": [
    "screenshot",
    "console",
    "dom_summary",
    "proof_json"
  ],
  "baseline_policy": "invariant_only",
  "failure_policy": {
    "product_regression": "fail",
    "proof_insufficient": "review",
    "environment_blocked": "neutral",
    "configuration_error": "fail",
    "needs_human_review": "review"
  },
  "metadata": {
    "pack_id": "neon_step_sequencer",
    "pack_public_name": "Neon Step Sequencer Pack",
    "evidence_role_pattern": "interaction_snapshots",
    "purpose": "Apply and verify the already-selected Neon claim candidate from a prior human-review packet without rerunning the full candidate search.",
    "required_receipts": [
      "ratchet loop returns ok",
      "a supported claim candidate is selected",
      "section-by-section energy and loudness-style comparisons are captured",
      "approved candidate application receipt is captured",
      "compact human-review packet is captured",
      "ranking remains review-order only",
      "listening-review caveat remains explicit"
    ],
    "does_not_prove": [
      "subjective mix quality",
      "that the approval surrogate is a real listener preference",
      "all possible mix edits"
    ],
    "candidate_source": "human_review_packet_recommendation",
    "candidate_source_status": "candidate_ready_for_listening_review"
  }
}
