From 7c0cff71c512512d534e4d5b011cd27ced5992fe Mon Sep 17 00:00:00 2001 From: mohammed naji Date: Sun, 26 Jul 2026 18:40:02 +0400 Subject: [PATCH] governance: prepare capability validation v2 activation --- docs/core-reset/removal-manifest.yml | 194 ++- docs/core-reset/scorecard.md | 26 +- docs/designs/2026-07-19-core-reset.md | 28 +- docs/roadmap.md | 25 +- tests/unit/core-reset-governance.test.ts | 457 +++++- .../contracts/capability-validation-v2.json | 1303 +++++++++++++++++ ...ability-validation-contract-v2.schema.json | 27 + ...pability-validation-receipt-v2.schema.json | 1044 +++++++++++++ 8 files changed, 3019 insertions(+), 85 deletions(-) create mode 100644 tools/eval/core-reset/contracts/capability-validation-v2.json create mode 100644 tools/eval/core-reset/schemas/capability-validation-contract-v2.schema.json create mode 100644 tools/eval/core-reset/schemas/capability-validation-receipt-v2.schema.json diff --git a/docs/core-reset/removal-manifest.yml b/docs/core-reset/removal-manifest.yml index df0c1031..680256d9 100644 --- a/docs/core-reset/removal-manifest.yml +++ b/docs/core-reset/removal-manifest.yml @@ -21,14 +21,14 @@ review: unowned_files: 0 overlapping_files: 0 disposition_changes: 11 - amendment: 'Source lists remain complete and de-overlapped. Issue #588 moved four guaranteed extraction orphans into the completed delete contract. Issue #592 transferred stage.ts, freshness.ts, and source-discovery.ts to evidence-path-query and doctor.ts to thin-delivery. Approved issues #596 and #599 combined the original 54-file / 29,441-LOC query closure with nine finalizer files / 3,590 LOC, yielding one completed 63-file / 33,031-LOC predecessor contract and 22 ownership transfers. proof-report.ts plus review-compare.ts remain move-to-delete changes; serve.ts changed from rebuild to delete, raising disposition_changes from 4 to 7. Owner-approved issue #602 removed stale thin-delivery ownership of deleted serve.ts, transferred package-metadata.ts and shell.ts from rebuild to evaluation-tooling move ownership, raising disposition_changes from 7 to 9, and absorbed the remaining non-core-graph-products and activation-and-extra-integrations production owners into one exact 16-file / 7,277-LOC thin-delivery deletion contract. PR #604 completed that contract without further ownership change. Owner-approved issue #606 transferred graph-source-root.ts and workspace-copy.ts from safe-workspace-primitives to evaluation-tooling, raising disposition_changes from 9 to 11, and activated the exact 20-file / 4,698-LOC move contract from protected base 317dda89f2ea5c75e7626a26b104ceca1bd04ce5. Governance activation merged at 452ad84890c012392c5e6af613e8bfeb17de45db without production source changes. PR #608 completed the exact move without changing any surviving production TypeScript or dependency. First-stage owner-approved issue #610 authorizes only the eight-path governance activation candidate from protected base e7b3be547bc3f6cfdefdd514f17a1ad229afea03; activation merge still requires exact unchanged-head and three-asset SHA-256 approval, with zero production ownership or disposition change. Graph, index, generation, retrieval, CLI, MCP, installer, workspace, held-out, performance, grading, budget, and timeout semantics remain frozen.' + amendment: 'Source lists remain complete and de-overlapped. Issue #588 moved four guaranteed extraction orphans into the completed delete contract. Issue #592 transferred stage.ts, freshness.ts, and source-discovery.ts to evidence-path-query and doctor.ts to thin-delivery. Approved issues #596 and #599 combined the original 54-file / 29,441-LOC query closure with nine finalizer files / 3,590 LOC, yielding one completed 63-file / 33,031-LOC predecessor contract and 22 ownership transfers. proof-report.ts plus review-compare.ts remain move-to-delete changes; serve.ts changed from rebuild to delete, raising disposition_changes from 4 to 7. Owner-approved issue #602 removed stale thin-delivery ownership of deleted serve.ts, transferred package-metadata.ts and shell.ts from rebuild to evaluation-tooling move ownership, raising disposition_changes from 7 to 9, and absorbed the remaining non-core-graph-products and activation-and-extra-integrations production owners into one exact 16-file / 7,277-LOC thin-delivery deletion contract. PR #604 completed that contract without further ownership change. Owner-approved issue #606 transferred graph-source-root.ts and workspace-copy.ts from safe-workspace-primitives to evaluation-tooling, raising disposition_changes from 9 to 11, and activated the exact 20-file / 4,698-LOC move contract from protected base 317dda89f2ea5c75e7626a26b104ceca1bd04ce5. Governance activation merged at 452ad84890c012392c5e6af613e8bfeb17de45db without production source changes. PR #608 completed the exact move without changing any surviving production TypeScript or dependency. First-stage owner-approved issue #610 governance activation merged at dcb52596a3efa89f9ef5d372231ce97a91ae5f9f, then independent review stopped its uncommitted implementation under conditions 7, 8, and 13 before any implementation PR, campaign lock, provider request, or spend. First-stage owner-approved issue #612 authorizes only an eight-path governance-only v2 candidate from that exact merge; its separate activation merge approval remains required. It changes no production ownership or disposition. Graph, index, generation, retrieval, CLI, MCP, installer, workspace, held-out, provider, campaign, grading, product, package, dependency, budget, and timeout semantics remain frozen.' current: updated_at: 2026-07-26 completed_phase: evaluation-tooling - active_phase: capability-validation + active_phase: capability-validation-v2 ready_phase: null - base_commit: e7b3be547bc3f6cfdefdd514f17a1ad229afea03 + base_commit: dcb52596a3efa89f9ef5d372231ce97a91ae5f9f completed_phase_commit: 565c42bb1b34b67f7fefc7aabd0513e4e391a13b production_typescript_files: 43 production_typescript_loc: 11956 @@ -1478,7 +1478,7 @@ items: - id: capability-validation disposition: keep - status: in_progress + status: stopped destination: development-only blinded Native-vs-Graphify-vs-Madar capability evidence production_file_budget: added_max: 0 @@ -1509,7 +1509,7 @@ items: receipt_schema: path: tools/eval/core-reset/schemas/capability-validation-receipt.schema.json sha256: a33a6b3532a3e0df62bcd0f3616a9585b2be4ede1f360cf3d55f70c99c29f30e - exact_head_and_asset_owner_approval: required_before_activation_merge + exact_head_and_asset_owner_approval: passed frozen_contract: v2_blob: a6d1539cb99e8fd58ca20f868bf4d720812de4a5 v2_sha256: c22819a9e24e53f7b11a69c06511a8dc0c2cba8841868d8d9bb734575290bba9 @@ -1575,11 +1575,191 @@ items: rfc_amendment: https://github.com/mohanagy/madar/issues/577#issuecomment-5081133199 protected_base: e7b3be547bc3f6cfdefdd514f17a1ad229afea03 target_branch: core-reset - second_owner_hash_approval: required_before_activation_merge + second_owner_hash_approval: passed + activation_head: 80e942a8a28e3895465aa9ca432c4a926054055d + activation_merge: dcb52596a3efa89f9ef5d372231ce97a91ae5f9f + activation_tree: d0ca317290dbd6837295f36f36ded5b49855c0fe implementation_start_commit: exact_activation_merge_only - notes: 'Owner-approved issue #610 activates the governance-bound Capability Validation successor without changing production source, package, dependencies, CI, executable evaluation tooling, or historical evidence. The activation assets narrow frozen held-out v2 into one exact three-arm direct Anthropic campaign and strict receipt/review lifecycle. Activation merge still requires the second exact-head and three-asset-hash owner approval. Implementation, Count Tokens, paid execution, receipt evidence, external validation, publication, release, Registry metadata, tags, and main remain separately gated.' + stop: + conditions: + - 7 + - 8 + - 13 + issue_receipt: https://github.com/mohanagy/madar/issues/610#issuecomment-5083281270 + issue_receipt_body_sha256: 115e88cc3e1e00066c92f6ce4b3dd9ed8e0f6eabc1f8dbad918d1125c5cdaef9 + rfc_receipt: https://github.com/mohanagy/madar/issues/577#issuecomment-5083282711 + rfc_receipt_body_sha256: 65ac67ca30f24eb2c9d2741ab12ee42d2f593915220ff1251adb8af97e717ed0 + implementation_pr_opened: false + campaign_lock_created: false + provider_requests: 0 + spend_usd: 0 + protected_branch_implementation_changed: false + successor: capability-validation-v2 + notes: 'Issue #610 governance activation merged at dcb52596a3efa89f9ef5d372231ce97a91ae5f9f with its exact reviewed tree and immutable three-asset contract. Fresh independent review of the uncommitted implementation draft then triggered stop conditions 7, 8, and 13: no concrete campaign coordinator/relay, claim-based authorization, caller-resettable spend, abstract containment, incomplete provider/MCP evidence, and forgeable receipt/archive facts. The phase stopped before any implementation PR, campaign lock, Count Tokens, Create, other provider request, paid spend, production/package/dependency change, publication, release, Registry metadata, tag, or main target. The v2 successor does not edit, reopen, reinterpret, or silently repair these historical bytes or this first-stop observation.' exit_gate: The one fixed campaign and sealed independent review produce a schema-valid receipt proving or honestly failing every frozen machine, human, cost, isolation, schedule, and comparator gate without semantic or budget drift. + - id: capability-validation-v2 + disposition: keep + status: in_progress + predecessor: capability-validation + supersedes: development implementation allowlist and LOC ceiling only + destination: development-only evidence-authenticated Capability Validation execution boundary + production_file_budget: + added_max: 0 + removed_exact: 0 + production_loc_budget: + added_max: 0 + removed_exact: 0 + net_exact: 0 + anchor: + commit: dcb52596a3efa89f9ef5d372231ce97a91ae5f9f + tree: d0ca317290dbd6837295f36f36ded5b49855c0fe + src_tree: 1a37e3a58ee7b2a75ca034112506590f699b3918 + tools_eval_tree: b8ef02da3ce135596e87fdf6252441755061d956 + production_typescript_files: 43 + production_typescript_loc: 11956 + npm_files: 102 + npm_packed_bytes: 159759 + npm_unpacked_bytes: 637602 + predecessor_stop: + issue: https://github.com/mohanagy/madar/issues/610 + activation_head: 80e942a8a28e3895465aa9ca432c4a926054055d + activation_merge: dcb52596a3efa89f9ef5d372231ce97a91ae5f9f + activation_tree: d0ca317290dbd6837295f36f36ded5b49855c0fe + conditions: + - 7 + - 8 + - 13 + issue_receipt: https://github.com/mohanagy/madar/issues/610#issuecomment-5083281270 + issue_receipt_body_sha256: 115e88cc3e1e00066c92f6ce4b3dd9ed8e0f6eabc1f8dbad918d1125c5cdaef9 + rfc_receipt: https://github.com/mohanagy/madar/issues/577#issuecomment-5083282711 + rfc_receipt_body_sha256: 65ac67ca30f24eb2c9d2741ab12ee42d2f593915220ff1251adb8af97e717ed0 + governance_assets: + proposal_body_sha256: 4906405cbb806c850c0612305ef460e023e2060b5338734ae0af12303901cbd0 + exact_added_assets: 3 + aggregate_physical_lines_max: 3200 + aggregate_utf8_bytes_max: 2097152 + governance_added_lines_max: 650 + governance_removed_lines_max: 250 + activation_added_lines_max: 3850 + activation_removed_lines_max: 250 + contract: + path: tools/eval/core-reset/contracts/capability-validation-v2.json + sha256: 21d45642cbac36b0ae99258f6aa1d64480a33a20e0fc7334ffd166989ea0f44c + physical_lines_max: 1400 + utf8_bytes_max: 196608 + contract_schema: + path: tools/eval/core-reset/schemas/capability-validation-contract-v2.schema.json + sha256: ce6f2b132868d65e92ef958cdd28f39744f8169a21fcd4ef95d666a13ae0ae58 + physical_lines_max: 200 + utf8_bytes_max: 262144 + receipt_schema: + path: tools/eval/core-reset/schemas/capability-validation-receipt-v2.schema.json + sha256: 0aa0743837bdb2fa23430807c89d3ae433ee19c64fb0aa20901d53c5306204e2 + physical_lines_max: 1600 + utf8_bytes_max: 1638400 + exact_head_and_asset_owner_approval: required_before_activation_merge + inheritance: + v1_contract_sha256: ae03a6b2cc8675ca66ad0ff67f06e13389cf04e6a6a8167c3404f1c8657f36f5 + v1_contract_schema_sha256: 6d8679e335730180bee0c9fc62f144ae2086ea16dade800887a0301da27f23b6 + v1_receipt_schema_sha256: a33a6b3532a3e0df62bcd0f3616a9585b2be4ede1f360cf3d55f70c99c29f30e + allowed_difference_pointers: + - /schema_version + - /contract_id + - /status + - /governance + - /anchors/protected_base_commit + - /anchors/base_tree + - /anchors/tools_eval_tree + - /inheritance + - /receipt/path + - /receipt/schema_path + - /receipt/canonical_transcript + - /receipt/canonical_archive + - /execution_boundary + all_other_recursive_subjects: jcs_identical_to_v1 + provider_contract: + provider: anthropic_first_party_messages + endpoint: https://api.anthropic.com/v1/messages + api_version: 2023-06-01 + model: claude-sonnet-4-6 + temperatures: + - 0 + - 0.7 + thinking: disabled + max_tokens: 4096 + service_tier: standard_only + inference_geography: global + streaming: false + caching: forbidden + retry: forbidden + campaign_budget: + blocking_paid_answer_trials_exact: 60 + separate_madar_diagnostic_exact: 1 + refresh_samples_exact: 12 + trials_per_cell: 3 + tool_calls_per_trial_max: 12 + create_requests_per_trial_max: 13 + trial_timeout_seconds: 300 + provider_input_tokens_max: 20000000 + provider_output_tokens_max: 2000000 + runner_usd_max: 90 + provider_enforced_usd_max: 100 + provider_request_before_campaign_lock: forbidden + real_campaign_lock_offline: forbidden + retry_replace_drop_or_regrade: forbidden + implementation_budget: + touched_paths_exact: 53 + added_physical_lines_max: 29130 + removed_physical_lines_max: 350 + activation_plus_implementation_added_max: 32980 + activation_plus_implementation_removed_max: 600 + production_files_or_loc_changed: 0 + dependencies_changed: 0 + compatibility_aliases: forbidden + generated_files_committed: forbidden + ci_change: exact_offline_self_test_step_only + review_contract: + activation_ci_matrix_jobs: 6 + activation_independent_exact_head_review: required + activation_coderabbit_actual_disposition_must_be_honest: true + activation_unresolved_review_threads: 0 + implementation_independent_reviews: 2 + two_independent_natural_person_reviews: required_before_reveal + third_eligible_adjudicator_for_disagreement: required + sixth_independent_archive_verifier: required + one_fixed_campaign_without_rerun: required + activation: + issue: https://github.com/mohanagy/madar/issues/612 + proposal_receipt: https://github.com/mohanagy/madar/issues/612#issuecomment-5083546156 + rfc_proposal_receipt: https://github.com/mohanagy/madar/issues/577#issuecomment-5083547611 + owner_approval: https://github.com/mohanagy/madar/issues/612#issuecomment-5083661878 + rfc_amendment: https://github.com/mohanagy/madar/issues/577#issuecomment-5083662827 + protected_base: dcb52596a3efa89f9ef5d372231ce97a91ae5f9f + target_branch: core-reset + second_owner_hash_approval: required_before_activation_merge + implementation_start_commit: exact_activation_merge_only + deferred_provider_account_observer: + status: unresolved_separate_proposal_required + generic_proof_acceptance: forbidden + provider_hard_cap_and_zero_use_observation: required_before_real_campaign_lock + governance_closure: + after: exact_offline_implementation_merge_only + modified_paths: + - docs/core-reset/removal-manifest.yml + - docs/core-reset/scorecard.md + - docs/roadmap.md + - docs/designs/2026-07-19-core-reset.md + - tests/unit/core-reset-governance.test.ts + added_physical_lines_max: 400 + removed_physical_lines_max: 200 + activation_plus_implementation_plus_closure_added_max: 33380 + activation_plus_implementation_plus_closure_removed_max: 800 + records_only: v2 offline execution boundary passed, exact merge/tree/review/CI receipts, unchanged v1 stop, unresolved provider observer, zero provider requests/spend, and no active campaign + evaluator_schema_contract_ci_production_package_dependency_receipt_evidence_change: forbidden + notes: 'First-stage owner-approved #612 authorizes preparation and review of this governance-only candidate. It makes the stopped v1 execution boundary concrete and approval-bound while preserving every v1 provider, campaign, comparator, grading, product, production, package, dependency, token, USD, matrix, timeout, and tool-call ceiling. Only the later development implementation allowlist and LOC ceiling expand. This first-stage asset does not authorize activation merge or offline implementation; those require live second-stage approval and the exact activation merge. It never authorizes provider-account observation, campaign lock, target-repository execution, Count Tokens, Create, any provider request, spend, npm/package/product publication, release, Registry metadata, tags, or main.' + exit_gate: A separately approved offline implementation makes every authorization, coordination, containment, evidence, ledger, lifecycle, stopped-finalization, receipt, archive, and public-validation boundary executable and adversarially proven without creating a campaign lock or provider request. + - id: non-core-graph-products disposition: delete status: complete diff --git a/docs/core-reset/scorecard.md b/docs/core-reset/scorecard.md index 9edc27d9..a43b4cf3 100644 --- a/docs/core-reset/scorecard.md +++ b/docs/core-reset/scorecard.md @@ -2,7 +2,7 @@ > **RFC:** [#577](https://github.com/mohanagy/madar/issues/577) > **Milestone:** [`v0.40.0 — Core Reset`](https://github.com/mohanagy/madar/milestone/7) -> **Status:** accepted; phases through Evaluation Tooling Isolation passed; Capability Validation is the sole active phase under the exact first-stage owner-approved #610 proposal; activation merge and execution remain separately gated +> **Status:** accepted; phases through Evaluation Tooling Isolation passed; Capability Validation v1 stopped under #610; v2 is the sole active phase under the exact first-stage owner-approved #612 proposal, with activation merge, offline implementation, provider observation, and execution separately gated This is the phase-gate evidence ledger. An issue or PR link is not evidence by itself; each gate needs a reproducible test, receipt, measurement, or external-user record. @@ -38,11 +38,12 @@ The schema-validated, share-safe receipt was recorded at tooling checkout `250a6 | Evidence-path query | **Passed** | Held-out correctness and one-call completeness gates pass without repo-specific logic | [#596](https://github.com/mohanagy/madar/issues/596), merged [PR #600](https://github.com/mohanagy/madar/pull/600) at `596d286cdf4bb53670a6d8c27b2cec5f86137739`, [six-job CI run](https://github.com/mohanagy/madar/actions/runs/30124465700), [independent exact-head review](https://github.com/mohanagy/madar/pull/600#issuecomment-5074482136), and zero review threads | | Delivery and package | **Passed** | Exact predecessor deletion, one-tool MCP/allowlisted lazy CLI, startup, package, installer, transport, CI, review, and zero-thread gates pass without semantic drift | [#602](https://github.com/mohanagy/madar/issues/602) completed through merged [PR #604](https://github.com/mohanagy/madar/pull/604) at `14791cefa195f43e30ec9ec2dd611e38ad2b1b83`; [six exact-head CI jobs](https://github.com/mohanagy/madar/actions/runs/30154480779) passed; [independent review](https://github.com/mohanagy/madar/pull/604#pullrequestreview-4779114409) found no blocker; zero review threads remained; CodeRabbit's non-default-base skip is recorded honestly | | Evaluation tooling isolation | **Passed** | Exactly 20 production files / 4,698 LOC moved to `tools/eval/lib/**`; evaluation remains runnable while production imports, dist, prepack, and npm exclude it | [#606](https://github.com/mohanagy/madar/issues/606) completed through merged [PR #608](https://github.com/mohanagy/madar/pull/608) at `565c42bb1b34b67f7fefc7aabd0513e4e391a13b`; [six exact-head CI jobs](https://github.com/mohanagy/madar/actions/runs/30162721277) passed; [independent review](https://github.com/mohanagy/madar/pull/608#pullrequestreview-4779465252) found no blocker; zero review threads remained; CodeRabbit's non-default-base skip is recorded honestly | -| Capability validation | **In progress** | Native vs Graphify vs Madar blinded machine and human gates pass under the immutable companion | [#610](https://github.com/mohanagy/madar/issues/610), [proposal receipt](https://github.com/mohanagy/madar/issues/610#issuecomment-5080113972), [owner approval](https://github.com/mohanagy/madar/issues/610#issuecomment-5081132612), and [RFC approval](https://github.com/mohanagy/madar/issues/577#issuecomment-5081133199); implementation and campaign evidence remain pending | +| Capability validation v1 | **Stopped** | Preserve the activated contract and mandatory first-stop observation without reinterpretation | [#610 stop receipt](https://github.com/mohanagy/madar/issues/610#issuecomment-5083281270) and [RFC stop amendment](https://github.com/mohanagy/madar/issues/577#issuecomment-5083282711); stop conditions 7, 8, and 13 triggered before implementation PR, campaign lock, or provider request | +| Capability validation v2 | **In progress** | The governance-bound offline successor makes authorization, containment, evidence, lifecycle, receipt, and archive controls executable without widening any campaign or product ceiling | [#612](https://github.com/mohanagy/madar/issues/612), [proposal receipt](https://github.com/mohanagy/madar/issues/612#issuecomment-5083546156), [owner approval](https://github.com/mohanagy/madar/issues/612#issuecomment-5083661878), and [RFC approval](https://github.com/mohanagy/madar/issues/577#issuecomment-5083662827); this first-stage candidate itself authorizes neither activation merge nor implementation | | External validation | Not started | Activation, retention, and paid-intent gates pass | Pending | | Stable release | Not started | Every blocking gate passed; old core absent; migration docs ready | Pending | -Only one technical phase may be `In progress` at a time. `capability-validation` is the sole active phase. Evaluation Tooling Isolation completed through #606 and PR #608 at 43 production files / 11,956 LOC and 102 package files / 159,759 packed / 637,602 unpacked bytes. Capability Validation governance activation records `+0 / -0 / net 0`; implementation, campaign, review, receipt, and result evidence remain pending. +Only one technical phase may be `In progress` at a time. `capability-validation-v2` is the sole active phase; v1 remains stopped. Evaluation Tooling Isolation completed through #606 and PR #608 at 43 production files / 11,956 LOC and 102 package files / 159,759 packed / 637,602 unpacked bytes. The v2 candidate changes zero production files or LOC; activation merge, offline implementation, provider-account observation, campaign lock, provider requests, spend, review receipts, and results remain pending or separately forbidden. ### Directed multigraph phase evidence (passed) @@ -137,15 +138,16 @@ Only one technical phase may be `In progress` at a time. `capability-validation` - There is no valid blinded Native-vs-Graphify-vs-Madar runner. The current guided suite has no Graphify arm, while immutable historical evidence still records retired `--no-html` commands. This phase cannot build a replacement runner, restore an alias, reinterpret the guided suite, run Capability Validation, publish, release, or target `main`. - Any boundary mismatch; surviving-production TypeScript edit; retained moved module; dependency, compatibility, duplicate, fallback, semantic, contract, threshold, source-count, or package-budget change; workflow need to restore `--no-html`; protected-tree drift; or publication need stops implementation and requires a #577 amendment. -### Capability Validation contract (in progress) +### Capability Validation v1 stop and v2 contract (in progress) -- First-stage approval binds proposal SHA-256 `27c04eca61e8c3ae65e2a9eab5c0b7e269313be933cef785b94e9bdca7292ba5`, protected base `e7b3be547bc3f6cfdefdd514f17a1ad229afea03`, base tree `0fb5664ab85ecb04275f6277ee65270b948f8ab3`, and `src` tree `1a37e3a58ee7b2a75ca034112506590f699b3918`. -- The immutable companion plus its contract and receipt schemas are the only new activation assets. A second owner receipt must approve their exact SHA-256 values, the unchanged activation head, and all newly exact operational/schema choices before merge. -- The campaign compares Native, Graphify cold/warm, and Madar cold/warm on Documenso and Formbricks at temperatures `0` and `0.7`: 60 paid answer trials, three trials per cell, at most 12 tool calls and 13 create requests per trial, plus one excluded OpenStatus diagnostic. -- First-party Anthropic Messages API model `claude-sonnet-4-6` is fixed with thinking disabled, `max_tokens: 4096`, standard-only/global, no streaming, caching, server tools, retry, or unapproved request field. Input/output ceilings are 20,000,000 / 2,000,000 tokens, with a USD $90 runner ledger below one provider-enforced USD $100 hard cap. -- Production source, package/lock/build configuration, public semantics, dependencies, frozen v2 bytes, and historical receipts remain unchanged. Implementation is limited to the exact 29-path / 12,200-added / 200-removed boundary; activation plus implementation remains at most 15,100 additions / 450 removals. -- No provider request, including Count Tokens, may occur before the exact implementation merge and durable campaign lock prove the machine, toolchain, provider boundary, spend cap and zero use, comparator manifests, schedule, blind commitment, custodian, two independent natural-person reviewers, and eligible adjudicator. The fixed campaign runs once; no scheduled row may be retried, repaired, replaced, dropped, or favorably reinterpreted. -- Activation and implementation exact-head six-job CI, independent no-blocker review, honest CodeRabbit disposition, and zero review threads remain blocking. Any #610 stop condition requires a #577 amendment; publication, release, Registry metadata, tags, `main`, natural-activation claims, and external-validation work remain forbidden. +- V1 protected base `e7b3be547bc3f6cfdefdd514f17a1ad229afea03` and proposal SHA-256 `27c04eca61e8c3ae65e2a9eab5c0b7e269313be933cef785b94e9bdca7292ba5` remain bound by the historical [#610 approval](https://github.com/mohanagy/madar/issues/610#issuecomment-5081132612) and [RFC approval](https://github.com/mohanagy/madar/issues/577#issuecomment-5081133199). Activation head `80e942a8a28e3895465aa9ca432c4a926054055d` merged as `dcb52596a3efa89f9ef5d372231ce97a91ae5f9f`, tree `d0ca317290dbd6837295f36f36ded5b49855c0fe`. Independent review then triggered #610 stop conditions 7, 8, and 13 before an implementation PR, campaign lock, provider request, or spend. Its three asset bytes and stop receipts remain immutable. +- V2 first-stage approval binds proposal SHA-256 `4906405cbb806c850c0612305ef460e023e2060b5338734ae0af12303901cbd0`, protected base `dcb52596a3efa89f9ef5d372231ce97a91ae5f9f`, base tree `d0ca317290dbd6837295f36f36ded5b49855c0fe`, `src` tree `1a37e3a58ee7b2a75ca034112506590f699b3918`, and `tools/eval` tree `b8ef02da3ce135596e87fdf6252441755061d956`. +- Exactly three v2 machine assets may be added with aggregate ceilings of 3,200 lines / 2,097,152 bytes; only five governance files may change within `+650/-250`, for exactly eight activation paths and `+3,850/-250`. A second owner receipt must approve all three local SHA-256 values, the unchanged activation head, and every newly exact operational/schema choice before merge. +- V2 recursively preserves v1 outside its closed execution-control pointer allowlist. Only authorization observation, coordinator/relay ownership, non-resettable ledger, native containment, complete provider/MCP evidence, lifecycle, derived receipts, stopped finalization, archive/fsync, public-validation honesty, and their governance bindings differ. +- The development implementation boundary alone expands from 29 paths / `+12,200/-200` to 53 exact paths / `+29,130/-350`; combined activation plus implementation is `+32,980/-600`. Production source, package/lock/build configuration, dependencies, historical bytes, provider/model, 60-trial matrix, diagnostic, refresh samples, 20,000,000/2,000,000 token ceilings, 12-tool/13-Create/300-second limits, and USD $90/$100 ceilings remain unchanged. +- After the exact offline implementation merge, one five-governance-file closure is capped at `+400/-200`; full activation plus implementation plus closure is `+33,380/-800`. It records only that the v2 offline execution boundary passed, exact merge/review/CI evidence, v1's unchanged stop, unresolved provider observation, zero requests/spend, and no campaign. +- Offline v2 cannot produce the provider-account hard-cap and zero-use observation or a real campaign lock. A future separately approved mechanism is required. No Count Tokens, Create, other provider request, target-repository execution, spend, campaign, publication, release, Registry metadata, tag, `main`, natural-activation claim, or external-validation work is authorized. +- Activation and any later implementation each require exact-head six-job CI, independent no-blocker review, honest CodeRabbit disposition, and zero review threads. Any #612 stop condition requires a #577 amendment; no stop permits widening or favorable reinterpretation. ## Graph gates @@ -264,3 +266,5 @@ Copy this into a comment on [#577](https://github.com/mohanagy/madar/issues/577) | 2026-07-25 | Exact Evaluation Tooling Isolation contract accepted and governance-activated as the sole In progress technical phase | Protected `core-reset` base `317dda89f2ea5c75e7626a26b104ceca1bd04ce5`; audited `src` tree `b99217c74f6b26daef4ecab12e1cde5f8fe60122`; exact 20-file / 4,698-LOC move; zero production additions or dependencies; exact 43-file / 11,956-LOC final source; 102-file / 165,000-packed / 640,000-unpacked package ceilings; frozen production and historical evaluation semantics; no capability-runner redesign, publication, release, or `main` target. Governance activation changes no production code; implementation evidence remains pending. | [#606 contract](https://github.com/mohanagy/madar/issues/606), [owner approval](https://github.com/mohanagy/madar/issues/606#issuecomment-5078675449), and [RFC approval](https://github.com/mohanagy/madar/issues/577#issuecomment-5078676116) | | 2026-07-25 | Evaluation Tooling Isolation source and package candidate measured | Implementation started from exact activation merge `452ad84890c012392c5e6af613e8bfeb17de45db`. All 20 predecessors / 4,698 LOC moved to corresponding `tools/eval/lib/**` paths; production is 43 files / 11,956 LOC with `+0 / -4,698 / net -4,698`, zero surviving production TypeScript edits, and zero dependency changes. The fresh artifact is 102 files / 159,759 packed bytes / 637,602 unpacked bytes with shasum `6eee13af22e8c76113fe578e44d76a9e6d6fd899`. At this historical checkpoint exact-head CI, independent review, honest CodeRabbit disposition, zero-thread, and merge gates were pending; the following PR #608 completion row supersedes those pending gates. Capability Validation remained blocked and unapproved. | [#606 contract](https://github.com/mohanagy/madar/issues/606) and [removal manifest](removal-manifest.yml) | | 2026-07-25 | Evaluation Tooling Isolation complete; no technical phase active | [PR #608](https://github.com/mohanagy/madar/pull/608) merged into protected `core-reset` as `565c42bb1b34b67f7fefc7aabd0513e4e391a13b` from exact reviewed head `c0496413518382ca6dff74fa5c81ab72b9edd57c`; merge tree `225f446ee88ecc74a3226bd17c362458c2312528` exactly matches the reviewed head and has sole parent `452ad84890c012392c5e6af613e8bfeb17de45db`. All six jobs in [CI run 30162721277](https://github.com/mohanagy/madar/actions/runs/30162721277) passed, the [independent exact-head review](https://github.com/mohanagy/madar/pull/608#pullrequestreview-4779465252) found no blocker, zero threads remained, and CodeRabbit's [non-default-base skip](https://github.com/mohanagy/madar/pull/608#issuecomment-5078954363) is not represented as a review. The exact 20-file / 4,698-LOC move, 43-file / 11,956-LOC source, and 102-file / 159,759-packed / 637,602-unpacked package all pass with no dependency or semantic change. Capability Validation remains blocked and unapproved. | [#606 merge receipt](https://github.com/mohanagy/madar/issues/606#issuecomment-5078995452) and [RFC merge receipt](https://github.com/mohanagy/madar/issues/577#issuecomment-5078995591) | +| 2026-07-26 | Capability Validation v1 stopped after governance activation | Exact activation head `80e942a8a28e3895465aa9ca432c4a926054055d` merged as `dcb52596a3efa89f9ef5d372231ce97a91ae5f9f`; the three assets remain byte-identical. Independent review then triggered stop conditions 7, 8, and 13 before an implementation PR, campaign lock, provider request, spend, or protected-branch implementation change. | [#610 stop receipt](https://github.com/mohanagy/madar/issues/610#issuecomment-5083281270) and [RFC stop amendment](https://github.com/mohanagy/madar/issues/577#issuecomment-5083282711) | +| 2026-07-26 | Capability Validation v2 accepted for governance-only preparation and review | First-stage approval binds proposal SHA-256 `4906405cbb806c850c0612305ef460e023e2060b5338734ae0af12303901cbd0` and protected base `dcb52596a3efa89f9ef5d372231ce97a91ae5f9f`. Only the later development allowlist expands to 53 paths / `+29,130/-350`; every campaign and product ceiling remains unchanged. This first-stage candidate does not authorize activation merge or implementation; those require live second-stage approval and the exact merge. It never authorizes a campaign lock, provider request, spend, target-repository execution, product publication, release, Registry metadata, tag, or `main`. | [#612 approval](https://github.com/mohanagy/madar/issues/612#issuecomment-5083661878) and [RFC approval](https://github.com/mohanagy/madar/issues/577#issuecomment-5083662827) | diff --git a/docs/designs/2026-07-19-core-reset.md b/docs/designs/2026-07-19-core-reset.md index 676ac5ad..6b0c3308 100644 --- a/docs/designs/2026-07-19-core-reset.md +++ b/docs/designs/2026-07-19-core-reset.md @@ -3,7 +3,7 @@ > **Tracking issue:** [#577](https://github.com/mohanagy/madar/issues/577) > **Milestone:** [`v0.40.0 — Core Reset`](https://github.com/mohanagy/madar/milestone/7) > **Project:** [Madar Roadmap](https://github.com/users/mohanagy/projects/8) -> **Status:** accepted — phases through `evaluation-tooling` are complete; `capability-validation` is the sole active phase under the exact first-stage owner-approved #610 proposal; activation merge and execution remain separately gated +> **Status:** accepted — phases through `evaluation-tooling` are complete; Capability Validation v1 stopped under #610; `capability-validation-v2` is the sole active phase under the exact first-stage owner-approved #612 proposal, with activation merge, offline implementation, provider observation, and execution separately gated ## Decision @@ -376,23 +376,27 @@ Stop implementation and amend #577 if the boundary differs from 20 files / 4,698 [PR #608](https://github.com/mohanagy/madar/pull/608) squash-merged the exact implementation into protected `core-reset` as `565c42bb1b34b67f7fefc7aabd0513e4e391a13b` from exact reviewed head `c0496413518382ca6dff74fa5c81ab72b9edd57c`. Merge tree `225f446ee88ecc74a3226bd17c362458c2312528` exactly equals the reviewed-head tree and the merge has sole parent `452ad84890c012392c5e6af613e8bfeb17de45db`. All six jobs in [exact-head CI run 30162721277](https://github.com/mohanagy/madar/actions/runs/30162721277) passed, including 74 test files / 617 tests passed with 3 skipped and 81.57% statement, 73.05% branch, 89.04% function, and 85.45% line coverage. The [independent exact-head review](https://github.com/mohanagy/madar/pull/608#pullrequestreview-4779465252) found no blocker and zero review threads remained. [CodeRabbit explicitly skipped](https://github.com/mohanagy/madar/pull/608#issuecomment-5078954363) because the required `core-reset` base is non-default; the skip is not represented as a completed review. The [#606 merge receipt](https://github.com/mohanagy/madar/issues/606#issuecomment-5078995452) and matching [RFC receipt](https://github.com/mohanagy/madar/issues/577#issuecomment-5078995591) record the completed implementation. No #606 stop condition triggered. -Evaluation Tooling Isolation is complete. Capability Validation is separately activated below under the exact approval-bound #610 companion; #606 itself did not authorize the successor runner. No npm package, GitHub Release, Registry metadata, or tag was published, and neither phase targets `main`. +Evaluation Tooling Isolation is complete. Capability Validation v1 was separately activated and then stopped below; #606 itself did not authorize either successor runner. No npm package, GitHub Release, Registry metadata, or tag was published, and no phase targets `main`. -## Accepted amendment — capability validation +## Stopped amendment — capability validation v1 -The owner approved exact proposal-body SHA-256 `27c04eca61e8c3ae65e2a9eab5c0b7e269313be933cef785b94e9bdca7292ba5` through the [#610 first-stage receipt](https://github.com/mohanagy/madar/issues/610#issuecomment-5081132612) and [matching RFC receipt](https://github.com/mohanagy/madar/issues/577#issuecomment-5081133199). The governance anchor is protected `core-reset` commit `e7b3be547bc3f6cfdefdd514f17a1ad229afea03`, tree `0fb5664ab85ecb04275f6277ee65270b948f8ab3`, `src` tree `1a37e3a58ee7b2a75ca034112506590f699b3918`, and frozen evaluation tree `983df4a5462ae8e5f57cf549bcc23c06c328b596`. +The exact #610 activation head `80e942a8a28e3895465aa9ca432c4a926054055d` merged into protected `core-reset` as `dcb52596a3efa89f9ef5d372231ce97a91ae5f9f`, with tree `d0ca317290dbd6837295f36f36ded5b49855c0fe`. Its immutable assets remain `capability-validation-v1.json` SHA-256 `ae03a6b2cc8675ca66ad0ff67f06e13389cf04e6a6a8167c3404f1c8657f36f5`, contract-schema SHA-256 `6d8679e335730180bee0c9fc62f144ae2086ea16dade800887a0301da27f23b6`, and receipt-schema SHA-256 `a33a6b3532a3e0df62bcd0f3616a9585b2be4ede1f360cf3d55f70c99c29f30e`. -The activation adds exactly three immutable machine assets: `capability-validation-v1.json`, `capability-validation-contract.schema.json`, and `capability-validation-receipt.schema.json`. They hash-bind and narrow frozen `core-reset-held-out-v2`, define the complete inherited JSON-pointer allowlist, exact common raw tools and result envelope, current Madar bundle, pinned Graphify environment and full 6,694-byte MCP surface, provider loop, schedule, isolation, spend, union dossier, blind mapping, independent review/adjudication, reveal, receipt, and failure semantics. The historical v2 contract, its schema and validator, every historical receipt, production source, package/lock, build configuration, and CI remain byte-identical. +Fresh independent review of the uncommitted implementation draft triggered stop conditions 7, 8, and 13: authorization accepted claims instead of observed evidence, no committed coordinator/relay or campaign entrypoint owned the workflow, the spend ledger was caller-resettable, containment was abstract, provider/MCP evidence was incomplete, and receipt/archive facts remained forgeable. The exact [#610 stop receipt](https://github.com/mohanagy/madar/issues/610#issuecomment-5083281270) and [RFC stop amendment](https://github.com/mohanagy/madar/issues/577#issuecomment-5083282711) record body SHA-256 values `115e88cc3e1e00066c92f6ce4b3dd9ed8e0f6eabc1f8dbad918d1125c5cdaef9` and `65ac67ca30f24eb2c9d2741ab12ee42d2f593915220ff1251adb8af97e717ed0`. V1 stopped before an implementation PR, campaign lock, Count Tokens, Create, any provider request, spend, production/package/dependency change, or publication. -This governance candidate may merge only after a second owner receipt approves the exact unchanged activation head, all three asset SHA-256 values, and every new JSON-pointer, raw-tool, receipt, dossier, mapping, error, and operational/schema choice. Any changed head requires renewed approval. After activation merges, implementation starts from that exact merge and is confined to #610's 29-path allowlist, `+12,200 / -200` implementation ceiling, zero production/dependency/package change, and single exact offline CI self-test addition. +## Accepted amendment — capability validation v2 -The blocking campaign contains two frozen questions at temperatures `0` and `0.7`, with three Native, three Graphify cold, three Graphify warm, three Madar cold, and three Madar warm trials per block: 60 paid answers total. One Madar-only OpenStatus diagnostic is reported separately. Every answer trial uses the first-party Anthropic Messages API with fixed `claude-sonnet-4-6`, thinking disabled, `max_tokens: 4096`, standard-only/global, no streaming or caching, at most 13 create requests, at most 12 shared tool calls, and the frozen 300-second process-tree boundary. Graphify remains pinned to unsigned tag `v0.9.20` / commit `edec9eabeceeae6aa2375eddb3835efa1a32c0a3`; Madar uses the exact packed implementation merge and default three-file workspace bundle without an override or restored `--no-html`. +The owner approved exact v2 proposal-body SHA-256 `4906405cbb806c850c0612305ef460e023e2060b5338734ae0af12303901cbd0` through the durable [#612 first-stage receipt](https://github.com/mohanagy/madar/issues/612#issuecomment-5083661878) and [matching RFC receipt](https://github.com/mohanagy/madar/issues/577#issuecomment-5083662827). The governance anchor is protected `core-reset` commit `dcb52596a3efa89f9ef5d372231ce97a91ae5f9f`, tree `d0ca317290dbd6837295f36f36ded5b49855c0fe`, `src` tree `1a37e3a58ee7b2a75ca034112506590f699b3918`, and `tools/eval` tree `b8ef02da3ce135596e87fdf6252441755061d956`. -No provider request—including Count Tokens—may occur before a durable campaign lock binds the exact implementation merge/tree, source/package/toolchain bytes, host, request templates, hard provider cap and zero-use proof, common/MCP schemas, comparator manifests, schedule, blind commitment, independent mapping custodian, two independent natural-person reviewers, and eligible adjudicator. Provider input/output ceilings are 20,000,000 / 2,000,000 tokens, the runner ledger is USD $90, and the isolated provider-enforced cap is USD $100. The fixed campaign runs once; a failed, invalid, timed-out, or budget-terminated row scores zero and is never retried, replaced, dropped, or regraded after reveal. +The governance candidate adds exactly three closed machine assets: `capability-validation-v2.json`, `capability-validation-contract-v2.schema.json`, and `capability-validation-receipt-v2.schema.json`. The v2 contract recursively preserves the immutable v1 subjects outside a closed execution-control pointer allowlist. The added boundary makes exact the coordinator/relay, observed authorization, one non-resettable ledger, native monitor and sandbox profiles, complete transcript/provider/MCP evidence, semantic receipt derivation, first-stop lifecycle, crash-only stopped finalization, exclusive two-copy archive/fsync/reread, external archive verification, and honest commitment-only public validation. -Machine grading is recomputed from canonical transcripts and frozen fixtures. Human phase scores and incorrect load-bearing claims come only from two sealed independent reviews, with a third eligible human adjudicator for disagreement, all before the custodian reveals the precommitted mapping. Madar cold and warm must each pass at least two of three trials for every question/temperature, score 2 on every required phase with zero accepted incorrect load-bearing claims, and tie or beat the matching Graphify and Native medians under the frozen aggregation rule. +The three assets may total at most 3,200 lines / 2,097,152 bytes; only the five governance files may change within `+650/-250`, so activation touches exactly eight paths within `+3,850/-250`. A second owner receipt must approve the exact unchanged activation head, all three local asset SHA-256 values, and every newly exact execution-control, evidence, receipt, path, LOC, error, schema, and operational choice before merge. A changed head or asset requires renewed approval. -Stop and amend #577 if any anchor, source/package/frozen byte, repository, fixture, prompt, grader, model/request, temperature, tool, schedule, host, comparator, isolation, reviewer, mapping, receipt, budget, or semantic binding drifts; if production, dependency, package, public behavior, graph/index/query semantics, limits, or CI beyond the exact offline step must change; or if publication, release, Registry metadata, a tag, `main`, natural-activation work, or external validation becomes necessary. No stop condition authorizes widening or a favorable reinterpretation. +Only after that exact activation merge may offline implementation start from the merge, on #612's exact 53-path allowlist and `+29,130/-350` ceiling; combined activation plus implementation is `+32,980/-600`. This supersedes only v1's 29-path / `+12,200/-200` development boundary. The provider/model, exact 60 comparison trials, one diagnostic, 12 refresh samples, 20,000,000 input tokens, 2,000,000 output tokens, 12 tool calls, 13 Create requests, 300-second timer, USD $90 runner ledger, USD $100 provider hard cap, comparator identities, grading, review, product, production, package, dependency, graph/index/generation/query, and public semantics remain unchanged. + +After the exact offline implementation merge, one governance-only closure PR may touch only these five governance files within `+400/-200`, for full activation-plus-implementation-plus-closure ceilings of `+33,380/-800`. It records only that the v2 offline execution boundary passed, exact implementation merge/tree/review/CI receipts, #610's unchanged stop, the unresolved provider-account observer, zero provider requests/spend, and no active campaign; it cannot change an evaluator, schema, contract, CI, production, package, dependency, receipt, evidence, or historical asset. + +The offline v2 implementation has no generic provider-proof acceptance path and cannot create a real campaign lock. A future separately approved proposal must bind an authenticated provider-account hard-cap and zero-use observation mechanism. This activation authorizes no target-repository execution, provider request including Count Tokens or Create, paid spend, campaign, publication, release, Registry metadata, tag, `main`, natural activation, or external validation. Any #612 stop condition requires an RFC #577 amendment; none authorizes widening, retry, matrix reduction, or favorable reinterpretation. ## Public surface target @@ -498,7 +502,7 @@ Any change to the product job, non-goals, architecture boundary, compatibility p The repository owner accepted this RFC on 2026-07-19 in [#577](https://github.com/mohanagy/madar/issues/577) after the governance review passed. Scope/baseline, directed-multigraph, canonical-index, legacy/non-code deletion, generation/reconciliation, and evidence-path-query later passed their gates. The owner accepted [#592](https://github.com/mohanagy/madar/issues/592#issuecomment-5044052506), the recorded incremental stop amendment, [#596](https://github.com/mohanagy/madar/issues/596#issuecomment-5050888977), its [RFC amendment](https://github.com/mohanagy/madar/issues/577#issuecomment-5050889198), the graph-authenticated source correction through the durable [owner](https://github.com/mohanagy/madar/issues/596#issuecomment-5054853667) and [RFC](https://github.com/mohanagy/madar/issues/577#issuecomment-5054853815) receipts, and the source-only generation prerequisite through [#599](https://github.com/mohanagy/madar/issues/599#issuecomment-5060766685) and its [RFC receipt](https://github.com/mohanagy/madar/issues/577#issuecomment-5060766863). PRs #594 and #600 completed those contracts. On 2026-07-25 the owner approved the exact [#602 Thin Delivery contract](https://github.com/mohanagy/madar/issues/602#issuecomment-5075969972) and [RFC amendment](https://github.com/mohanagy/madar/issues/577#issuecomment-5075969871), then the exact [#606 Evaluation Tooling Isolation contract](https://github.com/mohanagy/madar/issues/606#issuecomment-5078675449) and [matching RFC amendment](https://github.com/mohanagy/madar/issues/577#issuecomment-5078676116). PR #604 merged Thin Delivery as `14791cefa195f43e30ec9ec2dd611e38ad2b1b83`; PR #608 merged Evaluation Tooling Isolation as `565c42bb1b34b67f7fefc7aabd0513e4e391a13b`, each after exact-head CI, independent review, honest CodeRabbit disposition, and zero-thread gates passed. At that #608 completion checkpoint no technical phase was active and Capability Validation plus every later phase remained blocked and unapproved; the 2026-07-26 approval below supersedes that checkpoint only for Capability Validation. -On 2026-07-26 the owner approved the exact Capability Validation proposal hash through [#610](https://github.com/mohanagy/madar/issues/610#issuecomment-5081132612) and the [matching RFC receipt](https://github.com/mohanagy/madar/issues/577#issuecomment-5081133199). `capability-validation` is the sole active phase under the immutable companion and two-stage activation gate above; implementation, provider access, paid execution, receipt evidence, external validation, and release remain separately gated. +On 2026-07-26 the owner approved the original Capability Validation proposal hash through [#610](https://github.com/mohanagy/madar/issues/610#issuecomment-5081132612) and the [matching RFC receipt](https://github.com/mohanagy/madar/issues/577#issuecomment-5081133199); independent implementation review later triggered the mandatory stop above. The owner then approved the exact v2 proposal hash through [#612](https://github.com/mohanagy/madar/issues/612#issuecomment-5083661878) and its [matching RFC receipt](https://github.com/mohanagy/madar/issues/577#issuecomment-5083662827). `capability-validation-v2` is the sole active phase under the two-stage activation gate. This first-stage candidate itself authorizes neither activation merge nor implementation; live second-stage approval and the exact merge gate them. Provider observation, paid execution, receipt evidence, external validation, and release remain separately gated or forbidden. ## Decision log @@ -530,3 +534,5 @@ On 2026-07-26 the owner approved the exact Capability Validation proposal hash t | 2026-07-25 | Evaluation Tooling Isolation source and package candidate measured | Implementation started from exact governance merge `452ad84890c012392c5e6af613e8bfeb17de45db`. The pre-PR candidate moved all 20 predecessors / 4,698 LOC to corresponding `tools/eval/lib/**` paths, left no old `src/**` copy, changed no surviving production TypeScript or dependency, and finished at 43 production files / 11,956 LOC with `+0 / -4,698 / net -4,698`. Its fresh artifact was 102 files / 159,759 packed bytes / 637,602 unpacked bytes with shasum `6eee13af22e8c76113fe578e44d76a9e6d6fd899`. Source, build-boundary, frozen-evidence, and package candidate gates passed within the accepted ceilings. At this historical checkpoint exact-head CI, independent review, honest CodeRabbit disposition, zero review threads, and merge were pending; the following PR #608 completion row supersedes those pending gates. Capability Validation remained blocked and unapproved. | | 2026-07-25 | Evaluation Tooling Isolation complete; no technical phase active | [PR #608](https://github.com/mohanagy/madar/pull/608) was squash-merged into protected `core-reset` as `565c42bb1b34b67f7fefc7aabd0513e4e391a13b` from exact reviewed head `c0496413518382ca6dff74fa5c81ab72b9edd57c`; merge tree `225f446ee88ecc74a3226bd17c362458c2312528` exactly equals the reviewed-head tree and has sole parent `452ad84890c012392c5e6af613e8bfeb17de45db`. The implementation moved exactly 20 files / 4,698 LOC, finished at 43 files / 11,956 LOC and 102 package files / 159,759 packed / 637,602 unpacked bytes, and changed no surviving production TypeScript or dependency. All six [exact-head CI jobs](https://github.com/mohanagy/madar/actions/runs/30162721277) passed; the [independent review](https://github.com/mohanagy/madar/pull/608#pullrequestreview-4779465252) found no blocker; zero threads remained; CodeRabbit's [non-default-base skip](https://github.com/mohanagy/madar/pull/608#issuecomment-5078954363) is not represented as a review. The [#606](https://github.com/mohanagy/madar/issues/606#issuecomment-5078995452) and [RFC](https://github.com/mohanagy/madar/issues/577#issuecomment-5078995591) receipts record the merge. Capability Validation remains blocked and unapproved. | | 2026-07-26 | Capability Validation proposal accepted for governance activation | The owner approved exact proposal-body SHA-256 `27c04eca61e8c3ae65e2a9eab5c0b7e269313be933cef785b94e9bdca7292ba5` through the [#610 receipt](https://github.com/mohanagy/madar/issues/610#issuecomment-5081132612) and [matching RFC receipt](https://github.com/mohanagy/madar/issues/577#issuecomment-5081133199). Governance activation is anchored to protected `core-reset` `e7b3be547bc3f6cfdefdd514f17a1ad229afea03`, changes no production or executable evaluator code, and requires a second owner approval of the exact unchanged activation head plus all three machine-asset hashes before merge. No provider request or implementation is authorized by this first-stage receipt. | +| 2026-07-26 | Capability Validation v1 mandatory stop | Independent review of the uncommitted implementation draft triggered #610 stop conditions 7, 8, and 13. The [issue stop](https://github.com/mohanagy/madar/issues/610#issuecomment-5083281270) and [RFC stop](https://github.com/mohanagy/madar/issues/577#issuecomment-5083282711) preserve the exact activation and asset bytes. No implementation PR, campaign lock, provider request, spend, protected-branch implementation change, or publication occurred. | +| 2026-07-26 | Capability Validation v2 accepted for governance activation preparation | The owner approved exact proposal-body SHA-256 `4906405cbb806c850c0612305ef460e023e2060b5338734ae0af12303901cbd0` through the [#612 receipt](https://github.com/mohanagy/madar/issues/612#issuecomment-5083661878) and [matching RFC receipt](https://github.com/mohanagy/madar/issues/577#issuecomment-5083662827). Governance activation is anchored to protected `core-reset` `dcb52596a3efa89f9ef5d372231ce97a91ae5f9f`, changes no production or executable evaluator code, and requires a separate approval of the exact unchanged head plus all three v2 asset hashes before merge. Only the later offline implementation allowlist and LOC ceiling expand; no implementation, campaign lock, provider request, spend, target-repository run, publication, release, Registry write, tag, or `main` target is authorized. | diff --git a/docs/roadmap.md b/docs/roadmap.md index 6d4e17c4..05ef9cc1 100644 --- a/docs/roadmap.md +++ b/docs/roadmap.md @@ -11,7 +11,7 @@ Madar is executing an accepted Core Reset. The roadmap is outcome-driven: work a - [Removal manifest](core-reset/removal-manifest.yml) — keep, rebuild, move, delete, and defer decisions - [Scorecard](core-reset/scorecard.md) — technical and business evidence gates -The RFC is **accepted**. Scope and baseline, Directed multigraph, Canonical TypeScript/JavaScript index, the combined legacy/non-code deletion, Generation and reconciliation, Evidence-path query, Thin Delivery, and Evaluation Tooling Isolation have passed. Capability Validation is the sole active technical phase under the exact first-stage owner-approved #610 proposal; its activation merge, implementation, and campaign remain separately gated. +The RFC is **accepted**. Scope and baseline, Directed multigraph, Canonical TypeScript/JavaScript index, the combined legacy/non-code deletion, Generation and reconciliation, Evidence-path query, Thin Delivery, and Evaluation Tooling Isolation have passed. Capability Validation v1 is stopped under #610; `capability-validation-v2` is the sole active technical phase under the exact first-stage owner-approved #612 proposal, while activation merge, offline implementation, provider-account observation, and the fixed campaign remain separately gated. ## Passed — directed multigraph @@ -119,23 +119,26 @@ Capability Validation remained blocked throughout #606. The completed phase neit No #606 stop condition triggered. No npm package, GitHub Release, Registry metadata, or tag was published, and the phase did not target `main`. -## In progress — capability validation +## In progress — capability validation v2 -The owner approved proposal-body SHA-256 `27c04eca61e8c3ae65e2a9eab5c0b7e269313be933cef785b94e9bdca7292ba5` through the durable [#610 first-stage receipt](https://github.com/mohanagy/madar/issues/610#issuecomment-5081132612) and [matching RFC receipt](https://github.com/mohanagy/madar/issues/577#issuecomment-5081133199). Governance activation starts from protected `core-reset` commit `e7b3be547bc3f6cfdefdd514f17a1ad229afea03`, tree `0fb5664ab85ecb04275f6277ee65270b948f8ab3`, and audited `src` tree `1a37e3a58ee7b2a75ca034112506590f699b3918`. +Capability Validation v1 stopped before an implementation PR, campaign lock, or provider request when independent review triggered #610 stop conditions 7, 8, and 13. Its original protected base `e7b3be547bc3f6cfdefdd514f17a1ad229afea03`, proposal SHA-256 `27c04eca61e8c3ae65e2a9eab5c0b7e269313be933cef785b94e9bdca7292ba5`, [#610 approval](https://github.com/mohanagy/madar/issues/610#issuecomment-5081132612), and [RFC approval](https://github.com/mohanagy/madar/issues/577#issuecomment-5081133199) remain historical. The immutable [#610 stop receipt](https://github.com/mohanagy/madar/issues/610#issuecomment-5083281270) and [RFC stop amendment](https://github.com/mohanagy/madar/issues/577#issuecomment-5083282711) preserve activation head `80e942a8a28e3895465aa9ca432c4a926054055d`, merge `dcb52596a3efa89f9ef5d372231ce97a91ae5f9f`, tree `d0ca317290dbd6837295f36f36ded5b49855c0fe`, and the three v1 asset bytes. No Count Tokens, Create, other provider request, campaign spend, implementation PR, production change, or publication occurred. -The activation adds only the versioned companion `tools/eval/core-reset/contracts/capability-validation-v1.json` and its contract and receipt schemas, while modifying only the five governing files. It changes no production code, executable evaluator, dependency, package/build configuration, CI workflow, historical contract, or receipt. Before activation may merge, a second owner receipt must bind the exact unchanged activation head, all three asset SHA-256 values, and every new JSON-pointer, raw-tool, receipt, dossier, mapping, error, and operational/schema choice. +The owner approved exact v2 proposal-body SHA-256 `4906405cbb806c850c0612305ef460e023e2060b5338734ae0af12303901cbd0` through the durable [#612 first-stage receipt](https://github.com/mohanagy/madar/issues/612#issuecomment-5083661878) and [matching RFC receipt](https://github.com/mohanagy/madar/issues/577#issuecomment-5083662827). Governance activation starts from protected `core-reset` commit `dcb52596a3efa89f9ef5d372231ce97a91ae5f9f`, tree `d0ca317290dbd6837295f36f36ded5b49855c0fe`, audited `src` tree `1a37e3a58ee7b2a75ca034112506590f699b3918`, and `tools/eval` tree `b8ef02da3ce135596e87fdf6252441755061d956`. -After that exact activation merge, implementation is limited to the 29 paths and line budgets in #610. It must preserve 43 production TypeScript files / 11,956 LOC, the `src` tree, package and lock bytes, graph/index/query semantics, public budgets and timeouts, the 102-file npm artifact boundary, and every frozen v2 grading input. No compatibility alias, dependency, production edit, generated commit, historical rewrite, or `main` target is permitted. +The governance-only candidate adds exactly `capability-validation-v2.json`, `capability-validation-contract-v2.schema.json`, and `capability-validation-receipt-v2.schema.json` and modifies only the five governing files, within `+3,850/-250`. It changes no production code, executable evaluator, CI, dependency, package/build configuration, historical contract, or receipt. Before activation may merge, a second owner receipt must bind the exact unchanged head, all three asset SHA-256 values, and every newly exact coordinator, relay, evidence, containment, ledger, receipt, stopped-finalization, archive, public-validation, error, path, LOC, schema, and operational choice. -The fixed campaign is exactly 60 paid answer trials across Native, Graphify cold/warm, and Madar cold/warm, plus one separate Madar-only diagnostic, using first-party Anthropic Messages API model `claude-sonnet-4-6`, temperatures `0` and `0.7`, at most 12 tool calls and 13 create requests per trial, and the frozen 300-second boundary. Provider input is capped at 20,000,000 tokens, output at 2,000,000, the runner ledger at USD $90, and the provider-enforced workspace/key cap at USD $100. +Only after that exact activation merge may offline implementation start, limited to #612's 53 exact paths and `+29,130/-350`; combined activation plus implementation remains `+32,980/-600`. This supersedes only v1's 29-path / `+12,200/-200` development boundary. The provider, token, USD, trial, matrix, timeout, tool-call, product, production, package, dependency, graph/index/generation/query, and public-semantic ceilings remain unchanged; no compatibility alias, dependency, production edit, generated commit, historical rewrite, or `main` target is permitted. -No provider request of any kind—including Count Tokens—is authorized until the exact implementation merge is locked with the machine, toolchain, request, environment, schedule, spend, isolation, mapping-custodian, reviewer, and adjudicator receipts required by #610. The campaign runs once with no retry, replacement, repair, dropped row, post-reveal regrade, or budget widening. Any stop condition requires an RFC #577 amendment before further technical work. +After the exact offline implementation merge, one separately reviewed governance-only closure may modify only these five governance files within `+400/-200`, for full activation-plus-implementation-plus-closure ceilings of `+33,380/-800`. It may record only that the v2 offline execution boundary passed, exact merge/review/CI evidence, v1's unchanged stop, the unresolved provider observer, zero requests/spend, and no active campaign. -With Capability Validation active, the remaining dependency order is: +The offline v2 boundary cannot create a real campaign lock: authenticated provider-account hard-cap and zero-use observation remains a separately proposed future mechanism. No provider request of any kind—including Count Tokens or Create—target-repository execution, paid spend, or fixed campaign is authorized by this activation. Any stop condition requires an RFC #577 amendment before further technical work. -1. Complete the exact #610 activation, implementation, one fixed campaign, sealed review, and receipt gates. -2. Run external design-partner validation. -3. Publish a beta under npm tag `next` only after its preceding gates authorize it. +The remaining dependency order is: + +1. Complete exact #612 governance activation and separately authorized offline implementation. +2. Approve and prove the provider-account observer, then separately lock and run the unchanged fixed campaign. +3. Run external design-partner validation. +4. Publish a beta under npm tag `next` only after its preceding gates authorize it. Every replacement issue has an exact deletion contract. New and old implementations may coexist only temporarily on the reset integration branch; the old path cannot survive the phase. diff --git a/tests/unit/core-reset-governance.test.ts b/tests/unit/core-reset-governance.test.ts index de960276..77386b28 100644 --- a/tests/unit/core-reset-governance.test.ts +++ b/tests/unit/core-reset-governance.test.ts @@ -1,4 +1,5 @@ import { execFileSync } from 'node:child_process' +import { isUtf8 } from 'node:buffer' import { createHash } from 'node:crypto' import { existsSync, @@ -327,12 +328,6 @@ const CAPABILITY_VALIDATION_CONTRACT_SCHEMA = 'tools/eval/core-reset/schemas/capability-validation-contract.schema.json' const CAPABILITY_VALIDATION_RECEIPT_SCHEMA = 'tools/eval/core-reset/schemas/capability-validation-receipt.schema.json' -const CAPABILITY_VALIDATION_ACTIVATION_FILES = [ - ...EVALUATION_TOOLING_ACTIVATION_FILES, - CAPABILITY_VALIDATION_CONTRACT, - CAPABILITY_VALIDATION_CONTRACT_SCHEMA, - CAPABILITY_VALIDATION_RECEIPT_SCHEMA, -] as const const CAPABILITY_VALIDATION_FROZEN_HASHES = { 'tools/eval/core-reset/contracts/evaluation-contract.json': 'c22819a9e24e53f7b11a69c06511a8dc0c2cba8841868d8d9bb734575290bba9', @@ -350,6 +345,67 @@ const CAPABILITY_VALIDATION_ASSET_HASHES = { [CAPABILITY_VALIDATION_CONTRACT_SCHEMA]: '6d8679e335730180bee0c9fc62f144ae2086ea16dade800887a0301da27f23b6', [CAPABILITY_VALIDATION_RECEIPT_SCHEMA]: 'a33a6b3532a3e0df62bcd0f3616a9585b2be4ede1f360cf3d55f70c99c29f30e', } as const +const CAPABILITY_VALIDATION_STOP_ISSUE_RECEIPT = + 'https://github.com/mohanagy/madar/issues/610#issuecomment-5083281270' +const CAPABILITY_VALIDATION_STOP_RFC_RECEIPT = + 'https://github.com/mohanagy/madar/issues/577#issuecomment-5083282711' +const CAPABILITY_VALIDATION_STOP_BODY_HASHES = { + issue: '115e88cc3e1e00066c92f6ce4b3dd9ed8e0f6eabc1f8dbad918d1125c5cdaef9', + rfc: '65ac67ca30f24eb2c9d2741ab12ee42d2f593915220ff1251adb8af97e717ed0', +} as const +const CAPABILITY_VALIDATION_V2_BASE = 'dcb52596a3efa89f9ef5d372231ce97a91ae5f9f' +const CAPABILITY_VALIDATION_V2_BASE_TREE = 'd0ca317290dbd6837295f36f36ded5b49855c0fe' +const CAPABILITY_VALIDATION_V2_SRC_TREE = '1a37e3a58ee7b2a75ca034112506590f699b3918' +const CAPABILITY_VALIDATION_V2_TOOLS_EVAL_TREE = 'b8ef02da3ce135596e87fdf6252441755061d956' +const CAPABILITY_VALIDATION_V2_PROPOSAL_SHA256 = + '4906405cbb806c850c0612305ef460e023e2060b5338734ae0af12303901cbd0' +const CAPABILITY_VALIDATION_V2_ISSUE = 'https://github.com/mohanagy/madar/issues/612' +const CAPABILITY_VALIDATION_V2_PROPOSAL_RECEIPT = + `${CAPABILITY_VALIDATION_V2_ISSUE}#issuecomment-5083546156` +const CAPABILITY_VALIDATION_V2_RFC_PROPOSAL_RECEIPT = + 'https://github.com/mohanagy/madar/issues/577#issuecomment-5083547611' +const CAPABILITY_VALIDATION_V2_OWNER_APPROVAL = + `${CAPABILITY_VALIDATION_V2_ISSUE}#issuecomment-5083661878` +const CAPABILITY_VALIDATION_V2_RFC_APPROVAL = + 'https://github.com/mohanagy/madar/issues/577#issuecomment-5083662827' +const CAPABILITY_VALIDATION_V2_CONTRACT = + 'tools/eval/core-reset/contracts/capability-validation-v2.json' +const CAPABILITY_VALIDATION_V2_CONTRACT_SCHEMA = + 'tools/eval/core-reset/schemas/capability-validation-contract-v2.schema.json' +const CAPABILITY_VALIDATION_V2_RECEIPT_SCHEMA = + 'tools/eval/core-reset/schemas/capability-validation-receipt-v2.schema.json' +const CAPABILITY_VALIDATION_V2_ACTIVATION_FILES = [ + ...EVALUATION_TOOLING_ACTIVATION_FILES, + CAPABILITY_VALIDATION_V2_CONTRACT, + CAPABILITY_VALIDATION_V2_CONTRACT_SCHEMA, + CAPABILITY_VALIDATION_V2_RECEIPT_SCHEMA, +] as const +const CAPABILITY_VALIDATION_V2_ASSET_HASHES = { + [CAPABILITY_VALIDATION_V2_CONTRACT]: '21d45642cbac36b0ae99258f6aa1d64480a33a20e0fc7334ffd166989ea0f44c', + [CAPABILITY_VALIDATION_V2_CONTRACT_SCHEMA]: + 'ce6f2b132868d65e92ef958cdd28f39744f8169a21fcd4ef95d666a13ae0ae58', + [CAPABILITY_VALIDATION_V2_RECEIPT_SCHEMA]: '0aa0743837bdb2fa23430807c89d3ae433ee19c64fb0aa20901d53c5306204e2', +} as const +const CAPABILITY_VALIDATION_V2_ASSET_LIMITS: Record = { + [CAPABILITY_VALIDATION_V2_CONTRACT]: { lines: 1_400, bytes: 196_608 }, + [CAPABILITY_VALIDATION_V2_CONTRACT_SCHEMA]: { lines: 200, bytes: 262_144 }, + [CAPABILITY_VALIDATION_V2_RECEIPT_SCHEMA]: { lines: 1_600, bytes: 1_638_400 }, +} as const +const CAPABILITY_VALIDATION_V2_ALLOWED_DIFFERENCE_POINTERS = [ + '/schema_version', + '/contract_id', + '/status', + '/governance', + '/anchors/protected_base_commit', + '/anchors/base_tree', + '/anchors/tools_eval_tree', + '/inheritance', + '/receipt/path', + '/receipt/schema_path', + '/receipt/canonical_transcript', + '/receipt/canonical_archive', + '/execution_boundary', +] as const const EVALUATION_TOOLING_FROZEN_EVIDENCE = [ 'docs/core-reset/evidence/baseline-v0.32.0.json', 'docs/core-reset/evidence/evidence-path-held-out.json', @@ -644,6 +700,45 @@ const canonicalJson = (value: unknown): string => { `${JSON.stringify(key)}:${canonicalJson(record[key])}`).join(',')}}` } +const withoutJsonPointers = (value: unknown, pointers: readonly string[]): unknown => { + const clone = structuredClone(value) + for (const pointer of pointers) { + const segments = pointer.slice(1).split('/').map((segment) => + segment.replaceAll('~1', '/').replaceAll('~0', '~')) + let parent = clone as Record + for (const segment of segments.slice(0, -1)) { + parent = parent[segment] as Record + } + delete parent[segments.at(-1)!] + } + return clone +} + +const strictJson = (source: string): unknown => { + const value = JSON.parse(source) + parse(source) // YAML's JSON-compatible parser rejects duplicate mapping keys that JSON.parse discards. + const visit = (candidate: unknown): void => { + if (typeof candidate === 'string') { + for (let index = 0; index < candidate.length; index += 1) { + const unit = candidate.charCodeAt(index) + if (unit >= 0xd800 && unit <= 0xdbff && candidate.charCodeAt(++index) >= 0xdc00 + && candidate.charCodeAt(index) <= 0xdfff) continue + if (unit >= 0xd800 && unit <= 0xdfff) throw new Error('lone Unicode surrogate') + } + } else if (Array.isArray(candidate)) candidate.forEach(visit) + else if (candidate && typeof candidate === 'object') { + for (const [key, child] of Object.entries(candidate)) { visit(key); visit(child) } + } + } + visit(value) + return value +} +const readStrictJson = (path: string): unknown => { + const bytes = readFileSync(resolve(path)) + if (!isUtf8(bytes)) throw new Error(`${path}: invalid UTF-8`) + return strictJson(bytes.toString('utf8')) +} + describe('core reset governance', () => { it('keeps one linked roadmap and RFC contract', () => { const roadmap = read('docs/roadmap.md') @@ -665,11 +760,15 @@ describe('core reset governance', () => { expect(roadmap).toContain('## Passed — evidence-path query') expect(roadmap).toContain('## Passed — thin delivery') expect(roadmap).toContain('## Passed — evaluation tooling isolation') - expect(roadmap).toContain('## In progress — capability validation') + expect(roadmap).toContain('## In progress — capability validation v2') expect(roadmap).toContain(CAPABILITY_VALIDATION_PROPOSAL_SHA256) expect(roadmap).toContain(CAPABILITY_VALIDATION_OWNER_APPROVAL) expect(roadmap).toContain(CAPABILITY_VALIDATION_RFC_APPROVAL) expect(roadmap).toContain(CAPABILITY_VALIDATION_BASE) + expect(roadmap).toContain(CAPABILITY_VALIDATION_V2_PROPOSAL_SHA256) + expect(roadmap).toContain(CAPABILITY_VALIDATION_V2_OWNER_APPROVAL) + expect(roadmap).toContain(CAPABILITY_VALIDATION_V2_RFC_APPROVAL) + expect(roadmap).toContain(CAPABILITY_VALIDATION_V2_BASE) expect(roadmap).toContain(EVALUATION_TOOLING_OWNER_APPROVAL) expect(roadmap).toContain(EVALUATION_TOOLING_RFC_APPROVAL) expect(roadmap).toContain(EVALUATION_TOOLING_BASE) @@ -754,11 +853,16 @@ describe('core reset governance', () => { expect(design).toContain('## Completed amendment — generic evidence-path query') expect(design).toContain('## Completed amendment — thin delivery') expect(design).toContain('## Completed amendment — evaluation tooling isolation') - expect(design).toContain('## Accepted amendment — capability validation') + expect(design).toContain('## Stopped amendment — capability validation v1') + expect(design).toContain('## Accepted amendment — capability validation v2') expect(design).toContain(CAPABILITY_VALIDATION_PROPOSAL_SHA256) expect(design).toContain(CAPABILITY_VALIDATION_OWNER_APPROVAL) expect(design).toContain(CAPABILITY_VALIDATION_RFC_APPROVAL) expect(design).toContain(CAPABILITY_VALIDATION_BASE) + expect(design).toContain(CAPABILITY_VALIDATION_V2_PROPOSAL_SHA256) + expect(design).toContain(CAPABILITY_VALIDATION_V2_OWNER_APPROVAL) + expect(design).toContain(CAPABILITY_VALIDATION_V2_RFC_APPROVAL) + expect(design).toContain(CAPABILITY_VALIDATION_V2_BASE) expect(design).toContain(EVALUATION_TOOLING_OWNER_APPROVAL) expect(design).toContain(EVALUATION_TOOLING_RFC_APPROVAL) expect(design).toContain(EVALUATION_TOOLING_BASE) @@ -837,11 +941,16 @@ describe('core reset governance', () => { expect(scorecard).toContain('| Evidence-path query | **Passed**') expect(scorecard).toContain('| Delivery and package | **Passed**') expect(scorecard).toContain('| Evaluation tooling isolation | **Passed**') - expect(scorecard).toContain('| Capability validation | **In progress**') + expect(scorecard).toContain('| Capability validation v1 | **Stopped**') + expect(scorecard).toContain('| Capability validation v2 | **In progress**') expect(scorecard).toContain(CAPABILITY_VALIDATION_PROPOSAL_SHA256) expect(scorecard).toContain(CAPABILITY_VALIDATION_OWNER_APPROVAL) expect(scorecard).toContain(CAPABILITY_VALIDATION_RFC_APPROVAL) expect(scorecard).toContain(CAPABILITY_VALIDATION_BASE) + expect(scorecard).toContain(CAPABILITY_VALIDATION_V2_PROPOSAL_SHA256) + expect(scorecard).toContain(CAPABILITY_VALIDATION_V2_OWNER_APPROVAL) + expect(scorecard).toContain(CAPABILITY_VALIDATION_V2_RFC_APPROVAL) + expect(scorecard).toContain(CAPABILITY_VALIDATION_V2_BASE) expect(scorecard).toContain(EVALUATION_TOOLING_OWNER_APPROVAL) expect(scorecard).toContain(EVALUATION_TOOLING_RFC_APPROVAL) expect(scorecard).toContain(EVALUATION_TOOLING_BASE) @@ -877,7 +986,7 @@ describe('core reset governance', () => { expect(scorecard).toContain('only an authenticated canonical symbol declaration may provide a snippet or cover a phase') expect(scorecard).toContain('Identical normalized request plus identical canonical graph bytes') expect(scorecard).toContain('every warmup/measured result must remain correct; an empty positive result fails') - expect(scorecard).toContain('`capability-validation` is the sole active phase') + expect(scorecard).toContain('`capability-validation-v2` is the sole active phase') expect(scorecard).toContain('exactly 20 production TypeScript files / 4,698 LOC') expect(scorecard).toContain('completed Evaluation Tooling Isolation is 43 files / 11,956 LOC') expect(scorecard).toContain('- [x] Production cannot import `tools/eval`') @@ -1088,9 +1197,9 @@ describe('core reset governance', () => { expect(manifest.current).toMatchObject({ updated_at: '2026-07-26', completed_phase: 'evaluation-tooling', - active_phase: 'capability-validation', + active_phase: 'capability-validation-v2', ready_phase: null, - base_commit: CAPABILITY_VALIDATION_BASE, + base_commit: CAPABILITY_VALIDATION_V2_BASE, completed_phase_commit: EVALUATION_TOOLING_MERGE, production_typescript_files: 43, production_typescript_loc: 11_956, @@ -1112,7 +1221,8 @@ describe('core reset governance', () => { for (const item of manifest.items) { expect(item.id.trim().length).toBeGreaterThan(0) expect(['keep', 'rebuild', 'move', 'delete', 'defer']).toContain(item.disposition) - expect(['proposed', 'planned', 'ready', 'in_progress', 'complete', 'approved_exception']).toContain(item.status) + expect(['proposed', 'planned', 'ready', 'in_progress', 'complete', 'stopped', 'approved_exception']) + .toContain(item.status) expect(item.exit_gate.trim().length).toBeGreaterThan(0) for (const source of item.sources ?? []) { expect(source.trim()).toMatch(/^(?:\.github|docs|examples|src|tests|tools)\//) @@ -1217,7 +1327,7 @@ describe('core reset governance', () => { expect(logicalLocAtCommit(legacyBase, deletionFiles)).toBe(20_951) const generation = manifest.items.find((item) => item.id === 'generation-and-incremental') expect(manifest.items.filter((item) => item.status === 'in_progress').map((item) => item.id)) - .toEqual(['capability-validation']) + .toEqual(['capability-validation-v2']) expect(generation).toMatchObject({ status: 'complete', sources: INCREMENTAL_OWNED_REPLACEMENTS, @@ -1536,9 +1646,9 @@ describe('core reset governance', () => { expect(manifest.current).toMatchObject({ updated_at: '2026-07-26', completed_phase: 'evaluation-tooling', - active_phase: 'capability-validation', + active_phase: 'capability-validation-v2', ready_phase: null, - base_commit: CAPABILITY_VALIDATION_BASE, + base_commit: CAPABILITY_VALIDATION_V2_BASE, completed_phase_commit: EVALUATION_TOOLING_MERGE, production_typescript_files: 43, production_typescript_loc: 11_956, @@ -1549,7 +1659,7 @@ describe('core reset governance', () => { snapshot_scope: 'exact_implementation_source_and_package', }) expect(manifest.items.filter((item) => item.status === 'in_progress').map((item) => item.id)) - .toEqual(['capability-validation']) + .toEqual(['capability-validation-v2']) expect(manifest.targets).toMatchObject({ production_typescript_files_max: 80, production_typescript_loc_max: 35_000, @@ -2402,9 +2512,9 @@ describe('core reset governance', () => { )).not.toThrow() expect(manifest.current).toMatchObject({ completed_phase: 'evaluation-tooling', - active_phase: 'capability-validation', + active_phase: 'capability-validation-v2', ready_phase: null, - base_commit: CAPABILITY_VALIDATION_BASE, + base_commit: CAPABILITY_VALIDATION_V2_BASE, completed_phase_commit: EVALUATION_TOOLING_MERGE, production_typescript_files: 43, production_typescript_loc: 11_956, @@ -2416,7 +2526,7 @@ describe('core reset governance', () => { npm_unpacked_bytes: 637_602, }) expect(manifest.items.filter((item) => item.status === 'in_progress').map((item) => item.id)) - .toEqual(['capability-validation']) + .toEqual(['capability-validation-v2']) const evaluation = manifest.items.find((item) => item.id === 'evaluation-tooling') expect(evaluation).toMatchObject({ @@ -2834,7 +2944,7 @@ describe('core reset governance', () => { )).not.toThrow() }) - it('activates the exact Capability Validation governance contract without implementation drift', () => { + it('freezes the stopped Capability Validation v1 contract and first-stop receipt', () => { const manifest = parse(read('docs/core-reset/removal-manifest.yml')) as { current: Record items: Array & { id: string; status: string }> @@ -2850,8 +2960,8 @@ describe('core reset governance', () => { | undefined expect(manifest.current).toMatchObject({ completed_phase: 'evaluation-tooling', - active_phase: 'capability-validation', - base_commit: CAPABILITY_VALIDATION_BASE, + active_phase: 'capability-validation-v2', + base_commit: CAPABILITY_VALIDATION_V2_BASE, production_typescript_files: 43, production_typescript_loc: 11_956, production_loc_added: 0, @@ -2859,10 +2969,10 @@ describe('core reset governance', () => { production_loc_net: 0, }) expect(manifest.items.filter((item) => item.status === 'in_progress').map((item) => item.id)) - .toEqual(['capability-validation']) + .toEqual(['capability-validation-v2']) expect(phase).toMatchObject({ disposition: 'keep', - status: 'in_progress', + status: 'stopped', production_file_budget: { added_max: 0, removed_exact: 0 }, production_loc_budget: { added_max: 0, removed_exact: 0, net_exact: 0 }, anchor: { @@ -2879,7 +2989,21 @@ describe('core reset governance', () => { rfc_amendment: CAPABILITY_VALIDATION_RFC_APPROVAL, protected_base: CAPABILITY_VALIDATION_BASE, target_branch: 'core-reset', - second_owner_hash_approval: 'required_before_activation_merge', + second_owner_hash_approval: 'passed', + activation_head: '80e942a8a28e3895465aa9ca432c4a926054055d', + activation_merge: CAPABILITY_VALIDATION_V2_BASE, + activation_tree: CAPABILITY_VALIDATION_V2_BASE_TREE, + }, + stop: { + conditions: [7, 8, 13], + issue_receipt: CAPABILITY_VALIDATION_STOP_ISSUE_RECEIPT, + issue_receipt_body_sha256: CAPABILITY_VALIDATION_STOP_BODY_HASHES.issue, + rfc_receipt: CAPABILITY_VALIDATION_STOP_RFC_RECEIPT, + rfc_receipt_body_sha256: CAPABILITY_VALIDATION_STOP_BODY_HASHES.rfc, + implementation_pr_opened: false, + campaign_lock_created: false, + provider_requests: 0, + spend_usd: 0, }, }) @@ -3069,14 +3193,263 @@ describe('core reset governance', () => { ], }) + expect(() => execFileSync(git, [ + 'diff', '--exit-code', CAPABILITY_VALIDATION_V2_BASE, '--', + CAPABILITY_VALIDATION_CONTRACT, + CAPABILITY_VALIDATION_CONTRACT_SCHEMA, + CAPABILITY_VALIDATION_RECEIPT_SCHEMA, + ])).not.toThrow() + }) + + it('activates only the exact Capability Validation v2 governance successor', () => { + const manifest = parse(read('docs/core-reset/removal-manifest.yml')) as { + current: Record + items: Array & { id: string; status: string }> + } + const phase = manifest.items.find((item) => item.id === 'capability-validation-v2') as + | (Record & { + governance_assets: { + contract: { path: string; sha256: string } + contract_schema: { path: string; sha256: string } + receipt_schema: { path: string; sha256: string } + } + }) + | undefined + expect(manifest.current).toMatchObject({ + completed_phase: 'evaluation-tooling', + active_phase: 'capability-validation-v2', + ready_phase: null, + base_commit: CAPABILITY_VALIDATION_V2_BASE, + production_typescript_files: 43, + production_typescript_loc: 11_956, + production_loc_added: 0, + production_loc_removed: 0, + production_loc_net: 0, + }) + expect(manifest.items.filter((item) => item.status === 'in_progress').map((item) => item.id)) + .toEqual(['capability-validation-v2']) + expect(phase).toMatchObject({ + disposition: 'keep', + status: 'in_progress', + predecessor: 'capability-validation', + supersedes: 'development implementation allowlist and LOC ceiling only', + production_file_budget: { added_max: 0, removed_exact: 0 }, + production_loc_budget: { added_max: 0, removed_exact: 0, net_exact: 0 }, + anchor: { + commit: CAPABILITY_VALIDATION_V2_BASE, + tree: CAPABILITY_VALIDATION_V2_BASE_TREE, + src_tree: CAPABILITY_VALIDATION_V2_SRC_TREE, + tools_eval_tree: CAPABILITY_VALIDATION_V2_TOOLS_EVAL_TREE, + }, + predecessor_stop: { + conditions: [7, 8, 13], + issue_receipt: CAPABILITY_VALIDATION_STOP_ISSUE_RECEIPT, + issue_receipt_body_sha256: CAPABILITY_VALIDATION_STOP_BODY_HASHES.issue, + rfc_receipt: CAPABILITY_VALIDATION_STOP_RFC_RECEIPT, + rfc_receipt_body_sha256: CAPABILITY_VALIDATION_STOP_BODY_HASHES.rfc, + }, + implementation_budget: { + touched_paths_exact: 53, + added_physical_lines_max: 29_130, + removed_physical_lines_max: 350, + activation_plus_implementation_added_max: 32_980, + activation_plus_implementation_removed_max: 600, + production_files_or_loc_changed: 0, + dependencies_changed: 0, + compatibility_aliases: 'forbidden', + }, + governance_closure: { + after: 'exact_offline_implementation_merge_only', + added_physical_lines_max: 400, + removed_physical_lines_max: 200, + activation_plus_implementation_plus_closure_added_max: 33_380, + activation_plus_implementation_plus_closure_removed_max: 800, + }, + activation: { + issue: CAPABILITY_VALIDATION_V2_ISSUE, + proposal_receipt: CAPABILITY_VALIDATION_V2_PROPOSAL_RECEIPT, + rfc_proposal_receipt: CAPABILITY_VALIDATION_V2_RFC_PROPOSAL_RECEIPT, + owner_approval: CAPABILITY_VALIDATION_V2_OWNER_APPROVAL, + rfc_amendment: CAPABILITY_VALIDATION_V2_RFC_APPROVAL, + protected_base: CAPABILITY_VALIDATION_V2_BASE, + target_branch: 'core-reset', + second_owner_hash_approval: 'required_before_activation_merge', + }, + }) + + expect(execFileSync(git, ['rev-parse', `${CAPABILITY_VALIDATION_V2_BASE}^{tree}`], { encoding: 'utf8' }).trim()) + .toBe(CAPABILITY_VALIDATION_V2_BASE_TREE) + expect(execFileSync(git, ['rev-parse', `${CAPABILITY_VALIDATION_V2_BASE}:src`], { encoding: 'utf8' }).trim()) + .toBe(CAPABILITY_VALIDATION_V2_SRC_TREE) + expect(execFileSync(git, ['rev-parse', `${CAPABILITY_VALIDATION_V2_BASE}:tools/eval`], { encoding: 'utf8' }).trim()) + .toBe(CAPABILITY_VALIDATION_V2_TOOLS_EVAL_TREE) + for (const [path, expected] of Object.entries(CAPABILITY_VALIDATION_ASSET_HASHES)) { + expect(createHash('sha256').update(readFileSync(resolve(path))).digest('hex'), path).toBe(expected) + } + + let assetLines = 0 + let assetBytes = 0 + for (const [path, expected] of Object.entries(CAPABILITY_VALIDATION_V2_ASSET_HASHES)) { + const source = read(path) + const lines = (source.match(/\n/g)?.length ?? 0) + (source.length > 0 && !source.endsWith('\n') ? 1 : 0) + const bytes = Buffer.byteLength(source) + assetLines += lines + assetBytes += bytes + const limit = CAPABILITY_VALIDATION_V2_ASSET_LIMITS[path]! + expect(lines, path).toBeLessThanOrEqual(limit.lines) + expect(bytes, path).toBeLessThanOrEqual(limit.bytes) + expect(createHash('sha256').update(source).digest('hex'), path).toBe(expected) + } + expect(assetLines).toBeLessThanOrEqual(3_200) + expect(assetBytes).toBeLessThanOrEqual(2_097_152) + expect(phase?.governance_assets).toMatchObject({ + proposal_body_sha256: CAPABILITY_VALIDATION_V2_PROPOSAL_SHA256, + exact_added_assets: 3, + contract: { + path: CAPABILITY_VALIDATION_V2_CONTRACT, + sha256: CAPABILITY_VALIDATION_V2_ASSET_HASHES[CAPABILITY_VALIDATION_V2_CONTRACT], + }, + contract_schema: { + path: CAPABILITY_VALIDATION_V2_CONTRACT_SCHEMA, + sha256: CAPABILITY_VALIDATION_V2_ASSET_HASHES[CAPABILITY_VALIDATION_V2_CONTRACT_SCHEMA], + }, + receipt_schema: { + path: CAPABILITY_VALIDATION_V2_RECEIPT_SCHEMA, + sha256: CAPABILITY_VALIDATION_V2_ASSET_HASHES[CAPABILITY_VALIDATION_V2_RECEIPT_SCHEMA], + }, + }) + + expect(() => strictJson('{"duplicate":1,"duplicate":2}')).toThrow() + expect(() => strictJson('{"invalid":"\\ud800"}')).toThrow() + const v1Contract = readStrictJson(CAPABILITY_VALIDATION_CONTRACT) + const contract = readStrictJson(CAPABILITY_VALIDATION_V2_CONTRACT) as any + expect(contract).toMatchObject({ + contract_id: 'core-reset-capability-validation-v2', + governance: { + proposal_body_sha256: CAPABILITY_VALIDATION_V2_PROPOSAL_SHA256, + target_branch: 'core-reset', + forbidden_branch: 'main', + activation_merge_authorized_by_first_stage: false, + offline_implementation_authorized_by_first_stage: false, + campaign_lock_authorized_by_first_stage: false, + provider_request_authorized_by_first_stage: false, + provider_spend_authorized_by_first_stage_cents: 0, + }, + inheritance: { + comparison: { + allowed_difference_pointers: [...CAPABILITY_VALIDATION_V2_ALLOWED_DIFFERENCE_POINTERS], + deny_unlisted: true, + }, + source_stop_receipts: { + issue_610_body_sha256: CAPABILITY_VALIDATION_STOP_BODY_HASHES.issue, + rfc_577_body_sha256: CAPABILITY_VALIDATION_STOP_BODY_HASHES.rfc, + matched_stop_condition_ids: [7, 8, 13], + }, + }, + execution_boundary: { + authorization: { + current_scope: expect.stringContaining('publication of the activation branch and activation PR'), + forbidden_under_first_stage: expect.arrayContaining(['npm/package/product publication']), + }, + closure: { + after: 'exact offline implementation merge only', + records_only: expect.arrayContaining(['v2 offline execution boundary passed']), + full_activation_implementation_closure_numstat: { + max_added_lines: 33_380, + max_removed_lines: 800, + }, + }, + implementation: { + exact_path_count: 53, + global_numstat: { max_added_lines: 29_130, max_removed_lines: 350 }, + }, + review_and_merge: { + activation_external_approval_audit: { + protected_base_tip_gate: expect.objectContaining({ expected_commit: CAPABILITY_VALIDATION_V2_BASE, expected_tree: CAPABILITY_VALIDATION_V2_BASE_TREE }), + known_live_receipts: expect.arrayContaining([ + expect.objectContaining({ purpose: 'issue_610_stop' }), + expect.objectContaining({ purpose: 'rfc_577_first_stage' }), + ]), + required_second_stage_receipts: expect.arrayContaining([ + expect.objectContaining({ purpose: 'issue_612_second_stage' }), + expect.objectContaining({ purpose: 'rfc_577_second_stage' }), + ]), + }, + }, + stop_action: expect.stringContaining('post the durable stop record on #612'), + }, + }) + const strippedV1 = withoutJsonPointers(v1Contract, CAPABILITY_VALIDATION_V2_ALLOWED_DIFFERENCE_POINTERS) + const strippedV2 = withoutJsonPointers(contract, CAPABILITY_VALIDATION_V2_ALLOWED_DIFFERENCE_POINTERS) + expect(strippedV2).toEqual(strippedV1) + expect(canonicalJson(strippedV2)).toBe(canonicalJson(strippedV1)) + expect(new Set(contract.execution_boundary.receipt_derivation.private_artifact_kinds).size) + .toBe(contract.execution_boundary.receipt_derivation.private_artifact_kinds.length) + expect(contract.execution_boundary.receipt_derivation.private_artifact_kinds).toHaveLength(25) + expect(contract.execution_boundary.receipt_derivation.private_artifact_kinds) + .not.toContain('other_private') + + const contractSchema = JSON.parse(read(CAPABILITY_VALIDATION_V2_CONTRACT_SCHEMA)) + // @ts-expect-error -- Ajv's NodeNext declaration shape differs from its runtime default export + const contractAjv = new Ajv2020({ allErrors: true, strict: true }) + // @ts-expect-error -- ajv-formats has the same declaration/runtime mismatch + addFormats(contractAjv) + const validateContract = contractAjv.compile(contractSchema) + expect(validateContract(contract), contractAjv.errorsText(validateContract.errors)).toBe(true) + const widened = structuredClone(contract) + widened.governance.provider_request_authorized_by_first_stage = true + expect(validateContract(widened)).toBe(false) + + const receiptSchema = readStrictJson(CAPABILITY_VALIDATION_V2_RECEIPT_SCHEMA) as any; const receiptRefs: string[] = [] + const collectRefs = (value: any): void => { + if (Array.isArray(value)) value.forEach(collectRefs) + else if (value && typeof value === 'object') { + if (typeof value.$ref === 'string') receiptRefs.push(value.$ref) + Object.values(value).forEach(collectRefs) + } + } + collectRefs(receiptSchema); expect(receiptRefs.every((ref) => ref.startsWith('#/$defs/'))).toBe(true) + const validatePublicReceipt = contractAjv.compile(receiptSchema) + const privateRefs = receiptSchema.$defs.privateEvidenceEnvelope.oneOf.map( + ({ $ref }: { $ref: string }) => $ref) + expect(privateRefs).toHaveLength(25) + const privateValidators = privateRefs.map((ref: string) => { + const name = ref.slice('#/$defs/'.length) + const definition = receiptSchema.$defs[name] + expect(definition).toMatchObject({ type: 'object', additionalProperties: false, required: + expect.arrayContaining(['artifact_kind']), properties: { artifact_kind: { const: expect.any(String) } } }) + const validate = contractAjv.compile({ $ref: `${receiptSchema.$id}${ref}` }); const fixture = structuredClone(definition.examples[0]) + expect(validate(fixture), contractAjv.errorsText(validate.errors)).toBe(true) + const missing = structuredClone(fixture); delete missing.artifact_kind + expect(validate(missing)).toBe(false) + expect(validate({ ...fixture, unexpected: true })).toBe(false) + expect(validatePublicReceipt(fixture)).toBe(false) + return { fixture, kind: definition.properties.artifact_kind.const, validate } + }) + expect(privateValidators.map(({ kind }: any) => kind)).toEqual( + contract.execution_boundary.receipt_derivation.private_artifact_kinds) + for (const { fixture } of privateValidators) expect( + privateValidators.filter(({ validate }: any) => validate(fixture))).toHaveLength(1) + for (const name of ['derivedArchiveManifest', 'privateArchiveIndex', 'derivedArchiveCopyAttestation', + 'externalArchiveVerifierAttestation']) { + expect(receiptSchema.$defs[name]).toBeDefined() + expect(privateRefs).not.toContain(`#/$defs/${name}`) + } + const nameStatus = execFileSync(git, [ - 'diff', '--no-ext-diff', '--no-renames', '--name-status', CAPABILITY_VALIDATION_BASE, '--', + 'diff', '--no-ext-diff', '--no-renames', '--name-status', CAPABILITY_VALIDATION_V2_BASE, '--', ], { encoding: 'utf8' }).trim().split('\n').filter(Boolean) expect(nameStatus.every((line) => /^(?:A|M)\t/.test(line))).toBe(true) expect(nameStatus.map((line) => line.slice(line.indexOf('\t') + 1)).sort()) - .toEqual([...CAPABILITY_VALIDATION_ACTIVATION_FILES].sort()) + .toEqual([...CAPABILITY_VALIDATION_V2_ACTIVATION_FILES].sort()) + expect(nameStatus.filter((line) => line.startsWith('A\t')).map((line) => line.slice(2)).sort()) + .toEqual([ + CAPABILITY_VALIDATION_V2_CONTRACT, + CAPABILITY_VALIDATION_V2_CONTRACT_SCHEMA, + CAPABILITY_VALIDATION_V2_RECEIPT_SCHEMA, + ].sort()) const rows = execFileSync(git, [ - 'diff', '--no-ext-diff', '--no-renames', '--numstat', CAPABILITY_VALIDATION_BASE, '--', + 'diff', '--no-ext-diff', '--no-renames', '--numstat', CAPABILITY_VALIDATION_V2_BASE, '--', ], { encoding: 'utf8' }).trim().split('\n').filter(Boolean).map((line) => { const [added = '', removed = '', path = ''] = line.split('\t') expect([added, removed]).not.toContain('-') @@ -3084,18 +3457,10 @@ describe('core reset governance', () => { }) const governance = rows.filter((row) => (EVALUATION_TOOLING_ACTIVATION_FILES as readonly string[]).includes(row.path)) - expect(governance.reduce((sum, row) => sum + row.added, 0)).toBeLessThanOrEqual(600) + expect(governance.reduce((sum, row) => sum + row.added, 0)).toBeLessThanOrEqual(650) expect(governance.reduce((sum, row) => sum + row.removed, 0)).toBeLessThanOrEqual(250) - expect(rows.reduce((sum, row) => sum + row.added, 0)).toBeLessThanOrEqual(2_900) + expect(rows.reduce((sum, row) => sum + row.added, 0)).toBeLessThanOrEqual(3_850) expect(rows.reduce((sum, row) => sum + row.removed, 0)).toBeLessThanOrEqual(250) - expect(() => execFileSync(git, [ - 'diff', '--exit-code', CAPABILITY_VALIDATION_BASE, '--', - 'src', 'package.json', 'package-lock.json', 'tsconfig.json', 'tsconfig.build.json', - 'tsconfig.eval.json', '.github/workflows/ci.yml', 'docs/core-reset/evidence', - 'tools/eval/core-reset/contracts/evaluation-contract.json', - 'tools/eval/core-reset/schemas/evaluation-contract.schema.json', - 'tools/eval/core-reset/contract-validation.mjs', - ])).not.toThrow() }) it('freezes the completed combined evidence-path implementation contract and receipt', () => { @@ -3472,9 +3837,9 @@ describe('core reset governance', () => { expect(manifest.current).toMatchObject({ updated_at: '2026-07-26', completed_phase: 'evaluation-tooling', - active_phase: 'capability-validation', + active_phase: 'capability-validation-v2', ready_phase: null, - base_commit: CAPABILITY_VALIDATION_BASE, + base_commit: CAPABILITY_VALIDATION_V2_BASE, completed_phase_commit: EVALUATION_TOOLING_MERGE, production_typescript_files: 43, production_typescript_loc: 11_956, @@ -3488,7 +3853,7 @@ describe('core reset governance', () => { snapshot_scope: 'exact_implementation_source_and_package', }) expect(manifest.items.filter((item) => item.status === 'in_progress').map((item) => item.id)) - .toEqual(['capability-validation']) + .toEqual(['capability-validation-v2']) const evidence = manifest.items.find((item) => item.id === 'evidence-path-query') expect(evidence).toMatchObject({ @@ -4993,9 +5358,10 @@ describe('core reset governance', () => { expect(governance).toContain('## Passed — thin delivery') expect(governance).toContain('## Passed — evaluation tooling isolation') expect(governance).toContain('## Completed amendment — evaluation tooling isolation') - expect(governance).toContain('## In progress — capability validation') - expect(governance).toContain('## Accepted amendment — capability validation') - expect(governance).toContain('`capability-validation` is the sole active phase') + expect(governance).toContain('## In progress — capability validation v2') + expect(governance).toContain('## Stopped amendment — capability validation v1') + expect(governance).toContain('## Accepted amendment — capability validation v2') + expect(governance).toContain('`capability-validation-v2` is the sole active phase') expect(governance).toContain('At that #608 completion checkpoint no technical phase was active') expect(governance).not.toContain('\nNo technical phase is active; Capability Validation') expect(governance).not.toContain('## In progress — evaluation tooling isolation') @@ -5023,5 +5389,6 @@ describe('core reset governance', () => { expect(governance).not.toContain('scope and baseline is the only authorized phase') expect(governance).not.toContain('Capability Validation is Ready') expect(governance).not.toContain('ready_phase: capability-validation') + expect(governance).not.toContain('`capability-validation` is the sole active phase') }) }) diff --git a/tools/eval/core-reset/contracts/capability-validation-v2.json b/tools/eval/core-reset/contracts/capability-validation-v2.json new file mode 100644 index 00000000..ec9bbd53 --- /dev/null +++ b/tools/eval/core-reset/contracts/capability-validation-v2.json @@ -0,0 +1,1303 @@ +{ + "schema_version": 2, + "contract_id": "core-reset-capability-validation-v2", + "status": "immutable-offline-successor-governance-contract", + "governance": { + "issue": 612, + "issue_url": "https://github.com/mohanagy/madar/issues/612", + "parent_rfc": 577, + "parent_rfc_url": "https://github.com/mohanagy/madar/issues/577", + "stopped_predecessor_issue": 610, + "stopped_predecessor_url": "https://github.com/mohanagy/madar/issues/610", + "target_branch": "core-reset", + "forbidden_branch": "main", + "proposal_body_sha256": "4906405cbb806c850c0612305ef460e023e2060b5338734ae0af12303901cbd0", + "proposal_receipt": "https://github.com/mohanagy/madar/issues/612#issuecomment-5083546156", + "rfc_proposal_receipt": "https://github.com/mohanagy/madar/issues/577#issuecomment-5083547611", + "first_owner_approval": "https://github.com/mohanagy/madar/issues/612#issuecomment-5083661878", + "rfc_first_owner_approval": "https://github.com/mohanagy/madar/issues/577#issuecomment-5083662827", + "first_owner_approval_scope": "prepare, publish, run CI for, and independently review only the governance-only activation candidate", + "activation_merge_authorized_by_first_stage": false, + "offline_implementation_authorized_by_first_stage": false, + "campaign_lock_authorized_by_first_stage": false, + "target_repository_execution_authorized_by_first_stage": false, + "provider_request_authorized_by_first_stage": false, + "provider_spend_authorized_by_first_stage_cents": 0, + "second_owner_approval_required": true, + "second_owner_approval_scope": ["unchanged activation head commit","v2 contract SHA-256","v2 contract schema SHA-256","v2 receipt schema SHA-256","every newly exact coordinator/relay, observed-authorization, non-resettable-ledger, native-monitor/sandbox, transcript/provider/MCP evidence, receipt-derivation, stopped-finalization, archive/fsync, public-validation, error, path, LOC, schema, and operational choice"], + "activation_merge_authorization": "conditional only on the live valid matching second-stage owner approval receipts binding the exact unchanged activation head and all three local asset SHA-256 values", + "offline_implementation_authorization": "conditional only after that same valid second-stage approval and merge of that exact unchanged activation head to protected core-reset; implementation starts from the exact activation merge in a new isolated worktree", + "campaign_execution_authorized_under_issue_612": false, + "target_repository_execution_authorized_under_issue_612": false, + "provider_request_authorized_under_issue_612": false, + "provider_spend_authorized_under_issue_612_cents": 0, + "future_campaign_approval": "separate proposal and explicit owner approval required after the exact offline implementation merge" + }, + "anchors": { + "protected_base_commit": "dcb52596a3efa89f9ef5d372231ce97a91ae5f9f", + "base_tree": "d0ca317290dbd6837295f36f36ded5b49855c0fe", + "src_tree": "1a37e3a58ee7b2a75ca034112506590f699b3918", + "tools_eval_tree": "b8ef02da3ce135596e87fdf6252441755061d956", + "package_json_sha256": "d464fd8e59b3d4d3f817ebdd6457fb3cfb02d9f3fad4fc8648f29c03a8a56b33", + "package_lock_sha256": "b9d179f0ee70e14d85653c5013cf2513efb22127b10fc3ee1deb5fa698993a61", + "tsconfig_eval_sha256": "b2eb8dea28aab40a794bda38f11100dcc98e8c2987b3d8fdefc62263ebe7ae17", + "ci_workflow_sha256": "4dde28b814127bceabe8e076c2f5afc286153d9f8b655cf5e8a1681f754ac2f8" + }, + "inheritance": { + "source_path": "tools/eval/core-reset/contracts/capability-validation-v1.json", + "source_contract_id": "core-reset-capability-validation-v1", + "source_git_blob": "6c1406a2d52e80127ca8670f331fc13d258ab0c3", + "source_sha256": "ae03a6b2cc8675ca66ad0ff67f06e13389cf04e6a6a8167c3404f1c8657f36f5", + "source_schema_path": "tools/eval/core-reset/schemas/capability-validation-contract.schema.json", + "source_schema_git_blob": "1cfc8a333b76966deb97d258aae99c05df7ece63", + "source_schema_sha256": "6d8679e335730180bee0c9fc62f144ae2086ea16dade800887a0301da27f23b6", + "source_receipt_schema_path": "tools/eval/core-reset/schemas/capability-validation-receipt.schema.json", + "source_receipt_schema_git_blob": "e05615cc97d31b2607d1e60b93fe080dddc75930", + "source_receipt_schema_sha256": "a33a6b3532a3e0df62bcd0f3616a9585b2be4ede1f360cf3d55f70c99c29f30e", + "source_proposal_body_sha256": "27c04eca61e8c3ae65e2a9eab5c0b7e269313be933cef785b94e9bdca7292ba5", + "source_activation_head": "80e942a8a28e3895465aa9ca432c4a926054055d", + "source_activation_merge": "dcb52596a3efa89f9ef5d372231ce97a91ae5f9f", + "source_activation_tree": "d0ca317290dbd6837295f36f36ded5b49855c0fe", + "source_stop_receipts": { + "issue_610_url": "https://github.com/mohanagy/madar/issues/610#issuecomment-5083281270", + "issue_610_body_sha256": "115e88cc3e1e00066c92f6ce4b3dd9ed8e0f6eabc1f8dbad918d1125c5cdaef9", + "rfc_577_url": "https://github.com/mohanagy/madar/issues/577#issuecomment-5083282711", + "rfc_577_body_sha256": "65ac67ca30f24eb2c9d2741ab12ee42d2f593915220ff1251adb8af97e717ed0", + "matched_stop_condition_ids": [7,8,13], + "historical_disposition": "immutable stopped record; not a trial, implementation base, authority source, cherry-pick target, or merge candidate" + }, + "comparison": { + "algorithm": "after exact source, source-schema, and source-receipt-schema byte-hash verification, reject duplicate JSON keys and invalid Unicode, parse both contracts, validate v1 against its immutable schema, then recursively compare RFC8785-JCS values at every object member and ordered array position", + "allowed_difference_pointers": ["/schema_version","/contract_id","/status","/governance","/anchors/protected_base_commit","/anchors/base_tree","/anchors/tools_eval_tree","/inheritance","/receipt/path","/receipt/schema_path","/receipt/canonical_transcript","/receipt/canonical_archive","/execution_boundary"], + "difference_pointer_semantics": "RFC6901; a listed object pointer permits that complete subtree; /execution_boundary is the sole source-absent addition; every other source-absent, target-absent, type-changed, key-changed, array-length, array-order, number, string, boolean, or null difference rejects", + "deny_unlisted": true, + "reject_duplicate_or_ancestor_descendant_pointers": true, + "frozen_root_pointers": ["/anchors/src_tree","/anchors/package_json_sha256","/anchors/package_lock_sha256","/anchors/tsconfig_eval_sha256","/anchors/ci_workflow_sha256","/candidate","/graphify","/provider","/raw_tools","/campaign","/isolation","/spend","/blinding","/receipt/max_physical_lines","/receipt/max_bytes","/receipt/canonical_archive_copies","/receipt/committed_machine_grading_evidence","/receipt/lifecycle_evidence","/receipt/self_hash","/receipt/required_statuses","/receipt/pass_derivation","/receipt/semantic_validator_invariants","/receipt/unknown_blocking_fact","/receipt/duplicate_retried_or_replaced_trial","/receipt/status_evidence_policy","/receipt/index_cost_evidence","/receipt/campaign_lock_implementation_identities","/receipt/campaign_lock_raw_tool_binding","/receipt/raw_private_material_policy","/stop_policy"], + "frozen_assertions": [ + {"pointer":"/provider/model","value":"claude-sonnet-4-6"}, + {"pointer":"/provider/temperatures","value":[0,0.7]}, + {"pointer":"/provider/count_path","value":"/v1/messages/count_tokens"}, + {"pointer":"/provider/create_path","value":"/v1/messages"}, + {"pointer":"/provider/max_create_requests_per_trial","value":13}, + {"pointer":"/provider/max_tool_calls_per_trial","value":12}, + {"pointer":"/campaign/trials_per_cell","value":3}, + {"pointer":"/campaign/timeout_seconds","value":300}, + {"pointer":"/campaign/refresh/total_samples","value":12}, + {"pointer":"/spend/provider_input_tokens_max","value":20000000}, + {"pointer":"/spend/provider_output_tokens_max","value":2000000}, + {"pointer":"/spend/provider_cost_cents_max","value":10000}, + {"pointer":"/spend/runner_cost_cents_max","value":9000} + ], + "campaign_population": {"comparison_trials":60,"diagnostics":1,"refresh_samples":12,"order":"the exact v1 global_execution_order"}, + "conjunctive_rule": "execution_boundary adds fail-closed controls only; it cannot delete, loosen, reinterpret, retry, replace, alias, widen, or otherwise override any frozen v1 value" + } + }, + "candidate": { + "package_name": "@lubab/madar", + "package_version": "0.32.0", + "identity_source": "exact implementation merge commit", + "required_src_tree": "1a37e3a58ee7b2a75ca034112506590f699b3918", + "required_package_json_sha256": "d464fd8e59b3d4d3f817ebdd6457fb3cfb02d9f3fad4fc8648f29c03a8a56b33", + "required_package_lock_sha256": "b9d179f0ee70e14d85653c5013cf2513efb22127b10fc3ee1deb5fa698993a61", + "pack_once_per_block": true, + "clean_argv": ["generate","."], + "refresh_argv": ["generate",".","--update"], + "forbidden_argv": ["--no-html"], + "mcp_argv": ["mcp"], + "mcp_cwd": "frozen graph_root", + "graph_override": "forbidden", + "compatibility_wrapper": "forbidden", + "packed_cli_invocation": { + "resolution": "resolve the executable from the single package tarball installed from the exact implementation merge, then bind its absolute realpath and SHA-256", + "generate": "invoke the resolved packed CLI directly with argv [\"generate\",\".\"]", + "update": "invoke the same resolved packed CLI directly with argv [\"generate\",\".\",\"--update\"]", + "mcp": "invoke the same resolved packed CLI directly with argv [\"mcp\"] from frozen graph_root", + "forbidden": ["npm exec","npx","package-manager shim","source-checkout CLI","PATH-selected CLI","wrapper","alias","graph override"] + }, + "workspace_bundle": ["out/graph.json","out/indexing-manifest.json","out/indexing-manifest.share-safe.json"], + "bundle_hash_checkpoints": ["after_build","before_cold_answer","after_cold_answer","before_warm_answer","after_warm_answer"], + "bundle_hash_policy": "all three files remain byte-identical at every checkpoint", + "pair_mutation_policy": "no rebuild, refresh, mutation, reconciliation write, or other bundle change is permitted between or during the cold/warm pair", + "startup_policy": "default MCP startup and normal no-op reconciliation are inside answer elapsed time", + "mcp_snapshot": { + "protocol_version": "2025-11-25", + "initialize_bytes": 301, + "initialize_sha256": "a6fa8a94a5777b99f48351585b3971dfef8476129198d24bf1db6a77d8743f9b", + "tools_list_bytes": 522, + "tools_list_sha256": "43823255827750225d05b6c7e46865351b2240509e9017bc83a647396bf32594", + "combined_bytes": 852, + "combined_sha256": "025593c75c92ade8d659e104832b98275cbabfd0f222759048ff1c1a9b65a144", + "combined_jcs": { + "initialize": {"capabilities":{"tools":{"listChanged":false}},"instructions":"Call retrieve once with the codebase question. Madar returns one deterministic authenticated evidence path or a terminal evidence boundary.","protocolVersion":"2025-11-25","serverInfo":{"name":"madar","title":"Madar","version":"0.32.0"}}, + "tools_list": { + "tools": [ + { + "description": "Return the smallest deterministic evidence path for a TypeScript or JavaScript codebase question.", + "inputSchema": {"additionalProperties":false,"properties":{"budget":{"description":"Requested result budget; effective serialized output is capped at 4000 tokens.","minimum":1,"type":"integer"},"question":{"description":"The codebase question to answer from authenticated graph evidence.","maxLength":512,"minLength":1,"type":"string"}},"required":["question"],"type":"object"}, + "name": "retrieve" + } + ] + } + } + } + }, + "graphify": { + "repository": "https://github.com/Graphify-Labs/graphify", + "tag": "v0.9.20", + "tag_object": "083212f1871822e0bfd237369abd9eac0b968edd", + "commit": "edec9eabeceeae6aa2375eddb3835efa1a32c0a3", + "tree": "5cfbdfa42c036ed759deb4f7d5ad510e5b205d9b", + "signed": false, + "uv_version": "0.11.16", + "uv_sha256": "f63ec276fa13f8f392542a334c0f58f36833b24304831e5f4c221e2edf7a16f3", + "python_version": "3.12.11", + "python_arch": "arm64", + "python_sha256": "ee24a8666b2f675b465b799f4e173a62319f5ae41c011b8103925d0a7c9a886f", + "build_constraint": "setuptools==83.0.0", + "wheel": "graphifyy-0.9.20-py3-none-any.whl", + "wheel_sha256": "9629d2dca7a73979dadfc02fe500182ac9654c8332afb1d5386e530cba57a2c0", + "install_argv": ["--no-config","--no-python-downloads","tool","install","--force","--python","","--constraints","","--build-constraints","","graphifyy[mcp] @ git+https://github.com/Graphify-Labs/graphify@edec9eabeceeae6aa2375eddb3835efa1a32c0a3"], + "resolved_constraints": ["annotated-types==0.8.0","anyio==4.14.2","attrs==26.1.0","certifi==2026.7.22","cffi==2.1.0","click==8.4.2","cryptography==49.0.0","graphifyy @ git+https://github.com/graphify-labs/graphify@edec9eabeceeae6aa2375eddb3835efa1a32c0a3","h11==0.16.0","httpcore==1.0.9","httpx-sse==0.4.3","httpx==0.28.1","idna==3.18","jsonschema-specifications==2025.9.1","jsonschema==4.26.0","mcp==1.28.1","networkx==3.6.1","numpy==2.5.1","pycparser==3.0","pydantic-core==2.46.4","pydantic-settings==2.14.2","pydantic==2.13.4","pyjwt==2.13.0","python-dotenv==1.2.2","python-multipart==0.0.32","rapidfuzz==3.14.5","referencing==0.37.0","rpds-py==2026.6.3","sse-starlette==3.4.6","starlette==1.3.1","tree-sitter-bash==0.25.1","tree-sitter-c-sharp==0.23.5","tree-sitter-c==0.24.2","tree-sitter-cpp==0.23.4","tree-sitter-elixir==0.3.5","tree-sitter-fortran==0.6.0","tree-sitter-go==0.25.0","tree-sitter-groovy==0.1.2","tree-sitter-java==0.23.5","tree-sitter-javascript==0.25.0","tree-sitter-json==0.24.8","tree-sitter-julia==0.23.1","tree-sitter-kotlin==1.1.0","tree-sitter-lua==0.5.0","tree-sitter-objc==3.0.2","tree-sitter-php==0.24.1","tree-sitter-powershell==0.26.4","tree-sitter-python==0.25.0","tree-sitter-ruby==0.23.1","tree-sitter-rust==0.24.2","tree-sitter-scala==0.26.0","tree-sitter-swift==0.7.3","tree-sitter-typescript==0.23.2","tree-sitter-verilog==1.0.3","tree-sitter-zig==1.1.2","tree-sitter==0.25.2","typing-extensions==4.16.0","typing-inspection==0.4.2","uvicorn==0.51.0"], + "resolved_constraints_encoding": "UTF-8, LF after every row including final row, LC_ALL=C bytewise-sorted", + "resolved_constraints_sha256": "0cefc2366a03b606262baa69cc5520d499851c161b00cd1fa67c4feff990902c", + "environment": { + "isolated_roots": ["UV_TOOL_DIR","UV_PYTHON_INSTALL_DIR"], + "pre_snapshot_removals": ["**/__pycache__/**","**/*.pyc","**/*.pyo"], + "required": {"PYTHONDONTWRITEBYTECODE":"1","PYTHONNOUSERSITE":"1","GRAPHIFY_QUERY_LOG_DISABLE":"1"}, + "required_unset": ["PYTHONPYCACHEPREFIX","GRAPHIFY_QUERY_LOG","GRAPHIFY_QUERY_LOG_ENABLE","GRAPHIFY_QUERY_LOG_RESPONSES"], + "filesystem_manifest": { + "canonicalization": "RFC8785 JCS UTF-8 without trailing LF", + "roots": ["UV_TOOL_DIR","UV_PYTHON_INSTALL_DIR"], + "order": "root name then UTF-8 relative-path bytes", + "entries": ["directory","regular_file","symlink"], + "directory_fields": ["root","path","type","mode"], + "regular_file_fields": ["root","path","type","mode","bytes","sha256"], + "symlink_fields": ["root","path","type","mode","target"], + "include_dot_root_row": true, + "no_follow_lstat": true, + "reject_types": ["socket","fifo","block_device","character_device","other"], + "post_unit_recompute": true, + "drift_policy": "invalidate complete comparison block" + }, + "dependency_manifest": { + "canonicalization": "v2 RFC8785 JCS UTF-8 without trailing LF", + "capture_point": "after bytecode cleanup and before the first comparison-block unit", + "records": ["verified isolated CPython version, SHA-256, and absolute realpath","verified uv version, SHA-256, and absolute realpath","direct Graphify requirement at commit edec9eabeceeae6aa2375eddb3835efa1a32c0a3","every installed distribution normalized name and version","every installed distribution direct_url object or explicit null"], + "distribution_count": 59, + "graphify_direct_url_required": true, + "executable_realpaths_recorded_separately": ["python","uv","graphify","graphify-mcp"], + "sha256_bound_in_campaign_lock": true + }, + "reuse_rule": {"same_isolated_roots_per_comparison_block":true,"manifest_recomputed":["before every unit","after every unit"],"forbidden":["dependency re-resolution","reinstallation","wheel replacement","installed-file drift","new, removed, or changed filesystem entry","mode drift","regenerated bytecode"],"mismatch_policy":"invalidate the complete comparison block, stop the campaign, and do not rerun"}, + "bytecode_policy": {"before_snapshot":"recursively remove every __pycache__ directory and *.pyc/*.pyo file from both isolated roots","required_before_and_after_every_unit":"zero __pycache__ directories and zero *.pyc/*.pyo files","post_snapshot_exclusions":"none"} + }, + "build_argv": ["extract",".","--code-only"], + "refresh_argv": ["update","."], + "refresh_source_extensions_forbidden": [".md",".mdx",".qmd",".skill"], + "code_only_corpus": {"preconditions":["before clean build","after frozen mutation before refresh"],"document_extensions":[".md",".mdx",".qmd",".skill"],"required_document_extractor_result":null,"detected_code_source_set":"bound before clean build","refresh_source_rule":"refresh may introduce no graph source outside the bound detected code-source set","images_are_update_widening_trigger":false,"drift_policy":"stop the campaign"}, + "artifact": "graphify-out/graph.json", + "artifact_directed": false, + "mcp_runtime_directed": true, + "mcp_argv": ["/graph.json"], + "mcp_protocol": "2025-11-25", + "mcp_server_name": "graphify", + "mcp_server_version": "1.28.1", + "mcp_result_max_utf8_bytes": 65536, + "allowed_mcp_methods": ["initialize","tools/list","resources/list","tools/call"], + "forbidden_mcp_methods": ["resources/read"], + "tool_names": ["query_graph","get_node","get_neighbors","get_community","god_nodes","graph_stats","shortest_path","list_prs","get_pr_impact","triage_prs"], + "resource_uris": ["graphify://report","graphify://stats","graphify://god-nodes","graphify://surprises","graphify://audit","graphify://questions"], + "resources_exposed_to_provider": false, + "mcp_boundary": { + "transport": "stdio only", + "network": "fail-closed denied", + "credentials": "none", + "tool_result": "unmodified MCP payload serialized as RFC8785 JCS into exactly one provider tool_result; never rewritten into the common raw-tool envelope", + "result_max_utf8_bytes": 65536, + "oversize_result": "invalidate the trial with no truncation", + "project_path_schema": "unmodified", + "project_path_escape": "fails naturally under the MCP filesystem sandbox and consumes the tool call", + "resources_read": "reject, record, consume the call, and invalidate the trial", + "failed_network_pr_call": "remains in the transcript and consumes the common tool-call budget" + }, + "initialize_bytes": 201, + "initialize_sha256": "5663ccae0c781f831c5542da54861bd3762b182eae67f770ff86acf429bc3037", + "tools_list_bytes": 5642, + "tools_list_sha256": "ac88c309fb4c397d4f611db446ef634555dcaaa37640d43867aedb09a53a976e", + "resources_list_bytes": 804, + "resources_list_sha256": "48e8d52b5f5b5d01e464fac9598e8607b134b830d43d81fa0b846d457461e940", + "combined_bytes": 6694, + "combined_sha256": "f6630c505fdb3b6ce4df2679176cbb43d228b6d6df9ac48ccfee8fe6b890de16", + "combined_jcs": { + "initialize": {"capabilities":{"experimental":{},"resources":{"listChanged":false,"subscribe":false},"tools":{"listChanged":false}},"protocolVersion":"2025-11-25","serverInfo":{"name":"graphify","version":"1.28.1"}}, + "resources_list": { + "resources": [ + {"description":"Full GRAPH_REPORT.md","mimeType":"text/markdown","name":"Graph Report","uri":"graphify://report"}, + {"description":"Node/edge/community counts and confidence breakdown","mimeType":"text/plain","name":"Graph Stats","uri":"graphify://stats"}, + {"description":"Top 10 most-connected nodes","mimeType":"text/plain","name":"God Nodes","uri":"graphify://god-nodes"}, + {"description":"Cross-community surprising connections","mimeType":"text/plain","name":"Surprising Connections","uri":"graphify://surprises"}, + {"description":"EXTRACTED/INFERRED/AMBIGUOUS edge breakdown","mimeType":"text/plain","name":"Confidence Audit","uri":"graphify://audit"}, + {"description":"Suggested questions for this codebase","mimeType":"text/plain","name":"Suggested Questions","uri":"graphify://questions"} + ] + }, + "tools_list": { + "tools": [ + { + "description": "Search the knowledge graph using BFS or DFS. Returns relevant nodes and edges as text context.", + "inputSchema": { + "properties": { + "context_filter": {"description":"Optional explicit edge-context filter, e.g. ['call', 'field']","items":{"type":"string"},"type":"array"}, + "depth": {"default":3,"description":"Traversal depth (1-6)","type":"integer"}, + "mode": {"default":"bfs","description":"bfs=broad context, dfs=trace a specific path","enum":["bfs","dfs"],"type":"string"}, + "project_path": {"description":"Absolute path to a project directory containing graphify-out/graph.json. Optional — defaults to the graph this server was started with.","type":"string"}, + "question": {"description":"Natural language question or keyword search","type":"string"}, + "token_budget": {"default":2000,"description":"Max output tokens","type":"integer"} + }, + "required": ["question"], + "type": "object" + }, + "name": "query_graph" + }, + {"description":"Get full details for a specific node by label or ID.","inputSchema":{"properties":{"label":{"description":"Node label or ID to look up","type":"string"},"project_path":{"description":"Absolute path to a project directory containing graphify-out/graph.json. Optional — defaults to the graph this server was started with.","type":"string"}},"required":["label"],"type":"object"},"name":"get_node"}, + {"description":"Get all direct neighbors of a node with edge details.","inputSchema":{"properties":{"label":{"type":"string"},"project_path":{"description":"Absolute path to a project directory containing graphify-out/graph.json. Optional — defaults to the graph this server was started with.","type":"string"},"relation_filter":{"description":"Optional: filter by relation type","type":"string"}},"required":["label"],"type":"object"},"name":"get_neighbors"}, + {"description":"Get all nodes in a community by community ID.","inputSchema":{"properties":{"community_id":{"description":"Community ID (0-indexed by size)","type":"integer"},"project_path":{"description":"Absolute path to a project directory containing graphify-out/graph.json. Optional — defaults to the graph this server was started with.","type":"string"}},"required":["community_id"],"type":"object"},"name":"get_community"}, + {"description":"Return the most connected nodes - the core abstractions of the knowledge graph.","inputSchema":{"properties":{"project_path":{"description":"Absolute path to a project directory containing graphify-out/graph.json. Optional — defaults to the graph this server was started with.","type":"string"},"top_n":{"default":10,"type":"integer"}},"type":"object"},"name":"god_nodes"}, + {"description":"Return summary statistics: node count, edge count, communities, confidence breakdown.","inputSchema":{"properties":{"project_path":{"description":"Absolute path to a project directory containing graphify-out/graph.json. Optional — defaults to the graph this server was started with.","type":"string"}},"type":"object"},"name":"graph_stats"}, + { + "description": "Find the shortest path between two concepts in the knowledge graph.", + "inputSchema": {"properties":{"max_hops":{"default":8,"description":"Maximum hops to consider","type":"integer"},"project_path":{"description":"Absolute path to a project directory containing graphify-out/graph.json. Optional — defaults to the graph this server was started with.","type":"string"},"source":{"description":"Source concept label or keyword","type":"string"},"target":{"description":"Target concept label or keyword","type":"string"}},"required":["source","target"],"type":"object"}, + "name": "shortest_path" + }, + { + "description": "List open GitHub PRs with CI status, review state, and graph impact (which communities each PR touches, blast radius). Use this before starting work to check if a PR already covers the area you're about to change.", + "inputSchema": {"properties":{"base":{"description":"Base branch to filter PRs by (auto-detected if omitted)","type":"string"},"project_path":{"description":"Absolute path to a project directory containing graphify-out/graph.json. Optional — defaults to the graph this server was started with.","type":"string"},"repo":{"description":"GitHub repo (owner/repo). Defaults to current repo.","type":"string"}},"type":"object"}, + "name": "list_prs" + }, + { + "description": "Get detailed graph impact for a specific PR: which files it changes, which knowledge-graph communities are affected, and how many nodes are touched. Use this to assess merge risk or check for overlap with your current work.", + "inputSchema": {"properties":{"pr_number":{"description":"PR number to analyse","type":"integer"},"project_path":{"description":"Absolute path to a project directory containing graphify-out/graph.json. Optional — defaults to the graph this server was started with.","type":"string"},"repo":{"description":"GitHub repo (owner/repo). Defaults to current repo.","type":"string"}},"required":["pr_number"],"type":"object"}, + "name": "get_pr_impact" + }, + { + "description": "Return all actionable open PRs (correct base, not stale) with full graph impact data so you can reason about review priority, merge order, and conflict risk. Call this when the user asks 'what PRs should I review?' or 'what's ready to merge?'", + "inputSchema": {"properties":{"base":{"description":"Base branch to filter PRs by (auto-detected if omitted)","type":"string"},"project_path":{"description":"Absolute path to a project directory containing graphify-out/graph.json. Optional — defaults to the graph this server was started with.","type":"string"},"repo":{"description":"GitHub repo (owner/repo). Defaults to current repo.","type":"string"}},"type":"object"}, + "name": "triage_prs" + } + ] + } + } + }, + "provider": { + "kind": "anthropic-first-party-messages-api", + "execution_mode": "development-only direct Messages API tool loop", + "http_client": "direct Node fetch", + "http_method": "POST", + "forbidden_clients_and_capabilities": ["Claude Code","Codex","guided benchmark suite","Anthropic SDK","batch API","server tools","web search","web fetch","code execution"], + "origin": "https://api.anthropic.com", + "count_path": "/v1/messages/count_tokens", + "create_path": "/v1/messages", + "api_version": "2023-06-01", + "model": "claude-sonnet-4-6", + "thinking": {"type":"disabled"}, + "temperatures": [0,0.7], + "max_tokens": 4096, + "service_tier_request": "standard_only", + "service_tier_response": "standard", + "inference_geo_request": "global", + "inference_geo_response": "global", + "stream": false, + "tool_choice": {"type":"auto","disable_parallel_tool_use":true}, + "omitted_fields": ["top_p","top_k","stop_sequences","cache_control","metadata","output_config","betas"], + "system": "You are a repository-analysis agent. Answer only the user's frozen question. Use only the supplied tools and evidence returned by them. Cite repository-root-relative file paths and exact symbols for load-bearing claims. Distinguish verified facts from inference and state uncertainty. Do not modify files, seek network access, or mention this evaluation.", + "user_message_frame": "inherited product_scope.scope_statement UTF-8, then two LF bytes, then inherited question.prompt UTF-8", + "initial_messages": {"array_length":1,"message_fields_only":["role","content"],"role":"user","content_binding":"the exact evaluated user_message_frame string","property_order":["role","content"],"content_block_array":"forbidden"}, + "per_trial_fresh_state": {"worker_process":"new process","conversation":"new conversation with no prior messages","provider_context":"new provider context with no reuse","home":"empty HOME","xdg":"empty XDG_CONFIG_HOME, XDG_CACHE_HOME, XDG_DATA_HOME, and XDG_STATE_HOME","configuration":"empty agent, user, global, and tool configuration","mcp_process":"new arm MCP process"}, + "count_request_fields": ["model","system","tools","messages","thinking","tool_choice"], + "create_request_fields": ["model","system","tools","messages","thinking","tool_choice","temperature","max_tokens","service_tier","inference_geo","stream"], + "provider_tools": { + "raw_conversion": "for each raw_tools.tool_definitions row emit exactly {name,description,input_schema} with input_schema equal to the approval-bound input_schema object", + "mcp_conversion": "for each approval-bound MCP tools/list row emit exactly {name,description,input_schema}, renaming only inputSchema to input_schema and preserving the complete schema value byte-for-byte under RFC8785 JCS", + "native_order": ["read","search","list","shell-read-only"], + "graphify_order": ["read","search","list","shell-read-only","query_graph","get_node","get_neighbors","get_community","god_nodes","graph_stats","shortest_path","list_prs","get_pr_impact","triage_prs"], + "madar_order": ["read","search","list","shell-read-only","retrieve"], + "renaming_or_wrapping": "forbidden except the exact inputSchema to input_schema key conversion" + }, + "request_serialization": { + "encoding": "UTF-8 JSON with no BOM and no trailing LF", + "serializer": "native JSON.stringify over a newly constructed plain object", + "count_property_order": ["model","system","tools","messages","thinking","tool_choice"], + "create_property_order": ["model","system","tools","messages","thinking","tool_choice","temperature","max_tokens","service_tier","inference_geo","stream"], + "nested_property_order": "approval-bound provider tool arrays and message/content objects are constructed in the exact key order stated by their schemas; no replacer, whitespace, normalization, or post-processing", + "hash_and_length": "SHA-256 and decimal content-length cover the exact serialized UTF-8 request bytes" + }, + "response_parsing": { + "wire_decode": "buffer the capped response body, reject a UTF-8 BOM, decode with TextDecoder('utf-8',{fatal:true}), and perform no Unicode or newline normalization", + "json": "before JSON.parse, a string-aware lexical scan rejects duplicate keys at every object depth; JSON.parse must produce one plain top-level object; recursively reject every string containing an unpaired UTF-16 surrogate before JCS, hashing, dispatch, or answer encoding; numeric token and byte fields are nonnegative Number-safe integers; NaN, infinity, fractions, bigint coercion, accessors, and prototypes other than Object/Array/null are rejected", + "count_response": {"http":"status 200 only","required_and_allowed_top_level_keys":["input_tokens"],"input_tokens":"nonnegative Number-safe integer","other_status_or_shape":"campaign stop with no retry and no Create"}, + "create_response": { + "required_and_allowed_top_level_keys": ["id","type","role","model","content","stop_reason","stop_sequence","usage","service_tier","inference_geo"], + "id": "nonempty string", + "type": "message", + "role": "assistant", + "stop_sequence": "null", + "stop_reason_values": ["end_turn","max_tokens","tool_use","refusal"], + "unknown_stop_reason": "campaign stop after charge recording", + "non_2xx": "ordinary terminal-zero Create with exact body/header hashes and the full reservation permanently consumed; the error body is not projected into a successful response object", + "malformed_or_unsupported_json_shape": "campaign stop after charge recording" + }, + "usage": { + "required_and_allowed_keys": ["input_tokens","cache_creation_input_tokens","cache_read_input_tokens","output_tokens","cache_creation"], + "token_fields": "input_tokens, cache_creation_input_tokens, cache_read_input_tokens, and output_tokens are nonnegative Number-safe integers", + "cache_creation": "either absent when cache_creation_input_tokens is zero, or exactly {ephemeral_5m_input_tokens,ephemeral_1h_input_tokens} with nonnegative Number-safe integers whose sum equals cache_creation_input_tokens", + "pass_requirement": "cache_creation_input_tokens, both cache-creation TTL categories, and cache_read_input_tokens are all exactly zero", + "missing_extra_unknown_or_inconsistent": "campaign stop after charge recording" + }, + "content_shapes": { + "final_text": "content is a nonempty array containing only exact {type:'text',text:string} objects; when stop_reason is refusal the classified shape is refusal, otherwise final_text", + "single_tool_use": "with stop_reason tool_use, content is a nonempty array containing exactly one exact {type:'tool_use',id:nonempty string,name:nonempty string,input:plain JSON object} plus zero or more exact {type:'text',text:string} blocks in any returned order; every complete block is retained for byte-exact continuation", + "none": "content is an empty array", + "recognized_loop_violation": "an array of individually exact known text/tool_use block objects that contains zero or multiple tool_use blocks for stop_reason tool_use, any tool_use block for another stop_reason, or otherwise conflicts with the recognized stop_reason", + "provider_shape_drift": "any unknown block type, extra or missing block field, non-object block, invalid field type, or otherwise non-schema response/content object", + "actions": "provider_shape_drift stops the campaign after charge recording; recognized_loop_violation, unknown tool name, duplicate or reused tool_use ID, state violation, or tool request on Create 13 is ordinary terminal-zero; a known allowed tool with schema-invalid input executes its exact error tool_result and may continue" + }, + "final_answer": {"accepted_shape":"final_text with stop_reason end_turn","bytes":"concatenate each text value's exact UTF-8 bytes in array order with no separator, prefix, suffix, trimming, or normalization","nonempty":"the concatenated UTF-8 byte length is at least one; whitespace bytes are not removed","empty_or_other_stop":"ordinary terminal-zero trial"}, + "assistant_round_trip": "after strict response validation, retain the exact parsed content array object; JSON.stringify that unchanged value with no replacer or whitespace and hash those UTF-8 bytes; the next assistant message embeds that same object reference, and its serialized content-value bytes must equal the retained bytes before the matching tool_result is appended", + "ordinary_terminal_zero": ["max_tokens","refusal","empty end_turn final_text","HTTP non-2xx","Create deadline","connection reset or ambiguous Create transport with full reservation retained","recognized mixed/multiple/parallel loop violation, unknown tool name, duplicate or reused valid tool_use ID, trial-state violation, or tool_use on Create 13"], + "campaign_stop_after_charge": ["wrong model, service tier, inference geography, request template, rate, cache, or usage category","unknown stop reason","malformed or unsupported response/content/usage shape","actual charge over reservation"] + }, + "hash_subjects": { + "request_sha256": "exact UTF-8 JSON request-body bytes sent to fetch", + "response_sha256": "exact capped bytes yielded by the Fetch Response body stream after Fetch content-decoding and before UTF-8 decoding or JSON parsing; null only when no response body bytes were yielded", + "request_id": "the exact nonempty request-id header value exposed by Node fetch after OWS normalization; comma-containing or duplicate-equivalent values are rejected", + "request_id_sha256": "exact UTF-8 bytes of request_id only", + "request_id_header_sha256": "UTF-8 bytes of lowercase 'request-id: ' followed by request_id with no trailing newline", + "request_headers_sha256": "RFC8785 JCS UTF-8 of the reconstructed lowercase approval-bound request-header template with x-api-key replaced by literal '' and exact derived host/content-length; explicitly a template hash, not a claim to observe provider-wire header bytes", + "response_headers_sha256": "RFC8785 JCS UTF-8 of the complete lowercase, whitespace-normalized, duplicate-combined header map exposed by Fetch Headers iteration; this is explicitly not a raw wire-header hash", + "canonical_semantic_fields_sha256": "RFC8785 JCS of exactly {model,system,tools,messages,thinking,tool_choice}", + "tools_sha256": "RFC8785 JCS of the complete provider tools array", + "messages_sha256": "RFC8785 JCS of the complete provider messages array", + "system_sha256": "RFC8785 JCS of the system string", + "tool_choice_sha256": "RFC8785 JCS of the tool_choice object", + "assistant_content_sha256": "exact UTF-8 JSON.stringify bytes of the strictly parsed assistant content array used for the continuation round trip" + }, + "tool_result_request": { + "message_shape": {"message_fields_only":["role","content"],"role":"user","content_length":1,"block_fields_only":["type","tool_use_id","content"],"type":"tool_result","property_order":{"message":["role","content"],"block":["type","tool_use_id","content"]}}, + "tool_use_id_binding": "exact ID from the accepted single tool_use block", + "content_subject": "raw tools use the complete common result envelope JCS; MCP tools use the complete unmodified MCP result payload JCS", + "is_error": "omitted", + "additional_blocks_or_fields": "forbidden" + }, + "max_create_requests_per_trial": 13, + "max_tool_calls_per_trial": 12, + "single_tool_use_per_turn": true, + "round_trip_assistant_content_byte_exact": "exact JSON.stringify content-value bytes under response_parsing.assistant_round_trip", + "successful_stop_reason": "end_turn", + "successful_final_text_min_utf8_bytes": 1, + "retry_policy": "none", + "required_response": {"model":"claude-sonnet-4-6","service_tier":"standard","inference_geo":"global","cache_creation_input_tokens":0,"cache_read_input_tokens":0}, + "count_create_equality": {"count_precedes_every_create":true,"byte_equal_semantic_fields":["model","system","tools","messages","thinking","tool_choice"],"create_only_fields_absent_from_count":["temperature","max_tokens","service_tier","inference_geo","stream"],"count_failure":"terminal campaign stop with no retry","body_hashes_required":true}, + "tool_loop_state_machine": { + "initial": "create request 1 may return final end_turn text or exactly one tool_use", + "tool_turn": "one accepted tool_use is followed by exactly one continuation containing the complete byte-identical assistant content blocks and exactly one tool_result whose tool_use_id matches", + "continuation_field_equality": ["model","temperature","thinking","system","complete tools array","tool_choice","max_tokens","service_tier","inference_geo","stream","cache omissions"], + "assistant_content_mutation": "terminal zero", + "multiple_or_parallel_tools": "terminal zero", + "unknown_tool": "terminal zero", + "recognized_mixed_multiple_or_parallel_content": "terminal zero", + "provider_schema_malformed_content": "campaign stop after charge recording", + "recoverable_known_tool_error": "raw invalid input, denied path, timeout, or execution failure returns the exact bounded common error envelope; Graphify/Madar schema-invalid input, denied project path, network-denied PR call, or ordinary tool failure returns the exact unmodified MCP error payload; each consumes one shared tool call, appends exactly one matching tool_result, and permits the next Create", + "mismatched_or_multiple_tool_results": "terminal zero", + "after_tool_call_12": "exactly one create request 13 may return final answer only", + "tool_request_on_create_13": "terminal zero", + "create_request_14": "forbidden", + "tool_layer_termination": "resources/read, complete-result overflow, MCP protocol/process loss without a valid error payload, create/tool budget termination, or another approval-bound invalidator ends the trial after the attempted tool event; preserve the successful Count/Create prefix exactly and never fabricate or relabel a terminal failed Create", + "zero_trial_provider_prefixes": "an ordinary zero row may end either in one recognized terminal-zero Create response/transport outcome or immediately after a valid single_tool_use Create plus the immutable completed tool-event prefix", + "pass_campaign_exclusion": "wrong model/tier/geography/cache/rate/template, unknown stop reason, unsupported response/content/usage shape, or any other campaign drift cannot appear as an ordinary zero row in a pass-status campaign" + }, + "success_condition": {"stop_reason":"end_turn","final_content":"response_parsing.final_answer accepted_shape and nonempty bytes","required_model":"claude-sonnet-4-6","required_service_tier":"standard","required_inference_geo":"global","required_cache_creation_input_tokens":0,"required_cache_read_input_tokens":0}, + "terminal_trial_failures": ["stop_reason max_tokens","refusal","context overflow","Create deadline or connection reset with full reservation retained","HTTP non-2xx","empty final text","recognized mixed/multiple/parallel loop violation, unknown tool name, duplicate or reused valid tool_use ID, trial-state violation, or tool_use on Create 13"], + "terminal_campaign_drifts": ["wrong returned model","request-template or temperature or thinking drift","wrong service tier","wrong inference geography","nonzero or unknown cache category","unknown billed category","unknown stop reason","malformed or unsupported response, content, or usage shape"], + "hash_capture": ["count request body","count response body","count request-ID header","create request body","create response body","create request-ID header"] + }, + "raw_tools": { + "provider_order": ["read","search","list","shell-read-only"], + "tool_definitions_jcs_sha256": "45cfc724cbacbca111b0d6445bee9c59baf44b5689abd51a4eee9cd41192a805", + "path_policy_jcs_sha256": "160ef4febd892ca3a1f4b0c1af48362f9d2c5bd1b73a30cb5b54bc4601257a22", + "result_schema_jcs_sha256": "563229237cbe87b005297c35608e26e888e0e932085a51b2275c4ccbbcfecdf2", + "error_messages_jcs_sha256": "fc1f96b93ca368a26b2d34662065fcc79de893261f2d0c00830c654bd7e259ac", + "semantics_jcs_sha256": "9b43f3059c3f5d9afa17c2b1f11f3c2e66eb6e08d0c79366f73f6c3d4bca62da", + "aggregate_hashes_jcs_sha256": "e37db194dc48e8af99efde26bd86e0f8c884b45b774aead47a4ac5bd05f5a08a", + "tool_definitions": [ + {"name":"read","description":"Read a bounded line range from one repository file.","input_schema":{"type":"object","additionalProperties":false,"required":["path"],"properties":{"path":{"type":"string","minLength":1,"maxLength":4096},"start_line":{"type":"integer","minimum":1},"end_line":{"type":"integer","minimum":1}}}}, + {"name":"search","description":"Find literal text in files under a contained repository path.","input_schema":{"type":"object","additionalProperties":false,"required":["query"],"properties":{"query":{"type":"string","minLength":1,"maxLength":256},"path":{"type":"string","minLength":1,"maxLength":4096,"default":"."},"max_results":{"type":"integer","minimum":1,"maximum":50,"default":50}}}}, + {"name":"list","description":"List files and directories under a contained repository path.","input_schema":{"type":"object","additionalProperties":false,"properties":{"path":{"type":"string","minLength":1,"maxLength":4096,"default":"."},"depth":{"type":"integer","minimum":1,"maximum":4,"default":2},"max_entries":{"type":"integer","minimum":1,"maximum":200,"default":200}}}}, + {"name":"shell-read-only","description":"Compute a line count or SHA-256 for one repository file without running a shell.","input_schema":{"type":"object","additionalProperties":false,"required":["operation","path"],"properties":{"operation":{"enum":["line_count","sha256"]},"path":{"type":"string","minLength":1,"maxLength":4096}}}} + ], + "path_policy": { + "input_coordinate": "graph_root_relative_posix", + "output_coordinate": "repository_root_relative_posix", + "default_directory": ".", + "reject": ["absolute path","backslash","NUL","empty component","dot component except the complete path '.'","dot-dot component","path longer than 4096 Unicode scalar values"], + "static_denied_roots": [".git","out","graphify-out"], + "dynamic_denied_paths": "every generated path captured before or during the pair", + "resolution": "component-by-component no-follow inspection followed by final realpath containment beneath frozen graph_root", + "explicit_symlink_escape": "symlink_escape error", + "enumeration_symlinks": "omit and never descend", + "raw_tools_may_access_graph_bundle": false + }, + "common_result_max_utf8_bytes": 65536, + "common_result_cap_subject": "the complete RFC8785-JCS UTF-8 result envelope inserted as provider tool_result content, not only its data or error member", + "result_digest_subject": "RFC8785 JCS UTF-8 of data when ok=true, otherwise RFC8785 JCS UTF-8 of error", + "result_schema": { + "oneOf": [ + {"type":"object","additionalProperties":false,"required":["ok","tool","path","truncated","bytes","sha256","data","error"],"properties":{"ok":{"const":true},"tool":{"const":"read"},"path":{"type":"string"},"truncated":{"type":"boolean"},"bytes":{"type":"integer","minimum":0,"maximum":65536},"sha256":{"type":"string","pattern":"^[0-9a-f]{64}$"},"data":{"type":"object","additionalProperties":false,"required":["text"],"properties":{"text":{"type":"string"}}},"error":{"type":"null"}}}, + { + "type": "object", + "additionalProperties": false, + "required": ["ok","tool","path","truncated","bytes","sha256","data","error"], + "properties": { + "ok": {"const":true}, + "tool": {"const":"search"}, + "path": {"type":"string"}, + "truncated": {"type":"boolean"}, + "bytes": {"type":"integer","minimum":0,"maximum":65536}, + "sha256": {"type":"string","pattern":"^[0-9a-f]{64}$"}, + "data": {"type":"object","additionalProperties":false,"required":["matches"],"properties":{"matches":{"type":"array","maxItems":50,"items":{"type":"object","additionalProperties":false,"required":["path","line","text"],"properties":{"path":{"type":"string"},"line":{"type":"integer","minimum":1},"text":{"type":"string"}}}}}}, + "error": {"type":"null"} + } + }, + { + "type": "object", + "additionalProperties": false, + "required": ["ok","tool","path","truncated","bytes","sha256","data","error"], + "properties": { + "ok": {"const":true}, + "tool": {"const":"list"}, + "path": {"type":"string"}, + "truncated": {"type":"boolean"}, + "bytes": {"type":"integer","minimum":0,"maximum":65536}, + "sha256": {"type":"string","pattern":"^[0-9a-f]{64}$"}, + "data": {"type":"object","additionalProperties":false,"required":["entries"],"properties":{"entries":{"type":"array","maxItems":200,"items":{"type":"object","additionalProperties":false,"required":["path","type"],"properties":{"path":{"type":"string"},"type":{"enum":["file","directory"]}}}}}}, + "error": {"type":"null"} + } + }, + { + "type": "object", + "additionalProperties": false, + "required": ["ok","tool","path","truncated","bytes","sha256","data","error"], + "properties": {"ok":{"const":true},"tool":{"const":"shell-read-only"},"path":{"type":"string"},"truncated":{"const":false},"bytes":{"type":"integer","minimum":0,"maximum":65536},"sha256":{"type":"string","pattern":"^[0-9a-f]{64}$"},"data":{"type":"object","additionalProperties":false,"required":["line_count"],"properties":{"line_count":{"type":"integer","minimum":0}}},"error":{"type":"null"}} + }, + { + "type": "object", + "additionalProperties": false, + "required": ["ok","tool","path","truncated","bytes","sha256","data","error"], + "properties": {"ok":{"const":true},"tool":{"const":"shell-read-only"},"path":{"type":"string"},"truncated":{"const":false},"bytes":{"type":"integer","minimum":0,"maximum":65536},"sha256":{"type":"string","pattern":"^[0-9a-f]{64}$"},"data":{"type":"object","additionalProperties":false,"required":["sha256"],"properties":{"sha256":{"type":"string","pattern":"^[0-9a-f]{64}$"}}},"error":{"type":"null"}} + }, + { + "type": "object", + "additionalProperties": false, + "required": ["ok","tool","path","truncated","bytes","sha256","data","error"], + "properties": { + "ok": {"const":false}, + "tool": {"enum":["read","search","list","shell-read-only"]}, + "path": {"type":["string","null"]}, + "truncated": {"const":false}, + "bytes": {"type":"integer","minimum":0,"maximum":65536}, + "sha256": {"type":"string","pattern":"^[0-9a-f]{64}$"}, + "data": {"type":"null"}, + "error": { + "oneOf": [ + {"type":"object","additionalProperties":false,"required":["code","message"],"properties":{"code":{"const":"invalid_input"},"message":{"const":"Invalid tool input."}}}, + {"type":"object","additionalProperties":false,"required":["code","message"],"properties":{"code":{"const":"path_denied"},"message":{"const":"Path is outside the allowed repository scope."}}}, + {"type":"object","additionalProperties":false,"required":["code","message"],"properties":{"code":{"const":"generated_path_denied"},"message":{"const":"Generated paths are not available to raw tools."}}}, + {"type":"object","additionalProperties":false,"required":["code","message"],"properties":{"code":{"const":"symlink_escape"},"message":{"const":"Path resolution escaped through a symbolic link."}}}, + {"type":"object","additionalProperties":false,"required":["code","message"],"properties":{"code":{"const":"not_found"},"message":{"const":"Path does not exist."}}}, + {"type":"object","additionalProperties":false,"required":["code","message"],"properties":{"code":{"const":"not_file"},"message":{"const":"Path is not a regular file."}}}, + {"type":"object","additionalProperties":false,"required":["code","message"],"properties":{"code":{"const":"not_directory"},"message":{"const":"Path is not a directory."}}}, + {"type":"object","additionalProperties":false,"required":["code","message"],"properties":{"code":{"const":"invalid_utf8"},"message":{"const":"File is not valid UTF-8."}}}, + {"type":"object","additionalProperties":false,"required":["code","message"],"properties":{"code":{"const":"range_invalid"},"message":{"const":"Requested line range is invalid."}}}, + {"type":"object","additionalProperties":false,"required":["code","message"],"properties":{"code":{"const":"range_out_of_bounds"},"message":{"const":"Requested start line is beyond end of file."}}}, + {"type":"object","additionalProperties":false,"required":["code","message"],"properties":{"code":{"const":"output_overflow"},"message":{"const":"Tool result exceeds its byte limit."}}}, + {"type":"object","additionalProperties":false,"required":["code","message"],"properties":{"code":{"const":"io_error"},"message":{"const":"The repository read failed."}}} + ] + } + } + } + ] + }, + "error_messages": { + "invalid_input": "Invalid tool input.", + "path_denied": "Path is outside the allowed repository scope.", + "generated_path_denied": "Generated paths are not available to raw tools.", + "symlink_escape": "Path resolution escaped through a symbolic link.", + "not_found": "Path does not exist.", + "not_file": "Path is not a regular file.", + "not_directory": "Path is not a directory.", + "invalid_utf8": "File is not valid UTF-8.", + "range_invalid": "Requested line range is invalid.", + "range_out_of_bounds": "Requested start line is beyond end of file.", + "output_overflow": "Tool result exceeds its byte limit.", + "io_error": "The repository read failed." + }, + "semantics": { + "read": { + "line_numbers": "one-based inclusive", + "line_definition": "LF-delimited; a nonempty final segment without LF is one line; an empty file has zero lines", + "preserve_bytes": "remove only each selected line's LF delimiter; preserve CR and join selected lines with LF", + "default_start_line": 1, + "default_end_line": "minimum of EOF and start_line+399", + "maximum_lines": 400, + "maximum_text_utf8_bytes": 16384, + "oversize_explicit_range": "range_invalid", + "start_after_eof": "range_out_of_bounds", + "text_overflow": "output_overflow", + "truncated": "true only when end_line was omitted and later lines exist" + }, + "search": { + "matching": "case-sensitive literal UTF-8 byte sequence with no normalization", + "forbidden_implementations": ["regular expression","preprocessor","shell","child executable"], + "result_grain": "at most one result per matching line", + "line_text": "complete valid UTF-8 line with LF removed and CR preserved", + "invalid_utf8_files": "skip", + "order": "repository-root-relative UTF-8 path bytes, then ascending line number", + "truncated": "true only when one additional match exists beyond max_results", + "result_overflow": "output_overflow" + }, + "list": {"depth":"requested directory children are depth 1; the requested directory itself is omitted","order":"repository-root-relative UTF-8 path bytes","symlinks":"omit and never descend","truncated":"true only when one additional entry exists beyond max_entries","result_overflow":"output_overflow"}, + "shell-read-only": {"implementation":"in-process regular-file byte reads only; no shell and no child process","line_count":"number of LF bytes plus one only for a nonempty final segment without LF; empty file is zero","sha256":"lowercase SHA-256 of complete regular-file bytes","truncated":false}, + "failure": {"ok":false,"data":null,"truncated":false,"consumes_tool_call":true,"operating_system_details_in_message":false}, + "result_integrity": { + "path": "exact normalized repository-root-relative path used or produced by the operation; null only when no path can be safely resolved for a failure", + "bytes": "exact UTF-8 byte length of RFC8785 JCS data on success or RFC8785 JCS error on failure", + "sha256": "lowercase SHA-256 of that exact bytes subject", + "complete_envelope": "serialize the exact eight-key envelope as RFC8785 JCS; if a prospective success envelope exceeds 65,536 UTF-8 bytes, replace it with the exact output_overflow bounded error envelope and never truncate a JCS value; the error envelope itself must be at most 65,536 bytes", + "validation": "reject any tool/data discriminator mismatch, code/message cross-pair, ok/error mismatch, truncation drift, path drift, inner byte-count/digest drift, or complete envelope above 65,536 bytes" + } + } + }, + "campaign": { + "blocking_questions": ["documenso-document-send","formbricks-survey-response"], + "temperatures": [0,0.7], + "trials_per_cell": 3, + "cells_per_block": 5, + "answers_per_block": 15, + "blocking_blocks": 4, + "blocking_answers": 60, + "schedule_units_per_block": 9, + "global_execution_order": { + "comparison_blocks": ["documenso@0","documenso@0.7","formbricks@0","formbricks@0.7"], + "then_diagnostic": "openstatus-574-strict-one-call@0@madar", + "then_refresh_samples": ["documenso@graphify@1","documenso@graphify@2","documenso@graphify@3","documenso@madar@1","documenso@madar@2","documenso@madar@3","formbricks@graphify@1","formbricks@graphify@2","formbricks@graphify@3","formbricks@madar@1","formbricks@madar@2","formbricks@madar@3"], + "then_review_pipeline": ["seal execution manifest","load frozen fixtures and rubric","seal two union dossiers","seal 60 blind bundles","seal 120 reviews and required adjudications","custodian pre-reveal confirmation","reveal and verify","aggregate","archive"], + "prefix_rule": "execute exactly left to right; a stop retains only the immutable completed prefix plus the triggering partial row and forbids every later ordinary campaign, review, reveal, or aggregate stage", + "mandatory_stop_finalization": ["seal the exact prefix and triggering evidence","build and fsync two canonical opaque-path prefix archives","post the RFC #577 stop amendment","write and validate the stopped receipt"], + "stop_finalization_boundary": "these four finalization steps occur after execution stops and may add only prefix/archive/amendment/receipt evidence; they cannot run provider calls, trials, refreshes, reviews, adjudications, ordinary reveal, eligibility aggregates, retry, replacement, or regrading" + }, + "tool_call_budget": 12, + "timeout_seconds": 300, + "arms": {"native_agent":{"conditions":["native"],"raw_tools":true,"graph_tools":[]},"graphify":{"conditions":["cold","warm"],"raw_tools":true,"graph_tools_source":"graphify.combined_jcs.tools_list.tools"},"madar":{"conditions":["cold","warm"],"raw_tools":true,"graph_tools_source":"candidate.mcp_snapshot.combined_jcs.tools_list.tools"}}, + "graph_pairing": "cold ordinal n immediately followed by warm ordinal n with no intervening trial", + "graphify_artifact_policy": "one external graph.json remains byte-identical across the pair", + "madar_artifact_policy": "the accepted three-file out bundle remains in graph_root and byte-identical across the pair", + "comparison_pair_artifact_evidence": { + "pairs_per_block": 6, + "checkpoints": ["after_build","before_cold_answer","after_cold_answer","before_warm_answer","after_warm_answer"], + "graphify": "for each ordinal 1..3 record graphify-out/graph.json at all five checkpoints; the externalized file SHA-256 and byte count are identical across every checkpoint and both trial joins", + "madar": "for each ordinal 1..3 record out/graph.json, out/indexing-manifest.json, and out/indexing-manifest.share-safe.json at all five checkpoints; every path's SHA-256 and byte count are identical across every checkpoint and both trial joins", + "ownership": "comparison-block pair evidence is canonical; trial rows reference the matching arm/ordinal pair and do not duplicate private artifact bytes" + }, + "checkout_evidence": { + "comparison_clone_count_per_block": 9, + "clone_ownership": "three native trial clones, three Graphify cold/warm pair clones, and three Madar cold/warm pair clones are fresh standalone detached clones with distinct realpaths/inodes; every scheduled unit joins to exactly its owned clone and no clone is reused across units or blocks", + "commit": "must equal the inherited repository commit for the block", + "git_tree": "exact lowercase git rev-parse HEAD^{tree} object ID observed in the standalone detached clone", + "tree_paths_sha256": "must equal the inherited repository tree_paths_sha256", + "pre_post_tree_subject": "RFC8785 JCS UTF-8 manifest of every tracked checkout entry as {path,mode,git_blob_oid,bytes,sha256}, sorted by UTF-8 path bytes, with no trailing LF", + "status_subject": "exact porcelain-v2 -z bytes plus RFC8785 JCS of sorted untracked regular-file {path,bytes,sha256} rows, both captured before and after each unit without ignore filtering", + "allowed_untracked": "at pristine-clone capture none; at later named checkpoints only the exact approval-bound Graphify graphify-out or Madar three-file out bundle for that stage, with no query log, cache, telemetry, package-manager, or other generated path", + "identity": "pre- and post-block tracked manifests are byte-identical; status/untracked manifests prove only the exact checkpoint-owned artifacts and their later required cleanup/retention; any commit/tree/path/status/untracked/query-log/manifest drift stops the campaign" + }, + "pair_local_build_configuration": { + "common": "fresh standalone detached clone at the frozen repository commit; verify checkout, tree, fixture, patch, and frozen mutation hashes; one pair-local build configuration directory is destroyed after the pair", + "graphify": "after clean build copy exactly graphify-out/graph.json to a pair-external artifact directory, hash it, then delete graphify-out completely; the MCP may read only that external file plus its immutable runtime", + "madar": "retain exactly out/graph.json, out/indexing-manifest.json, and out/indexing-manifest.share-safe.json inside graph_root because default madar mcp requires them; raw tools deny out/**; destroy pair build configuration but never delete, rebuild, refresh, or mutate the retained bundle during the pair" + }, + "mcp_tool_result_policy": {"serialization":"unmodified MCP result payload as RFC8785 JCS in exactly one matching provider tool_result","raw_envelope_conversion":"forbidden","maximum_utf8_bytes":65536,"oversize":"invalid trial with no truncation","transport":"stdio only","resources_read":"reject, record, consume the call, invalidate the trial","project_path_escape":"natural sandbox failure that consumes the call","network_denied_pr_tool":"failed call is transcript evidence and consumes the common budget"}, + "graph_result_extraction": { + "common": "validate and hash the complete unmodified MCP payload first; extraction is deterministic grading metadata only and never rewrites the provider tool_result", + "madar": "require exactly one content text block, strict-parse its text as the approval-bound madar.retrieve v1 result with no extra fields, then form returned_files from normalized matched_nodes[].source_file and relationships[].source_file, returned_symbols from matched_nodes[].node_id and .label, and verification_targets from nonempty matched_nodes[].source_location, relationships[].source_location, and boundaries[].subject; each set is deduplicated and unsigned-UTF-8 sorted", + "graphify_text_subject": "recursively visit the complete strict JSON payload by array index and lexicographically sorted object key, collect every Unicode-scalar string leaf, and join exact UTF-8 values with one LF byte and no leading/trailing LF", + "graphify_candidate_universe": "from the frozen checkout/graph artifact form three unsigned-UTF-8-sorted unique sets: tracked repository-relative file paths; graph node IDs and labels; and graph node/edge source_location or verification-target strings", + "graphify": "a candidate is returned exactly when its complete UTF-8 byte sequence occurs literally in graphify_text_subject; classify matches into returned_files, returned_symbols, and verification_targets by the fixed candidate universe; no regex, case folding, normalization, inference, prefix expansion, or human selection", + "focused_raw_rule": "after any graph call, read or shell-read-only is focused only on an exact returned_file; search is focused only when its contained path is an exact returned_file or its literal query exactly equals a returned_symbol or verification_target; list is always a broad-search restart; any other search/list/shell-read-only call fails the machine gate" + }, + "post_graph_raw_tool_rule": "after any graph call, broad search, list, or shell-read-only outside a returned file, symbol, or verification target is a broad-search restart and fails the inherited machine gate", + "native_start_boundary": "immediately before first Count Tokens request", + "graph_start_boundary": "immediately before arm MCP server startup", + "answer_timer_includes": ["MCP startup","initialize","tools/list","Count Tokens","relay","create requests","tool calls and results","process sampling","final validation","transcript fsync","answer fsync"], + "failed_answer_score": 0, + "retry_or_replacement": "forbidden", + "diagnostic": { + "question": "openstatus-574-strict-one-call", + "excluded_question": "openstatus-565-runtime-flow", + "workspace": "one fresh standalone detached OpenStatus clone at the exact frozen commit", + "observed_checkout_evidence": ["repository URL","commit","git tree","tree_paths_sha256","graph_root","standalone-detached proof SHA-256","pre/post tracked-tree manifest SHA-256","dependency manifest SHA-256"], + "build": "one clean Madar build using the exact resolved packed CLI", + "bundle": {"paths":["out/graph.json","out/indexing-manifest.json","out/indexing-manifest.share-safe.json"],"retention":"retain exactly these three files in graph_root for the complete trial","hash_checkpoints":["after_clean_build","before_answer","after_answer"],"identity":"all three files remain byte-identical at all three checkpoints"}, + "temperature": 0, + "arm": "madar", + "condition": "diagnostic", + "retrieve_calls_max": 1, + "retrieve_budget": 4000, + "focused_reads_max": 2, + "focused_read_scope": "each read path must be one exact file returned by the single retrieve result", + "other_raw_tools": "forbidden", + "forbidden_operations": ["search","list","shell-read-only","rewritten prompt","second graph call"], + "phase_dispositions": { + "ordered_ids": ["checker_detection","tinybird_persistence","incident_mutation","notification_delivery","public_html","json_feeds"], + "unsupported_exact": ["checker_detection","tinybird_persistence"], + "row_fields_only": ["phase_id","scope","disposition","boundary_or_evidence_hashes"], + "rule": "all six rows are present in order; the two unsupported_language phases have disposition unsupported with hashes of their exact inherited boundary subjects, while each required phase records satisfied, unsatisfied, or unknown and the exact normalized retrieve/read evidence-result hashes supporting that disposition" + }, + "reporting": "separate diagnostic section only", + "pass_fail_effect": "excluded from comparator medians and final eligibility", + "blocking": false, + "success_evidence": "status success requires exactly one retrieve, zero to two reads only to exact retrieve-returned files, one to three total evidence calls, complete tool input/result trace hash, and complete 3-by-3 bundle evidence", + "ordinary_failure_evidence": "status failed, timed_out, or invalid may preserve an exact completed prefix with zero or one retrieve, zero to two reads, and zero to three total evidence calls; it never changes comparator medians or final eligibility", + "drift_boundary": "provider, checkout, clone, isolation, build, or bundle drift is not an ordinary diagnostic failure and triggers the matching campaign stop" + }, + "refresh": { + "repositories": ["documenso","formbricks"], + "arms": ["graphify","madar"], + "samples_per_repository_arm": 3, + "total_samples": 12, + "graphify_clean_argv": ["extract",".","--code-only"], + "graphify_refresh_argv": ["update","."], + "madar_clean_argv": ["generate","."], + "madar_refresh_argv": ["generate",".","--update"], + "pre_state": { + "common": "fresh standalone detached clone at frozen commit, verify checkout/tree/fixture/mutation hashes, perform one exact clean build, then apply the frozen mutation outside the timer", + "graphify": "retain the in-sample graphify-out/graph.json created by exact clean argv as the refresh input; do not externalize or delete it before the timed update", + "madar": "retain exactly the clean-build out/graph.json, out/indexing-manifest.json, and out/indexing-manifest.share-safe.json as the refresh input; no other out/** path may exist" + }, + "pair_local_build_configuration": {"graphify":"sample-local isolated build configuration is destroyed only after the refresh sample and its complete evidence are fsynced","madar":"sample-local isolated build configuration is destroyed only after the refresh sample and its complete three-file post-refresh bundle evidence are fsynced"}, + "provider_tokens": {"graphify":{"input":0,"output":0,"total":0},"madar":{"input":0,"output":0,"total":0},"arithmetic":"provider_total_tokens equals provider_input_tokens plus provider_output_tokens whenever both components are known; pass requires all three exact zero values"}, + "artifact_evidence": {"graphify":["graphify-out/graph.json pre-refresh and post-refresh bytes/SHA-256"],"madar":["out/graph.json pre/post bytes/SHA-256","out/indexing-manifest.json pre/post bytes/SHA-256","out/indexing-manifest.share-safe.json pre/post bytes/SHA-256"],"identity":"every sample records the exact arm-specific list and joins its graph row to pre_graph_sha256, post_graph_sha256, and post_graph_bytes"}, + "mutation_inside_timer": false, + "failure_policy": "a failed, timed-out, invalid, drifted, or incomplete sample is never retried or replaced; its cost is unknown and the blocking refresh block stops", + "invalid_sample_retry": "forbidden", + "incomplete_block_cost": "unknown" + }, + "aggregation": { + "inheritance": "inherit exact v2 human rubric, machine gates, medians, break-even formulas, and pass rule through the allowlisted pointers", + "cell_rows": 20, + "madar_comparison_rows": 8, + "clean_build_medians": 4, + "refresh_medians": 4, + "break_even_rows": 24, + "break_even_key": ["repository_id","question_id","temperature","arm","scenario"], + "break_even_temperature_policy": "compute independently for temperature 0 and 0.7; never pool, select, average, or substitute task medians across temperatures", + "break_even_dispositions": "time and input-token denominators are independent; each has its own finite, never, or unknown status and matching integer, literal 'never', or null value", + "refresh_median_metrics": ["elapsed_ms","peak_rss_bytes","provider_input_tokens","provider_output_tokens","provider_total_tokens","post_graph_bytes"], + "measurement_precision": "elapsed_ms is ceil((monotonic_end_ns - monotonic_start_ns) / 1000000) as a nonnegative Number-safe integer; RSS, byte, token, count, and cost inputs are nonnegative Number-safe integers", + "median": "sort the exact finite numeric population ascending; odd n selects the middle value; even n is the exact arithmetic mean of the two middle values with no rounding (therefore an integer or half-integer for integer inputs); reject unsafe, nonfinite, unknown, overflowed, or differently sized populations", + "break_even_arithmetic": "represent every integer or half-integer median and refresh rate 4/20 as a reduced signed bigint rational numerator over a positive denominator; perform addition, subtraction, multiplication, denominator sign and zero tests, comparison, and mathematical ceiling exactly; reject unsafe receipt projection or overflow and never use binary floating-point" + }, + "pass_claim": "both Madar cold and Madar warm satisfy every inherited gate and tie or exceed matching Graphify and native medians for every included question and temperature" + }, + "isolation": { + "host": {"os":"macOS","os_version":"26.3","build":"25D125","darwin":"25.3","architecture":"arm64","hardware":"Apple M3 Max","ram_bytes":51539607552}, + "binaries": [ + {"name":"node","realpath":"/private/tmp/madar-core-reset-capability-validation-v1/toolchain/node","version":"v22.9.0","sha256":"983a169edf336738090b93b76df43fe9752aa7d0ed733099fa4b36d8a1116ed8"}, + {"name":"npm","realpath":"/opt/homebrew/lib/node_modules/npm/bin/npm-cli.js","version":"11.12.1","sha256":"8e5f6f3429f8cdbe693cdc29904e9d5a7b127a494bd15c804bd54c7403bfcbe7"}, + {"name":"sandbox-exec","realpath":"/usr/bin/sandbox-exec","sha256":"2f447acfae7a954ccb5a1bcf3a1955f69b1a8549c434ddff643df98fd3cb33ba"}, + {"name":"git","realpath":"/usr/bin/git","sha256":"506cb2ddd061e2992c8ee7c53853340688b53d9fcec94c3aa936524cea5b40cb"} + ], + "path_binding": {"PATH":"/private/tmp/madar-core-reset-capability-validation-v1/toolchain:/usr/bin:/bin","approval_bound":true,"resolution":"every executable is invoked by its separately bound absolute realpath; PATH exists only for unavoidable operating-system lookup","ambient_path_shadowing":"reject before setup and before every measured child","unexpected_path_entry_or_resolution":"stop campaign"}, + "checkout": "fresh standalone detached clone at frozen commit; linked worktrees forbidden", + "setup_network": "only frozen GitHub, package, and Python registry inputs", + "measured_child_network": "fail-closed denied for workers, raw tools, Graphify, Madar, and descendants", + "credentials": "only trusted parent relay holds isolated provider credential", + "relay_request": ["campaign_id","trial_id","sequence","operation","canonical_messages_hash"], + "relay_rejects_caller_fields": ["model","prompt","message","tool","provider","URL","host","path","header","method","sampling"], + "relay_state_enforcement": { + "scheduled_trial": "accept only the current scheduled incomplete trial", + "sequence": "strictly monotonic and exactly next for that trial", + "create_and_tool_limits": "at most 13 creates and 12 accepted tool calls", + "reuse": "reject reused, unknown, completed, stopped, or non-current campaign/trial IDs", + "conversation": "canonical_messages_hash must equal the parent-owned sealed conversation state before reconstruction", + "request_construction": "relay reconstructs complete Count/Create bodies only from immutable companion values and sealed parent state" + }, + "relay_urls": {"origin":"https://api.anthropic.com","count":"https://api.anthropic.com/v1/messages/count_tokens","create":"https://api.anthropic.com/v1/messages","hard_coded_in_source":true}, + "application_headers": {"accept":"application/json","accept-encoding":"identity","anthropic-version":"2023-06-01","content-type":"application/json","user-agent":"madar-core-reset-capability-validation-v1","x-api-key":""}, + "permitted_transport_headers": {"host":"api.anthropic.com","connection":"keep-alive","accept-language":"*","sec-fetch-mode":"cors","content-length":"base-10 decimal equal to the exact request-body UTF-8 byte length"}, + "request_header_observation": "set accept-encoding and user-agent explicitly; before campaign lock, an isolated loopback sentinel captures the pinned Node Fetch raw headers for the same method/application/transport template and binds its bytes/hash; each provider-call request_headers_sha256 is the reconstructed approved map with derived host/content-length, while response/request-ID evidence remains provider-observed", + "forbidden_headers": ["authorization","anthropic-beta","tracing","forwarding","cookie","cache","proxy","every unlisted application or transport header"], + "request_body_max_bytes": 2097152, + "count_response_max_bytes": 65536, + "create_response_max_bytes": 262144, + "response_headers_max_bytes": 32768, + "fetch_observation_boundary": { + "response_headers": "iterate the Fetch Headers object once into a lowercase plain string map, reject any key/value with an unpaired surrogate, RFC8785-JCS serialize it, and apply response_headers_max_bytes to those exact normalized UTF-8 bytes; raw wire order and duplicate lines are neither observable nor claimed", + "response_body": "incrementally count and buffer the bytes yielded by the Fetch Response body stream after Fetch content-decoding; apply the operation response cap to those bytes and hash them before text decoding", + "content_encoding": "pass requires content-encoding absent or exact identity; any other value records the normalized headers and capped yielded body/charge then triggers provider drift", + "tls_hostname": "the evidence field is the exact lowercase URL hostname api.anthropic.com supplied to Node Fetch and its default certificate verifier, proven by the frozen origin, no proxy/custom CA/DNS override, redirect:error, and exact final Response.url; it is not represented as a raw socket observation", + "certificate_verification": "Node default TLS certificate and hostname verification must succeed; disabling or replacing it is forbidden" + }, + "count_timeout_ms": 30000, + "create_timeout_ms": 120000, + "trial_deadline": { + "clock": "one monotonic nanosecond clock shared by the complete trial", + "deadline": "trial_start_ns + 300000000000 with checked Number-safe or bigint arithmetic", + "remaining_before_operation_ms": "max(0, floor((deadline_ns - operation_pre_send_ns) / 1000000))", + "operation_abort_ms": "min(the operation's fixed count_timeout_ms or create_timeout_ms, remaining_before_operation_ms)", + "nonpositive_remaining": "do not send; terminate the scheduled trial as timed_out empty-zero", + "boundary_attribution": "an AbortError at the trial deadline is a trial timeout; an earlier fixed Count deadline is a campaign-stopping Count failure; an earlier fixed Create deadline is an ordinary terminal-zero Create outcome", + "post_response_expiry": "if a valid final end_turn text response arrives but validation, transcript fsync, or answer fsync is not complete before the trial deadline, retain the exact successful provider event and raw answer only in the private transcript/archive, classify the trial timed_out, expose an ordinary empty-zero blind answer/hash, and never fabricate a failed Create", + "no_timer_reset": true + }, + "redirect": "error", + "tls_hostname": "api.anthropic.com", + "network_configuration": {"proxy":"forbidden","custom_ca":"forbidden","dns_override":"forbidden","ambient_network_configuration":"forbidden","accepted_final_url":"must exactly equal the requested https://api.anthropic.com path","accepted_tls_hostname":"the frozen verifier-input hostname must exactly equal api.anthropic.com under fetch_observation_boundary.tls_hostname"}, + "relay_failure_outcomes": { + "request_body_overflow": "before send: no provider call; stop campaign", + "response_or_header_overflow": "record any charge, assign scheduled trial zero, stop campaign", + "final_url_or_tls_mismatch": "record any charge, assign scheduled trial zero, stop campaign", + "count_deadline": "before Create: stop campaign with no retry and no Create", + "create_deadline": "after send: permanently consume the full reservation, assign scheduled trial zero, never retry or replace, and continue only while all strict ceilings remain satisfied", + "connection_reset_or_ambiguous_create_transport": "permanently consume the full reservation, assign scheduled trial zero, never retry or replace, and continue only while all strict ceilings remain satisfied", + "non_2xx_create_response": "hash the exact response and headers, permanently consume the full reservation because billable usage is not approval-bound in an error body, assign scheduled trial zero, never retry or replace, and continue only while all strict ceilings remain satisfied" + }, + "sandbox_honesty": "macOS sandbox is not claimed to provide a domain-specific IP allowlist; endpoint restriction is the narrow audited relay boundary", + "campaign_lock_bindings": ["relay source hash","coordinator source hash","IPC schema hash","descriptor map hash","exact Count/Create request-template hashes","every sandbox-profile hash"], + "sandbox_profile_policy": "exact approval-bound profile bytes; no widening, fallback, or ambient exception", + "close_on_exec_relay_descriptors": true, + "process_group_per_measured_child": true, + "descendant_marker_required": true, + "rss_sample_interval_ms_max": 10, + "escaped_or_untracked_descendant": "invalid", + "process_termination": "terminate the dedicated process group and every process carrying its unique descendant marker, then prove all descendants exited; reparenting, escaped PID, untracked descendant, or incomplete termination invalidates the trial", + "forbidden_context": ["user/global rules","hooks","skills","MCP settings","history","prior transcripts","Madar source checkout","hidden fixtures","grading inputs"], + "pre_provider_proofs": ["worker cannot connect to Anthropic","worker cannot connect to controlled sentinel","worker cannot read relay credential"], + "pre_provider_proof_scope": "before the first provider request of any kind, including Count Tokens, prove the worker and every descendant satisfy all three checks", + "child_environment_scrub": ["GitHub credentials/configuration","npm credentials/configuration","provider credentials/configuration","cloud credentials/configuration","agent credentials/configuration","user HOME/XDG/configuration"], + "forbidden_measured_access": ["repository and package registries","update checks","telemetry","query logs","arbitrary egress"], + "fixture_stage_order": "persist and fsync every answer and transcript before loading owner fixtures, required handoffs, or human rubric material", + "block_integrity": "verify frozen checkout, tree, and fixture hashes before and after every comparison block", + "failure_policy": "stop campaign when containment or endpoint restriction cannot be proved" + }, + "spend": { + "currency": "USD", + "input_micro_usd_per_token": 3, + "output_micro_usd_per_token": 15, + "provider_input_tokens_max": 20000000, + "provider_output_tokens_max": 2000000, + "provider_cost_cents_max": 10000, + "runner_cost_cents_max": 9000, + "provider_hard_cap_required": true, + "provider_zero_prior_usage_required": true, + "provider_authorization": { + "timing": "before the first provider request of any kind, including Count Tokens", + "workspace": "one isolated Anthropic workspace/API key", + "hard_limit_cents_max": 10000, + "zero_usage_in_campaign_billing_window": true, + "remaining_enforced_limit_micro_usd": "exact nonnegative Number-safe integer equal to remaining_enforced_limit_cents * 10000 with checked multiplication", + "lock_fields": ["redacted workspace identifier","redacted key identifier","limit/export or console-receipt SHA-256","observation timestamp","zero-use proof SHA-256","remaining enforced limit"], + "local_ledger_alone_sufficient": false, + "failure": "stop before Count Tokens" + }, + "create_input_safety_margin_tokens": 1024, + "create_output_reservation_tokens": 4096, + "ambiguous_transport_consumes_full_reservation": true, + "billable_categories": ["uncached_input","cache_write_5m","cache_write_1h","cache_read","output","geography_modifier","service_tier_modifier","other_modifier"], + "unknown_category": "stop", + "reservation_algorithm": { + "before_each_create": "obtain successful Count Tokens for the exact create semantic body", + "reserved_input_tokens": "counted_input_tokens + 1024", + "reserved_output_tokens": 4096, + "reserved_input_micro_usd": "reserved_input_tokens * 3", + "reserved_output_micro_usd": "4096 * 15", + "reserved_total_micro_usd": "reserved_input_micro_usd + reserved_output_micro_usd", + "send_guard": "do not send unless known actual plus permanently consumed ambiguous plus the new outstanding reservation remains strictly below 20,000,000 input tokens, 2,000,000 output tokens, 90,000,000 runner micro-USD, and remaining_enforced_limit_cents * 10000 micro-USD; equality reaches a ceiling and stops before Create", + "ceiling_comparison": "integer arithmetic with no rounding down", + "count_failure": "stop campaign with no retry" + }, + "reconciliation_algorithm": { + "successful_response": "replace its outstanding reservation with every actual billable token category and actual cost; nonzero cache usage remains drift but still consumes both ledgers", + "actual_over_reservation": "record actual usage and charge, assign trial zero, and stop immediately", + "ambiguous_transport": "permanently consume the full input, output, and cost reservation in the ambiguous-reservation ledger; never release it or substitute zero actual usage; the trial is ordinary terminal-zero and the campaign continues only while every strict ceiling remains satisfied", + "create_deadline": "a post-send Create AbortError with no accepted response is an ordinary terminal-zero trial, not a retry; permanently consume the full reservation in the ambiguous-reservation ledger and continue only while every strict ceiling remains satisfied", + "count_deadline": "a Count Tokens deadline is a Count failure and stops the campaign before Create; Count requests carry no Create reservation", + "non_2xx_create_response": "an error response is ordinary terminal-zero; permanently consume the full reservation instead of inferring absent usage from an unapproved error-body shape, and continue only while every strict ceiling remains satisfied", + "failed_known_response": "record and consume all actual usage/cost returned by the provider before applying terminal policy", + "unknown_usage_or_cost": "blocking unknown; assign trial zero and stop", + "no_release_after_ambiguity": true + }, + "reservation_arithmetic": { + "count_join": "Create counted_input_tokens equals its immediately preceding successful Count input_tokens", + "reserved_input_tokens": "counted_input_tokens + 1024", + "reserved_output_tokens": 4096, + "minimum_reserved_micro_usd": 64512, + "reserved_micro_usd": "reserved_input_tokens * 3 + reserved_output_tokens * 15", + "usage_total": "every known provider total equals the exact sum of its recorded token categories", + "ledger": "known actual usage/cost plus permanently consumed ambiguous reservations and outstanding reservations reconcile every Count/Create and diagnostic call exactly once" + }, + "per_call_record_fields": ["operation and monotonic sequence","request/response/request-ID hashes","exact provider request ID","returned model ID","requested and returned service tier","requested and returned inference geography","uncached input tokens","5-minute cache-write tokens","1-hour cache-write tokens","cache-read tokens","output tokens","effective base rates and geography/tier/other modifiers","provider-reported cost when available","conservatively derived cost","reserved input/output/cost","final response URL and TLS hostname"], + "terminal_drift": "wrong model, request template, temperature, thinking, tier, geography, rate, usage category, cache state, stop/content/usage shape, or billed category records request and charge, assigns trial zero, and stops the campaign", + "ceiling_action": "do not send request and stop campaign" + }, + "blinding": { + "reviewers": 2, + "reviewer_kind": "distinct independent natural persons", + "adjudicator_kind": "third distinct independent natural person", + "mapping_custodian_kind": "independent natural person who is neither operator nor reviewer", + "material_generation": {"timing":"before the first provider request of any kind, including Count Tokens","actor":"bound independent mapping custodian, never the operator","materials":["32-byte cryptographic seed","32-byte cryptographic salt","32-byte AES-256 key","fresh 12-byte AES-GCM nonce"],"reveal_map_creation":"complete plaintext map and final bundle order are created and committed before execution"}, + "pseudonym": {"seed_bytes":32,"salt_bytes":32,"algorithm":"HMAC-SHA-256","hmac_key":"seed","message":"UTF8('madar-capability-v1/pseudonym') || 0x00 || salt || 0x00 || UTF8(trial_id)","format":"A- plus first 16 lowercase hexadecimal digest characters","collision":"stop"}, + "answer_id": {"derivation":"exactly equal to the trial's HMAC pseudonym","format":"A- plus 16 lowercase hexadecimal characters","blinding":"never contains repository, temperature, arm, condition, ordinal, schedule position, or trial ID","join":"blind bundle, review payload/receipt, adjudication payload/receipt, reveal pseudonym, answer hash, and aggregate joins use this same opaque value"}, + "bundle_order": {"input_order":"scheduled comparison trial IDs in UTF-8 bytewise order","stream_algorithm":"HMAC-SHA-256","hmac_key":"seed","stream_message":"UTF8('madar-capability-v1/bundle-order') || 0x00 || salt || 0x00 || uint64be(counter)","counter_start":0,"draw":"first unsigned 64-bit big-endian digest word","shuffle":"frozen rejection-sampling Fisher-Yates","collision_or_bias_fallback":"none"}, + "reveal_encryption": {"algorithm":"AES-256-GCM","key_bytes":32,"nonce_bytes":12,"tag_bytes":16,"aad_utf8":"madar/core-reset/capability-validation-v1/reveal-map","base64":"RFC4648 standard alphabet with padding","canonicalization":"RFC8785 JCS UTF-8 without trailing LF","commitment":"lowercase SHA-256 of encrypted envelope JCS"}, + "reveal_map_plaintext": {"fields_only":["schema_version","campaign_id","seed_base64","salt_base64","custodian","created_at","mappings","bundle_order"],"mapping_fields_only":["trial_id","pseudonym","repository_id","question_id","temperature","arm","condition","ordinal"],"mapping_count":60,"bundle_order_count":60,"canonicalization":"RFC8785 JCS UTF-8 without trailing LF"}, + "reveal_envelope": {"fields_only":["schema_version","algorithm","nonce","ciphertext","tag","plaintext_sha256"],"algorithm":"AES-256-GCM","nonce":"fresh 12 bytes encoded RFC4648 base64 with padding","ciphertext":"RFC4648 base64 with padding","tag":"16 bytes encoded RFC4648 base64 with padding","plaintext_sha256":"lowercase SHA-256 of exact reveal-map JCS","commitment":"lowercase SHA-256 of exact envelope JCS"}, + "custody_and_visibility": {"custodian":"alone holds seed, salt, AES key, and editable reveal map until reveal","operator":"sees arm-labelled execution transcripts but never custodian seed, salt, AES key, or editable reveal map","reviewers":"see only their blind bundles and never arm identities, mapping, or another reviewer's receipt","adjudicator":"sees only required blind bundles and sealed disagreement inputs, never arm identities or mapping"}, + "failed_answer_blinding": { + "statuses": ["failed","timed_out","invalid","budget_terminated"], + "answer_kind": "empty_zero", + "final_answer_utf8": "empty byte string", + "answer_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "blind_bundle": "the ordinary blind bundle is still produced with the empty final_answer and identical question union dossier; no failure reason or arm identity is exposed", + "review": "both reviewers seal the exact question phase IDs and five dimension IDs at score 0 with no incorrect-claim rows; adjudication is required only by the ordinary phase-score or incorrect-claim disagreement rule", + "success_answer_kind": "substantive", + "consistency": "trial, blind bundle, review/adjudication payload, and aggregates must carry the same answer_kind and answer SHA-256; reveal mappings carry only the exact mapping_fields_only set" + }, + "durable_role_lock": { + "timing": "before the first provider request of any kind, including Count Tokens", + "identities": ["operator GitHub identity","mapping custodian GitHub identity","two reviewer GitHub identities","adjudicator GitHub identity"], + "pairwise_distinct": "operator, mapping custodian, reviewer slot 1, reviewer slot 2, and adjudicator are five pairwise-distinct bound GitHub identities", + "independence": "durable comments bind acceptance that reviewers did not author or operate the runner, cannot access the mapping, do not see one another's scores, and do not coordinate; the adjudicator cannot access the mapping or reviewer identities before an eligible disagreement payload; the custodian never reviews or adjudicates" + }, + "union_dossier": { + "count": 2, + "answers_per_question": 30, + "creation": "after all 30 comparison answers for the question are sealed", + "citation_detection": "a path is a valid dossier citation only when its exact UTF-8 repository-root-relative spelling occurs in final_answer and resolves beneath graph_root to a tracked, nonempty, regular, valid-UTF-8 file; empty, invalid-UTF-8, untracked, non-regular, escaping, or unresolved mentions are omitted from the dossier and remain available to human citation-correctness review", + "deduplication": "one entry per path across all 30 answers", + "order": "repository-root-relative UTF-8 path bytes", + "excerpt": "complete valid-UTF-8 file from line 1 through physical EOF with bytes unchanged", + "line_count": "LF count plus one for a nonempty final segment without LF; empty files cannot be cited", + "entry_fields_only": ["path","start_line","end_line","file_bytes","file_sha256","excerpt_bytes","excerpt_sha256","text"], + "entry_byte_fields": "file_bytes is the exact complete regular-file byte length; excerpt_bytes is the exact UTF-8 byte length of text; because the excerpt is the complete valid-UTF-8 file, both values are equal and independently recomputed", + "hashes": ["complete file SHA-256","exact excerpt UTF-8 SHA-256"], + "identical_bytes_per_question": true, + "answer_specific_dossier": "forbidden", + "private_artifact": "the complete dossier and excerpt text exist only in the two private canonical archive copies and reviewer blind bundles; they are never embedded in the committed receipt", + "committed_receipt_binding": ["schema_version","campaign_id","question_id","repository_id","answer_count","entry_count","dossier_sha256","entry_manifest_sha256"] + }, + "blind_bundle_allowed_fields": ["schema_version","campaign_id","answer_id","question_id","repository_id","pseudonym","answer_kind","product_scope","question","final_answer","answer_sha256","dossier","dossier_sha256"], + "blind_bundle_forbidden_fields": ["arm","condition","tool","MCP","timing","cost","transcript","graph artifact","reveal mapping"], + "score_payload_canonicalization": "RFC8785 JCS UTF-8 without trailing LF", + "attestation": "bound GitHub identity posts exact score-payload SHA-256 and independence statement", + "attestation_record_creation": "after comment exists; separate from score payload", + "adjudication_trigger": "any phase-score or incorrect-load-bearing-claim disagreement; dimension-score disagreement alone does not trigger adjudication", + "dimension_resolution": "for each of the five dimension IDs, the final dimension score is the exact arithmetic mean of the two bound reviewer integer scores with no rounding, yielding only 0, 0.5, 1, 1.5, or 2; the final trial total is the sum of every equal-or-adjudicated required phase score plus those five resolved dimension scores", + "incorrect_claim_resolution": { + "claim_fields_only": ["claim_sha256","start_utf8_byte","end_utf8_byte","text_sha256","contradicted","rationale_code","private_rationale_sha256"], + "locator": "start_utf8_byte and end_utf8_byte are nonnegative Number-safe integer boundaries into exact final-answer UTF-8 with start < end; both fall on Unicode-scalar boundaries and identify the exact nonempty claim bytes", + "text_sha256": "lowercase SHA-256 of the exact located claim bytes", + "claim_sha256": "lowercase SHA-256 of RFC8785 JCS UTF-8 of exactly {start_utf8_byte,end_utf8_byte,text_sha256}", + "reviewer_set": "each payload sorts unique claim rows by claim_sha256; its incorrect set is exactly the claim_sha256 values whose contradicted value is true", + "disagreement": "adjudication is required exactly when the two incorrect sets differ, regardless of omitted or contradicted:false rows; the adjudicator resolves the sorted union of both reviewers' located claims", + "accepted_set": "when incorrect sets differ use exactly the adjudicator's contradicted:true set; otherwise use the identical reviewer incorrect set and any adjudication triggered only by phases must preserve it", + "empty_zero": "no claim rows and an empty accepted set" + }, + "review_text_privacy": { + "committed_claim_rationale_codes": ["contradicted_by_dossier","unsupported_by_dossier","internal_answer_conflict","not_incorrect","other_private"], + "private_rationale_sha256": "lowercase SHA-256 of exact private rationale UTF-8 bytes stored only in the canonical archive; use the empty-byte SHA-256 when no private rationale exists", + "private_notes_sha256": "lowercase SHA-256 of exact optional private notes UTF-8 bytes stored only in the canonical archive; when no notes exist use the empty-byte SHA-256 e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "score_payload_notes": "free-form notes are forbidden in committed review and adjudication score payloads; optional notes remain private and are bound only by a private_notes_sha256", + "source_text": "raw source, dossier excerpt, provider text beyond the already approved final_answer blind field, and review working prose are forbidden in the committed receipt" + }, + "independence_statements": { + "operator_exact": "I will operate only the immutable locked campaign, will not access the custodian seed, salt, key, or editable mapping, and will not expose arm identities before an authorized reveal.", + "custodian_exact": "I alone hold the precommitted seed, salt, key, and editable mapping until the reveal gate, and I will not operate, review, or adjudicate this campaign.", + "reviewer_exact": "I independently reviewed this blind bundle without access to arm identities, the reveal mapping, another reviewer's scores, runner authorship, or coordination.", + "adjudicator_exact": "I independently adjudicated only the sealed disagreement payload without access to arm identities, the reveal mapping, or reviewer identities, and without coordination.", + "role_acceptance_field": "every campaign-lock role acceptance stores its role-specific exact statement verbatim plus statement SHA-256, GitHub author, comment URL/body SHA-256, and timestamp; the statement occurs byte-for-byte in the bound comment", + "attestation_field": "independence_statement is stored verbatim in each review/adjudication attestation, equals the role-specific exact string, occurs byte-for-byte in the bound GitHub comment body, and is hashed by independence_statement_sha256" + }, + "artifact_hash_subjects": { + "canonicalization": "unless an exact raw-byte subject is stated, every object hash below is lowercase SHA-256 of RFC8785 JCS UTF-8 with no trailing LF", + "dossier_sha256": "the complete private union-dossier object including every exact excerpt text field", + "entry_manifest_sha256": "exactly the dossier entries projected to {path,start_line,end_line,file_bytes,file_sha256,excerpt_bytes,excerpt_sha256} in dossier order, excluding only excerpt text", + "blind_bundle_sha256": "the complete blind_bundle object; the digest is stored only in its referencing review/adjudication/receipt rows, never inside blind_bundle", + "score_payload_sha256": "the complete review_score_payload or adjudication_score_payload object; the digest is stored only outside that payload", + "attestation_sha256": "the complete review_attestation or adjudication_attestation object; the digest is stored only outside that attestation", + "comment_body_sha256": "exact UTF-8 bytes of the GitHub API comment body string with no added newline or normalization", + "independence_statement_sha256": "exact UTF-8 bytes of the full independence_statement string stored in the attestation and present byte-for-byte in the bound comment", + "review_or_adjudication_receipt_sha256": "the complete receipt object after removing only its own receipt_sha256 field", + "aggregates_recomputed_sha256": "the complete aggregates object after removing only its own recomputed_sha256 field" + }, + "reveal_gate": "all expected review and adjudication payload and attestation hashes sealed", + "join_gate": "AES-GCM envelope, commitment, pseudonyms, and bundle order all reproduce", + "sequence": ["seal all 60 scheduled comparison answers before generating any blind bundle","create the two deterministic 30-answer union dossiers","serialize and seal all 60 blind bundles in committed HMAC-derived order","obtain two independent sealed review score payloads and durable attestations for every blind bundle","obtain a sealed adjudication payload and durable attestation for every phase-score or incorrect-claim disagreement","custodian confirms every expected review and adjudication hash before reveal","custodian publishes exact plaintext reveal-map JCS and AES key through the durable receipt process","reproduce encryption commitment, every pseudonym, and bundle order before joining scores to arms"] + }, + "receipt": { + "path": "docs/core-reset/evidence/capability-validation-v2.json", + "schema_path": "tools/eval/core-reset/schemas/capability-validation-receipt-v2.schema.json", + "max_physical_lines": 6000, + "max_bytes": 2097152, + "canonical_archive_copies": 2, + "canonical_transcript": { + "schema_version": "madar-capability-transcript-v2", + "private_object_fields_only": ["schema_version","campaign_id","trial_id","events"], + "event_order": "strict zero-based event_index in actual monotonic journal order; provider and tool events are never regrouped, omitted, synthesized, relabeled, or reordered", + "event_union": "every event is exactly one closed provider_event or tool_event selected by event_kind; additional fields are forbidden", + "provider_event_fields_only": ["event_index","event_kind","provider_sequence","count_provider_sequence","state_before","state_after","monotonic_reservation_request_ns","monotonic_reservation_ack_ns","monotonic_send_start_ns","monotonic_headers_ns","monotonic_body_end_ns","monotonic_outcome_ack_ns","deadline_remaining_ms","abort_ms","request_url","final_url","tls_hostname","http_method","request_body_base64","request_bytes","request_sha256","request_headers","request_headers_sha256","canonical_semantic_fields_sha256","tools_sha256","messages_sha256","system_sha256","tool_choice_sha256","http_status","response_body_base64","response_bytes","response_sha256","response_headers","response_headers_sha256","request_id","request_id_sha256","request_id_header_sha256","model","service_tier","inference_geo","usage","rate","reservation","actual_cost_micro_usd","ledger_disposition","content_classification","assistant_content_sha256","stop_reason","terminal_classification"], + "provider_event_variants": "event_kind is count or create; pre-send termination creates no event; every sent request creates exactly one event; request fields and send boundary are always complete; count has null Create-only association, reservation, response-model, content, and cost fields; timeout/reset/ambiguous no-body outcomes retain exact send/timing/URL/TLS subjects with null response-only fields and full reservation for Create; non-2xx preserves response bytes, headers, status, request ID, and full Create reservation; accepted responses populate every applicable strict field", + "request_headers": "closed lowercase normalized non-secret map reconstructed from the approval-bound template; x-api-key value is the literal ; no credential bytes are retained", + "response_headers": "closed lowercase whitespace-normalized duplicate-combined map exposed by Fetch Headers iteration; it is not represented as raw wire headers", + "request_and_transport_subject": "request_url is the hard-coded origin plus path; final_url and tls_hostname are observed from the completed direct-fetch response/connection when available; redirects are forbidden; http_method is POST; request body is exact base64 and its decoded bytes/hash/length must agree", + "timing": "all monotonic fields are exact decimal nanosecond strings allocated by the store; deadline_remaining_ms and abort_ms derive from them and the frozen deadline rules; absent boundaries are null only in their named pre-boundary outcome", + "provider_derivation": "request ID hashes, content length, semantic hashes, Count association, elapsed time, usage, rate, reservation, actual cost, ledger disposition, content classification, and terminal classification are recomputed from sealed request/response/store bytes and cannot be supplied", + "tool_event_fields_only": ["event_index","event_kind","tool_call_index","provider_sequence","continuation_provider_sequence","monotonic_start_ns","monotonic_end_ns","tool_use_id","name","input","input_jcs_base64","input_bytes","input_sha256","result","result_jcs_base64","result_bytes","result_sha256","result_subject","status"], + "tool_event_variants": "event_kind is tool; every provider-emitted tool_use attempt has one event; input is the strict parsed plain object and input_jcs_base64 decodes to its exact JCS; result is the complete raw envelope or unmodified MCP payload and result_jcs_base64 decodes to its exact JCS; continuation_provider_sequence is the exact later Create sequence or null only when the trial terminates; status is success, bounded_error, timed_out, invalid, denied, overflow, protocol_lost, process_lost, or failed", + "mcp_error_rule": "an exact MCP {content:[...],isError:true} payload at or below 65,536 UTF-8 bytes is preserved unmodified as bounded_error, consumes the call, and may continue; protocol/process loss or oversize records the honest attempted event and stopped prefix and is never relabeled as a valid error result", + "integer_and_null_policy": "indices, byte counts, deadline/abort milliseconds, token/usage/reservation/cost values, and monotonic nanosecond strings are nonnegative and exact; nullable fields are null only in the explicitly named variant and are never omitted or replaced with zero, empty string, empty object, or fabricated data", + "canonicalization": "RFC8785 JCS UTF-8 without BOM or trailing LF", + "transcript_sha256": "lowercase SHA-256 of exact canonical transcript JCS bytes", + "success_answer_sha256": "lowercase SHA-256 of exact final-answer UTF-8 bytes with no separator, trimming, normalization, or JSON quoting", + "empty_answer_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "tool_input_sha256": "lowercase SHA-256 of exact decoded input_jcs_base64 bytes after equality with RFC8785 JCS of input", + "tool_result_sha256": "lowercase SHA-256 of exact decoded result_jcs_base64 bytes after equality with RFC8785 JCS of complete result", + "total_bijection": "private events, committed tool_calls, machine_grade.tool_rows, and completed_tool_event_indexes join one-to-one over event index, tool-use ID, name, input/result bytes and hashes, provider sequence, continuation sequence, and result subject" + }, + "committed_machine_grading_evidence": { + "privacy": "contains normalized repository-root-relative paths, symbols, verification targets, classifications, counts, ratios, joins, and hashes but never raw file contents, graph contents, transcript contents, hidden-fixture contents, provider text, or arm mapping before reveal", + "trial_binding": "every row binds trial_id, transcript_sha256, answer_sha256, frozen expected-evidence hash, and the exact completed provider/tool-event prefix", + "tool_rows": "strictly event-ordered rows bind tool_use_id, allowed tool name, input/result hashes and byte counts, normalized requested path/query/symbol, returned file/symbol/verification-target sets, selected file set, focused-read classification, graph-call classification, and post-graph broad-search classification", + "phase_rows": "one row per frozen phase binds phase_id, exact matching event/result-hash joins, normalized evidence paths/symbols, expected and observed match counts, and coverage disposition", + "file_sets": "sorted unique selected, relevant, unrelated, cited, focused-read, graph-returned, and verification-target path sets permit exact precision and unrelated-file recomputation against the inherited frozen fixture", + "derived_values": "phase coverage, selected-file precision numerator/denominator, unrelated-file count, focused-call count, graph-call count, broad-search restart, accepted incorrect-claim count, and every machine gate are recomputed and may not be accepted as bare claims", + "join_rule": "every normalized proof joins to one existing transcript tool event by trial_id, event_index, tool_use_id, tool name, input_sha256, result_sha256, and result byte count; extra, missing, duplicate, or contradictory proof rows reject" + }, + "canonical_archive": { + "magic_utf8": "MADAR-CAPABILITY-ARCHIVE-V2\n", + "manifest": "RFC8785 JCS UTF-8 of exactly {schema_version:'madar-capability-archive-v2',campaign_id,files:[{ordinal,path,bytes,sha256}]}; ordinal is one-based contiguous and files are in exact encoded order", + "path_policy": "paths are exactly p/ plus one-based zero-padded 8-digit ordinal plus .bin; repository, arm, condition, trial ID, semantic name, artifact kind, source path, and extension are forbidden in public paths", + "private_index": { + "path": "p/00000001.bin", + "schema_version": "madar-capability-private-index-v2", + "object_fields_only": ["schema_version","campaign_id","entries"], + "entry_fields_only": ["ordinal","path","artifact_kind","semantic_id","bytes","sha256"], + "archive_payload_kinds": ["lock_observation","role_acceptance","environment_manifest","containment_observation","containment_probe","journal_frame","ledger_frame","provider_event","tool_event","transcript","machine_grade_join","dossier","blind_bundle","review","adjudication","reveal_mapping","lifecycle_manifest","stop_observation","receipt_build_input","raw_repository","graph","hidden_fixture","provider_body","review_working","dossier_excerpt"], + "entry_order": "strict unsigned UTF-8 tuple order by artifact_kind then semantic_id; both are nonempty exact strings; duplicate tuples reject", + "entry_rule": "entries cover every archive file after the private index exactly once; ordinal is its one-based manifest position and at least 2; path is matching p/NNNNNNNN.bin; bytes and sha256 equal the public manifest row and exact raw content", + "canonicalization": "RFC8785 JCS UTF-8 without trailing LF; exact bytes are p/00000001.bin content; private semantic IDs and kinds do not appear in the committed public receipt" + }, + "private_envelope": "every indexed content object validates against exactly one closed local receipt-schema fragment selected by artifact_kind; unknown, generic, catch-all, overlapping, and other_private variants reject", + "file_row": "ordinal and bytes are exact nonnegative Number-safe integers; sha256 is lowercase SHA-256 of exact raw content bytes", + "encoding": "magic bytes, unsigned 64-bit big-endian manifest-byte length, exact manifest bytes, then for each manifest row in order unsigned 64-bit big-endian content length followed by exact raw content; no external path bytes, compression, padding, alignment, footer, or trailing bytes", + "archive_sha256": "lowercase SHA-256 of complete bytes from first magic byte through last content byte", + "cycle_rule": "archive payload excludes final public receipt, archive copy attestations, copy-identity record, and archive-verifier attestation", + "committed_receipt": "records complete opaque public manifest, manifest JCS SHA-256, archive byte count and SHA-256, exactly two derived copy attestations, and copy-identity-record SHA-256 without private contents, semantic IDs, artifact kinds, or absolute paths", + "copy_identity_record": "RFC8785 JCS of exactly two rows ordered copy_index 1 then 2; each row has only copy_index, absolute_path_sha256, realpath_sha256, device, inode, nlink, mode, bytes, archive_sha256, manifest_sha256, file_fsync, directory_fsync, reread_sha256, pre_stat_sha256, and post_stat_sha256", + "copies": "exactly two byte-identical regular files at distinct absolute paths, distinct realpaths, and distinct (device,inode); exclusive no-follow create mode 0600; nlink exactly 1; fsync each complete file and containing directory; reopen no-follow and independently reread and restat each before attestation", + "archive_verifier": "sixth locked independent verifier reopens both copies, reproduces every byte/hash/manifest/copy-identity commitment, and posts a durable attestation over candidate receipt SHA-256, both archive SHA-256 values, manifest SHA-256, copy-identity-record SHA-256, and review timestamp; the attestation is not embedded in the receipt it signs", + "failure": "any absent, extra, duplicate, unreadable, noncanonical, malformed, trailing, linked, symlinked, non-regular, wrong-mode, same-identity, stat-drifted, unfsynced, unreread, or hash-mismatched archive/copy/index fact rejects and prevents final receipt" + }, + "lifecycle_evidence": { + "event_fields_only": ["sequence","stage","occurred_at","local_monotonic_ns","subject_manifest_sha256","durable_receipt_url"], + "encoding": "sequence is a zero-based contiguous integer; stage is approval-bound; occurred_at is RFC3339; local_monotonic_ns is a base-10 nonnegative bigint string or null for an externally posted event; subject_manifest_sha256 is the exact stage-manifest JCS hash; durable_receipt_url is an exact GitHub comment URL or null", + "pass_stages": ["campaign_lock_sealed","execution_fsynced","grading_material_loaded","dossiers_sealed","blind_bundles_sealed","reviews_and_adjudications_sealed","custodian_pre_reveal_confirmed","reveal_published","aggregates_sealed","archive_copies_fsynced"], + "execution_manifest": "contains all 60 comparison answer/transcript fsync rows plus diagnostic disposition and all 12 refresh rows; every local fsync monotonic time precedes grading_material_loaded", + "ordering": "the exact pass_stages are contiguous and strictly ordered; all 60 answers are sealed before dossiers/bundles, all expected score payloads, attestations, receipts and required adjudications are sealed before custodian confirmation, reveal_published has its own publication timestamp/comment hash distinct from pre-execution reveal_map.created_at, aggregates follow verified reveal, and archive follows aggregates", + "stopped_prefix": "stopped status contains the contiguous completed ordinary lifecycle prefix plus the triggering partial-stage manifest, followed only by stop_prefix_sealed, prefix_archive_copies_fsynced, rfc_stop_amendment_posted, and stopped_receipt_sealed finalization events; no skipped ordinary stage or fabricated later evidence may exist" + }, + "self_hash": "lowercase SHA-256 of RFC8785 JCS UTF-8 after removing only top-level receipt_sha256", + "required_statuses": ["pass","failed","stopped"], + "pass_derivation": "independent recomputation from immutable trials, privacy-safe grading proofs, review/adjudication receipts, inherited gates, medians, all 24 temperature-specific break-even rows, and every stop condition", + "semantic_validator_invariants": ["recompute every Count/Create request template, exact body/header byte hash and length, Count-to-Create semantic-subset equality, monotonic trial-deadline calculation, state transition, raw request-ID hash, usage/rate/cache/model/tier/geography disposition, and terminal content parse","reconcile every comparison and diagnostic provider call to reserved and actual ledger categories; retain the full reservation for a Create deadline, reset, ambiguous transport, or non-2xx response; record actual over-reservation charges before the first stop","prove each campaign-lock role, implementation hash, environment, process tree, credential path, relay, schedule, spend proof, and blind commitment existed before the first Count timestamp","prove all four comparison schedules contain the exact 60 unique immutable trial IDs in committed order with no retry, replacement, omission, or duplicate; every pair has all five exact arm-specific artifact checkpoints and every checkout preserves the inherited commit, tree, tree-path hash, and tracked manifest","reproduce each private canonical transcript hash, exact success or empty answer hash, tool input/result hash subject, provider tool_use/result ID join, arm-specific tool allowlist, create/tool-call cap, and honest completed provider/tool prefix without fabricated terminal events","recompute deterministic arm-specific graph-result extraction, phase matches and coverage, normalized selected/relevant/unrelated file sets, selected-file precision, graph and focused call counts, post-graph broad-search classification, accepted incorrect-claim count, and every machine gate from committed privacy-safe grading rows joined to transcript events and inherited fixtures","prove the two question dossiers, 60 unique blind bundles, 120 unique review receipts, exactly two distinct bound reviewers per bundle, all score/answer/attestation hashes and answer-kind joins; adjudicate if and only if phase or incorrect-claim scores disagree and exact-mean dimension-only disagreements without rounding","reproduce the AES-GCM commitment, all 60 full-trial-ID HMAC pseudonyms, committed bundle order, reveal joins, private dossier and safe committed bindings, reviewer/adjudicator independence hashes, and post-reveal aggregate joins","recompute all 20 cell aggregates, eight Madar comparisons, four six-sample clean-build medians, four three-sample refresh medians including token/byte metrics, and all 24 repository/question/temperature/arm/scenario break-even rows with independent time/token dispositions and no temperature pooling","prove every Madar cold and warm cell has at least two of three qualifying trials, every qualifying trial passes every machine gate, scores exactly 2 on every required phase, has zero accepted incorrect load-bearing claims, and each Madar median ties or exceeds both matching Graphify and native medians","prove the diagnostic used one fresh frozen OpenStatus clone at the bound commit/tree/path hash, one exact packed-Madar clean build, conditionally zero-or-one retrieve and at most two allowlisted reads, at most three total evidence calls, an honest completed tool prefix, and byte-identical three-file by three-checkpoint bundle hashes","prove each Graphify build/refresh code-only extractor/source-set gate, each sample's exact arm-specific pre/post artifacts, zero provider input/output/total tokens, recomputable graph joins and metrics, no retry or replacement, and no missing failed-block cost","reproduce the canonical archive manifest and byte encoding, every private file hash, two byte-identical distinct fsynced copies, archive byte count, manifest hash, and complete archive hash without committing private contents","recompute the complete lifecycle manifest and global schedule order; for stopped status prove every row is the immutable completed prefix through all first-observation matching stop IDs plus only mandatory stop-finalization evidence; omit every unreachable ordinary row","reject pass when any strict ceiling is reached, any blocking fact is unknown, any stop condition or campaign drift is present, any exact population or join is missing, or any cross-object invariant above fails"], + "unknown_blocking_fact": "reject", + "duplicate_retried_or_replaced_trial": "reject", + "status_evidence_policy": { + "pass": "requires the complete 60-trial campaign, diagnostic, 12 refresh samples, two union dossiers, 60 blind bundles, 120 review receipts, every triggered adjudication, full reveal, recomputed aggregates, no blocking unknown, and eligible outcome", + "failed": "means the complete campaign reached final eligibility comparison without triggering any of stop conditions 1 through 14: first_stop_condition_id is null, eligibility is not_eligible with stop_condition_triggered false, one or more nonempty recomputed final failure reasons and the required RFC #577 amendment comment URL are present, and no pass claim is allowed", + "stopped": "means one or more stop conditions 1 through 14 matched the first stopping observation: all matching IDs are recorded, first_stop_condition_id and eligibility stop_condition_id equal the lowest numeric match, eligibility is stopped with stop_condition_triggered true, the matching RFC #577 amendment comment URL is present, all completed immutable evidence and charges through that boundary are retained, unreachable future rows are omitted, and no pass claim is allowed", + "pre_reveal_stopped_visibility": "when stopped before a valid reveal, committed comparison prefix rows use only opaque pseudonym/answer_id plus question/repository, status, hashes, counts, and charges; arm, condition, full trial_id, schedule-position joins, semantic archive names, and plaintext private prefix remain only in the encrypted private archive bound by the original commitment and a committed private-prefix hash; no terminal reveal is fabricated", + "post_reveal_visibility": "arm/condition/full-trial joins may appear only when the ordinary review/adjudication/reveal gate had already completed before the later stop", + "human_review_on_stop": "stopped evidence may contain a complete or incomplete review prefix according to the actual stop boundary; it is never forced complete or fabricated", + "trial_row_on_stop": "a started scheduled trial retained at the stop boundary is sealed as its honest completed substantive or empty-zero disposition; an unstarted future trial row is omitted" + }, + "index_cost_evidence": { + "clean_build_fields": ["status","elapsed_ms","peak_rss_bytes","provider_input_tokens","provider_output_tokens","provider_total_tokens","artifact_bytes"], + "refresh_fields": ["elapsed_ms","peak_rss_bytes","provider_input_tokens","provider_output_tokens","provider_total_tokens","post_graph_bytes"], + "failed_or_stopped_unknowns": "use null and explicit failed/unknown status; never substitute zero", + "pass_values": "all inherited blocking index-cost fields are present, finite, non-null, and independently recomputed" + }, + "campaign_lock_implementation_identities": ["entrypoint","contract","report","contract_test","receipt_schema","ci_step"], + "campaign_lock_raw_tool_binding": "bind each of tool-definitions, path-policy, result-schema, error-message, and semantics JCS hashes plus their aggregate JCS hash", + "raw_private_material_policy": {"committed":false,"archive_only":["raw repositories","graphs","canonical transcripts","provider response bodies","hidden fixtures","arm mapping before reveal","review working files","union-dossier excerpts"],"committed_safe_evidence":["hashes","byte counts","normalized grading proofs","canonical archive manifest","post-reveal joins"],"credentials":"never stored in either archive or receipt"} + }, + "execution_boundary": { + "authorization": { + "current_scope": "first-stage approval authorizes only preparation and publication of the activation branch and activation PR, CI, and independent review of this governance-only activation candidate", + "offline_only": true, + "authorized_provider_spend_cents": 0, + "activation_merge_requires_second_owner_approval": true, + "implementation_requires_exact_activation_merge": true, + "real_execution_gate": "without a later separately approved campaign authorization subject the real command fails closed before reading fd 3 or any provider credential", + "forbidden_under_first_stage": ["activation merge","implementation","campaign lock","provider-account proof collection","Count Tokens","Create","provider request","paid spend","target-repository execution","npm/package/product publication","release","Registry metadata","tag","main"], + "lock_builder": { + "schema_validity_is_authorization": false, + "caller_authored_proof_objects": "reject", + "caller_supplied_hash_without_observed_bytes": "reject", + "generic_url_or_screenshot_or_export": "reject", + "observed_git_and_file_subjects": ["commit","tree","blob","src tree","package.json","package-lock.json","tarball","toolchain","helper","sandbox profile","native-monitor source","native-monitor compiler","native-monitor binary","machine manifest"], + "observed_comment_fields_only": ["repository_id","repository_owner_id","issue_number","comment_numeric_id","author_login","author_numeric_id","author_association","body_utf8","body_sha256","created_at","updated_at","includes_created_edit","html_url"], + "owner_approval_and_stop_comment_requirements": "fetch live from GitHub; require exact repository numeric identity, repository owner login/numeric identity, author_association OWNER, canonical issue/comment URL, unedited state, and exact body UTF-8 bytes, SHA-256, created_at, and updated_at matching the approval-bound owner approval or stop expectation", + "role_comment_requirements": "fetch live from GitHub; require exact repository numeric identity and the authorization-subject-bound role author's exact login and numeric identity, canonical issue/comment URL, exact recorded author_association, unedited state, and exact body UTF-8 bytes, SHA-256, created_at, and updated_at; role, reviewer, adjudicator, and archive-verifier authors are not required to be OWNER", + "authorization_subject_fields_only": ["contract_id","contract_sha256","contract_schema_sha256","receipt_schema_sha256","implementation_commit","implementation_tree","implementation_paths_sha256","implementation_numstat_sha256","source_and_binary_manifest_sha256","environment_manifest_sha256","containment_manifest_sha256","schedule_sha256","provider_observer_subject_sha256","spend_subject_sha256","role_subject_sha256"], + "authorization_subject_excludes": ["role acceptance comment metadata","final lock metadata","lock_jcs_sha256","provider credential","caller assertions"], + "locked_roles": ["mapping_custodian","operator","reviewer_1","reviewer_2","adjudicator","archive_verifier"], + "role_independence": "the five inherited grading-role authors are pairwise distinct; archive_verifier is distinct from all five and from operator, build author, and receipt author", + "ordering": "all observed role-acceptance comments bind the same authorization_subject_sha256 and precede final lock creation; final lock precedes the first Count request", + "real_lock": "may be built only in a future separately approved campaign phase after every observed proof, role acceptance, provider-account observation, source/profile/helper byte, and machine fact succeeds" + }, + "provider_account_observer": { + "status": "deferred-unresolved", + "offline_implementation_may_mint_real_lock": false, + "reason": "no approval-bound authenticated mechanism currently proves the exact Claude Platform workspace hard cap at or below USD 100.00 and zero campaign-window usage", + "future_binding_required": ["actual account type","exact authenticated acquisition mechanism","credential isolation","endpoint and request schema","response schema","pagination","freshness window","workspace and key join","raw proof bytes","hard-cap derivation","zero-use derivation","any additional code allowlist"], + "failure": "Capability Validation remains stopped; no credential read, lock, Count, Create, target checkout, or spend" + } + }, + "coordinator": { + "implementation": "one committed concrete coordinator directly owns every state transition and invokes only committed concrete components", + "owned_stages": ["preflight","credential-free acquisition","clone","setup","build","schedule","MCP","provider","diagnostic","refresh","review transition","receipt construction","stop finalization"], + "fixed_order": "exactly the inherited 60 comparison rows, then one diagnostic, then 12 refresh rows, then the inherited review pipeline", + "first_stop": "prevents every later ordinary, provider, trial, refresh, review, reveal, and aggregate stage", + "forbidden_interfaces": ["arbitrary executor callback","caller-supplied campaign adapter","matrix selector","repository selector","row filter","retry","replacement","execution resume","initial ledger","remaining balance","alternate transport","caller-supplied aggregate"], + "campaign_initialization": "exclusive-create campaign directory and execution-started seal, fsync the seal and directory, then permanently reject a second normal initialization or execution resume for the campaign ID", + "crash_recovery_finalization": { + "purpose": "seal one existing append-only prefix as stopped; never resume execution", + "exclusive_finalizer_seal": true, + "allowed": ["observe crash stop","seal existing journal prefix","write and verify two private archives","post or bind RFC #577 stop amendment","derive stopped receipt"], + "forbidden": ["instantiate relay","read provider credential","setup","tool or MCP call","provider request","review","reveal","ordinary-stage append","retry","replacement"] + } + }, + "campaign_store": { + "owner": "coordinator-process campaign-store component", + "sole_writer": true, + "caller_instantiation_or_seed_or_reset_or_replace_or_selection": "forbidden", + "owned_allocators": ["global sequence","event index","provider sequence","tool-call index","trial state","monotonic timestamp"], + "writer_seal": "exclusive for every phase transition; concurrent, stale, fresh-object, and alternate-entrypoint writers fail", + "frame": {"encoding":"unsigned length prefix followed by exact RFC8785 JCS UTF-8","fields_only":["campaign_id","global_sequence","frame_kind","previous_frame_sha256","payload","frame_sha256"],"chain":"global_sequence is zero-based contiguous; first previous hash is 64 zeroes; later previous hash equals prior complete frame SHA-256; frame_sha256 is derived with only itself omitted"}, + "durability": "exclusive create and fsync after every reservation and every provider outcome; fsync the containing directory for each created store file", + "provider_sequence": ["relay reservation request","store append and fsync","store acknowledgement","provider send","relay outcome","store append and fsync","store acknowledgement","coordinator continuation"], + "reservation": "Count reservation and cost are zero; before each Create reserve the inherited (counted_input + 1024) * 3 + 4096 * 15 micro-USD", + "unknown_outcome": "a sent Create timeout, reset, ambiguous transport, overflow, non-2xx, or unknowable usage/cost retains the full reservation and never records unknown cost as zero", + "known_cost_on_other_drift": "reconcile strict known usage and actual cost first, then stop; never replace known cost with reservation", + "probe": "with exactly 64,513 micro-USD remaining, at most one reservation may succeed across every public entrypoint and any attempted fresh object construction" + }, + "credential_relay": { + "process": "distinct committed relay process; sole provider transport", + "credential_input": "inherited fd 3 only; coordinator closes its copy immediately after spawn", + "credential_forbidden_locations": ["environment","argv","configuration","journal","ledger","filesystem","worker","MCP process","raw tool","child descriptor"], + "ipc": {"encoding":"unsigned length prefix plus closed RFC8785 JCS UTF-8","fields_only":["campaign_id","trial_id","sequence","operation","canonical_messages_hash"],"operation_values":["count","create"],"reject":["extra or missing field","duplicate","replay","non-current trial","caller-supplied provider body","caller-supplied response","alternate transport"]}, + "request_construction": "read the already-fsynced canonical conversation, reconstruct exact frozen Count/Create bodies, and verify semantic/body hashes before send", + "transport": "only the inherited direct Node fetch; hard-coded origin, paths, method, request templates, headers, redirect policy, response byte caps, and deadlines", + "send_gate": "no send before matching fsynced reservation acknowledgement; no coordinator continuation before matching fsynced outcome acknowledgement" + }, + "containment": { + "platform": "Darwin arm64 exact-host only", + "profiles": ["tools/eval/core-reset/sandbox/capability-validation-v2-setup.sb","tools/eval/core-reset/sandbox/capability-validation-v2-worker.sb","tools/eval/core-reset/sandbox/capability-validation-v2-mcp.sb","tools/eval/core-reset/sandbox/capability-validation-v2-relay.sb"], + "native_monitor_source": "tools/eval/core-reset/native/capability-validation-v2-process-monitor.c", + "native_interfaces": ["libproc","sysctl"], + "observed_fields": ["monotonic_ns","pid","ppid","process_group","rss_bytes","descendant_marker","fork_exec_denial","termination_state"], + "build_binding": "compile before any future campaign lock with exact approval-bound clang argv; bind source, compiler, binary, argv, and all profile byte hashes", + "prelock_setup": "credential-free; seal acquisition outputs and complete environment manifests before execution-started", + "spawn_ownership": "coordinator directly spawns every approved top-level process during measured answer, diagnostic, and refresh stages", + "kernel_policy": "worker and MCP profiles deny process-fork and default-deny process-exec after the exact approval-bound initial sandbox-exec/interpreter chain; relay and all workers default-deny network except relay's exact provider host", + "initial_chain": "live preflight must prove the exact chain; if a measured comparator requires any additional fork or exec, stop condition 8 fires and profiles are not weakened", + "monitor_cadence_ms": 5, + "maximum_observed_gap_ms": 10, + "termination": "close coordinator spawn gate, signal the complete process group and every marked PID, keep fork/exec kernel-denied, then require five complete zero-process scans separated by at least 10 ms", + "failures": ["reparent","process-group change","unexpected PID","RSS omission","denial failure","sampling gap over 10 ms","network or credential access","descriptor leak","non-quiescence","surviving child"], + "child_fds": [0,1,2], + "live_probes": ["worker and descendant cannot reach api.anthropic.com","worker and descendant cannot reach controlled sentinel","worker and descendant cannot read credential","process cannot escape containment","no child survives termination"], + "proof_boundary": "kernel fork/exec denial plus closed spawn gate plus native accounting plus repeated quiescence barrier; polling alone, ps fallback, abstract inspector, caveat, and best-effort mode are forbidden" + }, + "evidence": { + "journal": "one append-only campaign-store journal allocates and owns every event index, provider sequence, tool-call index, state, timestamp, and continuation", + "transcript_fields_only": ["schema_version","campaign_id","trial_id","events"], + "pre_send_termination": "creates no provider event", + "provider_event_rule": "every sent Count/Create creates exactly one provider event, including timeout, reset, non-2xx, overflow, malformed response, or drift", + "tool_event_rule": "every provider-emitted tool_use attempt creates exactly one tool event, including known, unknown, schema-invalid, resources/read, denied, timeout, overflow, and protocol/process-loss attempts", + "capture_before_derivation": ["exact request body and bytes","redacted normalized request headers and hash subject","exact response body and bytes","normalized response headers","raw request ID","URL","final URL","TLS hostname","monotonic boundaries","Count association","reservation","usage","rate","ledger disposition","tool input","tool result","state transition","continuation sequence"], + "derived_not_supplied": ["request ID hash","content length","deadline","elapsed time","semantic hashes","reservation disposition","usage totals","actual cost","answer kind","lifecycle status"], + "mcp_bounded_error": "preserve an MCP {content:[...],isError:true} payload at or below 65,536 UTF-8 bytes unmodified as bounded_error; consume the call and permit the provider loop to continue", + "mcp_stopped_prefix": "protocol loss, transport loss, or oversize result records the exact stopped-prefix tool attempt and cannot be relabeled as bounded evidence", + "cost_vectors": [{"input_tokens":7,"output_tokens":11,"cache_tokens":0,"micro_usd":186},{"counted_input_tokens":5,"reserved_micro_usd":64527}], + "deadline_boundary_remaining_ms": [0,29999,30001,119999,120001], + "tool_bijection": "for each disclosed full trial, private tool events, public tool_calls, machine_grade.tool_rows, and completed_tool_event_indexes form a total bijection over event index, tool-use ID, name, input/result bytes and hashes, provider sequence, continuation sequence, and result subject; omission, duplication, contradiction, or relabeling rejects" + }, + "receipt_derivation": { + "public_top_level_fields_only": ["schema_version","receipt_id","contract_id","status","generated_at","contract","candidate","campaign_lock","archive","comparison_blocks","diagnostic","refresh_blocks","provider_ledger","human_review","aggregates","eligibility","receipt_sha256","stop_conditions","first_stop_condition_id","rfc_amendment_url","validator_assertions","lifecycle_evidence"], + "private_artifact_kinds": ["lock_observation","role_acceptance","environment_manifest","containment_observation","containment_probe","journal_frame","ledger_frame","provider_event","tool_event","transcript","machine_grade_join","dossier","blind_bundle","review","adjudication","reveal_mapping","lifecycle_manifest","stop_observation","receipt_build_input","raw_repository","graph","hidden_fixture","provider_body","review_working","dossier_excerpt"], + "private_kind_coverage": "the private artifact kinds equal canonical_archive.private_index.archive_payload_kinds byte-for-byte and in order; each maps to exactly one closed local schema fragment and every private object matches exactly one kind; generic, unknown, catch-all, overlapping, and other_private kinds reject", + "separately_validated_non_private_objects": {"archive_manifest":"derived canonical opaque public manifest validated inside the committed receipt archive object; never a private envelope payload","archive_copy_attestation":"derived public receipt commitment created only after both fsynced copies independently reread; never an archive payload","archive_verifier_attestation":"external live durable-comment merge-gate object authenticated out of band; neither private archive payload nor embedded receipt object"}, + "builder_input": "one sealed immutable evidence root plus observed GitHub attestations; no hand-authored receipt, aggregate, boolean, status, cost, lifecycle, lock fact, archive fact, or other derived claim", + "pure_derivations": ["machine grades","costs","gates","medians","review aggregates","eligibility","pass","failed","stopped","all validator assertions"], + "answer_kind": "empty_zero iff final-answer UTF-8 byte length is exactly zero; whitespace and every other nonempty answer are substantive", + "empty_zero_review": "all scores and accepted claims are zero; two valid reviews necessarily agree, so adjudication is forbidden", + "review_joins": "campaign, question, pseudonym, answer ID/hash/kind, bundle, reviewer, adjudicator, score, and attestation join exactly to sealed evidence; all 60 bundle hashes are unique and each is used exactly twice by its locked pair", + "review_order": "score submission precedes its exact durable attestation comment, which precedes receipt construction", + "first_stop": "evaluate all 14 inherited conditions at one immutable observation, record every simultaneous match, select the lowest ID, retain the exact completed global prefix plus triggering partial row, and omit every unstarted ordinary/review/reveal/aggregate row", + "stopped_lifecycle": ["contiguous completed ordinary-stage prefix","triggering_partial_stage","stop_prefix_sealed","prefix_archive_copies_fsynced","rfc_stop_amendment_posted","stopped_receipt_sealed"], + "stopped_seal": "stopped_receipt_sealed hashes an independent JCS seal-plan/component manifest excluding final receipt bytes and self-hash; the final receipt embeds lifecycle evidence and computes its self-hash afterward; neither subject contains the other" + }, + "archive": { + "ordering": "unsigned UTF-8 tuple (artifact_kind, semantic_id)", + "encoding": "canonical v2 private archive with no trailing bytes", + "copy_count": 2, + "write": "two absolute private paths, exclusive no-follow create, regular files only, mode 0600, never overwrite; fsync both files and both containing directories", + "reread": "reopen no-follow and independently reread both complete copies before any copy attestation", + "reject": ["symlink","hardlink","nlink not 1","non-regular","same realpath","same dev and inode","stat drift","wrong mode","FIFO or device","malformed bytes","trailing bytes","index mismatch","byte or hash difference","unfsynced or unread copy"], + "payload_cycle_rule": "private archive excludes the final public receipt; receipt records derived canonical private manifest/hash and copy attestations, then is atomically published and independently reread", + "archive_verifier": "sixth locked independent verifier receives both copies, reopens and validates them, reproduces canonical manifest/hash and copy-identity commitment, then posts a durable attestation binding candidate receipt SHA-256, both archive SHA-256 values, canonical manifest SHA-256, copy-identity-record SHA-256, and review timestamp", + "verifier_attestation": "external merge-gate object not embedded in the receipt it signs; any receipt-byte change requires a fresh reread and attestation" + }, + "public_validation": { + "successful_disposition": "commitment-only", + "private_copies_re_read": false, + "claims": "public CI validates committed public receipt structure, self-hash, derivable public commitments, and schema only; it cannot claim private-byte reread or live-comment revalidation", + "full_validation": "exists only in receipt-building process plus independent archive verifier; missing private bytes cannot produce a final receipt", + "receipt_merge_gate": "external exact-head audit fetches the live verifier comment, authenticates author/body/timestamp/edit state, and proves it binds the unchanged receipt and both reread copies" + }, + "activation": { + "modified_paths": ["docs/core-reset/removal-manifest.yml","docs/core-reset/scorecard.md","docs/roadmap.md","docs/designs/2026-07-19-core-reset.md","tests/unit/core-reset-governance.test.ts"], + "added_assets": [{"path":"tools/eval/core-reset/contracts/capability-validation-v2.json","max_lines":1400,"max_utf8_bytes":196608},{"path":"tools/eval/core-reset/schemas/capability-validation-contract-v2.schema.json","max_lines":200,"max_utf8_bytes":262144},{"path":"tools/eval/core-reset/schemas/capability-validation-receipt-v2.schema.json","max_lines":1600,"max_utf8_bytes":1638400}], + "asset_aggregate": {"max_lines":3200,"max_utf8_bytes":2097152}, + "governance_numstat": {"max_added_lines":650,"max_removed_lines":250}, + "total_numstat": {"max_added_lines":3850,"max_removed_lines":250}, + "exact_path_count": 8, + "forbidden": ["production code","executable evaluator","CI","package","dependency","lockfile","tsconfig","generated output","historical evidence or asset","public behavior"] + }, + "implementation": { + "base": "new isolated worktree from exact v2 activation merge", + "module_root": "tools/eval/lib/capability-validation-v2/", + "module_line_caps": {"types.ts":440,"contract.ts":600,"schedule.ts":280,"environment.ts":500,"process-tree.ts":420,"workspace.ts":650,"mcp-client.ts":500,"provider.ts":760,"agent-worker.ts":560,"raw-tools.ts":480,"arms.ts":820,"runner.ts":520,"review.ts":620,"report.ts":700,"campaign-lock.ts":720,"campaign-store.ts":760,"credential-relay.ts":900,"macos-containment.ts":720,"campaign-executor.ts":1450,"evidence.ts":1050,"provider-evidence.ts":800,"lifecycle.ts":700,"archive-store.ts":850,"receipt-builder.ts":1200}, + "module_aggregate_max_lines": 17000, + "support_line_caps": {"tools/eval/core-reset/capability-validation-v2.mjs":240,"tools/eval/core-reset/capability-validation-v2-relay.mjs":120,"tools/eval/core-reset/native/capability-validation-v2-process-monitor.c":650,"tests/fixtures/capability-validation-v2/mock-runtime.mjs":500}, + "sandbox_profiles": ["tools/eval/core-reset/sandbox/capability-validation-v2-setup.sb","tools/eval/core-reset/sandbox/capability-validation-v2-worker.sb","tools/eval/core-reset/sandbox/capability-validation-v2-mcp.sb","tools/eval/core-reset/sandbox/capability-validation-v2-relay.sb"], + "sandbox_aggregate_max_lines": 320, + "support_aggregate_max_lines": 1830, + "test_paths": ["tests/unit/capability-validation-v2-contract.test.ts","tests/unit/capability-validation-v2-schedule.test.ts","tests/unit/capability-validation-v2-environment-workspace.test.ts","tests/unit/capability-validation-v2-provider-agent.test.ts","tests/unit/capability-validation-v2-mcp-arms.test.ts","tests/unit/capability-validation-v2-runner.test.ts","tests/unit/capability-validation-v2-review-report.test.ts","tests/unit/capability-validation-v2-campaign-lock.test.ts","tests/unit/capability-validation-v2-campaign-store-relay.test.ts","tests/unit/capability-validation-v2-macos-containment.test.ts","tests/unit/capability-validation-v2-campaign-executor.test.ts","tests/unit/capability-validation-v2-evidence.test.ts","tests/unit/capability-validation-v2-provider-evidence.test.ts","tests/unit/capability-validation-v2-lifecycle.test.ts","tests/unit/capability-validation-v2-archive-receipt-e2e.test.ts"], + "test_aggregate_max_lines": 9400, + "modified_paths": [".github/workflows/ci.yml","tests/unit/core-reset-baseline.test.ts","tests/unit/core-reset-governance.test.ts","tools/eval/core-reset/README.md","tools/eval/core-reset/isolation-support.mjs","tools/eval/core-reset/verify-isolation.mjs"], + "modified_numstat": {"max_added_lines":900,"max_removed_lines":350}, + "exact_path_count": 53, + "global_numstat": {"max_added_lines":29130,"max_removed_lines":350}, + "combined_activation_implementation_numstat": {"max_added_lines":32980,"max_removed_lines":600}, + "measurement": "git diff --no-ext-diff --no-renames --numstat ...; gross physical UTF-8 text lines with no netting or exemption", + "forbidden": ["any unlisted path","deletion or rename","generated commit","production file","package","dependency","lockfile","tsconfig","historical asset","evidence receipt","semantic change","compatibility alias"] + }, + "ci": { + "placement": "immediately after Build evaluation tooling", + "step_fields_only": ["name","run"], + "step_name": "Validate Capability Validation v2 offline self-test", + "run": "node tools/eval/core-reset/capability-validation-v2.mjs --self-test --validate-receipt-if-present", + "jobs": 6, + "forbidden_inputs": ["credential","network","provider","GitHub","registry","comparator installation","target repository","paid call"], + "stdout_receipt_absent": "{\"contract\":\"core-reset-capability-validation-v2\",\"mode\":\"self-test\",\"private_copies_re_read\":false,\"receipt\":\"absent\",\"status\":\"pass\"}", + "stdout_receipt_present": "{\"contract\":\"core-reset-capability-validation-v2\",\"mode\":\"self-test\",\"private_copies_re_read\":false,\"receipt\":\"commitment-only\",\"status\":\"pass\"}", + "output_rule": "exactly one RFC8785 JCS line and no other stdout or stderr; any other output or nonzero status fails", + "coverage": "complete synthetic 60+1+12 campaign, every stop finalizer, all mandatory adversarial mutations, and proof that real execution fails before credential access without the separate campaign authorization subject" + }, + "adversarial_acceptance": ["synthetic lock or missing proof bytes","edited or wrong-author comment","wrong Git object or changed source/profile/helper","second initialization, ledger reset, execution resume, replay, alternate transport, or caller-supplied provider field","fork, double-fork, reparent, process-group escape, RSS omission, network or credential access, sampling gap, or survivor","deleted, duplicated, reordered, fabricated, or mutated provider/tool event","forged length, URL, final URL, TLS hostname, headers, request ID, hash, deadline, reservation, usage, rate, cost, or disposition","omitted adverse, broad-search, or tool row; relabeling; missing continuation; non-bijection","stopping an in-bounds MCP isError payload instead of preserving and continuing","empty/substantive relabel, nonzero empty score, reviewer swap, duplicate role, forged or late attestation","future row after stop, skipped lifecycle stage, later first-stop ID, fabricated reveal, or missing RFC amendment","corrupt, linked, symlinked, FIFO, wrong-mode, unfsynced, unread, trailing, false-index archive or full-validation claim without bytes","hand-authored derived value, 59-trial pass, equality accepted below a strict ceiling, receipt overwrite, or private evidence accepted at public top level"], + "review_and_merge": { + "implementation_internal_order": ["contract/store","authenticated lock","relay/provider","native containment","setup/arms","fixed coordinator","evidence/lifecycle/archive/receipt","offline integration and adversarial audit"], + "activation_and_implementation_gates": ["all six CI jobs green on exact unchanged head","independent exact-head review with no P0/P1 blocker or blocking unknown","zero unresolved review threads","CodeRabbit non-default-core-reset skip stated honestly and never counted as review","no head change from final approval/review/CI through merge"], + "implementation_reviews": ["security/containment/accounting","evidence/receipt/semantic derivation"], + "activation_external_approval_audit": { + "local_ci_limitation": "local CI proves neither remote-comment immutability nor repository-owner approval of an activation head or asset hash", + "timing": "run against the exact final activation head after local CI and review and immediately before merge, after refreshing the live protected-base ref and fetching the live proposal/comments; repeat from live state after any head, base, asset, comment, review, or CI-state change", + "expected_repository": {"full_name":"mohanagy/madar","repository_numeric_id":1207912024,"repository_node_id":"R_kgDOR_9GWA","owner_login":"mohanagy","owner_numeric_id":11216054,"owner_node_id":"MDQ6VXNlcjExMjE2MDU0"}, + "proposal_issue_612": { + "expected_identity": {"issue_number":612,"issue_numeric_id":4980622532,"issue_node_id":"I_kwDOR_9GWM8AAAABKN5ExA","url":"https://github.com/mohanagy/madar/issues/612","title":"[Core Reset]: Make Capability Validation v2 execution mechanically complete"}, + "expected_author": {"login":"mohanagy","numeric_id":11216054,"node_id":"MDQ6VXNlcjExMjE2MDU0","author_association":"OWNER"}, + "expected_body": {"utf8_bytes":38009,"sha256":"4906405cbb806c850c0612305ef460e023e2060b5338734ae0af12303901cbd0"}, + "expected_creation_state": {"created_at":"2026-07-26T12:49:11Z","published_at":"2026-07-26T12:49:11Z","last_edited_at":null,"state":"OPEN"}, + "live_fetch": "immediately before activation merge fetch issue #612 through both GitHub REST and GraphQL; require exact repository, issue, URL, title, author, OWNER association, created/published state, open state, body UTF-8 bytes, and body SHA-256; require REST updated_at equals GraphQL updatedAt and record that live value, because comment activity may advance it but is not body-edit proof", + "body_binding": "recompute SHA-256 from the exact live body bytes and require both byte length and hash equal expected_body and governance.proposal_body_sha256; require GraphQL lastEditedAt remains null so an edit followed by restoration cannot pass as immutable", + "failure": "any identity, author, association, state, edit-state, byte-length, body-hash, REST/GraphQL update-state, or governance proposal-hash mismatch rejects activation merge and requires a fresh proposal snapshot plus renewed exact proposal and activation approval" + }, + "known_live_receipts": [ + {"purpose":"issue_610_stop","issue":610,"comment_numeric_id":5083281270,"url":"https://github.com/mohanagy/madar/issues/610#issuecomment-5083281270","body_utf8_bytes":3658,"body_sha256":"115e88cc3e1e00066c92f6ce4b3dd9ed8e0f6eabc1f8dbad918d1125c5cdaef9","created_at":"2026-07-26T11:31:21Z","updated_at":"2026-07-26T11:31:21Z"}, + {"purpose":"rfc_577_stop","issue":577,"comment_numeric_id":5083282711,"url":"https://github.com/mohanagy/madar/issues/577#issuecomment-5083282711","body_utf8_bytes":2889,"body_sha256":"65ac67ca30f24eb2c9d2741ab12ee42d2f593915220ff1251adb8af97e717ed0","created_at":"2026-07-26T11:31:48Z","updated_at":"2026-07-26T11:31:48Z"}, + {"purpose":"issue_612_first_stage","issue":612,"comment_numeric_id":5083661878,"url":"https://github.com/mohanagy/madar/issues/612#issuecomment-5083661878","body_utf8_bytes":2492,"body_sha256":"5b91f7d217fbfc30b65691915f359791c542a232d6bf555eb12ab95bbb2da34d","created_at":"2026-07-26T13:24:44Z","updated_at":"2026-07-26T13:24:44Z"}, + {"purpose":"rfc_577_first_stage","issue":577,"comment_numeric_id":5083662827,"url":"https://github.com/mohanagy/madar/issues/577#issuecomment-5083662827","body_utf8_bytes":2406,"body_sha256":"8597ee92caf9f6306da63f62762a11d89b4b1128e4f7b9ed6fffe5aa117506e3","created_at":"2026-07-26T13:25:01Z","updated_at":"2026-07-26T13:25:01Z"} + ], + "required_second_stage_receipts": [ + {"purpose":"issue_612_second_stage","issue":612,"selection":"exactly one live unedited OWNER receipt whose exact body binds the final activation head and all three local asset SHA-256 values and expresses the complete second-stage authorization"}, + {"purpose":"rfc_577_second_stage","issue":577,"selection":"exactly one live unedited OWNER receipt whose exact body binds the same final activation head and all three local asset SHA-256 values and expresses the matching complete second-stage authorization"} + ], + "live_comment_verification": "fetch all six comments from GitHub; verify repository full name, repository numeric and node identity, issue number, comment numeric ID, canonical URL, owner login/numeric/node identity, author_association OWNER, exact body UTF-8 bytes and SHA-256, created_at, updated_at, includesCreatedEdit false, and no minimized, deleted, transferred, edited, or mismatched state", + "stop_hash_recomputation": "recompute both live stop-comment body SHA-256 values from exact fetched body bytes and require equality with inheritance.source_stop_receipts and the known_live_receipts rows", + "first_stage_gate": "both live first-stage receipts must retain their exact recorded bytes/hashes and authorize only activation-candidate preparation, publication, CI, and review", + "second_stage_subject_fields_only": ["activation_head_commit","v2_contract_sha256","v2_contract_schema_sha256","v2_receipt_schema_sha256"], + "local_asset_paths": ["tools/eval/core-reset/contracts/capability-validation-v2.json","tools/eval/core-reset/schemas/capability-validation-contract-v2.schema.json","tools/eval/core-reset/schemas/capability-validation-receipt-v2.schema.json"], + "second_stage_binding": "parse the two exact live second-stage receipt bodies without caller-supplied values; require identical four-field subjects, complete second-stage approval scope, and values exactly equal to the unchanged checked-out activation head and freshly SHA-256-hashed local asset bytes", + "protected_base_tip_gate": { + "remote_ref": "refs/remotes/origin/core-reset", + "upstream_ref": "refs/heads/core-reset", + "expected_commit": "dcb52596a3efa89f9ef5d372231ce97a91ae5f9f", + "expected_tree": "d0ca317290dbd6837295f36f36ded5b49855c0fe", + "live_verification": "immediately before merge fetch origin refs/heads/core-reset into refs/remotes/origin/core-reset without merging; require git ls-remote origin refs/heads/core-reset, the refreshed remote-tracking ref, and git rev-parse refs/remotes/origin/core-reset all equal expected_commit, then require git rev-parse refs/remotes/origin/core-reset^{tree} equals expected_tree", + "drift": "any live branch-tip or tree mismatch rejects activation merge and requires a fresh proposal snapshot plus renewed exact proposal and activation approvals; silent rebase, update-branch, retargeting, merge-base substitution, or approval carry-forward is forbidden" + }, + "unchanged_head_gate": "the audited activation head equals the PR head reviewed, approved, and used by all six green CI jobs and remains byte-for-byte unchanged through protected core-reset merge", + "failure": "any missing, ambiguous, extra matching, edited, identity-mismatched, URL/timestamp/body/hash-mismatched, scope-incomplete, protected-base-tip/tree-drifted, head-changed, or asset-changed fact rejects activation merge; base drift requires a fresh proposal snapshot plus renewed proposal and activation approvals, while any other approved-subject change requires fresh exact owner approval receipts for the new unchanged head and all three new asset hashes" + }, + "target_branch": "core-reset", + "forbidden_target": "main", + "campaign_execution_authorized": false + }, + "closure": { + "after": "exact offline implementation merge only", + "modified_paths": ["docs/core-reset/removal-manifest.yml","docs/core-reset/scorecard.md","docs/roadmap.md","docs/designs/2026-07-19-core-reset.md","tests/unit/core-reset-governance.test.ts"], + "numstat": {"max_added_lines":400,"max_removed_lines":200}, + "records_only": ["v2 offline execution boundary passed","exact implementation merge and tree","review and CI receipts","#610 unchanged stopped disposition","unresolved provider-account observer","zero provider requests and spend","no active campaign"], + "forbidden": ["evaluator","schema","contract","CI","production","package","dependency","receipt","evidence","historical asset"], + "full_activation_implementation_closure_numstat": {"max_added_lines":33380,"max_removed_lines":800}, + "merge_gates": "same exact-head six-job CI, independent no-blocker governance review, honest CodeRabbit skip, zero threads, protected core-reset only" + }, + "stop_conditions": ["anchor, v1 asset, stop receipt, inherited value, or equality proof drifts","provider request, campaign lock, target-repository execution, or paid spend becomes necessary","provider, comparator, model, matrix, repository, prompt, temperature, schedule, token, tool, time, USD, grading, blinding, or aggregation changes","any path or line/byte ceiling must widen","production, package, dependency, lockfile, tsconfig, public, graph/index/query, CLI, MCP, token, timeout, or npm-artifact semantics change","CI requires more than the exact offline step","compatibility alias, v1 implementation continuation, alternate executor or transport, retry, resume, replacement, fallback, or caveat is required","coordinator, relay, native monitor, sandbox, ledger, journal, evidence derivation, stopped finalizer, receipt builder, or archive lifecycle remains asserted, abstract, incomplete, or unknown","exact-host monitor cannot compile or sustain observed intervals at or below 10 ms","worker or child can read credential, inherit relay descriptors, reach provider/sentinel, escape containment, or survive termination","public validation is represented as private-byte or live-comment revalidation","exact-head CI, review, or thread gate fails","publication, npm, GitHub Release, Registry metadata, tag, main, external validation, or later phase is targeted"], + "stop_action": "stop immediately, preserve exact evidence and known charges, post the durable stop record on #612, amend RFC #577, never amend the immutable #612 proposal body, and do not reinterpret favorably, widen, reduce matrix, add compatibility, work around technically, or retry a provider request" + }, + "stop_policy": { + "on_any_stop_condition": "record charge and immutable evidence when applicable, assign scheduled trial zero when applicable, stop, and amend RFC #577", + "classification": "record every condition ID whose trigger is true at the first stopping observation; first_stop_condition_id is the lowest numeric matching ID, simultaneous overlaps are not discarded, and no later observation may replace or reprioritize that set", + "conditions": [ + {"id":1,"group":"frozen-bindings","trigger":"protected base, src, package, lock, frozen v2, schema, validator, repository, fixture, prompt, expected evidence, grading, threshold, temperature, schedule, tool-call, timeout, or cost binding drifts"}, + {"id":2,"group":"production-semantics","trigger":"any production source, public behavior, dependency, package content, build config, graph/index/query semantic, token budget, or timeout must change"}, + {"id":3,"group":"ci","trigger":"any CI workflow change beyond the one approval-bound offline self-test is required"}, + {"id":4,"group":"compatibility","trigger":"any compatibility alias, wrapper, fallback, duplicate implementation, graph override, restored --no-html, or hidden configuration is required"}, + {"id":5,"group":"madar-default-mcp","trigger":"the exact default Madar MCP cannot use the retained accepted bundle without drift or rebuild"}, + {"id":6,"group":"graphify","trigger":"Graphify identity/environment/argv, ten-tool/six-resource surface, directed-runtime coercion, code-only precondition, zero build-provider tokens, query-log denial, or network isolation differs"}, + {"id":7,"group":"provider","trigger":"provider rejects a frozen temperature; model, request-template, thinking, service-tier, geography, rate, usage-category, cache, stop/content/usage-shape, or billing behavior drifts; or audited narrow relay and credential isolation cannot be proved"}, + {"id":8,"group":"host-containment","trigger":"host/binary/sandbox binding changes or cannot prove full child-process containment/RSS"}, + {"id":9,"group":"hashes","trigger":"a repository, owner, patch, or result hash differs"}, + {"id":10,"group":"leakage","trigger":"a generated path, hidden fixture, prior answer, arm identity, or rubric leaks before its permitted stage"}, + {"id":11,"group":"human-review","trigger":"reviewer independence, two sealed scores, required adjudication, or pre-reveal hashes are missing"}, + {"id":12,"group":"post-reveal-integrity","trigger":"any scheduled trial is retried, replaced, dropped, or regraded after reveal"}, + {"id":13,"group":"ceilings-and-unknowns","trigger":"any token or USD ceiling is reached or any blocking value is unknown"}, + {"id":14,"group":"forbidden-publication-target","trigger":"publication, release, Registry metadata, a tag, main, or external-validation work becomes necessary"} + ], + "rerun": "forbidden", + "budget_increase": "forbidden", + "matrix_reduction": "forbidden", + "model_or_comparator_change": "forbidden", + "production_or_package_change": "forbidden", + "publication": "forbidden" + } +} diff --git a/tools/eval/core-reset/schemas/capability-validation-contract-v2.schema.json b/tools/eval/core-reset/schemas/capability-validation-contract-v2.schema.json new file mode 100644 index 00000000..aa291b19 --- /dev/null +++ b/tools/eval/core-reset/schemas/capability-validation-contract-v2.schema.json @@ -0,0 +1,27 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://github.com/mohanagy/madar/tools/eval/core-reset/schemas/capability-validation-contract-v2.schema.json", + "title": "Madar Core Reset capability-validation v2 immutable offline successor contract", + "type": "object", + "additionalProperties": false, + "required": ["schema_version","contract_id","status","governance","anchors","inheritance","candidate","graphify","provider","raw_tools","campaign","isolation","spend","blinding","receipt","execution_boundary","stop_policy"], + "properties": { + "schema_version": {"const":2}, + "contract_id": {"const":"core-reset-capability-validation-v2"}, + "status": {"const":"immutable-offline-successor-governance-contract"}, + "governance": {"const":{"issue":612,"issue_url":"https://github.com/mohanagy/madar/issues/612","parent_rfc":577,"parent_rfc_url":"https://github.com/mohanagy/madar/issues/577","stopped_predecessor_issue":610,"stopped_predecessor_url":"https://github.com/mohanagy/madar/issues/610","target_branch":"core-reset","forbidden_branch":"main","proposal_body_sha256":"4906405cbb806c850c0612305ef460e023e2060b5338734ae0af12303901cbd0","proposal_receipt":"https://github.com/mohanagy/madar/issues/612#issuecomment-5083546156","rfc_proposal_receipt":"https://github.com/mohanagy/madar/issues/577#issuecomment-5083547611","first_owner_approval":"https://github.com/mohanagy/madar/issues/612#issuecomment-5083661878","rfc_first_owner_approval":"https://github.com/mohanagy/madar/issues/577#issuecomment-5083662827","first_owner_approval_scope":"prepare, publish, run CI for, and independently review only the governance-only activation candidate","activation_merge_authorized_by_first_stage":false,"offline_implementation_authorized_by_first_stage":false,"campaign_lock_authorized_by_first_stage":false,"target_repository_execution_authorized_by_first_stage":false,"provider_request_authorized_by_first_stage":false,"provider_spend_authorized_by_first_stage_cents":0,"second_owner_approval_required":true,"second_owner_approval_scope":["unchanged activation head commit","v2 contract SHA-256","v2 contract schema SHA-256","v2 receipt schema SHA-256","every newly exact coordinator/relay, observed-authorization, non-resettable-ledger, native-monitor/sandbox, transcript/provider/MCP evidence, receipt-derivation, stopped-finalization, archive/fsync, public-validation, error, path, LOC, schema, and operational choice"],"activation_merge_authorization":"conditional only on the live valid matching second-stage owner approval receipts binding the exact unchanged activation head and all three local asset SHA-256 values","offline_implementation_authorization":"conditional only after that same valid second-stage approval and merge of that exact unchanged activation head to protected core-reset; implementation starts from the exact activation merge in a new isolated worktree","campaign_execution_authorized_under_issue_612":false,"target_repository_execution_authorized_under_issue_612":false,"provider_request_authorized_under_issue_612":false,"provider_spend_authorized_under_issue_612_cents":0,"future_campaign_approval":"separate proposal and explicit owner approval required after the exact offline implementation merge"}}, + "anchors": {"const":{"protected_base_commit":"dcb52596a3efa89f9ef5d372231ce97a91ae5f9f","base_tree":"d0ca317290dbd6837295f36f36ded5b49855c0fe","src_tree":"1a37e3a58ee7b2a75ca034112506590f699b3918","tools_eval_tree":"b8ef02da3ce135596e87fdf6252441755061d956","package_json_sha256":"d464fd8e59b3d4d3f817ebdd6457fb3cfb02d9f3fad4fc8648f29c03a8a56b33","package_lock_sha256":"b9d179f0ee70e14d85653c5013cf2513efb22127b10fc3ee1deb5fa698993a61","tsconfig_eval_sha256":"b2eb8dea28aab40a794bda38f11100dcc98e8c2987b3d8fdefc62263ebe7ae17","ci_workflow_sha256":"4dde28b814127bceabe8e076c2f5afc286153d9f8b655cf5e8a1681f754ac2f8"}}, + "inheritance": {"const":{"source_path":"tools/eval/core-reset/contracts/capability-validation-v1.json","source_contract_id":"core-reset-capability-validation-v1","source_git_blob":"6c1406a2d52e80127ca8670f331fc13d258ab0c3","source_sha256":"ae03a6b2cc8675ca66ad0ff67f06e13389cf04e6a6a8167c3404f1c8657f36f5","source_schema_path":"tools/eval/core-reset/schemas/capability-validation-contract.schema.json","source_schema_git_blob":"1cfc8a333b76966deb97d258aae99c05df7ece63","source_schema_sha256":"6d8679e335730180bee0c9fc62f144ae2086ea16dade800887a0301da27f23b6","source_receipt_schema_path":"tools/eval/core-reset/schemas/capability-validation-receipt.schema.json","source_receipt_schema_git_blob":"e05615cc97d31b2607d1e60b93fe080dddc75930","source_receipt_schema_sha256":"a33a6b3532a3e0df62bcd0f3616a9585b2be4ede1f360cf3d55f70c99c29f30e","source_proposal_body_sha256":"27c04eca61e8c3ae65e2a9eab5c0b7e269313be933cef785b94e9bdca7292ba5","source_activation_head":"80e942a8a28e3895465aa9ca432c4a926054055d","source_activation_merge":"dcb52596a3efa89f9ef5d372231ce97a91ae5f9f","source_activation_tree":"d0ca317290dbd6837295f36f36ded5b49855c0fe","source_stop_receipts":{"issue_610_url":"https://github.com/mohanagy/madar/issues/610#issuecomment-5083281270","issue_610_body_sha256":"115e88cc3e1e00066c92f6ce4b3dd9ed8e0f6eabc1f8dbad918d1125c5cdaef9","rfc_577_url":"https://github.com/mohanagy/madar/issues/577#issuecomment-5083282711","rfc_577_body_sha256":"65ac67ca30f24eb2c9d2741ab12ee42d2f593915220ff1251adb8af97e717ed0","matched_stop_condition_ids":[7,8,13],"historical_disposition":"immutable stopped record; not a trial, implementation base, authority source, cherry-pick target, or merge candidate"},"comparison":{"algorithm":"after exact source, source-schema, and source-receipt-schema byte-hash verification, reject duplicate JSON keys and invalid Unicode, parse both contracts, validate v1 against its immutable schema, then recursively compare RFC8785-JCS values at every object member and ordered array position","allowed_difference_pointers":["/schema_version","/contract_id","/status","/governance","/anchors/protected_base_commit","/anchors/base_tree","/anchors/tools_eval_tree","/inheritance","/receipt/path","/receipt/schema_path","/receipt/canonical_transcript","/receipt/canonical_archive","/execution_boundary"],"difference_pointer_semantics":"RFC6901; a listed object pointer permits that complete subtree; /execution_boundary is the sole source-absent addition; every other source-absent, target-absent, type-changed, key-changed, array-length, array-order, number, string, boolean, or null difference rejects","deny_unlisted":true,"reject_duplicate_or_ancestor_descendant_pointers":true,"frozen_root_pointers":["/anchors/src_tree","/anchors/package_json_sha256","/anchors/package_lock_sha256","/anchors/tsconfig_eval_sha256","/anchors/ci_workflow_sha256","/candidate","/graphify","/provider","/raw_tools","/campaign","/isolation","/spend","/blinding","/receipt/max_physical_lines","/receipt/max_bytes","/receipt/canonical_archive_copies","/receipt/committed_machine_grading_evidence","/receipt/lifecycle_evidence","/receipt/self_hash","/receipt/required_statuses","/receipt/pass_derivation","/receipt/semantic_validator_invariants","/receipt/unknown_blocking_fact","/receipt/duplicate_retried_or_replaced_trial","/receipt/status_evidence_policy","/receipt/index_cost_evidence","/receipt/campaign_lock_implementation_identities","/receipt/campaign_lock_raw_tool_binding","/receipt/raw_private_material_policy","/stop_policy"],"frozen_assertions":[{"pointer":"/provider/model","value":"claude-sonnet-4-6"},{"pointer":"/provider/temperatures","value":[0,0.7]},{"pointer":"/provider/count_path","value":"/v1/messages/count_tokens"},{"pointer":"/provider/create_path","value":"/v1/messages"},{"pointer":"/provider/max_create_requests_per_trial","value":13},{"pointer":"/provider/max_tool_calls_per_trial","value":12},{"pointer":"/campaign/trials_per_cell","value":3},{"pointer":"/campaign/timeout_seconds","value":300},{"pointer":"/campaign/refresh/total_samples","value":12},{"pointer":"/spend/provider_input_tokens_max","value":20000000},{"pointer":"/spend/provider_output_tokens_max","value":2000000},{"pointer":"/spend/provider_cost_cents_max","value":10000},{"pointer":"/spend/runner_cost_cents_max","value":9000}],"campaign_population":{"comparison_trials":60,"diagnostics":1,"refresh_samples":12,"order":"the exact v1 global_execution_order"},"conjunctive_rule":"execution_boundary adds fail-closed controls only; it cannot delete, loosen, reinterpret, retry, replace, alias, widen, or otherwise override any frozen v1 value"}}}, + "candidate": {"const":{"package_name":"@lubab/madar","package_version":"0.32.0","identity_source":"exact implementation merge commit","required_src_tree":"1a37e3a58ee7b2a75ca034112506590f699b3918","required_package_json_sha256":"d464fd8e59b3d4d3f817ebdd6457fb3cfb02d9f3fad4fc8648f29c03a8a56b33","required_package_lock_sha256":"b9d179f0ee70e14d85653c5013cf2513efb22127b10fc3ee1deb5fa698993a61","pack_once_per_block":true,"clean_argv":["generate","."],"refresh_argv":["generate",".","--update"],"forbidden_argv":["--no-html"],"mcp_argv":["mcp"],"mcp_cwd":"frozen graph_root","graph_override":"forbidden","compatibility_wrapper":"forbidden","packed_cli_invocation":{"resolution":"resolve the executable from the single package tarball installed from the exact implementation merge, then bind its absolute realpath and SHA-256","generate":"invoke the resolved packed CLI directly with argv [\"generate\",\".\"]","update":"invoke the same resolved packed CLI directly with argv [\"generate\",\".\",\"--update\"]","mcp":"invoke the same resolved packed CLI directly with argv [\"mcp\"] from frozen graph_root","forbidden":["npm exec","npx","package-manager shim","source-checkout CLI","PATH-selected CLI","wrapper","alias","graph override"]},"workspace_bundle":["out/graph.json","out/indexing-manifest.json","out/indexing-manifest.share-safe.json"],"bundle_hash_checkpoints":["after_build","before_cold_answer","after_cold_answer","before_warm_answer","after_warm_answer"],"bundle_hash_policy":"all three files remain byte-identical at every checkpoint","pair_mutation_policy":"no rebuild, refresh, mutation, reconciliation write, or other bundle change is permitted between or during the cold/warm pair","startup_policy":"default MCP startup and normal no-op reconciliation are inside answer elapsed time","mcp_snapshot":{"protocol_version":"2025-11-25","initialize_bytes":301,"initialize_sha256":"a6fa8a94a5777b99f48351585b3971dfef8476129198d24bf1db6a77d8743f9b","tools_list_bytes":522,"tools_list_sha256":"43823255827750225d05b6c7e46865351b2240509e9017bc83a647396bf32594","combined_bytes":852,"combined_sha256":"025593c75c92ade8d659e104832b98275cbabfd0f222759048ff1c1a9b65a144","combined_jcs":{"initialize":{"capabilities":{"tools":{"listChanged":false}},"instructions":"Call retrieve once with the codebase question. Madar returns one deterministic authenticated evidence path or a terminal evidence boundary.","protocolVersion":"2025-11-25","serverInfo":{"name":"madar","title":"Madar","version":"0.32.0"}},"tools_list":{"tools":[{"description":"Return the smallest deterministic evidence path for a TypeScript or JavaScript codebase question.","inputSchema":{"additionalProperties":false,"properties":{"budget":{"description":"Requested result budget; effective serialized output is capped at 4000 tokens.","minimum":1,"type":"integer"},"question":{"description":"The codebase question to answer from authenticated graph evidence.","maxLength":512,"minLength":1,"type":"string"}},"required":["question"],"type":"object"},"name":"retrieve"}]}}}}}, + "graphify": {"const":{"repository":"https://github.com/Graphify-Labs/graphify","tag":"v0.9.20","tag_object":"083212f1871822e0bfd237369abd9eac0b968edd","commit":"edec9eabeceeae6aa2375eddb3835efa1a32c0a3","tree":"5cfbdfa42c036ed759deb4f7d5ad510e5b205d9b","signed":false,"uv_version":"0.11.16","uv_sha256":"f63ec276fa13f8f392542a334c0f58f36833b24304831e5f4c221e2edf7a16f3","python_version":"3.12.11","python_arch":"arm64","python_sha256":"ee24a8666b2f675b465b799f4e173a62319f5ae41c011b8103925d0a7c9a886f","build_constraint":"setuptools==83.0.0","wheel":"graphifyy-0.9.20-py3-none-any.whl","wheel_sha256":"9629d2dca7a73979dadfc02fe500182ac9654c8332afb1d5386e530cba57a2c0","install_argv":["--no-config","--no-python-downloads","tool","install","--force","--python","","--constraints","","--build-constraints","","graphifyy[mcp] @ git+https://github.com/Graphify-Labs/graphify@edec9eabeceeae6aa2375eddb3835efa1a32c0a3"],"resolved_constraints":["annotated-types==0.8.0","anyio==4.14.2","attrs==26.1.0","certifi==2026.7.22","cffi==2.1.0","click==8.4.2","cryptography==49.0.0","graphifyy @ git+https://github.com/graphify-labs/graphify@edec9eabeceeae6aa2375eddb3835efa1a32c0a3","h11==0.16.0","httpcore==1.0.9","httpx-sse==0.4.3","httpx==0.28.1","idna==3.18","jsonschema-specifications==2025.9.1","jsonschema==4.26.0","mcp==1.28.1","networkx==3.6.1","numpy==2.5.1","pycparser==3.0","pydantic-core==2.46.4","pydantic-settings==2.14.2","pydantic==2.13.4","pyjwt==2.13.0","python-dotenv==1.2.2","python-multipart==0.0.32","rapidfuzz==3.14.5","referencing==0.37.0","rpds-py==2026.6.3","sse-starlette==3.4.6","starlette==1.3.1","tree-sitter-bash==0.25.1","tree-sitter-c-sharp==0.23.5","tree-sitter-c==0.24.2","tree-sitter-cpp==0.23.4","tree-sitter-elixir==0.3.5","tree-sitter-fortran==0.6.0","tree-sitter-go==0.25.0","tree-sitter-groovy==0.1.2","tree-sitter-java==0.23.5","tree-sitter-javascript==0.25.0","tree-sitter-json==0.24.8","tree-sitter-julia==0.23.1","tree-sitter-kotlin==1.1.0","tree-sitter-lua==0.5.0","tree-sitter-objc==3.0.2","tree-sitter-php==0.24.1","tree-sitter-powershell==0.26.4","tree-sitter-python==0.25.0","tree-sitter-ruby==0.23.1","tree-sitter-rust==0.24.2","tree-sitter-scala==0.26.0","tree-sitter-swift==0.7.3","tree-sitter-typescript==0.23.2","tree-sitter-verilog==1.0.3","tree-sitter-zig==1.1.2","tree-sitter==0.25.2","typing-extensions==4.16.0","typing-inspection==0.4.2","uvicorn==0.51.0"],"resolved_constraints_encoding":"UTF-8, LF after every row including final row, LC_ALL=C bytewise-sorted","resolved_constraints_sha256":"0cefc2366a03b606262baa69cc5520d499851c161b00cd1fa67c4feff990902c","environment":{"isolated_roots":["UV_TOOL_DIR","UV_PYTHON_INSTALL_DIR"],"pre_snapshot_removals":["**/__pycache__/**","**/*.pyc","**/*.pyo"],"required":{"PYTHONDONTWRITEBYTECODE":"1","PYTHONNOUSERSITE":"1","GRAPHIFY_QUERY_LOG_DISABLE":"1"},"required_unset":["PYTHONPYCACHEPREFIX","GRAPHIFY_QUERY_LOG","GRAPHIFY_QUERY_LOG_ENABLE","GRAPHIFY_QUERY_LOG_RESPONSES"],"filesystem_manifest":{"canonicalization":"RFC8785 JCS UTF-8 without trailing LF","roots":["UV_TOOL_DIR","UV_PYTHON_INSTALL_DIR"],"order":"root name then UTF-8 relative-path bytes","entries":["directory","regular_file","symlink"],"directory_fields":["root","path","type","mode"],"regular_file_fields":["root","path","type","mode","bytes","sha256"],"symlink_fields":["root","path","type","mode","target"],"include_dot_root_row":true,"no_follow_lstat":true,"reject_types":["socket","fifo","block_device","character_device","other"],"post_unit_recompute":true,"drift_policy":"invalidate complete comparison block"},"dependency_manifest":{"canonicalization":"v2 RFC8785 JCS UTF-8 without trailing LF","capture_point":"after bytecode cleanup and before the first comparison-block unit","records":["verified isolated CPython version, SHA-256, and absolute realpath","verified uv version, SHA-256, and absolute realpath","direct Graphify requirement at commit edec9eabeceeae6aa2375eddb3835efa1a32c0a3","every installed distribution normalized name and version","every installed distribution direct_url object or explicit null"],"distribution_count":59,"graphify_direct_url_required":true,"executable_realpaths_recorded_separately":["python","uv","graphify","graphify-mcp"],"sha256_bound_in_campaign_lock":true},"reuse_rule":{"same_isolated_roots_per_comparison_block":true,"manifest_recomputed":["before every unit","after every unit"],"forbidden":["dependency re-resolution","reinstallation","wheel replacement","installed-file drift","new, removed, or changed filesystem entry","mode drift","regenerated bytecode"],"mismatch_policy":"invalidate the complete comparison block, stop the campaign, and do not rerun"},"bytecode_policy":{"before_snapshot":"recursively remove every __pycache__ directory and *.pyc/*.pyo file from both isolated roots","required_before_and_after_every_unit":"zero __pycache__ directories and zero *.pyc/*.pyo files","post_snapshot_exclusions":"none"}},"build_argv":["extract",".","--code-only"],"refresh_argv":["update","."],"refresh_source_extensions_forbidden":[".md",".mdx",".qmd",".skill"],"code_only_corpus":{"preconditions":["before clean build","after frozen mutation before refresh"],"document_extensions":[".md",".mdx",".qmd",".skill"],"required_document_extractor_result":null,"detected_code_source_set":"bound before clean build","refresh_source_rule":"refresh may introduce no graph source outside the bound detected code-source set","images_are_update_widening_trigger":false,"drift_policy":"stop the campaign"},"artifact":"graphify-out/graph.json","artifact_directed":false,"mcp_runtime_directed":true,"mcp_argv":["/graph.json"],"mcp_protocol":"2025-11-25","mcp_server_name":"graphify","mcp_server_version":"1.28.1","mcp_result_max_utf8_bytes":65536,"allowed_mcp_methods":["initialize","tools/list","resources/list","tools/call"],"forbidden_mcp_methods":["resources/read"],"tool_names":["query_graph","get_node","get_neighbors","get_community","god_nodes","graph_stats","shortest_path","list_prs","get_pr_impact","triage_prs"],"resource_uris":["graphify://report","graphify://stats","graphify://god-nodes","graphify://surprises","graphify://audit","graphify://questions"],"resources_exposed_to_provider":false,"mcp_boundary":{"transport":"stdio only","network":"fail-closed denied","credentials":"none","tool_result":"unmodified MCP payload serialized as RFC8785 JCS into exactly one provider tool_result; never rewritten into the common raw-tool envelope","result_max_utf8_bytes":65536,"oversize_result":"invalidate the trial with no truncation","project_path_schema":"unmodified","project_path_escape":"fails naturally under the MCP filesystem sandbox and consumes the tool call","resources_read":"reject, record, consume the call, and invalidate the trial","failed_network_pr_call":"remains in the transcript and consumes the common tool-call budget"},"initialize_bytes":201,"initialize_sha256":"5663ccae0c781f831c5542da54861bd3762b182eae67f770ff86acf429bc3037","tools_list_bytes":5642,"tools_list_sha256":"ac88c309fb4c397d4f611db446ef634555dcaaa37640d43867aedb09a53a976e","resources_list_bytes":804,"resources_list_sha256":"48e8d52b5f5b5d01e464fac9598e8607b134b830d43d81fa0b846d457461e940","combined_bytes":6694,"combined_sha256":"f6630c505fdb3b6ce4df2679176cbb43d228b6d6df9ac48ccfee8fe6b890de16","combined_jcs":{"initialize":{"capabilities":{"experimental":{},"resources":{"listChanged":false,"subscribe":false},"tools":{"listChanged":false}},"protocolVersion":"2025-11-25","serverInfo":{"name":"graphify","version":"1.28.1"}},"resources_list":{"resources":[{"description":"Full GRAPH_REPORT.md","mimeType":"text/markdown","name":"Graph Report","uri":"graphify://report"},{"description":"Node/edge/community counts and confidence breakdown","mimeType":"text/plain","name":"Graph Stats","uri":"graphify://stats"},{"description":"Top 10 most-connected nodes","mimeType":"text/plain","name":"God Nodes","uri":"graphify://god-nodes"},{"description":"Cross-community surprising connections","mimeType":"text/plain","name":"Surprising Connections","uri":"graphify://surprises"},{"description":"EXTRACTED/INFERRED/AMBIGUOUS edge breakdown","mimeType":"text/plain","name":"Confidence Audit","uri":"graphify://audit"},{"description":"Suggested questions for this codebase","mimeType":"text/plain","name":"Suggested Questions","uri":"graphify://questions"}]},"tools_list":{"tools":[{"description":"Search the knowledge graph using BFS or DFS. Returns relevant nodes and edges as text context.","inputSchema":{"properties":{"context_filter":{"description":"Optional explicit edge-context filter, e.g. ['call', 'field']","items":{"type":"string"},"type":"array"},"depth":{"default":3,"description":"Traversal depth (1-6)","type":"integer"},"mode":{"default":"bfs","description":"bfs=broad context, dfs=trace a specific path","enum":["bfs","dfs"],"type":"string"},"project_path":{"description":"Absolute path to a project directory containing graphify-out/graph.json. Optional — defaults to the graph this server was started with.","type":"string"},"question":{"description":"Natural language question or keyword search","type":"string"},"token_budget":{"default":2000,"description":"Max output tokens","type":"integer"}},"required":["question"],"type":"object"},"name":"query_graph"},{"description":"Get full details for a specific node by label or ID.","inputSchema":{"properties":{"label":{"description":"Node label or ID to look up","type":"string"},"project_path":{"description":"Absolute path to a project directory containing graphify-out/graph.json. Optional — defaults to the graph this server was started with.","type":"string"}},"required":["label"],"type":"object"},"name":"get_node"},{"description":"Get all direct neighbors of a node with edge details.","inputSchema":{"properties":{"label":{"type":"string"},"project_path":{"description":"Absolute path to a project directory containing graphify-out/graph.json. Optional — defaults to the graph this server was started with.","type":"string"},"relation_filter":{"description":"Optional: filter by relation type","type":"string"}},"required":["label"],"type":"object"},"name":"get_neighbors"},{"description":"Get all nodes in a community by community ID.","inputSchema":{"properties":{"community_id":{"description":"Community ID (0-indexed by size)","type":"integer"},"project_path":{"description":"Absolute path to a project directory containing graphify-out/graph.json. Optional — defaults to the graph this server was started with.","type":"string"}},"required":["community_id"],"type":"object"},"name":"get_community"},{"description":"Return the most connected nodes - the core abstractions of the knowledge graph.","inputSchema":{"properties":{"project_path":{"description":"Absolute path to a project directory containing graphify-out/graph.json. Optional — defaults to the graph this server was started with.","type":"string"},"top_n":{"default":10,"type":"integer"}},"type":"object"},"name":"god_nodes"},{"description":"Return summary statistics: node count, edge count, communities, confidence breakdown.","inputSchema":{"properties":{"project_path":{"description":"Absolute path to a project directory containing graphify-out/graph.json. Optional — defaults to the graph this server was started with.","type":"string"}},"type":"object"},"name":"graph_stats"},{"description":"Find the shortest path between two concepts in the knowledge graph.","inputSchema":{"properties":{"max_hops":{"default":8,"description":"Maximum hops to consider","type":"integer"},"project_path":{"description":"Absolute path to a project directory containing graphify-out/graph.json. Optional — defaults to the graph this server was started with.","type":"string"},"source":{"description":"Source concept label or keyword","type":"string"},"target":{"description":"Target concept label or keyword","type":"string"}},"required":["source","target"],"type":"object"},"name":"shortest_path"},{"description":"List open GitHub PRs with CI status, review state, and graph impact (which communities each PR touches, blast radius). Use this before starting work to check if a PR already covers the area you're about to change.","inputSchema":{"properties":{"base":{"description":"Base branch to filter PRs by (auto-detected if omitted)","type":"string"},"project_path":{"description":"Absolute path to a project directory containing graphify-out/graph.json. Optional — defaults to the graph this server was started with.","type":"string"},"repo":{"description":"GitHub repo (owner/repo). Defaults to current repo.","type":"string"}},"type":"object"},"name":"list_prs"},{"description":"Get detailed graph impact for a specific PR: which files it changes, which knowledge-graph communities are affected, and how many nodes are touched. Use this to assess merge risk or check for overlap with your current work.","inputSchema":{"properties":{"pr_number":{"description":"PR number to analyse","type":"integer"},"project_path":{"description":"Absolute path to a project directory containing graphify-out/graph.json. Optional — defaults to the graph this server was started with.","type":"string"},"repo":{"description":"GitHub repo (owner/repo). Defaults to current repo.","type":"string"}},"required":["pr_number"],"type":"object"},"name":"get_pr_impact"},{"description":"Return all actionable open PRs (correct base, not stale) with full graph impact data so you can reason about review priority, merge order, and conflict risk. Call this when the user asks 'what PRs should I review?' or 'what's ready to merge?'","inputSchema":{"properties":{"base":{"description":"Base branch to filter PRs by (auto-detected if omitted)","type":"string"},"project_path":{"description":"Absolute path to a project directory containing graphify-out/graph.json. Optional — defaults to the graph this server was started with.","type":"string"},"repo":{"description":"GitHub repo (owner/repo). Defaults to current repo.","type":"string"}},"type":"object"},"name":"triage_prs"}]}}}}, + "provider": {"const":{"kind":"anthropic-first-party-messages-api","execution_mode":"development-only direct Messages API tool loop","http_client":"direct Node fetch","http_method":"POST","forbidden_clients_and_capabilities":["Claude Code","Codex","guided benchmark suite","Anthropic SDK","batch API","server tools","web search","web fetch","code execution"],"origin":"https://api.anthropic.com","count_path":"/v1/messages/count_tokens","create_path":"/v1/messages","api_version":"2023-06-01","model":"claude-sonnet-4-6","thinking":{"type":"disabled"},"temperatures":[0,0.7],"max_tokens":4096,"service_tier_request":"standard_only","service_tier_response":"standard","inference_geo_request":"global","inference_geo_response":"global","stream":false,"tool_choice":{"type":"auto","disable_parallel_tool_use":true},"omitted_fields":["top_p","top_k","stop_sequences","cache_control","metadata","output_config","betas"],"system":"You are a repository-analysis agent. Answer only the user's frozen question. Use only the supplied tools and evidence returned by them. Cite repository-root-relative file paths and exact symbols for load-bearing claims. Distinguish verified facts from inference and state uncertainty. Do not modify files, seek network access, or mention this evaluation.","user_message_frame":"inherited product_scope.scope_statement UTF-8, then two LF bytes, then inherited question.prompt UTF-8","initial_messages":{"array_length":1,"message_fields_only":["role","content"],"role":"user","content_binding":"the exact evaluated user_message_frame string","property_order":["role","content"],"content_block_array":"forbidden"},"per_trial_fresh_state":{"worker_process":"new process","conversation":"new conversation with no prior messages","provider_context":"new provider context with no reuse","home":"empty HOME","xdg":"empty XDG_CONFIG_HOME, XDG_CACHE_HOME, XDG_DATA_HOME, and XDG_STATE_HOME","configuration":"empty agent, user, global, and tool configuration","mcp_process":"new arm MCP process"},"count_request_fields":["model","system","tools","messages","thinking","tool_choice"],"create_request_fields":["model","system","tools","messages","thinking","tool_choice","temperature","max_tokens","service_tier","inference_geo","stream"],"provider_tools":{"raw_conversion":"for each raw_tools.tool_definitions row emit exactly {name,description,input_schema} with input_schema equal to the approval-bound input_schema object","mcp_conversion":"for each approval-bound MCP tools/list row emit exactly {name,description,input_schema}, renaming only inputSchema to input_schema and preserving the complete schema value byte-for-byte under RFC8785 JCS","native_order":["read","search","list","shell-read-only"],"graphify_order":["read","search","list","shell-read-only","query_graph","get_node","get_neighbors","get_community","god_nodes","graph_stats","shortest_path","list_prs","get_pr_impact","triage_prs"],"madar_order":["read","search","list","shell-read-only","retrieve"],"renaming_or_wrapping":"forbidden except the exact inputSchema to input_schema key conversion"},"request_serialization":{"encoding":"UTF-8 JSON with no BOM and no trailing LF","serializer":"native JSON.stringify over a newly constructed plain object","count_property_order":["model","system","tools","messages","thinking","tool_choice"],"create_property_order":["model","system","tools","messages","thinking","tool_choice","temperature","max_tokens","service_tier","inference_geo","stream"],"nested_property_order":"approval-bound provider tool arrays and message/content objects are constructed in the exact key order stated by their schemas; no replacer, whitespace, normalization, or post-processing","hash_and_length":"SHA-256 and decimal content-length cover the exact serialized UTF-8 request bytes"},"response_parsing":{"wire_decode":"buffer the capped response body, reject a UTF-8 BOM, decode with TextDecoder('utf-8',{fatal:true}), and perform no Unicode or newline normalization","json":"before JSON.parse, a string-aware lexical scan rejects duplicate keys at every object depth; JSON.parse must produce one plain top-level object; recursively reject every string containing an unpaired UTF-16 surrogate before JCS, hashing, dispatch, or answer encoding; numeric token and byte fields are nonnegative Number-safe integers; NaN, infinity, fractions, bigint coercion, accessors, and prototypes other than Object/Array/null are rejected","count_response":{"http":"status 200 only","required_and_allowed_top_level_keys":["input_tokens"],"input_tokens":"nonnegative Number-safe integer","other_status_or_shape":"campaign stop with no retry and no Create"},"create_response":{"required_and_allowed_top_level_keys":["id","type","role","model","content","stop_reason","stop_sequence","usage","service_tier","inference_geo"],"id":"nonempty string","type":"message","role":"assistant","stop_sequence":"null","stop_reason_values":["end_turn","max_tokens","tool_use","refusal"],"unknown_stop_reason":"campaign stop after charge recording","non_2xx":"ordinary terminal-zero Create with exact body/header hashes and the full reservation permanently consumed; the error body is not projected into a successful response object","malformed_or_unsupported_json_shape":"campaign stop after charge recording"},"usage":{"required_and_allowed_keys":["input_tokens","cache_creation_input_tokens","cache_read_input_tokens","output_tokens","cache_creation"],"token_fields":"input_tokens, cache_creation_input_tokens, cache_read_input_tokens, and output_tokens are nonnegative Number-safe integers","cache_creation":"either absent when cache_creation_input_tokens is zero, or exactly {ephemeral_5m_input_tokens,ephemeral_1h_input_tokens} with nonnegative Number-safe integers whose sum equals cache_creation_input_tokens","pass_requirement":"cache_creation_input_tokens, both cache-creation TTL categories, and cache_read_input_tokens are all exactly zero","missing_extra_unknown_or_inconsistent":"campaign stop after charge recording"},"content_shapes":{"final_text":"content is a nonempty array containing only exact {type:'text',text:string} objects; when stop_reason is refusal the classified shape is refusal, otherwise final_text","single_tool_use":"with stop_reason tool_use, content is a nonempty array containing exactly one exact {type:'tool_use',id:nonempty string,name:nonempty string,input:plain JSON object} plus zero or more exact {type:'text',text:string} blocks in any returned order; every complete block is retained for byte-exact continuation","none":"content is an empty array","recognized_loop_violation":"an array of individually exact known text/tool_use block objects that contains zero or multiple tool_use blocks for stop_reason tool_use, any tool_use block for another stop_reason, or otherwise conflicts with the recognized stop_reason","provider_shape_drift":"any unknown block type, extra or missing block field, non-object block, invalid field type, or otherwise non-schema response/content object","actions":"provider_shape_drift stops the campaign after charge recording; recognized_loop_violation, unknown tool name, duplicate or reused tool_use ID, state violation, or tool request on Create 13 is ordinary terminal-zero; a known allowed tool with schema-invalid input executes its exact error tool_result and may continue"},"final_answer":{"accepted_shape":"final_text with stop_reason end_turn","bytes":"concatenate each text value's exact UTF-8 bytes in array order with no separator, prefix, suffix, trimming, or normalization","nonempty":"the concatenated UTF-8 byte length is at least one; whitespace bytes are not removed","empty_or_other_stop":"ordinary terminal-zero trial"},"assistant_round_trip":"after strict response validation, retain the exact parsed content array object; JSON.stringify that unchanged value with no replacer or whitespace and hash those UTF-8 bytes; the next assistant message embeds that same object reference, and its serialized content-value bytes must equal the retained bytes before the matching tool_result is appended","ordinary_terminal_zero":["max_tokens","refusal","empty end_turn final_text","HTTP non-2xx","Create deadline","connection reset or ambiguous Create transport with full reservation retained","recognized mixed/multiple/parallel loop violation, unknown tool name, duplicate or reused valid tool_use ID, trial-state violation, or tool_use on Create 13"],"campaign_stop_after_charge":["wrong model, service tier, inference geography, request template, rate, cache, or usage category","unknown stop reason","malformed or unsupported response/content/usage shape","actual charge over reservation"]},"hash_subjects":{"request_sha256":"exact UTF-8 JSON request-body bytes sent to fetch","response_sha256":"exact capped bytes yielded by the Fetch Response body stream after Fetch content-decoding and before UTF-8 decoding or JSON parsing; null only when no response body bytes were yielded","request_id":"the exact nonempty request-id header value exposed by Node fetch after OWS normalization; comma-containing or duplicate-equivalent values are rejected","request_id_sha256":"exact UTF-8 bytes of request_id only","request_id_header_sha256":"UTF-8 bytes of lowercase 'request-id: ' followed by request_id with no trailing newline","request_headers_sha256":"RFC8785 JCS UTF-8 of the reconstructed lowercase approval-bound request-header template with x-api-key replaced by literal '' and exact derived host/content-length; explicitly a template hash, not a claim to observe provider-wire header bytes","response_headers_sha256":"RFC8785 JCS UTF-8 of the complete lowercase, whitespace-normalized, duplicate-combined header map exposed by Fetch Headers iteration; this is explicitly not a raw wire-header hash","canonical_semantic_fields_sha256":"RFC8785 JCS of exactly {model,system,tools,messages,thinking,tool_choice}","tools_sha256":"RFC8785 JCS of the complete provider tools array","messages_sha256":"RFC8785 JCS of the complete provider messages array","system_sha256":"RFC8785 JCS of the system string","tool_choice_sha256":"RFC8785 JCS of the tool_choice object","assistant_content_sha256":"exact UTF-8 JSON.stringify bytes of the strictly parsed assistant content array used for the continuation round trip"},"tool_result_request":{"message_shape":{"message_fields_only":["role","content"],"role":"user","content_length":1,"block_fields_only":["type","tool_use_id","content"],"type":"tool_result","property_order":{"message":["role","content"],"block":["type","tool_use_id","content"]}},"tool_use_id_binding":"exact ID from the accepted single tool_use block","content_subject":"raw tools use the complete common result envelope JCS; MCP tools use the complete unmodified MCP result payload JCS","is_error":"omitted","additional_blocks_or_fields":"forbidden"},"max_create_requests_per_trial":13,"max_tool_calls_per_trial":12,"single_tool_use_per_turn":true,"round_trip_assistant_content_byte_exact":"exact JSON.stringify content-value bytes under response_parsing.assistant_round_trip","successful_stop_reason":"end_turn","successful_final_text_min_utf8_bytes":1,"retry_policy":"none","required_response":{"model":"claude-sonnet-4-6","service_tier":"standard","inference_geo":"global","cache_creation_input_tokens":0,"cache_read_input_tokens":0},"count_create_equality":{"count_precedes_every_create":true,"byte_equal_semantic_fields":["model","system","tools","messages","thinking","tool_choice"],"create_only_fields_absent_from_count":["temperature","max_tokens","service_tier","inference_geo","stream"],"count_failure":"terminal campaign stop with no retry","body_hashes_required":true},"tool_loop_state_machine":{"initial":"create request 1 may return final end_turn text or exactly one tool_use","tool_turn":"one accepted tool_use is followed by exactly one continuation containing the complete byte-identical assistant content blocks and exactly one tool_result whose tool_use_id matches","continuation_field_equality":["model","temperature","thinking","system","complete tools array","tool_choice","max_tokens","service_tier","inference_geo","stream","cache omissions"],"assistant_content_mutation":"terminal zero","multiple_or_parallel_tools":"terminal zero","unknown_tool":"terminal zero","recognized_mixed_multiple_or_parallel_content":"terminal zero","provider_schema_malformed_content":"campaign stop after charge recording","recoverable_known_tool_error":"raw invalid input, denied path, timeout, or execution failure returns the exact bounded common error envelope; Graphify/Madar schema-invalid input, denied project path, network-denied PR call, or ordinary tool failure returns the exact unmodified MCP error payload; each consumes one shared tool call, appends exactly one matching tool_result, and permits the next Create","mismatched_or_multiple_tool_results":"terminal zero","after_tool_call_12":"exactly one create request 13 may return final answer only","tool_request_on_create_13":"terminal zero","create_request_14":"forbidden","tool_layer_termination":"resources/read, complete-result overflow, MCP protocol/process loss without a valid error payload, create/tool budget termination, or another approval-bound invalidator ends the trial after the attempted tool event; preserve the successful Count/Create prefix exactly and never fabricate or relabel a terminal failed Create","zero_trial_provider_prefixes":"an ordinary zero row may end either in one recognized terminal-zero Create response/transport outcome or immediately after a valid single_tool_use Create plus the immutable completed tool-event prefix","pass_campaign_exclusion":"wrong model/tier/geography/cache/rate/template, unknown stop reason, unsupported response/content/usage shape, or any other campaign drift cannot appear as an ordinary zero row in a pass-status campaign"},"success_condition":{"stop_reason":"end_turn","final_content":"response_parsing.final_answer accepted_shape and nonempty bytes","required_model":"claude-sonnet-4-6","required_service_tier":"standard","required_inference_geo":"global","required_cache_creation_input_tokens":0,"required_cache_read_input_tokens":0},"terminal_trial_failures":["stop_reason max_tokens","refusal","context overflow","Create deadline or connection reset with full reservation retained","HTTP non-2xx","empty final text","recognized mixed/multiple/parallel loop violation, unknown tool name, duplicate or reused valid tool_use ID, trial-state violation, or tool_use on Create 13"],"terminal_campaign_drifts":["wrong returned model","request-template or temperature or thinking drift","wrong service tier","wrong inference geography","nonzero or unknown cache category","unknown billed category","unknown stop reason","malformed or unsupported response, content, or usage shape"],"hash_capture":["count request body","count response body","count request-ID header","create request body","create response body","create request-ID header"]}}, + "raw_tools": {"const":{"provider_order":["read","search","list","shell-read-only"],"tool_definitions_jcs_sha256":"45cfc724cbacbca111b0d6445bee9c59baf44b5689abd51a4eee9cd41192a805","path_policy_jcs_sha256":"160ef4febd892ca3a1f4b0c1af48362f9d2c5bd1b73a30cb5b54bc4601257a22","result_schema_jcs_sha256":"563229237cbe87b005297c35608e26e888e0e932085a51b2275c4ccbbcfecdf2","error_messages_jcs_sha256":"fc1f96b93ca368a26b2d34662065fcc79de893261f2d0c00830c654bd7e259ac","semantics_jcs_sha256":"9b43f3059c3f5d9afa17c2b1f11f3c2e66eb6e08d0c79366f73f6c3d4bca62da","aggregate_hashes_jcs_sha256":"e37db194dc48e8af99efde26bd86e0f8c884b45b774aead47a4ac5bd05f5a08a","tool_definitions":[{"name":"read","description":"Read a bounded line range from one repository file.","input_schema":{"type":"object","additionalProperties":false,"required":["path"],"properties":{"path":{"type":"string","minLength":1,"maxLength":4096},"start_line":{"type":"integer","minimum":1},"end_line":{"type":"integer","minimum":1}}}},{"name":"search","description":"Find literal text in files under a contained repository path.","input_schema":{"type":"object","additionalProperties":false,"required":["query"],"properties":{"query":{"type":"string","minLength":1,"maxLength":256},"path":{"type":"string","minLength":1,"maxLength":4096,"default":"."},"max_results":{"type":"integer","minimum":1,"maximum":50,"default":50}}}},{"name":"list","description":"List files and directories under a contained repository path.","input_schema":{"type":"object","additionalProperties":false,"properties":{"path":{"type":"string","minLength":1,"maxLength":4096,"default":"."},"depth":{"type":"integer","minimum":1,"maximum":4,"default":2},"max_entries":{"type":"integer","minimum":1,"maximum":200,"default":200}}}},{"name":"shell-read-only","description":"Compute a line count or SHA-256 for one repository file without running a shell.","input_schema":{"type":"object","additionalProperties":false,"required":["operation","path"],"properties":{"operation":{"enum":["line_count","sha256"]},"path":{"type":"string","minLength":1,"maxLength":4096}}}}],"path_policy":{"input_coordinate":"graph_root_relative_posix","output_coordinate":"repository_root_relative_posix","default_directory":".","reject":["absolute path","backslash","NUL","empty component","dot component except the complete path '.'","dot-dot component","path longer than 4096 Unicode scalar values"],"static_denied_roots":[".git","out","graphify-out"],"dynamic_denied_paths":"every generated path captured before or during the pair","resolution":"component-by-component no-follow inspection followed by final realpath containment beneath frozen graph_root","explicit_symlink_escape":"symlink_escape error","enumeration_symlinks":"omit and never descend","raw_tools_may_access_graph_bundle":false},"common_result_max_utf8_bytes":65536,"common_result_cap_subject":"the complete RFC8785-JCS UTF-8 result envelope inserted as provider tool_result content, not only its data or error member","result_digest_subject":"RFC8785 JCS UTF-8 of data when ok=true, otherwise RFC8785 JCS UTF-8 of error","result_schema":{"oneOf":[{"type":"object","additionalProperties":false,"required":["ok","tool","path","truncated","bytes","sha256","data","error"],"properties":{"ok":{"const":true},"tool":{"const":"read"},"path":{"type":"string"},"truncated":{"type":"boolean"},"bytes":{"type":"integer","minimum":0,"maximum":65536},"sha256":{"type":"string","pattern":"^[0-9a-f]{64}$"},"data":{"type":"object","additionalProperties":false,"required":["text"],"properties":{"text":{"type":"string"}}},"error":{"type":"null"}}},{"type":"object","additionalProperties":false,"required":["ok","tool","path","truncated","bytes","sha256","data","error"],"properties":{"ok":{"const":true},"tool":{"const":"search"},"path":{"type":"string"},"truncated":{"type":"boolean"},"bytes":{"type":"integer","minimum":0,"maximum":65536},"sha256":{"type":"string","pattern":"^[0-9a-f]{64}$"},"data":{"type":"object","additionalProperties":false,"required":["matches"],"properties":{"matches":{"type":"array","maxItems":50,"items":{"type":"object","additionalProperties":false,"required":["path","line","text"],"properties":{"path":{"type":"string"},"line":{"type":"integer","minimum":1},"text":{"type":"string"}}}}}},"error":{"type":"null"}}},{"type":"object","additionalProperties":false,"required":["ok","tool","path","truncated","bytes","sha256","data","error"],"properties":{"ok":{"const":true},"tool":{"const":"list"},"path":{"type":"string"},"truncated":{"type":"boolean"},"bytes":{"type":"integer","minimum":0,"maximum":65536},"sha256":{"type":"string","pattern":"^[0-9a-f]{64}$"},"data":{"type":"object","additionalProperties":false,"required":["entries"],"properties":{"entries":{"type":"array","maxItems":200,"items":{"type":"object","additionalProperties":false,"required":["path","type"],"properties":{"path":{"type":"string"},"type":{"enum":["file","directory"]}}}}}},"error":{"type":"null"}}},{"type":"object","additionalProperties":false,"required":["ok","tool","path","truncated","bytes","sha256","data","error"],"properties":{"ok":{"const":true},"tool":{"const":"shell-read-only"},"path":{"type":"string"},"truncated":{"const":false},"bytes":{"type":"integer","minimum":0,"maximum":65536},"sha256":{"type":"string","pattern":"^[0-9a-f]{64}$"},"data":{"type":"object","additionalProperties":false,"required":["line_count"],"properties":{"line_count":{"type":"integer","minimum":0}}},"error":{"type":"null"}}},{"type":"object","additionalProperties":false,"required":["ok","tool","path","truncated","bytes","sha256","data","error"],"properties":{"ok":{"const":true},"tool":{"const":"shell-read-only"},"path":{"type":"string"},"truncated":{"const":false},"bytes":{"type":"integer","minimum":0,"maximum":65536},"sha256":{"type":"string","pattern":"^[0-9a-f]{64}$"},"data":{"type":"object","additionalProperties":false,"required":["sha256"],"properties":{"sha256":{"type":"string","pattern":"^[0-9a-f]{64}$"}}},"error":{"type":"null"}}},{"type":"object","additionalProperties":false,"required":["ok","tool","path","truncated","bytes","sha256","data","error"],"properties":{"ok":{"const":false},"tool":{"enum":["read","search","list","shell-read-only"]},"path":{"type":["string","null"]},"truncated":{"const":false},"bytes":{"type":"integer","minimum":0,"maximum":65536},"sha256":{"type":"string","pattern":"^[0-9a-f]{64}$"},"data":{"type":"null"},"error":{"oneOf":[{"type":"object","additionalProperties":false,"required":["code","message"],"properties":{"code":{"const":"invalid_input"},"message":{"const":"Invalid tool input."}}},{"type":"object","additionalProperties":false,"required":["code","message"],"properties":{"code":{"const":"path_denied"},"message":{"const":"Path is outside the allowed repository scope."}}},{"type":"object","additionalProperties":false,"required":["code","message"],"properties":{"code":{"const":"generated_path_denied"},"message":{"const":"Generated paths are not available to raw tools."}}},{"type":"object","additionalProperties":false,"required":["code","message"],"properties":{"code":{"const":"symlink_escape"},"message":{"const":"Path resolution escaped through a symbolic link."}}},{"type":"object","additionalProperties":false,"required":["code","message"],"properties":{"code":{"const":"not_found"},"message":{"const":"Path does not exist."}}},{"type":"object","additionalProperties":false,"required":["code","message"],"properties":{"code":{"const":"not_file"},"message":{"const":"Path is not a regular file."}}},{"type":"object","additionalProperties":false,"required":["code","message"],"properties":{"code":{"const":"not_directory"},"message":{"const":"Path is not a directory."}}},{"type":"object","additionalProperties":false,"required":["code","message"],"properties":{"code":{"const":"invalid_utf8"},"message":{"const":"File is not valid UTF-8."}}},{"type":"object","additionalProperties":false,"required":["code","message"],"properties":{"code":{"const":"range_invalid"},"message":{"const":"Requested line range is invalid."}}},{"type":"object","additionalProperties":false,"required":["code","message"],"properties":{"code":{"const":"range_out_of_bounds"},"message":{"const":"Requested start line is beyond end of file."}}},{"type":"object","additionalProperties":false,"required":["code","message"],"properties":{"code":{"const":"output_overflow"},"message":{"const":"Tool result exceeds its byte limit."}}},{"type":"object","additionalProperties":false,"required":["code","message"],"properties":{"code":{"const":"io_error"},"message":{"const":"The repository read failed."}}}]}}}]},"error_messages":{"invalid_input":"Invalid tool input.","path_denied":"Path is outside the allowed repository scope.","generated_path_denied":"Generated paths are not available to raw tools.","symlink_escape":"Path resolution escaped through a symbolic link.","not_found":"Path does not exist.","not_file":"Path is not a regular file.","not_directory":"Path is not a directory.","invalid_utf8":"File is not valid UTF-8.","range_invalid":"Requested line range is invalid.","range_out_of_bounds":"Requested start line is beyond end of file.","output_overflow":"Tool result exceeds its byte limit.","io_error":"The repository read failed."},"semantics":{"read":{"line_numbers":"one-based inclusive","line_definition":"LF-delimited; a nonempty final segment without LF is one line; an empty file has zero lines","preserve_bytes":"remove only each selected line's LF delimiter; preserve CR and join selected lines with LF","default_start_line":1,"default_end_line":"minimum of EOF and start_line+399","maximum_lines":400,"maximum_text_utf8_bytes":16384,"oversize_explicit_range":"range_invalid","start_after_eof":"range_out_of_bounds","text_overflow":"output_overflow","truncated":"true only when end_line was omitted and later lines exist"},"search":{"matching":"case-sensitive literal UTF-8 byte sequence with no normalization","forbidden_implementations":["regular expression","preprocessor","shell","child executable"],"result_grain":"at most one result per matching line","line_text":"complete valid UTF-8 line with LF removed and CR preserved","invalid_utf8_files":"skip","order":"repository-root-relative UTF-8 path bytes, then ascending line number","truncated":"true only when one additional match exists beyond max_results","result_overflow":"output_overflow"},"list":{"depth":"requested directory children are depth 1; the requested directory itself is omitted","order":"repository-root-relative UTF-8 path bytes","symlinks":"omit and never descend","truncated":"true only when one additional entry exists beyond max_entries","result_overflow":"output_overflow"},"shell-read-only":{"implementation":"in-process regular-file byte reads only; no shell and no child process","line_count":"number of LF bytes plus one only for a nonempty final segment without LF; empty file is zero","sha256":"lowercase SHA-256 of complete regular-file bytes","truncated":false},"failure":{"ok":false,"data":null,"truncated":false,"consumes_tool_call":true,"operating_system_details_in_message":false},"result_integrity":{"path":"exact normalized repository-root-relative path used or produced by the operation; null only when no path can be safely resolved for a failure","bytes":"exact UTF-8 byte length of RFC8785 JCS data on success or RFC8785 JCS error on failure","sha256":"lowercase SHA-256 of that exact bytes subject","complete_envelope":"serialize the exact eight-key envelope as RFC8785 JCS; if a prospective success envelope exceeds 65,536 UTF-8 bytes, replace it with the exact output_overflow bounded error envelope and never truncate a JCS value; the error envelope itself must be at most 65,536 bytes","validation":"reject any tool/data discriminator mismatch, code/message cross-pair, ok/error mismatch, truncation drift, path drift, inner byte-count/digest drift, or complete envelope above 65,536 bytes"}}}}, + "campaign": {"const":{"blocking_questions":["documenso-document-send","formbricks-survey-response"],"temperatures":[0,0.7],"trials_per_cell":3,"cells_per_block":5,"answers_per_block":15,"blocking_blocks":4,"blocking_answers":60,"schedule_units_per_block":9,"global_execution_order":{"comparison_blocks":["documenso@0","documenso@0.7","formbricks@0","formbricks@0.7"],"then_diagnostic":"openstatus-574-strict-one-call@0@madar","then_refresh_samples":["documenso@graphify@1","documenso@graphify@2","documenso@graphify@3","documenso@madar@1","documenso@madar@2","documenso@madar@3","formbricks@graphify@1","formbricks@graphify@2","formbricks@graphify@3","formbricks@madar@1","formbricks@madar@2","formbricks@madar@3"],"then_review_pipeline":["seal execution manifest","load frozen fixtures and rubric","seal two union dossiers","seal 60 blind bundles","seal 120 reviews and required adjudications","custodian pre-reveal confirmation","reveal and verify","aggregate","archive"],"prefix_rule":"execute exactly left to right; a stop retains only the immutable completed prefix plus the triggering partial row and forbids every later ordinary campaign, review, reveal, or aggregate stage","mandatory_stop_finalization":["seal the exact prefix and triggering evidence","build and fsync two canonical opaque-path prefix archives","post the RFC #577 stop amendment","write and validate the stopped receipt"],"stop_finalization_boundary":"these four finalization steps occur after execution stops and may add only prefix/archive/amendment/receipt evidence; they cannot run provider calls, trials, refreshes, reviews, adjudications, ordinary reveal, eligibility aggregates, retry, replacement, or regrading"},"tool_call_budget":12,"timeout_seconds":300,"arms":{"native_agent":{"conditions":["native"],"raw_tools":true,"graph_tools":[]},"graphify":{"conditions":["cold","warm"],"raw_tools":true,"graph_tools_source":"graphify.combined_jcs.tools_list.tools"},"madar":{"conditions":["cold","warm"],"raw_tools":true,"graph_tools_source":"candidate.mcp_snapshot.combined_jcs.tools_list.tools"}},"graph_pairing":"cold ordinal n immediately followed by warm ordinal n with no intervening trial","graphify_artifact_policy":"one external graph.json remains byte-identical across the pair","madar_artifact_policy":"the accepted three-file out bundle remains in graph_root and byte-identical across the pair","comparison_pair_artifact_evidence":{"pairs_per_block":6,"checkpoints":["after_build","before_cold_answer","after_cold_answer","before_warm_answer","after_warm_answer"],"graphify":"for each ordinal 1..3 record graphify-out/graph.json at all five checkpoints; the externalized file SHA-256 and byte count are identical across every checkpoint and both trial joins","madar":"for each ordinal 1..3 record out/graph.json, out/indexing-manifest.json, and out/indexing-manifest.share-safe.json at all five checkpoints; every path's SHA-256 and byte count are identical across every checkpoint and both trial joins","ownership":"comparison-block pair evidence is canonical; trial rows reference the matching arm/ordinal pair and do not duplicate private artifact bytes"},"checkout_evidence":{"comparison_clone_count_per_block":9,"clone_ownership":"three native trial clones, three Graphify cold/warm pair clones, and three Madar cold/warm pair clones are fresh standalone detached clones with distinct realpaths/inodes; every scheduled unit joins to exactly its owned clone and no clone is reused across units or blocks","commit":"must equal the inherited repository commit for the block","git_tree":"exact lowercase git rev-parse HEAD^{tree} object ID observed in the standalone detached clone","tree_paths_sha256":"must equal the inherited repository tree_paths_sha256","pre_post_tree_subject":"RFC8785 JCS UTF-8 manifest of every tracked checkout entry as {path,mode,git_blob_oid,bytes,sha256}, sorted by UTF-8 path bytes, with no trailing LF","status_subject":"exact porcelain-v2 -z bytes plus RFC8785 JCS of sorted untracked regular-file {path,bytes,sha256} rows, both captured before and after each unit without ignore filtering","allowed_untracked":"at pristine-clone capture none; at later named checkpoints only the exact approval-bound Graphify graphify-out or Madar three-file out bundle for that stage, with no query log, cache, telemetry, package-manager, or other generated path","identity":"pre- and post-block tracked manifests are byte-identical; status/untracked manifests prove only the exact checkpoint-owned artifacts and their later required cleanup/retention; any commit/tree/path/status/untracked/query-log/manifest drift stops the campaign"},"pair_local_build_configuration":{"common":"fresh standalone detached clone at the frozen repository commit; verify checkout, tree, fixture, patch, and frozen mutation hashes; one pair-local build configuration directory is destroyed after the pair","graphify":"after clean build copy exactly graphify-out/graph.json to a pair-external artifact directory, hash it, then delete graphify-out completely; the MCP may read only that external file plus its immutable runtime","madar":"retain exactly out/graph.json, out/indexing-manifest.json, and out/indexing-manifest.share-safe.json inside graph_root because default madar mcp requires them; raw tools deny out/**; destroy pair build configuration but never delete, rebuild, refresh, or mutate the retained bundle during the pair"},"mcp_tool_result_policy":{"serialization":"unmodified MCP result payload as RFC8785 JCS in exactly one matching provider tool_result","raw_envelope_conversion":"forbidden","maximum_utf8_bytes":65536,"oversize":"invalid trial with no truncation","transport":"stdio only","resources_read":"reject, record, consume the call, invalidate the trial","project_path_escape":"natural sandbox failure that consumes the call","network_denied_pr_tool":"failed call is transcript evidence and consumes the common budget"},"graph_result_extraction":{"common":"validate and hash the complete unmodified MCP payload first; extraction is deterministic grading metadata only and never rewrites the provider tool_result","madar":"require exactly one content text block, strict-parse its text as the approval-bound madar.retrieve v1 result with no extra fields, then form returned_files from normalized matched_nodes[].source_file and relationships[].source_file, returned_symbols from matched_nodes[].node_id and .label, and verification_targets from nonempty matched_nodes[].source_location, relationships[].source_location, and boundaries[].subject; each set is deduplicated and unsigned-UTF-8 sorted","graphify_text_subject":"recursively visit the complete strict JSON payload by array index and lexicographically sorted object key, collect every Unicode-scalar string leaf, and join exact UTF-8 values with one LF byte and no leading/trailing LF","graphify_candidate_universe":"from the frozen checkout/graph artifact form three unsigned-UTF-8-sorted unique sets: tracked repository-relative file paths; graph node IDs and labels; and graph node/edge source_location or verification-target strings","graphify":"a candidate is returned exactly when its complete UTF-8 byte sequence occurs literally in graphify_text_subject; classify matches into returned_files, returned_symbols, and verification_targets by the fixed candidate universe; no regex, case folding, normalization, inference, prefix expansion, or human selection","focused_raw_rule":"after any graph call, read or shell-read-only is focused only on an exact returned_file; search is focused only when its contained path is an exact returned_file or its literal query exactly equals a returned_symbol or verification_target; list is always a broad-search restart; any other search/list/shell-read-only call fails the machine gate"},"post_graph_raw_tool_rule":"after any graph call, broad search, list, or shell-read-only outside a returned file, symbol, or verification target is a broad-search restart and fails the inherited machine gate","native_start_boundary":"immediately before first Count Tokens request","graph_start_boundary":"immediately before arm MCP server startup","answer_timer_includes":["MCP startup","initialize","tools/list","Count Tokens","relay","create requests","tool calls and results","process sampling","final validation","transcript fsync","answer fsync"],"failed_answer_score":0,"retry_or_replacement":"forbidden","diagnostic":{"question":"openstatus-574-strict-one-call","excluded_question":"openstatus-565-runtime-flow","workspace":"one fresh standalone detached OpenStatus clone at the exact frozen commit","observed_checkout_evidence":["repository URL","commit","git tree","tree_paths_sha256","graph_root","standalone-detached proof SHA-256","pre/post tracked-tree manifest SHA-256","dependency manifest SHA-256"],"build":"one clean Madar build using the exact resolved packed CLI","bundle":{"paths":["out/graph.json","out/indexing-manifest.json","out/indexing-manifest.share-safe.json"],"retention":"retain exactly these three files in graph_root for the complete trial","hash_checkpoints":["after_clean_build","before_answer","after_answer"],"identity":"all three files remain byte-identical at all three checkpoints"},"temperature":0,"arm":"madar","condition":"diagnostic","retrieve_calls_max":1,"retrieve_budget":4000,"focused_reads_max":2,"focused_read_scope":"each read path must be one exact file returned by the single retrieve result","other_raw_tools":"forbidden","forbidden_operations":["search","list","shell-read-only","rewritten prompt","second graph call"],"phase_dispositions":{"ordered_ids":["checker_detection","tinybird_persistence","incident_mutation","notification_delivery","public_html","json_feeds"],"unsupported_exact":["checker_detection","tinybird_persistence"],"row_fields_only":["phase_id","scope","disposition","boundary_or_evidence_hashes"],"rule":"all six rows are present in order; the two unsupported_language phases have disposition unsupported with hashes of their exact inherited boundary subjects, while each required phase records satisfied, unsatisfied, or unknown and the exact normalized retrieve/read evidence-result hashes supporting that disposition"},"reporting":"separate diagnostic section only","pass_fail_effect":"excluded from comparator medians and final eligibility","blocking":false,"success_evidence":"status success requires exactly one retrieve, zero to two reads only to exact retrieve-returned files, one to three total evidence calls, complete tool input/result trace hash, and complete 3-by-3 bundle evidence","ordinary_failure_evidence":"status failed, timed_out, or invalid may preserve an exact completed prefix with zero or one retrieve, zero to two reads, and zero to three total evidence calls; it never changes comparator medians or final eligibility","drift_boundary":"provider, checkout, clone, isolation, build, or bundle drift is not an ordinary diagnostic failure and triggers the matching campaign stop"},"refresh":{"repositories":["documenso","formbricks"],"arms":["graphify","madar"],"samples_per_repository_arm":3,"total_samples":12,"graphify_clean_argv":["extract",".","--code-only"],"graphify_refresh_argv":["update","."],"madar_clean_argv":["generate","."],"madar_refresh_argv":["generate",".","--update"],"pre_state":{"common":"fresh standalone detached clone at frozen commit, verify checkout/tree/fixture/mutation hashes, perform one exact clean build, then apply the frozen mutation outside the timer","graphify":"retain the in-sample graphify-out/graph.json created by exact clean argv as the refresh input; do not externalize or delete it before the timed update","madar":"retain exactly the clean-build out/graph.json, out/indexing-manifest.json, and out/indexing-manifest.share-safe.json as the refresh input; no other out/** path may exist"},"pair_local_build_configuration":{"graphify":"sample-local isolated build configuration is destroyed only after the refresh sample and its complete evidence are fsynced","madar":"sample-local isolated build configuration is destroyed only after the refresh sample and its complete three-file post-refresh bundle evidence are fsynced"},"provider_tokens":{"graphify":{"input":0,"output":0,"total":0},"madar":{"input":0,"output":0,"total":0},"arithmetic":"provider_total_tokens equals provider_input_tokens plus provider_output_tokens whenever both components are known; pass requires all three exact zero values"},"artifact_evidence":{"graphify":["graphify-out/graph.json pre-refresh and post-refresh bytes/SHA-256"],"madar":["out/graph.json pre/post bytes/SHA-256","out/indexing-manifest.json pre/post bytes/SHA-256","out/indexing-manifest.share-safe.json pre/post bytes/SHA-256"],"identity":"every sample records the exact arm-specific list and joins its graph row to pre_graph_sha256, post_graph_sha256, and post_graph_bytes"},"mutation_inside_timer":false,"failure_policy":"a failed, timed-out, invalid, drifted, or incomplete sample is never retried or replaced; its cost is unknown and the blocking refresh block stops","invalid_sample_retry":"forbidden","incomplete_block_cost":"unknown"},"aggregation":{"inheritance":"inherit exact v2 human rubric, machine gates, medians, break-even formulas, and pass rule through the allowlisted pointers","cell_rows":20,"madar_comparison_rows":8,"clean_build_medians":4,"refresh_medians":4,"break_even_rows":24,"break_even_key":["repository_id","question_id","temperature","arm","scenario"],"break_even_temperature_policy":"compute independently for temperature 0 and 0.7; never pool, select, average, or substitute task medians across temperatures","break_even_dispositions":"time and input-token denominators are independent; each has its own finite, never, or unknown status and matching integer, literal 'never', or null value","refresh_median_metrics":["elapsed_ms","peak_rss_bytes","provider_input_tokens","provider_output_tokens","provider_total_tokens","post_graph_bytes"],"measurement_precision":"elapsed_ms is ceil((monotonic_end_ns - monotonic_start_ns) / 1000000) as a nonnegative Number-safe integer; RSS, byte, token, count, and cost inputs are nonnegative Number-safe integers","median":"sort the exact finite numeric population ascending; odd n selects the middle value; even n is the exact arithmetic mean of the two middle values with no rounding (therefore an integer or half-integer for integer inputs); reject unsafe, nonfinite, unknown, overflowed, or differently sized populations","break_even_arithmetic":"represent every integer or half-integer median and refresh rate 4/20 as a reduced signed bigint rational numerator over a positive denominator; perform addition, subtraction, multiplication, denominator sign and zero tests, comparison, and mathematical ceiling exactly; reject unsafe receipt projection or overflow and never use binary floating-point"},"pass_claim":"both Madar cold and Madar warm satisfy every inherited gate and tie or exceed matching Graphify and native medians for every included question and temperature"}}, + "isolation": {"const":{"host":{"os":"macOS","os_version":"26.3","build":"25D125","darwin":"25.3","architecture":"arm64","hardware":"Apple M3 Max","ram_bytes":51539607552},"binaries":[{"name":"node","realpath":"/private/tmp/madar-core-reset-capability-validation-v1/toolchain/node","version":"v22.9.0","sha256":"983a169edf336738090b93b76df43fe9752aa7d0ed733099fa4b36d8a1116ed8"},{"name":"npm","realpath":"/opt/homebrew/lib/node_modules/npm/bin/npm-cli.js","version":"11.12.1","sha256":"8e5f6f3429f8cdbe693cdc29904e9d5a7b127a494bd15c804bd54c7403bfcbe7"},{"name":"sandbox-exec","realpath":"/usr/bin/sandbox-exec","sha256":"2f447acfae7a954ccb5a1bcf3a1955f69b1a8549c434ddff643df98fd3cb33ba"},{"name":"git","realpath":"/usr/bin/git","sha256":"506cb2ddd061e2992c8ee7c53853340688b53d9fcec94c3aa936524cea5b40cb"}],"path_binding":{"PATH":"/private/tmp/madar-core-reset-capability-validation-v1/toolchain:/usr/bin:/bin","approval_bound":true,"resolution":"every executable is invoked by its separately bound absolute realpath; PATH exists only for unavoidable operating-system lookup","ambient_path_shadowing":"reject before setup and before every measured child","unexpected_path_entry_or_resolution":"stop campaign"},"checkout":"fresh standalone detached clone at frozen commit; linked worktrees forbidden","setup_network":"only frozen GitHub, package, and Python registry inputs","measured_child_network":"fail-closed denied for workers, raw tools, Graphify, Madar, and descendants","credentials":"only trusted parent relay holds isolated provider credential","relay_request":["campaign_id","trial_id","sequence","operation","canonical_messages_hash"],"relay_rejects_caller_fields":["model","prompt","message","tool","provider","URL","host","path","header","method","sampling"],"relay_state_enforcement":{"scheduled_trial":"accept only the current scheduled incomplete trial","sequence":"strictly monotonic and exactly next for that trial","create_and_tool_limits":"at most 13 creates and 12 accepted tool calls","reuse":"reject reused, unknown, completed, stopped, or non-current campaign/trial IDs","conversation":"canonical_messages_hash must equal the parent-owned sealed conversation state before reconstruction","request_construction":"relay reconstructs complete Count/Create bodies only from immutable companion values and sealed parent state"},"relay_urls":{"origin":"https://api.anthropic.com","count":"https://api.anthropic.com/v1/messages/count_tokens","create":"https://api.anthropic.com/v1/messages","hard_coded_in_source":true},"application_headers":{"accept":"application/json","accept-encoding":"identity","anthropic-version":"2023-06-01","content-type":"application/json","user-agent":"madar-core-reset-capability-validation-v1","x-api-key":""},"permitted_transport_headers":{"host":"api.anthropic.com","connection":"keep-alive","accept-language":"*","sec-fetch-mode":"cors","content-length":"base-10 decimal equal to the exact request-body UTF-8 byte length"},"request_header_observation":"set accept-encoding and user-agent explicitly; before campaign lock, an isolated loopback sentinel captures the pinned Node Fetch raw headers for the same method/application/transport template and binds its bytes/hash; each provider-call request_headers_sha256 is the reconstructed approved map with derived host/content-length, while response/request-ID evidence remains provider-observed","forbidden_headers":["authorization","anthropic-beta","tracing","forwarding","cookie","cache","proxy","every unlisted application or transport header"],"request_body_max_bytes":2097152,"count_response_max_bytes":65536,"create_response_max_bytes":262144,"response_headers_max_bytes":32768,"fetch_observation_boundary":{"response_headers":"iterate the Fetch Headers object once into a lowercase plain string map, reject any key/value with an unpaired surrogate, RFC8785-JCS serialize it, and apply response_headers_max_bytes to those exact normalized UTF-8 bytes; raw wire order and duplicate lines are neither observable nor claimed","response_body":"incrementally count and buffer the bytes yielded by the Fetch Response body stream after Fetch content-decoding; apply the operation response cap to those bytes and hash them before text decoding","content_encoding":"pass requires content-encoding absent or exact identity; any other value records the normalized headers and capped yielded body/charge then triggers provider drift","tls_hostname":"the evidence field is the exact lowercase URL hostname api.anthropic.com supplied to Node Fetch and its default certificate verifier, proven by the frozen origin, no proxy/custom CA/DNS override, redirect:error, and exact final Response.url; it is not represented as a raw socket observation","certificate_verification":"Node default TLS certificate and hostname verification must succeed; disabling or replacing it is forbidden"},"count_timeout_ms":30000,"create_timeout_ms":120000,"trial_deadline":{"clock":"one monotonic nanosecond clock shared by the complete trial","deadline":"trial_start_ns + 300000000000 with checked Number-safe or bigint arithmetic","remaining_before_operation_ms":"max(0, floor((deadline_ns - operation_pre_send_ns) / 1000000))","operation_abort_ms":"min(the operation's fixed count_timeout_ms or create_timeout_ms, remaining_before_operation_ms)","nonpositive_remaining":"do not send; terminate the scheduled trial as timed_out empty-zero","boundary_attribution":"an AbortError at the trial deadline is a trial timeout; an earlier fixed Count deadline is a campaign-stopping Count failure; an earlier fixed Create deadline is an ordinary terminal-zero Create outcome","post_response_expiry":"if a valid final end_turn text response arrives but validation, transcript fsync, or answer fsync is not complete before the trial deadline, retain the exact successful provider event and raw answer only in the private transcript/archive, classify the trial timed_out, expose an ordinary empty-zero blind answer/hash, and never fabricate a failed Create","no_timer_reset":true},"redirect":"error","tls_hostname":"api.anthropic.com","network_configuration":{"proxy":"forbidden","custom_ca":"forbidden","dns_override":"forbidden","ambient_network_configuration":"forbidden","accepted_final_url":"must exactly equal the requested https://api.anthropic.com path","accepted_tls_hostname":"the frozen verifier-input hostname must exactly equal api.anthropic.com under fetch_observation_boundary.tls_hostname"},"relay_failure_outcomes":{"request_body_overflow":"before send: no provider call; stop campaign","response_or_header_overflow":"record any charge, assign scheduled trial zero, stop campaign","final_url_or_tls_mismatch":"record any charge, assign scheduled trial zero, stop campaign","count_deadline":"before Create: stop campaign with no retry and no Create","create_deadline":"after send: permanently consume the full reservation, assign scheduled trial zero, never retry or replace, and continue only while all strict ceilings remain satisfied","connection_reset_or_ambiguous_create_transport":"permanently consume the full reservation, assign scheduled trial zero, never retry or replace, and continue only while all strict ceilings remain satisfied","non_2xx_create_response":"hash the exact response and headers, permanently consume the full reservation because billable usage is not approval-bound in an error body, assign scheduled trial zero, never retry or replace, and continue only while all strict ceilings remain satisfied"},"sandbox_honesty":"macOS sandbox is not claimed to provide a domain-specific IP allowlist; endpoint restriction is the narrow audited relay boundary","campaign_lock_bindings":["relay source hash","coordinator source hash","IPC schema hash","descriptor map hash","exact Count/Create request-template hashes","every sandbox-profile hash"],"sandbox_profile_policy":"exact approval-bound profile bytes; no widening, fallback, or ambient exception","close_on_exec_relay_descriptors":true,"process_group_per_measured_child":true,"descendant_marker_required":true,"rss_sample_interval_ms_max":10,"escaped_or_untracked_descendant":"invalid","process_termination":"terminate the dedicated process group and every process carrying its unique descendant marker, then prove all descendants exited; reparenting, escaped PID, untracked descendant, or incomplete termination invalidates the trial","forbidden_context":["user/global rules","hooks","skills","MCP settings","history","prior transcripts","Madar source checkout","hidden fixtures","grading inputs"],"pre_provider_proofs":["worker cannot connect to Anthropic","worker cannot connect to controlled sentinel","worker cannot read relay credential"],"pre_provider_proof_scope":"before the first provider request of any kind, including Count Tokens, prove the worker and every descendant satisfy all three checks","child_environment_scrub":["GitHub credentials/configuration","npm credentials/configuration","provider credentials/configuration","cloud credentials/configuration","agent credentials/configuration","user HOME/XDG/configuration"],"forbidden_measured_access":["repository and package registries","update checks","telemetry","query logs","arbitrary egress"],"fixture_stage_order":"persist and fsync every answer and transcript before loading owner fixtures, required handoffs, or human rubric material","block_integrity":"verify frozen checkout, tree, and fixture hashes before and after every comparison block","failure_policy":"stop campaign when containment or endpoint restriction cannot be proved"}}, + "spend": {"const":{"currency":"USD","input_micro_usd_per_token":3,"output_micro_usd_per_token":15,"provider_input_tokens_max":20000000,"provider_output_tokens_max":2000000,"provider_cost_cents_max":10000,"runner_cost_cents_max":9000,"provider_hard_cap_required":true,"provider_zero_prior_usage_required":true,"provider_authorization":{"timing":"before the first provider request of any kind, including Count Tokens","workspace":"one isolated Anthropic workspace/API key","hard_limit_cents_max":10000,"zero_usage_in_campaign_billing_window":true,"remaining_enforced_limit_micro_usd":"exact nonnegative Number-safe integer equal to remaining_enforced_limit_cents * 10000 with checked multiplication","lock_fields":["redacted workspace identifier","redacted key identifier","limit/export or console-receipt SHA-256","observation timestamp","zero-use proof SHA-256","remaining enforced limit"],"local_ledger_alone_sufficient":false,"failure":"stop before Count Tokens"},"create_input_safety_margin_tokens":1024,"create_output_reservation_tokens":4096,"ambiguous_transport_consumes_full_reservation":true,"billable_categories":["uncached_input","cache_write_5m","cache_write_1h","cache_read","output","geography_modifier","service_tier_modifier","other_modifier"],"unknown_category":"stop","reservation_algorithm":{"before_each_create":"obtain successful Count Tokens for the exact create semantic body","reserved_input_tokens":"counted_input_tokens + 1024","reserved_output_tokens":4096,"reserved_input_micro_usd":"reserved_input_tokens * 3","reserved_output_micro_usd":"4096 * 15","reserved_total_micro_usd":"reserved_input_micro_usd + reserved_output_micro_usd","send_guard":"do not send unless known actual plus permanently consumed ambiguous plus the new outstanding reservation remains strictly below 20,000,000 input tokens, 2,000,000 output tokens, 90,000,000 runner micro-USD, and remaining_enforced_limit_cents * 10000 micro-USD; equality reaches a ceiling and stops before Create","ceiling_comparison":"integer arithmetic with no rounding down","count_failure":"stop campaign with no retry"},"reconciliation_algorithm":{"successful_response":"replace its outstanding reservation with every actual billable token category and actual cost; nonzero cache usage remains drift but still consumes both ledgers","actual_over_reservation":"record actual usage and charge, assign trial zero, and stop immediately","ambiguous_transport":"permanently consume the full input, output, and cost reservation in the ambiguous-reservation ledger; never release it or substitute zero actual usage; the trial is ordinary terminal-zero and the campaign continues only while every strict ceiling remains satisfied","create_deadline":"a post-send Create AbortError with no accepted response is an ordinary terminal-zero trial, not a retry; permanently consume the full reservation in the ambiguous-reservation ledger and continue only while every strict ceiling remains satisfied","count_deadline":"a Count Tokens deadline is a Count failure and stops the campaign before Create; Count requests carry no Create reservation","non_2xx_create_response":"an error response is ordinary terminal-zero; permanently consume the full reservation instead of inferring absent usage from an unapproved error-body shape, and continue only while every strict ceiling remains satisfied","failed_known_response":"record and consume all actual usage/cost returned by the provider before applying terminal policy","unknown_usage_or_cost":"blocking unknown; assign trial zero and stop","no_release_after_ambiguity":true},"reservation_arithmetic":{"count_join":"Create counted_input_tokens equals its immediately preceding successful Count input_tokens","reserved_input_tokens":"counted_input_tokens + 1024","reserved_output_tokens":4096,"minimum_reserved_micro_usd":64512,"reserved_micro_usd":"reserved_input_tokens * 3 + reserved_output_tokens * 15","usage_total":"every known provider total equals the exact sum of its recorded token categories","ledger":"known actual usage/cost plus permanently consumed ambiguous reservations and outstanding reservations reconcile every Count/Create and diagnostic call exactly once"},"per_call_record_fields":["operation and monotonic sequence","request/response/request-ID hashes","exact provider request ID","returned model ID","requested and returned service tier","requested and returned inference geography","uncached input tokens","5-minute cache-write tokens","1-hour cache-write tokens","cache-read tokens","output tokens","effective base rates and geography/tier/other modifiers","provider-reported cost when available","conservatively derived cost","reserved input/output/cost","final response URL and TLS hostname"],"terminal_drift":"wrong model, request template, temperature, thinking, tier, geography, rate, usage category, cache state, stop/content/usage shape, or billed category records request and charge, assigns trial zero, and stops the campaign","ceiling_action":"do not send request and stop campaign"}}, + "blinding": {"const":{"reviewers":2,"reviewer_kind":"distinct independent natural persons","adjudicator_kind":"third distinct independent natural person","mapping_custodian_kind":"independent natural person who is neither operator nor reviewer","material_generation":{"timing":"before the first provider request of any kind, including Count Tokens","actor":"bound independent mapping custodian, never the operator","materials":["32-byte cryptographic seed","32-byte cryptographic salt","32-byte AES-256 key","fresh 12-byte AES-GCM nonce"],"reveal_map_creation":"complete plaintext map and final bundle order are created and committed before execution"},"pseudonym":{"seed_bytes":32,"salt_bytes":32,"algorithm":"HMAC-SHA-256","hmac_key":"seed","message":"UTF8('madar-capability-v1/pseudonym') || 0x00 || salt || 0x00 || UTF8(trial_id)","format":"A- plus first 16 lowercase hexadecimal digest characters","collision":"stop"},"answer_id":{"derivation":"exactly equal to the trial's HMAC pseudonym","format":"A- plus 16 lowercase hexadecimal characters","blinding":"never contains repository, temperature, arm, condition, ordinal, schedule position, or trial ID","join":"blind bundle, review payload/receipt, adjudication payload/receipt, reveal pseudonym, answer hash, and aggregate joins use this same opaque value"},"bundle_order":{"input_order":"scheduled comparison trial IDs in UTF-8 bytewise order","stream_algorithm":"HMAC-SHA-256","hmac_key":"seed","stream_message":"UTF8('madar-capability-v1/bundle-order') || 0x00 || salt || 0x00 || uint64be(counter)","counter_start":0,"draw":"first unsigned 64-bit big-endian digest word","shuffle":"frozen rejection-sampling Fisher-Yates","collision_or_bias_fallback":"none"},"reveal_encryption":{"algorithm":"AES-256-GCM","key_bytes":32,"nonce_bytes":12,"tag_bytes":16,"aad_utf8":"madar/core-reset/capability-validation-v1/reveal-map","base64":"RFC4648 standard alphabet with padding","canonicalization":"RFC8785 JCS UTF-8 without trailing LF","commitment":"lowercase SHA-256 of encrypted envelope JCS"},"reveal_map_plaintext":{"fields_only":["schema_version","campaign_id","seed_base64","salt_base64","custodian","created_at","mappings","bundle_order"],"mapping_fields_only":["trial_id","pseudonym","repository_id","question_id","temperature","arm","condition","ordinal"],"mapping_count":60,"bundle_order_count":60,"canonicalization":"RFC8785 JCS UTF-8 without trailing LF"},"reveal_envelope":{"fields_only":["schema_version","algorithm","nonce","ciphertext","tag","plaintext_sha256"],"algorithm":"AES-256-GCM","nonce":"fresh 12 bytes encoded RFC4648 base64 with padding","ciphertext":"RFC4648 base64 with padding","tag":"16 bytes encoded RFC4648 base64 with padding","plaintext_sha256":"lowercase SHA-256 of exact reveal-map JCS","commitment":"lowercase SHA-256 of exact envelope JCS"},"custody_and_visibility":{"custodian":"alone holds seed, salt, AES key, and editable reveal map until reveal","operator":"sees arm-labelled execution transcripts but never custodian seed, salt, AES key, or editable reveal map","reviewers":"see only their blind bundles and never arm identities, mapping, or another reviewer's receipt","adjudicator":"sees only required blind bundles and sealed disagreement inputs, never arm identities or mapping"},"failed_answer_blinding":{"statuses":["failed","timed_out","invalid","budget_terminated"],"answer_kind":"empty_zero","final_answer_utf8":"empty byte string","answer_sha256":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","blind_bundle":"the ordinary blind bundle is still produced with the empty final_answer and identical question union dossier; no failure reason or arm identity is exposed","review":"both reviewers seal the exact question phase IDs and five dimension IDs at score 0 with no incorrect-claim rows; adjudication is required only by the ordinary phase-score or incorrect-claim disagreement rule","success_answer_kind":"substantive","consistency":"trial, blind bundle, review/adjudication payload, and aggregates must carry the same answer_kind and answer SHA-256; reveal mappings carry only the exact mapping_fields_only set"},"durable_role_lock":{"timing":"before the first provider request of any kind, including Count Tokens","identities":["operator GitHub identity","mapping custodian GitHub identity","two reviewer GitHub identities","adjudicator GitHub identity"],"pairwise_distinct":"operator, mapping custodian, reviewer slot 1, reviewer slot 2, and adjudicator are five pairwise-distinct bound GitHub identities","independence":"durable comments bind acceptance that reviewers did not author or operate the runner, cannot access the mapping, do not see one another's scores, and do not coordinate; the adjudicator cannot access the mapping or reviewer identities before an eligible disagreement payload; the custodian never reviews or adjudicates"},"union_dossier":{"count":2,"answers_per_question":30,"creation":"after all 30 comparison answers for the question are sealed","citation_detection":"a path is a valid dossier citation only when its exact UTF-8 repository-root-relative spelling occurs in final_answer and resolves beneath graph_root to a tracked, nonempty, regular, valid-UTF-8 file; empty, invalid-UTF-8, untracked, non-regular, escaping, or unresolved mentions are omitted from the dossier and remain available to human citation-correctness review","deduplication":"one entry per path across all 30 answers","order":"repository-root-relative UTF-8 path bytes","excerpt":"complete valid-UTF-8 file from line 1 through physical EOF with bytes unchanged","line_count":"LF count plus one for a nonempty final segment without LF; empty files cannot be cited","entry_fields_only":["path","start_line","end_line","file_bytes","file_sha256","excerpt_bytes","excerpt_sha256","text"],"entry_byte_fields":"file_bytes is the exact complete regular-file byte length; excerpt_bytes is the exact UTF-8 byte length of text; because the excerpt is the complete valid-UTF-8 file, both values are equal and independently recomputed","hashes":["complete file SHA-256","exact excerpt UTF-8 SHA-256"],"identical_bytes_per_question":true,"answer_specific_dossier":"forbidden","private_artifact":"the complete dossier and excerpt text exist only in the two private canonical archive copies and reviewer blind bundles; they are never embedded in the committed receipt","committed_receipt_binding":["schema_version","campaign_id","question_id","repository_id","answer_count","entry_count","dossier_sha256","entry_manifest_sha256"]},"blind_bundle_allowed_fields":["schema_version","campaign_id","answer_id","question_id","repository_id","pseudonym","answer_kind","product_scope","question","final_answer","answer_sha256","dossier","dossier_sha256"],"blind_bundle_forbidden_fields":["arm","condition","tool","MCP","timing","cost","transcript","graph artifact","reveal mapping"],"score_payload_canonicalization":"RFC8785 JCS UTF-8 without trailing LF","attestation":"bound GitHub identity posts exact score-payload SHA-256 and independence statement","attestation_record_creation":"after comment exists; separate from score payload","adjudication_trigger":"any phase-score or incorrect-load-bearing-claim disagreement; dimension-score disagreement alone does not trigger adjudication","dimension_resolution":"for each of the five dimension IDs, the final dimension score is the exact arithmetic mean of the two bound reviewer integer scores with no rounding, yielding only 0, 0.5, 1, 1.5, or 2; the final trial total is the sum of every equal-or-adjudicated required phase score plus those five resolved dimension scores","incorrect_claim_resolution":{"claim_fields_only":["claim_sha256","start_utf8_byte","end_utf8_byte","text_sha256","contradicted","rationale_code","private_rationale_sha256"],"locator":"start_utf8_byte and end_utf8_byte are nonnegative Number-safe integer boundaries into exact final-answer UTF-8 with start < end; both fall on Unicode-scalar boundaries and identify the exact nonempty claim bytes","text_sha256":"lowercase SHA-256 of the exact located claim bytes","claim_sha256":"lowercase SHA-256 of RFC8785 JCS UTF-8 of exactly {start_utf8_byte,end_utf8_byte,text_sha256}","reviewer_set":"each payload sorts unique claim rows by claim_sha256; its incorrect set is exactly the claim_sha256 values whose contradicted value is true","disagreement":"adjudication is required exactly when the two incorrect sets differ, regardless of omitted or contradicted:false rows; the adjudicator resolves the sorted union of both reviewers' located claims","accepted_set":"when incorrect sets differ use exactly the adjudicator's contradicted:true set; otherwise use the identical reviewer incorrect set and any adjudication triggered only by phases must preserve it","empty_zero":"no claim rows and an empty accepted set"},"review_text_privacy":{"committed_claim_rationale_codes":["contradicted_by_dossier","unsupported_by_dossier","internal_answer_conflict","not_incorrect","other_private"],"private_rationale_sha256":"lowercase SHA-256 of exact private rationale UTF-8 bytes stored only in the canonical archive; use the empty-byte SHA-256 when no private rationale exists","private_notes_sha256":"lowercase SHA-256 of exact optional private notes UTF-8 bytes stored only in the canonical archive; when no notes exist use the empty-byte SHA-256 e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","score_payload_notes":"free-form notes are forbidden in committed review and adjudication score payloads; optional notes remain private and are bound only by a private_notes_sha256","source_text":"raw source, dossier excerpt, provider text beyond the already approved final_answer blind field, and review working prose are forbidden in the committed receipt"},"independence_statements":{"operator_exact":"I will operate only the immutable locked campaign, will not access the custodian seed, salt, key, or editable mapping, and will not expose arm identities before an authorized reveal.","custodian_exact":"I alone hold the precommitted seed, salt, key, and editable mapping until the reveal gate, and I will not operate, review, or adjudicate this campaign.","reviewer_exact":"I independently reviewed this blind bundle without access to arm identities, the reveal mapping, another reviewer's scores, runner authorship, or coordination.","adjudicator_exact":"I independently adjudicated only the sealed disagreement payload without access to arm identities, the reveal mapping, or reviewer identities, and without coordination.","role_acceptance_field":"every campaign-lock role acceptance stores its role-specific exact statement verbatim plus statement SHA-256, GitHub author, comment URL/body SHA-256, and timestamp; the statement occurs byte-for-byte in the bound comment","attestation_field":"independence_statement is stored verbatim in each review/adjudication attestation, equals the role-specific exact string, occurs byte-for-byte in the bound GitHub comment body, and is hashed by independence_statement_sha256"},"artifact_hash_subjects":{"canonicalization":"unless an exact raw-byte subject is stated, every object hash below is lowercase SHA-256 of RFC8785 JCS UTF-8 with no trailing LF","dossier_sha256":"the complete private union-dossier object including every exact excerpt text field","entry_manifest_sha256":"exactly the dossier entries projected to {path,start_line,end_line,file_bytes,file_sha256,excerpt_bytes,excerpt_sha256} in dossier order, excluding only excerpt text","blind_bundle_sha256":"the complete blind_bundle object; the digest is stored only in its referencing review/adjudication/receipt rows, never inside blind_bundle","score_payload_sha256":"the complete review_score_payload or adjudication_score_payload object; the digest is stored only outside that payload","attestation_sha256":"the complete review_attestation or adjudication_attestation object; the digest is stored only outside that attestation","comment_body_sha256":"exact UTF-8 bytes of the GitHub API comment body string with no added newline or normalization","independence_statement_sha256":"exact UTF-8 bytes of the full independence_statement string stored in the attestation and present byte-for-byte in the bound comment","review_or_adjudication_receipt_sha256":"the complete receipt object after removing only its own receipt_sha256 field","aggregates_recomputed_sha256":"the complete aggregates object after removing only its own recomputed_sha256 field"},"reveal_gate":"all expected review and adjudication payload and attestation hashes sealed","join_gate":"AES-GCM envelope, commitment, pseudonyms, and bundle order all reproduce","sequence":["seal all 60 scheduled comparison answers before generating any blind bundle","create the two deterministic 30-answer union dossiers","serialize and seal all 60 blind bundles in committed HMAC-derived order","obtain two independent sealed review score payloads and durable attestations for every blind bundle","obtain a sealed adjudication payload and durable attestation for every phase-score or incorrect-claim disagreement","custodian confirms every expected review and adjudication hash before reveal","custodian publishes exact plaintext reveal-map JCS and AES key through the durable receipt process","reproduce encryption commitment, every pseudonym, and bundle order before joining scores to arms"]}}, + "receipt": {"const":{"path":"docs/core-reset/evidence/capability-validation-v2.json","schema_path":"tools/eval/core-reset/schemas/capability-validation-receipt-v2.schema.json","max_physical_lines":6000,"max_bytes":2097152,"canonical_archive_copies":2,"canonical_transcript":{"schema_version":"madar-capability-transcript-v2","private_object_fields_only":["schema_version","campaign_id","trial_id","events"],"event_order":"strict zero-based event_index in actual monotonic journal order; provider and tool events are never regrouped, omitted, synthesized, relabeled, or reordered","event_union":"every event is exactly one closed provider_event or tool_event selected by event_kind; additional fields are forbidden","provider_event_fields_only":["event_index","event_kind","provider_sequence","count_provider_sequence","state_before","state_after","monotonic_reservation_request_ns","monotonic_reservation_ack_ns","monotonic_send_start_ns","monotonic_headers_ns","monotonic_body_end_ns","monotonic_outcome_ack_ns","deadline_remaining_ms","abort_ms","request_url","final_url","tls_hostname","http_method","request_body_base64","request_bytes","request_sha256","request_headers","request_headers_sha256","canonical_semantic_fields_sha256","tools_sha256","messages_sha256","system_sha256","tool_choice_sha256","http_status","response_body_base64","response_bytes","response_sha256","response_headers","response_headers_sha256","request_id","request_id_sha256","request_id_header_sha256","model","service_tier","inference_geo","usage","rate","reservation","actual_cost_micro_usd","ledger_disposition","content_classification","assistant_content_sha256","stop_reason","terminal_classification"],"provider_event_variants":"event_kind is count or create; pre-send termination creates no event; every sent request creates exactly one event; request fields and send boundary are always complete; count has null Create-only association, reservation, response-model, content, and cost fields; timeout/reset/ambiguous no-body outcomes retain exact send/timing/URL/TLS subjects with null response-only fields and full reservation for Create; non-2xx preserves response bytes, headers, status, request ID, and full Create reservation; accepted responses populate every applicable strict field","request_headers":"closed lowercase normalized non-secret map reconstructed from the approval-bound template; x-api-key value is the literal ; no credential bytes are retained","response_headers":"closed lowercase whitespace-normalized duplicate-combined map exposed by Fetch Headers iteration; it is not represented as raw wire headers","request_and_transport_subject":"request_url is the hard-coded origin plus path; final_url and tls_hostname are observed from the completed direct-fetch response/connection when available; redirects are forbidden; http_method is POST; request body is exact base64 and its decoded bytes/hash/length must agree","timing":"all monotonic fields are exact decimal nanosecond strings allocated by the store; deadline_remaining_ms and abort_ms derive from them and the frozen deadline rules; absent boundaries are null only in their named pre-boundary outcome","provider_derivation":"request ID hashes, content length, semantic hashes, Count association, elapsed time, usage, rate, reservation, actual cost, ledger disposition, content classification, and terminal classification are recomputed from sealed request/response/store bytes and cannot be supplied","tool_event_fields_only":["event_index","event_kind","tool_call_index","provider_sequence","continuation_provider_sequence","monotonic_start_ns","monotonic_end_ns","tool_use_id","name","input","input_jcs_base64","input_bytes","input_sha256","result","result_jcs_base64","result_bytes","result_sha256","result_subject","status"],"tool_event_variants":"event_kind is tool; every provider-emitted tool_use attempt has one event; input is the strict parsed plain object and input_jcs_base64 decodes to its exact JCS; result is the complete raw envelope or unmodified MCP payload and result_jcs_base64 decodes to its exact JCS; continuation_provider_sequence is the exact later Create sequence or null only when the trial terminates; status is success, bounded_error, timed_out, invalid, denied, overflow, protocol_lost, process_lost, or failed","mcp_error_rule":"an exact MCP {content:[...],isError:true} payload at or below 65,536 UTF-8 bytes is preserved unmodified as bounded_error, consumes the call, and may continue; protocol/process loss or oversize records the honest attempted event and stopped prefix and is never relabeled as a valid error result","integer_and_null_policy":"indices, byte counts, deadline/abort milliseconds, token/usage/reservation/cost values, and monotonic nanosecond strings are nonnegative and exact; nullable fields are null only in the explicitly named variant and are never omitted or replaced with zero, empty string, empty object, or fabricated data","canonicalization":"RFC8785 JCS UTF-8 without BOM or trailing LF","transcript_sha256":"lowercase SHA-256 of exact canonical transcript JCS bytes","success_answer_sha256":"lowercase SHA-256 of exact final-answer UTF-8 bytes with no separator, trimming, normalization, or JSON quoting","empty_answer_sha256":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","tool_input_sha256":"lowercase SHA-256 of exact decoded input_jcs_base64 bytes after equality with RFC8785 JCS of input","tool_result_sha256":"lowercase SHA-256 of exact decoded result_jcs_base64 bytes after equality with RFC8785 JCS of complete result","total_bijection":"private events, committed tool_calls, machine_grade.tool_rows, and completed_tool_event_indexes join one-to-one over event index, tool-use ID, name, input/result bytes and hashes, provider sequence, continuation sequence, and result subject"},"committed_machine_grading_evidence":{"privacy":"contains normalized repository-root-relative paths, symbols, verification targets, classifications, counts, ratios, joins, and hashes but never raw file contents, graph contents, transcript contents, hidden-fixture contents, provider text, or arm mapping before reveal","trial_binding":"every row binds trial_id, transcript_sha256, answer_sha256, frozen expected-evidence hash, and the exact completed provider/tool-event prefix","tool_rows":"strictly event-ordered rows bind tool_use_id, allowed tool name, input/result hashes and byte counts, normalized requested path/query/symbol, returned file/symbol/verification-target sets, selected file set, focused-read classification, graph-call classification, and post-graph broad-search classification","phase_rows":"one row per frozen phase binds phase_id, exact matching event/result-hash joins, normalized evidence paths/symbols, expected and observed match counts, and coverage disposition","file_sets":"sorted unique selected, relevant, unrelated, cited, focused-read, graph-returned, and verification-target path sets permit exact precision and unrelated-file recomputation against the inherited frozen fixture","derived_values":"phase coverage, selected-file precision numerator/denominator, unrelated-file count, focused-call count, graph-call count, broad-search restart, accepted incorrect-claim count, and every machine gate are recomputed and may not be accepted as bare claims","join_rule":"every normalized proof joins to one existing transcript tool event by trial_id, event_index, tool_use_id, tool name, input_sha256, result_sha256, and result byte count; extra, missing, duplicate, or contradictory proof rows reject"},"canonical_archive":{"magic_utf8":"MADAR-CAPABILITY-ARCHIVE-V2\n","manifest":"RFC8785 JCS UTF-8 of exactly {schema_version:'madar-capability-archive-v2',campaign_id,files:[{ordinal,path,bytes,sha256}]}; ordinal is one-based contiguous and files are in exact encoded order","path_policy":"paths are exactly p/ plus one-based zero-padded 8-digit ordinal plus .bin; repository, arm, condition, trial ID, semantic name, artifact kind, source path, and extension are forbidden in public paths","private_index":{"path":"p/00000001.bin","schema_version":"madar-capability-private-index-v2","object_fields_only":["schema_version","campaign_id","entries"],"entry_fields_only":["ordinal","path","artifact_kind","semantic_id","bytes","sha256"],"archive_payload_kinds":["lock_observation","role_acceptance","environment_manifest","containment_observation","containment_probe","journal_frame","ledger_frame","provider_event","tool_event","transcript","machine_grade_join","dossier","blind_bundle","review","adjudication","reveal_mapping","lifecycle_manifest","stop_observation","receipt_build_input","raw_repository","graph","hidden_fixture","provider_body","review_working","dossier_excerpt"],"entry_order":"strict unsigned UTF-8 tuple order by artifact_kind then semantic_id; both are nonempty exact strings; duplicate tuples reject","entry_rule":"entries cover every archive file after the private index exactly once; ordinal is its one-based manifest position and at least 2; path is matching p/NNNNNNNN.bin; bytes and sha256 equal the public manifest row and exact raw content","canonicalization":"RFC8785 JCS UTF-8 without trailing LF; exact bytes are p/00000001.bin content; private semantic IDs and kinds do not appear in the committed public receipt"},"private_envelope":"every indexed content object validates against exactly one closed local receipt-schema fragment selected by artifact_kind; unknown, generic, catch-all, overlapping, and other_private variants reject","file_row":"ordinal and bytes are exact nonnegative Number-safe integers; sha256 is lowercase SHA-256 of exact raw content bytes","encoding":"magic bytes, unsigned 64-bit big-endian manifest-byte length, exact manifest bytes, then for each manifest row in order unsigned 64-bit big-endian content length followed by exact raw content; no external path bytes, compression, padding, alignment, footer, or trailing bytes","archive_sha256":"lowercase SHA-256 of complete bytes from first magic byte through last content byte","cycle_rule":"archive payload excludes final public receipt, archive copy attestations, copy-identity record, and archive-verifier attestation","committed_receipt":"records complete opaque public manifest, manifest JCS SHA-256, archive byte count and SHA-256, exactly two derived copy attestations, and copy-identity-record SHA-256 without private contents, semantic IDs, artifact kinds, or absolute paths","copy_identity_record":"RFC8785 JCS of exactly two rows ordered copy_index 1 then 2; each row has only copy_index, absolute_path_sha256, realpath_sha256, device, inode, nlink, mode, bytes, archive_sha256, manifest_sha256, file_fsync, directory_fsync, reread_sha256, pre_stat_sha256, and post_stat_sha256","copies":"exactly two byte-identical regular files at distinct absolute paths, distinct realpaths, and distinct (device,inode); exclusive no-follow create mode 0600; nlink exactly 1; fsync each complete file and containing directory; reopen no-follow and independently reread and restat each before attestation","archive_verifier":"sixth locked independent verifier reopens both copies, reproduces every byte/hash/manifest/copy-identity commitment, and posts a durable attestation over candidate receipt SHA-256, both archive SHA-256 values, manifest SHA-256, copy-identity-record SHA-256, and review timestamp; the attestation is not embedded in the receipt it signs","failure":"any absent, extra, duplicate, unreadable, noncanonical, malformed, trailing, linked, symlinked, non-regular, wrong-mode, same-identity, stat-drifted, unfsynced, unreread, or hash-mismatched archive/copy/index fact rejects and prevents final receipt"},"lifecycle_evidence":{"event_fields_only":["sequence","stage","occurred_at","local_monotonic_ns","subject_manifest_sha256","durable_receipt_url"],"encoding":"sequence is a zero-based contiguous integer; stage is approval-bound; occurred_at is RFC3339; local_monotonic_ns is a base-10 nonnegative bigint string or null for an externally posted event; subject_manifest_sha256 is the exact stage-manifest JCS hash; durable_receipt_url is an exact GitHub comment URL or null","pass_stages":["campaign_lock_sealed","execution_fsynced","grading_material_loaded","dossiers_sealed","blind_bundles_sealed","reviews_and_adjudications_sealed","custodian_pre_reveal_confirmed","reveal_published","aggregates_sealed","archive_copies_fsynced"],"execution_manifest":"contains all 60 comparison answer/transcript fsync rows plus diagnostic disposition and all 12 refresh rows; every local fsync monotonic time precedes grading_material_loaded","ordering":"the exact pass_stages are contiguous and strictly ordered; all 60 answers are sealed before dossiers/bundles, all expected score payloads, attestations, receipts and required adjudications are sealed before custodian confirmation, reveal_published has its own publication timestamp/comment hash distinct from pre-execution reveal_map.created_at, aggregates follow verified reveal, and archive follows aggregates","stopped_prefix":"stopped status contains the contiguous completed ordinary lifecycle prefix plus the triggering partial-stage manifest, followed only by stop_prefix_sealed, prefix_archive_copies_fsynced, rfc_stop_amendment_posted, and stopped_receipt_sealed finalization events; no skipped ordinary stage or fabricated later evidence may exist"},"self_hash":"lowercase SHA-256 of RFC8785 JCS UTF-8 after removing only top-level receipt_sha256","required_statuses":["pass","failed","stopped"],"pass_derivation":"independent recomputation from immutable trials, privacy-safe grading proofs, review/adjudication receipts, inherited gates, medians, all 24 temperature-specific break-even rows, and every stop condition","semantic_validator_invariants":["recompute every Count/Create request template, exact body/header byte hash and length, Count-to-Create semantic-subset equality, monotonic trial-deadline calculation, state transition, raw request-ID hash, usage/rate/cache/model/tier/geography disposition, and terminal content parse","reconcile every comparison and diagnostic provider call to reserved and actual ledger categories; retain the full reservation for a Create deadline, reset, ambiguous transport, or non-2xx response; record actual over-reservation charges before the first stop","prove each campaign-lock role, implementation hash, environment, process tree, credential path, relay, schedule, spend proof, and blind commitment existed before the first Count timestamp","prove all four comparison schedules contain the exact 60 unique immutable trial IDs in committed order with no retry, replacement, omission, or duplicate; every pair has all five exact arm-specific artifact checkpoints and every checkout preserves the inherited commit, tree, tree-path hash, and tracked manifest","reproduce each private canonical transcript hash, exact success or empty answer hash, tool input/result hash subject, provider tool_use/result ID join, arm-specific tool allowlist, create/tool-call cap, and honest completed provider/tool prefix without fabricated terminal events","recompute deterministic arm-specific graph-result extraction, phase matches and coverage, normalized selected/relevant/unrelated file sets, selected-file precision, graph and focused call counts, post-graph broad-search classification, accepted incorrect-claim count, and every machine gate from committed privacy-safe grading rows joined to transcript events and inherited fixtures","prove the two question dossiers, 60 unique blind bundles, 120 unique review receipts, exactly two distinct bound reviewers per bundle, all score/answer/attestation hashes and answer-kind joins; adjudicate if and only if phase or incorrect-claim scores disagree and exact-mean dimension-only disagreements without rounding","reproduce the AES-GCM commitment, all 60 full-trial-ID HMAC pseudonyms, committed bundle order, reveal joins, private dossier and safe committed bindings, reviewer/adjudicator independence hashes, and post-reveal aggregate joins","recompute all 20 cell aggregates, eight Madar comparisons, four six-sample clean-build medians, four three-sample refresh medians including token/byte metrics, and all 24 repository/question/temperature/arm/scenario break-even rows with independent time/token dispositions and no temperature pooling","prove every Madar cold and warm cell has at least two of three qualifying trials, every qualifying trial passes every machine gate, scores exactly 2 on every required phase, has zero accepted incorrect load-bearing claims, and each Madar median ties or exceeds both matching Graphify and native medians","prove the diagnostic used one fresh frozen OpenStatus clone at the bound commit/tree/path hash, one exact packed-Madar clean build, conditionally zero-or-one retrieve and at most two allowlisted reads, at most three total evidence calls, an honest completed tool prefix, and byte-identical three-file by three-checkpoint bundle hashes","prove each Graphify build/refresh code-only extractor/source-set gate, each sample's exact arm-specific pre/post artifacts, zero provider input/output/total tokens, recomputable graph joins and metrics, no retry or replacement, and no missing failed-block cost","reproduce the canonical archive manifest and byte encoding, every private file hash, two byte-identical distinct fsynced copies, archive byte count, manifest hash, and complete archive hash without committing private contents","recompute the complete lifecycle manifest and global schedule order; for stopped status prove every row is the immutable completed prefix through all first-observation matching stop IDs plus only mandatory stop-finalization evidence; omit every unreachable ordinary row","reject pass when any strict ceiling is reached, any blocking fact is unknown, any stop condition or campaign drift is present, any exact population or join is missing, or any cross-object invariant above fails"],"unknown_blocking_fact":"reject","duplicate_retried_or_replaced_trial":"reject","status_evidence_policy":{"pass":"requires the complete 60-trial campaign, diagnostic, 12 refresh samples, two union dossiers, 60 blind bundles, 120 review receipts, every triggered adjudication, full reveal, recomputed aggregates, no blocking unknown, and eligible outcome","failed":"means the complete campaign reached final eligibility comparison without triggering any of stop conditions 1 through 14: first_stop_condition_id is null, eligibility is not_eligible with stop_condition_triggered false, one or more nonempty recomputed final failure reasons and the required RFC #577 amendment comment URL are present, and no pass claim is allowed","stopped":"means one or more stop conditions 1 through 14 matched the first stopping observation: all matching IDs are recorded, first_stop_condition_id and eligibility stop_condition_id equal the lowest numeric match, eligibility is stopped with stop_condition_triggered true, the matching RFC #577 amendment comment URL is present, all completed immutable evidence and charges through that boundary are retained, unreachable future rows are omitted, and no pass claim is allowed","pre_reveal_stopped_visibility":"when stopped before a valid reveal, committed comparison prefix rows use only opaque pseudonym/answer_id plus question/repository, status, hashes, counts, and charges; arm, condition, full trial_id, schedule-position joins, semantic archive names, and plaintext private prefix remain only in the encrypted private archive bound by the original commitment and a committed private-prefix hash; no terminal reveal is fabricated","post_reveal_visibility":"arm/condition/full-trial joins may appear only when the ordinary review/adjudication/reveal gate had already completed before the later stop","human_review_on_stop":"stopped evidence may contain a complete or incomplete review prefix according to the actual stop boundary; it is never forced complete or fabricated","trial_row_on_stop":"a started scheduled trial retained at the stop boundary is sealed as its honest completed substantive or empty-zero disposition; an unstarted future trial row is omitted"},"index_cost_evidence":{"clean_build_fields":["status","elapsed_ms","peak_rss_bytes","provider_input_tokens","provider_output_tokens","provider_total_tokens","artifact_bytes"],"refresh_fields":["elapsed_ms","peak_rss_bytes","provider_input_tokens","provider_output_tokens","provider_total_tokens","post_graph_bytes"],"failed_or_stopped_unknowns":"use null and explicit failed/unknown status; never substitute zero","pass_values":"all inherited blocking index-cost fields are present, finite, non-null, and independently recomputed"},"campaign_lock_implementation_identities":["entrypoint","contract","report","contract_test","receipt_schema","ci_step"],"campaign_lock_raw_tool_binding":"bind each of tool-definitions, path-policy, result-schema, error-message, and semantics JCS hashes plus their aggregate JCS hash","raw_private_material_policy":{"committed":false,"archive_only":["raw repositories","graphs","canonical transcripts","provider response bodies","hidden fixtures","arm mapping before reveal","review working files","union-dossier excerpts"],"committed_safe_evidence":["hashes","byte counts","normalized grading proofs","canonical archive manifest","post-reveal joins"],"credentials":"never stored in either archive or receipt"}}}, + "execution_boundary": {"const":{"authorization":{"current_scope":"first-stage approval authorizes only preparation and publication of the activation branch and activation PR, CI, and independent review of this governance-only activation candidate","offline_only":true,"authorized_provider_spend_cents":0,"activation_merge_requires_second_owner_approval":true,"implementation_requires_exact_activation_merge":true,"real_execution_gate":"without a later separately approved campaign authorization subject the real command fails closed before reading fd 3 or any provider credential","forbidden_under_first_stage":["activation merge","implementation","campaign lock","provider-account proof collection","Count Tokens","Create","provider request","paid spend","target-repository execution","npm/package/product publication","release","Registry metadata","tag","main"],"lock_builder":{"schema_validity_is_authorization":false,"caller_authored_proof_objects":"reject","caller_supplied_hash_without_observed_bytes":"reject","generic_url_or_screenshot_or_export":"reject","observed_git_and_file_subjects":["commit","tree","blob","src tree","package.json","package-lock.json","tarball","toolchain","helper","sandbox profile","native-monitor source","native-monitor compiler","native-monitor binary","machine manifest"],"observed_comment_fields_only":["repository_id","repository_owner_id","issue_number","comment_numeric_id","author_login","author_numeric_id","author_association","body_utf8","body_sha256","created_at","updated_at","includes_created_edit","html_url"],"owner_approval_and_stop_comment_requirements":"fetch live from GitHub; require exact repository numeric identity, repository owner login/numeric identity, author_association OWNER, canonical issue/comment URL, unedited state, and exact body UTF-8 bytes, SHA-256, created_at, and updated_at matching the approval-bound owner approval or stop expectation","role_comment_requirements":"fetch live from GitHub; require exact repository numeric identity and the authorization-subject-bound role author's exact login and numeric identity, canonical issue/comment URL, exact recorded author_association, unedited state, and exact body UTF-8 bytes, SHA-256, created_at, and updated_at; role, reviewer, adjudicator, and archive-verifier authors are not required to be OWNER","authorization_subject_fields_only":["contract_id","contract_sha256","contract_schema_sha256","receipt_schema_sha256","implementation_commit","implementation_tree","implementation_paths_sha256","implementation_numstat_sha256","source_and_binary_manifest_sha256","environment_manifest_sha256","containment_manifest_sha256","schedule_sha256","provider_observer_subject_sha256","spend_subject_sha256","role_subject_sha256"],"authorization_subject_excludes":["role acceptance comment metadata","final lock metadata","lock_jcs_sha256","provider credential","caller assertions"],"locked_roles":["mapping_custodian","operator","reviewer_1","reviewer_2","adjudicator","archive_verifier"],"role_independence":"the five inherited grading-role authors are pairwise distinct; archive_verifier is distinct from all five and from operator, build author, and receipt author","ordering":"all observed role-acceptance comments bind the same authorization_subject_sha256 and precede final lock creation; final lock precedes the first Count request","real_lock":"may be built only in a future separately approved campaign phase after every observed proof, role acceptance, provider-account observation, source/profile/helper byte, and machine fact succeeds"},"provider_account_observer":{"status":"deferred-unresolved","offline_implementation_may_mint_real_lock":false,"reason":"no approval-bound authenticated mechanism currently proves the exact Claude Platform workspace hard cap at or below USD 100.00 and zero campaign-window usage","future_binding_required":["actual account type","exact authenticated acquisition mechanism","credential isolation","endpoint and request schema","response schema","pagination","freshness window","workspace and key join","raw proof bytes","hard-cap derivation","zero-use derivation","any additional code allowlist"],"failure":"Capability Validation remains stopped; no credential read, lock, Count, Create, target checkout, or spend"}},"coordinator":{"implementation":"one committed concrete coordinator directly owns every state transition and invokes only committed concrete components","owned_stages":["preflight","credential-free acquisition","clone","setup","build","schedule","MCP","provider","diagnostic","refresh","review transition","receipt construction","stop finalization"],"fixed_order":"exactly the inherited 60 comparison rows, then one diagnostic, then 12 refresh rows, then the inherited review pipeline","first_stop":"prevents every later ordinary, provider, trial, refresh, review, reveal, and aggregate stage","forbidden_interfaces":["arbitrary executor callback","caller-supplied campaign adapter","matrix selector","repository selector","row filter","retry","replacement","execution resume","initial ledger","remaining balance","alternate transport","caller-supplied aggregate"],"campaign_initialization":"exclusive-create campaign directory and execution-started seal, fsync the seal and directory, then permanently reject a second normal initialization or execution resume for the campaign ID","crash_recovery_finalization":{"purpose":"seal one existing append-only prefix as stopped; never resume execution","exclusive_finalizer_seal":true,"allowed":["observe crash stop","seal existing journal prefix","write and verify two private archives","post or bind RFC #577 stop amendment","derive stopped receipt"],"forbidden":["instantiate relay","read provider credential","setup","tool or MCP call","provider request","review","reveal","ordinary-stage append","retry","replacement"]}},"campaign_store":{"owner":"coordinator-process campaign-store component","sole_writer":true,"caller_instantiation_or_seed_or_reset_or_replace_or_selection":"forbidden","owned_allocators":["global sequence","event index","provider sequence","tool-call index","trial state","monotonic timestamp"],"writer_seal":"exclusive for every phase transition; concurrent, stale, fresh-object, and alternate-entrypoint writers fail","frame":{"encoding":"unsigned length prefix followed by exact RFC8785 JCS UTF-8","fields_only":["campaign_id","global_sequence","frame_kind","previous_frame_sha256","payload","frame_sha256"],"chain":"global_sequence is zero-based contiguous; first previous hash is 64 zeroes; later previous hash equals prior complete frame SHA-256; frame_sha256 is derived with only itself omitted"},"durability":"exclusive create and fsync after every reservation and every provider outcome; fsync the containing directory for each created store file","provider_sequence":["relay reservation request","store append and fsync","store acknowledgement","provider send","relay outcome","store append and fsync","store acknowledgement","coordinator continuation"],"reservation":"Count reservation and cost are zero; before each Create reserve the inherited (counted_input + 1024) * 3 + 4096 * 15 micro-USD","unknown_outcome":"a sent Create timeout, reset, ambiguous transport, overflow, non-2xx, or unknowable usage/cost retains the full reservation and never records unknown cost as zero","known_cost_on_other_drift":"reconcile strict known usage and actual cost first, then stop; never replace known cost with reservation","probe":"with exactly 64,513 micro-USD remaining, at most one reservation may succeed across every public entrypoint and any attempted fresh object construction"},"credential_relay":{"process":"distinct committed relay process; sole provider transport","credential_input":"inherited fd 3 only; coordinator closes its copy immediately after spawn","credential_forbidden_locations":["environment","argv","configuration","journal","ledger","filesystem","worker","MCP process","raw tool","child descriptor"],"ipc":{"encoding":"unsigned length prefix plus closed RFC8785 JCS UTF-8","fields_only":["campaign_id","trial_id","sequence","operation","canonical_messages_hash"],"operation_values":["count","create"],"reject":["extra or missing field","duplicate","replay","non-current trial","caller-supplied provider body","caller-supplied response","alternate transport"]},"request_construction":"read the already-fsynced canonical conversation, reconstruct exact frozen Count/Create bodies, and verify semantic/body hashes before send","transport":"only the inherited direct Node fetch; hard-coded origin, paths, method, request templates, headers, redirect policy, response byte caps, and deadlines","send_gate":"no send before matching fsynced reservation acknowledgement; no coordinator continuation before matching fsynced outcome acknowledgement"},"containment":{"platform":"Darwin arm64 exact-host only","profiles":["tools/eval/core-reset/sandbox/capability-validation-v2-setup.sb","tools/eval/core-reset/sandbox/capability-validation-v2-worker.sb","tools/eval/core-reset/sandbox/capability-validation-v2-mcp.sb","tools/eval/core-reset/sandbox/capability-validation-v2-relay.sb"],"native_monitor_source":"tools/eval/core-reset/native/capability-validation-v2-process-monitor.c","native_interfaces":["libproc","sysctl"],"observed_fields":["monotonic_ns","pid","ppid","process_group","rss_bytes","descendant_marker","fork_exec_denial","termination_state"],"build_binding":"compile before any future campaign lock with exact approval-bound clang argv; bind source, compiler, binary, argv, and all profile byte hashes","prelock_setup":"credential-free; seal acquisition outputs and complete environment manifests before execution-started","spawn_ownership":"coordinator directly spawns every approved top-level process during measured answer, diagnostic, and refresh stages","kernel_policy":"worker and MCP profiles deny process-fork and default-deny process-exec after the exact approval-bound initial sandbox-exec/interpreter chain; relay and all workers default-deny network except relay's exact provider host","initial_chain":"live preflight must prove the exact chain; if a measured comparator requires any additional fork or exec, stop condition 8 fires and profiles are not weakened","monitor_cadence_ms":5,"maximum_observed_gap_ms":10,"termination":"close coordinator spawn gate, signal the complete process group and every marked PID, keep fork/exec kernel-denied, then require five complete zero-process scans separated by at least 10 ms","failures":["reparent","process-group change","unexpected PID","RSS omission","denial failure","sampling gap over 10 ms","network or credential access","descriptor leak","non-quiescence","surviving child"],"child_fds":[0,1,2],"live_probes":["worker and descendant cannot reach api.anthropic.com","worker and descendant cannot reach controlled sentinel","worker and descendant cannot read credential","process cannot escape containment","no child survives termination"],"proof_boundary":"kernel fork/exec denial plus closed spawn gate plus native accounting plus repeated quiescence barrier; polling alone, ps fallback, abstract inspector, caveat, and best-effort mode are forbidden"},"evidence":{"journal":"one append-only campaign-store journal allocates and owns every event index, provider sequence, tool-call index, state, timestamp, and continuation","transcript_fields_only":["schema_version","campaign_id","trial_id","events"],"pre_send_termination":"creates no provider event","provider_event_rule":"every sent Count/Create creates exactly one provider event, including timeout, reset, non-2xx, overflow, malformed response, or drift","tool_event_rule":"every provider-emitted tool_use attempt creates exactly one tool event, including known, unknown, schema-invalid, resources/read, denied, timeout, overflow, and protocol/process-loss attempts","capture_before_derivation":["exact request body and bytes","redacted normalized request headers and hash subject","exact response body and bytes","normalized response headers","raw request ID","URL","final URL","TLS hostname","monotonic boundaries","Count association","reservation","usage","rate","ledger disposition","tool input","tool result","state transition","continuation sequence"],"derived_not_supplied":["request ID hash","content length","deadline","elapsed time","semantic hashes","reservation disposition","usage totals","actual cost","answer kind","lifecycle status"],"mcp_bounded_error":"preserve an MCP {content:[...],isError:true} payload at or below 65,536 UTF-8 bytes unmodified as bounded_error; consume the call and permit the provider loop to continue","mcp_stopped_prefix":"protocol loss, transport loss, or oversize result records the exact stopped-prefix tool attempt and cannot be relabeled as bounded evidence","cost_vectors":[{"input_tokens":7,"output_tokens":11,"cache_tokens":0,"micro_usd":186},{"counted_input_tokens":5,"reserved_micro_usd":64527}],"deadline_boundary_remaining_ms":[0,29999,30001,119999,120001],"tool_bijection":"for each disclosed full trial, private tool events, public tool_calls, machine_grade.tool_rows, and completed_tool_event_indexes form a total bijection over event index, tool-use ID, name, input/result bytes and hashes, provider sequence, continuation sequence, and result subject; omission, duplication, contradiction, or relabeling rejects"},"receipt_derivation":{"public_top_level_fields_only":["schema_version","receipt_id","contract_id","status","generated_at","contract","candidate","campaign_lock","archive","comparison_blocks","diagnostic","refresh_blocks","provider_ledger","human_review","aggregates","eligibility","receipt_sha256","stop_conditions","first_stop_condition_id","rfc_amendment_url","validator_assertions","lifecycle_evidence"],"private_artifact_kinds":["lock_observation","role_acceptance","environment_manifest","containment_observation","containment_probe","journal_frame","ledger_frame","provider_event","tool_event","transcript","machine_grade_join","dossier","blind_bundle","review","adjudication","reveal_mapping","lifecycle_manifest","stop_observation","receipt_build_input","raw_repository","graph","hidden_fixture","provider_body","review_working","dossier_excerpt"],"private_kind_coverage":"the private artifact kinds equal canonical_archive.private_index.archive_payload_kinds byte-for-byte and in order; each maps to exactly one closed local schema fragment and every private object matches exactly one kind; generic, unknown, catch-all, overlapping, and other_private kinds reject","separately_validated_non_private_objects":{"archive_manifest":"derived canonical opaque public manifest validated inside the committed receipt archive object; never a private envelope payload","archive_copy_attestation":"derived public receipt commitment created only after both fsynced copies independently reread; never an archive payload","archive_verifier_attestation":"external live durable-comment merge-gate object authenticated out of band; neither private archive payload nor embedded receipt object"},"builder_input":"one sealed immutable evidence root plus observed GitHub attestations; no hand-authored receipt, aggregate, boolean, status, cost, lifecycle, lock fact, archive fact, or other derived claim","pure_derivations":["machine grades","costs","gates","medians","review aggregates","eligibility","pass","failed","stopped","all validator assertions"],"answer_kind":"empty_zero iff final-answer UTF-8 byte length is exactly zero; whitespace and every other nonempty answer are substantive","empty_zero_review":"all scores and accepted claims are zero; two valid reviews necessarily agree, so adjudication is forbidden","review_joins":"campaign, question, pseudonym, answer ID/hash/kind, bundle, reviewer, adjudicator, score, and attestation join exactly to sealed evidence; all 60 bundle hashes are unique and each is used exactly twice by its locked pair","review_order":"score submission precedes its exact durable attestation comment, which precedes receipt construction","first_stop":"evaluate all 14 inherited conditions at one immutable observation, record every simultaneous match, select the lowest ID, retain the exact completed global prefix plus triggering partial row, and omit every unstarted ordinary/review/reveal/aggregate row","stopped_lifecycle":["contiguous completed ordinary-stage prefix","triggering_partial_stage","stop_prefix_sealed","prefix_archive_copies_fsynced","rfc_stop_amendment_posted","stopped_receipt_sealed"],"stopped_seal":"stopped_receipt_sealed hashes an independent JCS seal-plan/component manifest excluding final receipt bytes and self-hash; the final receipt embeds lifecycle evidence and computes its self-hash afterward; neither subject contains the other"},"archive":{"ordering":"unsigned UTF-8 tuple (artifact_kind, semantic_id)","encoding":"canonical v2 private archive with no trailing bytes","copy_count":2,"write":"two absolute private paths, exclusive no-follow create, regular files only, mode 0600, never overwrite; fsync both files and both containing directories","reread":"reopen no-follow and independently reread both complete copies before any copy attestation","reject":["symlink","hardlink","nlink not 1","non-regular","same realpath","same dev and inode","stat drift","wrong mode","FIFO or device","malformed bytes","trailing bytes","index mismatch","byte or hash difference","unfsynced or unread copy"],"payload_cycle_rule":"private archive excludes the final public receipt; receipt records derived canonical private manifest/hash and copy attestations, then is atomically published and independently reread","archive_verifier":"sixth locked independent verifier receives both copies, reopens and validates them, reproduces canonical manifest/hash and copy-identity commitment, then posts a durable attestation binding candidate receipt SHA-256, both archive SHA-256 values, canonical manifest SHA-256, copy-identity-record SHA-256, and review timestamp","verifier_attestation":"external merge-gate object not embedded in the receipt it signs; any receipt-byte change requires a fresh reread and attestation"},"public_validation":{"successful_disposition":"commitment-only","private_copies_re_read":false,"claims":"public CI validates committed public receipt structure, self-hash, derivable public commitments, and schema only; it cannot claim private-byte reread or live-comment revalidation","full_validation":"exists only in receipt-building process plus independent archive verifier; missing private bytes cannot produce a final receipt","receipt_merge_gate":"external exact-head audit fetches the live verifier comment, authenticates author/body/timestamp/edit state, and proves it binds the unchanged receipt and both reread copies"},"activation":{"modified_paths":["docs/core-reset/removal-manifest.yml","docs/core-reset/scorecard.md","docs/roadmap.md","docs/designs/2026-07-19-core-reset.md","tests/unit/core-reset-governance.test.ts"],"added_assets":[{"path":"tools/eval/core-reset/contracts/capability-validation-v2.json","max_lines":1400,"max_utf8_bytes":196608},{"path":"tools/eval/core-reset/schemas/capability-validation-contract-v2.schema.json","max_lines":200,"max_utf8_bytes":262144},{"path":"tools/eval/core-reset/schemas/capability-validation-receipt-v2.schema.json","max_lines":1600,"max_utf8_bytes":1638400}],"asset_aggregate":{"max_lines":3200,"max_utf8_bytes":2097152},"governance_numstat":{"max_added_lines":650,"max_removed_lines":250},"total_numstat":{"max_added_lines":3850,"max_removed_lines":250},"exact_path_count":8,"forbidden":["production code","executable evaluator","CI","package","dependency","lockfile","tsconfig","generated output","historical evidence or asset","public behavior"]},"implementation":{"base":"new isolated worktree from exact v2 activation merge","module_root":"tools/eval/lib/capability-validation-v2/","module_line_caps":{"types.ts":440,"contract.ts":600,"schedule.ts":280,"environment.ts":500,"process-tree.ts":420,"workspace.ts":650,"mcp-client.ts":500,"provider.ts":760,"agent-worker.ts":560,"raw-tools.ts":480,"arms.ts":820,"runner.ts":520,"review.ts":620,"report.ts":700,"campaign-lock.ts":720,"campaign-store.ts":760,"credential-relay.ts":900,"macos-containment.ts":720,"campaign-executor.ts":1450,"evidence.ts":1050,"provider-evidence.ts":800,"lifecycle.ts":700,"archive-store.ts":850,"receipt-builder.ts":1200},"module_aggregate_max_lines":17000,"support_line_caps":{"tools/eval/core-reset/capability-validation-v2.mjs":240,"tools/eval/core-reset/capability-validation-v2-relay.mjs":120,"tools/eval/core-reset/native/capability-validation-v2-process-monitor.c":650,"tests/fixtures/capability-validation-v2/mock-runtime.mjs":500},"sandbox_profiles":["tools/eval/core-reset/sandbox/capability-validation-v2-setup.sb","tools/eval/core-reset/sandbox/capability-validation-v2-worker.sb","tools/eval/core-reset/sandbox/capability-validation-v2-mcp.sb","tools/eval/core-reset/sandbox/capability-validation-v2-relay.sb"],"sandbox_aggregate_max_lines":320,"support_aggregate_max_lines":1830,"test_paths":["tests/unit/capability-validation-v2-contract.test.ts","tests/unit/capability-validation-v2-schedule.test.ts","tests/unit/capability-validation-v2-environment-workspace.test.ts","tests/unit/capability-validation-v2-provider-agent.test.ts","tests/unit/capability-validation-v2-mcp-arms.test.ts","tests/unit/capability-validation-v2-runner.test.ts","tests/unit/capability-validation-v2-review-report.test.ts","tests/unit/capability-validation-v2-campaign-lock.test.ts","tests/unit/capability-validation-v2-campaign-store-relay.test.ts","tests/unit/capability-validation-v2-macos-containment.test.ts","tests/unit/capability-validation-v2-campaign-executor.test.ts","tests/unit/capability-validation-v2-evidence.test.ts","tests/unit/capability-validation-v2-provider-evidence.test.ts","tests/unit/capability-validation-v2-lifecycle.test.ts","tests/unit/capability-validation-v2-archive-receipt-e2e.test.ts"],"test_aggregate_max_lines":9400,"modified_paths":[".github/workflows/ci.yml","tests/unit/core-reset-baseline.test.ts","tests/unit/core-reset-governance.test.ts","tools/eval/core-reset/README.md","tools/eval/core-reset/isolation-support.mjs","tools/eval/core-reset/verify-isolation.mjs"],"modified_numstat":{"max_added_lines":900,"max_removed_lines":350},"exact_path_count":53,"global_numstat":{"max_added_lines":29130,"max_removed_lines":350},"combined_activation_implementation_numstat":{"max_added_lines":32980,"max_removed_lines":600},"measurement":"git diff --no-ext-diff --no-renames --numstat ...; gross physical UTF-8 text lines with no netting or exemption","forbidden":["any unlisted path","deletion or rename","generated commit","production file","package","dependency","lockfile","tsconfig","historical asset","evidence receipt","semantic change","compatibility alias"]},"ci":{"placement":"immediately after Build evaluation tooling","step_fields_only":["name","run"],"step_name":"Validate Capability Validation v2 offline self-test","run":"node tools/eval/core-reset/capability-validation-v2.mjs --self-test --validate-receipt-if-present","jobs":6,"forbidden_inputs":["credential","network","provider","GitHub","registry","comparator installation","target repository","paid call"],"stdout_receipt_absent":"{\"contract\":\"core-reset-capability-validation-v2\",\"mode\":\"self-test\",\"private_copies_re_read\":false,\"receipt\":\"absent\",\"status\":\"pass\"}","stdout_receipt_present":"{\"contract\":\"core-reset-capability-validation-v2\",\"mode\":\"self-test\",\"private_copies_re_read\":false,\"receipt\":\"commitment-only\",\"status\":\"pass\"}","output_rule":"exactly one RFC8785 JCS line and no other stdout or stderr; any other output or nonzero status fails","coverage":"complete synthetic 60+1+12 campaign, every stop finalizer, all mandatory adversarial mutations, and proof that real execution fails before credential access without the separate campaign authorization subject"},"adversarial_acceptance":["synthetic lock or missing proof bytes","edited or wrong-author comment","wrong Git object or changed source/profile/helper","second initialization, ledger reset, execution resume, replay, alternate transport, or caller-supplied provider field","fork, double-fork, reparent, process-group escape, RSS omission, network or credential access, sampling gap, or survivor","deleted, duplicated, reordered, fabricated, or mutated provider/tool event","forged length, URL, final URL, TLS hostname, headers, request ID, hash, deadline, reservation, usage, rate, cost, or disposition","omitted adverse, broad-search, or tool row; relabeling; missing continuation; non-bijection","stopping an in-bounds MCP isError payload instead of preserving and continuing","empty/substantive relabel, nonzero empty score, reviewer swap, duplicate role, forged or late attestation","future row after stop, skipped lifecycle stage, later first-stop ID, fabricated reveal, or missing RFC amendment","corrupt, linked, symlinked, FIFO, wrong-mode, unfsynced, unread, trailing, false-index archive or full-validation claim without bytes","hand-authored derived value, 59-trial pass, equality accepted below a strict ceiling, receipt overwrite, or private evidence accepted at public top level"],"review_and_merge":{"implementation_internal_order":["contract/store","authenticated lock","relay/provider","native containment","setup/arms","fixed coordinator","evidence/lifecycle/archive/receipt","offline integration and adversarial audit"],"activation_and_implementation_gates":["all six CI jobs green on exact unchanged head","independent exact-head review with no P0/P1 blocker or blocking unknown","zero unresolved review threads","CodeRabbit non-default-core-reset skip stated honestly and never counted as review","no head change from final approval/review/CI through merge"],"implementation_reviews":["security/containment/accounting","evidence/receipt/semantic derivation"],"activation_external_approval_audit":{"local_ci_limitation":"local CI proves neither remote-comment immutability nor repository-owner approval of an activation head or asset hash","timing":"run against the exact final activation head after local CI and review and immediately before merge, after refreshing the live protected-base ref and fetching the live proposal/comments; repeat from live state after any head, base, asset, comment, review, or CI-state change","expected_repository":{"full_name":"mohanagy/madar","repository_numeric_id":1207912024,"repository_node_id":"R_kgDOR_9GWA","owner_login":"mohanagy","owner_numeric_id":11216054,"owner_node_id":"MDQ6VXNlcjExMjE2MDU0"},"proposal_issue_612":{"expected_identity":{"issue_number":612,"issue_numeric_id":4980622532,"issue_node_id":"I_kwDOR_9GWM8AAAABKN5ExA","url":"https://github.com/mohanagy/madar/issues/612","title":"[Core Reset]: Make Capability Validation v2 execution mechanically complete"},"expected_author":{"login":"mohanagy","numeric_id":11216054,"node_id":"MDQ6VXNlcjExMjE2MDU0","author_association":"OWNER"},"expected_body":{"utf8_bytes":38009,"sha256":"4906405cbb806c850c0612305ef460e023e2060b5338734ae0af12303901cbd0"},"expected_creation_state":{"created_at":"2026-07-26T12:49:11Z","published_at":"2026-07-26T12:49:11Z","last_edited_at":null,"state":"OPEN"},"live_fetch":"immediately before activation merge fetch issue #612 through both GitHub REST and GraphQL; require exact repository, issue, URL, title, author, OWNER association, created/published state, open state, body UTF-8 bytes, and body SHA-256; require REST updated_at equals GraphQL updatedAt and record that live value, because comment activity may advance it but is not body-edit proof","body_binding":"recompute SHA-256 from the exact live body bytes and require both byte length and hash equal expected_body and governance.proposal_body_sha256; require GraphQL lastEditedAt remains null so an edit followed by restoration cannot pass as immutable","failure":"any identity, author, association, state, edit-state, byte-length, body-hash, REST/GraphQL update-state, or governance proposal-hash mismatch rejects activation merge and requires a fresh proposal snapshot plus renewed exact proposal and activation approval"},"known_live_receipts":[{"purpose":"issue_610_stop","issue":610,"comment_numeric_id":5083281270,"url":"https://github.com/mohanagy/madar/issues/610#issuecomment-5083281270","body_utf8_bytes":3658,"body_sha256":"115e88cc3e1e00066c92f6ce4b3dd9ed8e0f6eabc1f8dbad918d1125c5cdaef9","created_at":"2026-07-26T11:31:21Z","updated_at":"2026-07-26T11:31:21Z"},{"purpose":"rfc_577_stop","issue":577,"comment_numeric_id":5083282711,"url":"https://github.com/mohanagy/madar/issues/577#issuecomment-5083282711","body_utf8_bytes":2889,"body_sha256":"65ac67ca30f24eb2c9d2741ab12ee42d2f593915220ff1251adb8af97e717ed0","created_at":"2026-07-26T11:31:48Z","updated_at":"2026-07-26T11:31:48Z"},{"purpose":"issue_612_first_stage","issue":612,"comment_numeric_id":5083661878,"url":"https://github.com/mohanagy/madar/issues/612#issuecomment-5083661878","body_utf8_bytes":2492,"body_sha256":"5b91f7d217fbfc30b65691915f359791c542a232d6bf555eb12ab95bbb2da34d","created_at":"2026-07-26T13:24:44Z","updated_at":"2026-07-26T13:24:44Z"},{"purpose":"rfc_577_first_stage","issue":577,"comment_numeric_id":5083662827,"url":"https://github.com/mohanagy/madar/issues/577#issuecomment-5083662827","body_utf8_bytes":2406,"body_sha256":"8597ee92caf9f6306da63f62762a11d89b4b1128e4f7b9ed6fffe5aa117506e3","created_at":"2026-07-26T13:25:01Z","updated_at":"2026-07-26T13:25:01Z"}],"required_second_stage_receipts":[{"purpose":"issue_612_second_stage","issue":612,"selection":"exactly one live unedited OWNER receipt whose exact body binds the final activation head and all three local asset SHA-256 values and expresses the complete second-stage authorization"},{"purpose":"rfc_577_second_stage","issue":577,"selection":"exactly one live unedited OWNER receipt whose exact body binds the same final activation head and all three local asset SHA-256 values and expresses the matching complete second-stage authorization"}],"live_comment_verification":"fetch all six comments from GitHub; verify repository full name, repository numeric and node identity, issue number, comment numeric ID, canonical URL, owner login/numeric/node identity, author_association OWNER, exact body UTF-8 bytes and SHA-256, created_at, updated_at, includesCreatedEdit false, and no minimized, deleted, transferred, edited, or mismatched state","stop_hash_recomputation":"recompute both live stop-comment body SHA-256 values from exact fetched body bytes and require equality with inheritance.source_stop_receipts and the known_live_receipts rows","first_stage_gate":"both live first-stage receipts must retain their exact recorded bytes/hashes and authorize only activation-candidate preparation, publication, CI, and review","second_stage_subject_fields_only":["activation_head_commit","v2_contract_sha256","v2_contract_schema_sha256","v2_receipt_schema_sha256"],"local_asset_paths":["tools/eval/core-reset/contracts/capability-validation-v2.json","tools/eval/core-reset/schemas/capability-validation-contract-v2.schema.json","tools/eval/core-reset/schemas/capability-validation-receipt-v2.schema.json"],"second_stage_binding":"parse the two exact live second-stage receipt bodies without caller-supplied values; require identical four-field subjects, complete second-stage approval scope, and values exactly equal to the unchanged checked-out activation head and freshly SHA-256-hashed local asset bytes","protected_base_tip_gate":{"remote_ref":"refs/remotes/origin/core-reset","upstream_ref":"refs/heads/core-reset","expected_commit":"dcb52596a3efa89f9ef5d372231ce97a91ae5f9f","expected_tree":"d0ca317290dbd6837295f36f36ded5b49855c0fe","live_verification":"immediately before merge fetch origin refs/heads/core-reset into refs/remotes/origin/core-reset without merging; require git ls-remote origin refs/heads/core-reset, the refreshed remote-tracking ref, and git rev-parse refs/remotes/origin/core-reset all equal expected_commit, then require git rev-parse refs/remotes/origin/core-reset^{tree} equals expected_tree","drift":"any live branch-tip or tree mismatch rejects activation merge and requires a fresh proposal snapshot plus renewed exact proposal and activation approvals; silent rebase, update-branch, retargeting, merge-base substitution, or approval carry-forward is forbidden"},"unchanged_head_gate":"the audited activation head equals the PR head reviewed, approved, and used by all six green CI jobs and remains byte-for-byte unchanged through protected core-reset merge","failure":"any missing, ambiguous, extra matching, edited, identity-mismatched, URL/timestamp/body/hash-mismatched, scope-incomplete, protected-base-tip/tree-drifted, head-changed, or asset-changed fact rejects activation merge; base drift requires a fresh proposal snapshot plus renewed proposal and activation approvals, while any other approved-subject change requires fresh exact owner approval receipts for the new unchanged head and all three new asset hashes"},"target_branch":"core-reset","forbidden_target":"main","campaign_execution_authorized":false},"closure":{"after":"exact offline implementation merge only","modified_paths":["docs/core-reset/removal-manifest.yml","docs/core-reset/scorecard.md","docs/roadmap.md","docs/designs/2026-07-19-core-reset.md","tests/unit/core-reset-governance.test.ts"],"numstat":{"max_added_lines":400,"max_removed_lines":200},"records_only":["v2 offline execution boundary passed","exact implementation merge and tree","review and CI receipts","#610 unchanged stopped disposition","unresolved provider-account observer","zero provider requests and spend","no active campaign"],"forbidden":["evaluator","schema","contract","CI","production","package","dependency","receipt","evidence","historical asset"],"full_activation_implementation_closure_numstat":{"max_added_lines":33380,"max_removed_lines":800},"merge_gates":"same exact-head six-job CI, independent no-blocker governance review, honest CodeRabbit skip, zero threads, protected core-reset only"},"stop_conditions":["anchor, v1 asset, stop receipt, inherited value, or equality proof drifts","provider request, campaign lock, target-repository execution, or paid spend becomes necessary","provider, comparator, model, matrix, repository, prompt, temperature, schedule, token, tool, time, USD, grading, blinding, or aggregation changes","any path or line/byte ceiling must widen","production, package, dependency, lockfile, tsconfig, public, graph/index/query, CLI, MCP, token, timeout, or npm-artifact semantics change","CI requires more than the exact offline step","compatibility alias, v1 implementation continuation, alternate executor or transport, retry, resume, replacement, fallback, or caveat is required","coordinator, relay, native monitor, sandbox, ledger, journal, evidence derivation, stopped finalizer, receipt builder, or archive lifecycle remains asserted, abstract, incomplete, or unknown","exact-host monitor cannot compile or sustain observed intervals at or below 10 ms","worker or child can read credential, inherit relay descriptors, reach provider/sentinel, escape containment, or survive termination","public validation is represented as private-byte or live-comment revalidation","exact-head CI, review, or thread gate fails","publication, npm, GitHub Release, Registry metadata, tag, main, external validation, or later phase is targeted"],"stop_action":"stop immediately, preserve exact evidence and known charges, post the durable stop record on #612, amend RFC #577, never amend the immutable #612 proposal body, and do not reinterpret favorably, widen, reduce matrix, add compatibility, work around technically, or retry a provider request"}}, + "stop_policy": {"const":{"on_any_stop_condition":"record charge and immutable evidence when applicable, assign scheduled trial zero when applicable, stop, and amend RFC #577","classification":"record every condition ID whose trigger is true at the first stopping observation; first_stop_condition_id is the lowest numeric matching ID, simultaneous overlaps are not discarded, and no later observation may replace or reprioritize that set","conditions":[{"id":1,"group":"frozen-bindings","trigger":"protected base, src, package, lock, frozen v2, schema, validator, repository, fixture, prompt, expected evidence, grading, threshold, temperature, schedule, tool-call, timeout, or cost binding drifts"},{"id":2,"group":"production-semantics","trigger":"any production source, public behavior, dependency, package content, build config, graph/index/query semantic, token budget, or timeout must change"},{"id":3,"group":"ci","trigger":"any CI workflow change beyond the one approval-bound offline self-test is required"},{"id":4,"group":"compatibility","trigger":"any compatibility alias, wrapper, fallback, duplicate implementation, graph override, restored --no-html, or hidden configuration is required"},{"id":5,"group":"madar-default-mcp","trigger":"the exact default Madar MCP cannot use the retained accepted bundle without drift or rebuild"},{"id":6,"group":"graphify","trigger":"Graphify identity/environment/argv, ten-tool/six-resource surface, directed-runtime coercion, code-only precondition, zero build-provider tokens, query-log denial, or network isolation differs"},{"id":7,"group":"provider","trigger":"provider rejects a frozen temperature; model, request-template, thinking, service-tier, geography, rate, usage-category, cache, stop/content/usage-shape, or billing behavior drifts; or audited narrow relay and credential isolation cannot be proved"},{"id":8,"group":"host-containment","trigger":"host/binary/sandbox binding changes or cannot prove full child-process containment/RSS"},{"id":9,"group":"hashes","trigger":"a repository, owner, patch, or result hash differs"},{"id":10,"group":"leakage","trigger":"a generated path, hidden fixture, prior answer, arm identity, or rubric leaks before its permitted stage"},{"id":11,"group":"human-review","trigger":"reviewer independence, two sealed scores, required adjudication, or pre-reveal hashes are missing"},{"id":12,"group":"post-reveal-integrity","trigger":"any scheduled trial is retried, replaced, dropped, or regraded after reveal"},{"id":13,"group":"ceilings-and-unknowns","trigger":"any token or USD ceiling is reached or any blocking value is unknown"},{"id":14,"group":"forbidden-publication-target","trigger":"publication, release, Registry metadata, a tag, main, or external-validation work becomes necessary"}],"rerun":"forbidden","budget_increase":"forbidden","matrix_reduction":"forbidden","model_or_comparator_change":"forbidden","production_or_package_change":"forbidden","publication":"forbidden"}} + } +} diff --git a/tools/eval/core-reset/schemas/capability-validation-receipt-v2.schema.json b/tools/eval/core-reset/schemas/capability-validation-receipt-v2.schema.json new file mode 100644 index 00000000..716db312 --- /dev/null +++ b/tools/eval/core-reset/schemas/capability-validation-receipt-v2.schema.json @@ -0,0 +1,1044 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://github.com/mohanagy/madar/tools/eval/core-reset/schemas/capability-validation-receipt-v2.schema.json", + "title": "Madar Core Reset capability-validation v2 public receipt and local private evidence fragments", + "description": "The top level validates only the closed committed public v2 receipt. Private evidence is validated only by explicitly selecting a local fragment under $defs.privateEvidenceEnvelope; no private artifact is valid at the public top level.", + "type": "object", + "additionalProperties": false, + "required": [ + "schema_version", + "receipt_id", + "contract_id", + "status", + "generated_at", + "contract", + "candidate", + "campaign_lock", + "archive", + "comparison_blocks", + "diagnostic", + "refresh_blocks", + "provider_ledger", + "human_review", + "aggregates", + "eligibility", + "receipt_sha256", + "stop_conditions", + "first_stop_condition_id", + "rfc_amendment_url", + "validator_assertions", + "lifecycle_evidence" + ], + "properties": { + "schema_version": {"const": 2}, + "receipt_id": {"const": "core-reset-capability-validation-v2"}, + "contract_id": {"const": "core-reset-capability-validation-v2"}, + "status": {"enum": ["pass", "failed", "stopped"]}, + "generated_at": {"$ref": "#/$defs/timestamp"}, + "contract": {"$ref": "#/$defs/publicContractBinding"}, + "candidate": {"$ref": "#/$defs/publicCandidateBinding"}, + "campaign_lock": {"$ref": "#/$defs/publicCampaignLock"}, + "archive": {"$ref": "#/$defs/publicArchiveCommitment"}, + "comparison_blocks": {"type": "array", "maxItems": 4, "items": {"$ref": "#/$defs/publicValueCommitment"}}, + "diagnostic": {"oneOf": [{"$ref": "#/$defs/publicValueCommitment"}, {"type": "null"}]}, + "refresh_blocks": {"type": "array", "maxItems": 4, "items": {"$ref": "#/$defs/publicValueCommitment"}}, + "provider_ledger": {"$ref": "#/$defs/publicProviderLedger"}, + "human_review": {"$ref": "#/$defs/publicHumanReviewCommitment"}, + "aggregates": {"oneOf": [{"$ref": "#/$defs/publicAggregatesCommitment"}, {"type": "null"}]}, + "eligibility": {"$ref": "#/$defs/publicEligibility"}, + "receipt_sha256": {"$ref": "#/$defs/sha256"}, + "stop_conditions": {"type": "array", "minItems": 14, "maxItems": 14, "prefixItems": [ + {"allOf": [{"$ref": "#/$defs/publicStopCondition"}, {"type": "object", "properties": {"id": {"const": 1}}}]}, + {"allOf": [{"$ref": "#/$defs/publicStopCondition"}, {"type": "object", "properties": {"id": {"const": 2}}}]}, + {"allOf": [{"$ref": "#/$defs/publicStopCondition"}, {"type": "object", "properties": {"id": {"const": 3}}}]}, + {"allOf": [{"$ref": "#/$defs/publicStopCondition"}, {"type": "object", "properties": {"id": {"const": 4}}}]}, + {"allOf": [{"$ref": "#/$defs/publicStopCondition"}, {"type": "object", "properties": {"id": {"const": 5}}}]}, + {"allOf": [{"$ref": "#/$defs/publicStopCondition"}, {"type": "object", "properties": {"id": {"const": 6}}}]}, + {"allOf": [{"$ref": "#/$defs/publicStopCondition"}, {"type": "object", "properties": {"id": {"const": 7}}}]}, + {"allOf": [{"$ref": "#/$defs/publicStopCondition"}, {"type": "object", "properties": {"id": {"const": 8}}}]}, + {"allOf": [{"$ref": "#/$defs/publicStopCondition"}, {"type": "object", "properties": {"id": {"const": 9}}}]}, + {"allOf": [{"$ref": "#/$defs/publicStopCondition"}, {"type": "object", "properties": {"id": {"const": 10}}}]}, + {"allOf": [{"$ref": "#/$defs/publicStopCondition"}, {"type": "object", "properties": {"id": {"const": 11}}}]}, + {"allOf": [{"$ref": "#/$defs/publicStopCondition"}, {"type": "object", "properties": {"id": {"const": 12}}}]}, + {"allOf": [{"$ref": "#/$defs/publicStopCondition"}, {"type": "object", "properties": {"id": {"const": 13}}}]}, + {"allOf": [{"$ref": "#/$defs/publicStopCondition"}, {"type": "object", "properties": {"id": {"const": 14}}}]} + ], "items": false}, + "first_stop_condition_id": {"type": ["integer", "null"], "minimum": 1, "maximum": 14}, + "rfc_amendment_url": {"oneOf": [{"$ref": "#/$defs/rfc577CommentUrl"}, {"type": "null"}]}, + "validator_assertions": {"$ref": "#/$defs/publicValidatorAssertions"}, + "lifecycle_evidence": {"$ref": "#/$defs/publicLifecycleEvidence"} + }, + "allOf": [ + { + "if": {"type": "object", "properties": {"status": {"const": "pass"}}, "required": ["status"]}, + "then": { + "type": "object", + "properties": { + "campaign_lock": {"allOf": [{"$ref": "#/$defs/publicCampaignLock"}, {"type": "object", "properties": {"status": {"const": "complete"}}}]}, + "comparison_blocks": {"type": "array", "minItems": 4, "maxItems": 4}, + "diagnostic": {"$ref": "#/$defs/publicValueCommitment"}, + "refresh_blocks": {"type": "array", "minItems": 4, "maxItems": 4}, + "aggregates": {"$ref": "#/$defs/publicAggregatesCommitment"}, + "eligibility": {"allOf": [{"$ref": "#/$defs/publicEligibility"}, {"type": "object", "properties": {"outcome": {"const": "eligible"}, "passes": {"const": true}, "stop_condition_triggered": {"const": false}, "stop_condition_id": {"type": "null"}}}]}, + "stop_conditions": {"type": "array", "items": {"allOf": [{"$ref": "#/$defs/publicStopCondition"}, {"type": "object", "properties": {"status": {"const": "not_triggered"}, "matched": {"const": false}}}]}}, + "first_stop_condition_id": {"type": "null"}, + "rfc_amendment_url": {"type": "null"}, + "lifecycle_evidence": {"$ref": "#/$defs/publicCompletedLifecycleEvidence"} + } + } + }, + { + "if": {"type": "object", "properties": {"status": {"const": "failed"}}, "required": ["status"]}, + "then": { + "type": "object", + "properties": { + "campaign_lock": {"allOf": [{"$ref": "#/$defs/publicCampaignLock"}, {"type": "object", "properties": {"status": {"const": "complete"}}}]}, + "comparison_blocks": {"type": "array", "minItems": 4, "maxItems": 4}, + "diagnostic": {"$ref": "#/$defs/publicValueCommitment"}, + "refresh_blocks": {"type": "array", "minItems": 4, "maxItems": 4}, + "aggregates": {"$ref": "#/$defs/publicAggregatesCommitment"}, + "eligibility": {"allOf": [{"$ref": "#/$defs/publicEligibility"}, {"type": "object", "properties": {"outcome": {"const": "not_eligible"}, "passes": {"const": false}, "stop_condition_triggered": {"const": false}, "stop_condition_id": {"type": "null"}}}]}, + "stop_conditions": {"type": "array", "items": {"allOf": [{"$ref": "#/$defs/publicStopCondition"}, {"type": "object", "properties": {"status": {"const": "not_triggered"}, "matched": {"const": false}}}]}}, + "first_stop_condition_id": {"type": "null"}, + "rfc_amendment_url": {"$ref": "#/$defs/rfc577CommentUrl"}, + "lifecycle_evidence": {"$ref": "#/$defs/publicCompletedLifecycleEvidence"} + } + } + }, + { + "if": {"type": "object", "properties": {"status": {"const": "stopped"}}, "required": ["status"]}, + "then": { + "type": "object", + "properties": { + "eligibility": {"allOf": [{"$ref": "#/$defs/publicEligibility"}, {"type": "object", "properties": {"outcome": {"const": "stopped"}, "passes": {"const": false}, "stop_condition_triggered": {"const": true}, "stop_condition_id": {"type": "integer"}}}]}, + "first_stop_condition_id": {"type": "integer", "minimum": 1, "maximum": 14}, + "rfc_amendment_url": {"$ref": "#/$defs/rfc577CommentUrl"}, + "stop_conditions": {"type": "array", "contains": {"allOf": [{"$ref": "#/$defs/publicStopCondition"}, {"type": "object", "properties": {"status": {"const": "triggered"}, "matched": {"const": true}}}]}, "minContains": 1}, + "lifecycle_evidence": {"$ref": "#/$defs/publicStoppedLifecycleEvidence"} + } + } + } + ], + "$defs": { + "sha": {"type": "string", "pattern": "^[0-9a-f]{40}$"}, + "sha256": {"type": "string", "pattern": "^[0-9a-f]{64}$"}, + "nullableSha256": {"oneOf": [{"$ref": "#/$defs/sha256"}, {"type": "null"}]}, + "timestamp": {"type": "string", "format": "date-time"}, + "bigint": {"type": "string", "pattern": "^(0|[1-9][0-9]*)$"}, + "nonEmptyString": {"type": "string", "minLength": 1}, + "base64": {"type": "string", "pattern": "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$"}, + "absolutePath": {"type": "string", "pattern": "^/[^\\u0000]+$"}, + "githubLogin": {"type": "string", "pattern": "^[A-Za-z0-9](?:[A-Za-z0-9-]{0,37}[A-Za-z0-9])?$"}, + "rfc577CommentUrl": {"type": "string", "format": "uri", "pattern": "^https://github\\.com/mohanagy/madar/issues/577#issuecomment-[0-9]+$"}, + "issue612CommentUrl": {"type": "string", "format": "uri", "pattern": "^https://github\\.com/mohanagy/madar/issues/612#issuecomment-[0-9]+$"}, + "githubCommentUrl": {"type": "string", "format": "uri", "pattern": "^https://github\\.com/mohanagy/madar/issues/[0-9]+#issuecomment-[0-9]+$"}, + + "capturedBytes": { + "type": "object", + "additionalProperties": false, + "required": ["utf8_or_binary_base64", "bytes", "sha256"], + "properties": { + "utf8_or_binary_base64": {"$ref": "#/$defs/base64"}, + "bytes": {"type": "integer", "minimum": 0}, + "sha256": {"$ref": "#/$defs/sha256"} + } + }, + "publicValueCommitment": { + "type": "object", + "additionalProperties": false, + "required": ["semantic_id", "value_jcs_utf8_base64", "value_bytes", "value_sha256", "private_source_manifest_sha256"], + "properties": { + "semantic_id": {"$ref": "#/$defs/nonEmptyString"}, + "value_jcs_utf8_base64": {"$ref": "#/$defs/base64"}, + "value_bytes": {"type": "integer", "minimum": 0}, + "value_sha256": {"$ref": "#/$defs/sha256"}, + "private_source_manifest_sha256": {"$ref": "#/$defs/sha256"} + } + }, + "v1SemanticsBinding": { + "type": "object", + "additionalProperties": false, + "required": ["contract_path", "contract_sha256", "contract_schema_path", "contract_schema_sha256", "receipt_schema_path", "receipt_schema_sha256", "receipt_root_pointer", "receipt_required_pointers", "allowed_difference_pointers", "recursive_equality_manifest_sha256", "v1_public_projection_sha256"], + "properties": { + "contract_path": {"const": "tools/eval/core-reset/contracts/capability-validation-v1.json"}, + "contract_sha256": {"const": "ae03a6b2cc8675ca66ad0ff67f06e13389cf04e6a6a8167c3404f1c8657f36f5"}, + "contract_schema_path": {"const": "tools/eval/core-reset/schemas/capability-validation-contract.schema.json"}, + "contract_schema_sha256": {"const": "6d8679e335730180bee0c9fc62f144ae2086ea16dade800887a0301da27f23b6"}, + "receipt_schema_path": {"const": "tools/eval/core-reset/schemas/capability-validation-receipt.schema.json"}, + "receipt_schema_sha256": {"const": "a33a6b3532a3e0df62bcd0f3616a9585b2be4ede1f360cf3d55f70c99c29f30e"}, + "receipt_root_pointer": {"const": "#"}, + "receipt_required_pointers": {"const": ["/schema_version", "/receipt_id", "/contract_id", "/status", "/generated_at", "/contract", "/candidate", "/campaign_lock", "/archive", "/comparison_blocks", "/diagnostic", "/refresh_blocks", "/provider_ledger", "/human_review", "/aggregates", "/eligibility", "/receipt_sha256", "/stop_conditions", "/first_stop_condition_id", "/rfc_amendment_url", "/validator_assertions", "/lifecycle_evidence"]}, + "allowed_difference_pointers": {"const": ["/schema_version", "/contract_id", "/status", "/governance", "/anchors/protected_base_commit", "/anchors/base_tree", "/anchors/tools_eval_tree", "/inheritance", "/receipt/path", "/receipt/schema_path", "/receipt/canonical_transcript", "/receipt/canonical_archive", "/execution_boundary"]}, + "recursive_equality_manifest_sha256": {"$ref": "#/$defs/sha256"}, + "v1_public_projection_sha256": {"$ref": "#/$defs/sha256"} + } + }, + "v2AssetBinding": { + "type": "object", + "additionalProperties": false, + "required": ["proposal_issue", "proposal_body_sha256", "contract_path", "contract_sha256", "contract_schema_path", "contract_schema_sha256", "receipt_schema_path", "receipt_schema_sha256", "first_owner_approval_issue", "first_owner_approval_issue_body_sha256", "first_owner_approval_rfc", "first_owner_approval_rfc_body_sha256", "second_owner_approval_issue", "second_owner_approval_issue_body_sha256", "second_owner_approval_rfc", "second_owner_approval_rfc_body_sha256", "activation_head", "activation_merge_commit", "activation_tree", "implementation_merge_commit", "implementation_tree"], + "properties": { + "proposal_issue": {"const": "https://github.com/mohanagy/madar/issues/612"}, + "proposal_body_sha256": {"const": "4906405cbb806c850c0612305ef460e023e2060b5338734ae0af12303901cbd0"}, + "contract_path": {"const": "tools/eval/core-reset/contracts/capability-validation-v2.json"}, + "contract_sha256": {"$ref": "#/$defs/sha256"}, + "contract_schema_path": {"const": "tools/eval/core-reset/schemas/capability-validation-contract-v2.schema.json"}, + "contract_schema_sha256": {"$ref": "#/$defs/sha256"}, + "receipt_schema_path": {"const": "tools/eval/core-reset/schemas/capability-validation-receipt-v2.schema.json"}, + "receipt_schema_sha256": {"$ref": "#/$defs/sha256"}, + "first_owner_approval_issue": {"$ref": "#/$defs/issue612CommentUrl"}, + "first_owner_approval_issue_body_sha256": {"$ref": "#/$defs/sha256"}, + "first_owner_approval_rfc": {"$ref": "#/$defs/rfc577CommentUrl"}, + "first_owner_approval_rfc_body_sha256": {"$ref": "#/$defs/sha256"}, + "second_owner_approval_issue": {"$ref": "#/$defs/issue612CommentUrl"}, + "second_owner_approval_issue_body_sha256": {"$ref": "#/$defs/sha256"}, + "second_owner_approval_rfc": {"$ref": "#/$defs/rfc577CommentUrl"}, + "second_owner_approval_rfc_body_sha256": {"$ref": "#/$defs/sha256"}, + "activation_head": {"$ref": "#/$defs/sha"}, + "activation_merge_commit": {"$ref": "#/$defs/sha"}, + "activation_tree": {"$ref": "#/$defs/sha"}, + "implementation_merge_commit": {"$ref": "#/$defs/sha"}, + "implementation_tree": {"$ref": "#/$defs/sha"} + } + }, + "publicContractBinding": { + "type": "object", + "additionalProperties": false, + "required": ["v1_semantics_binding", "v2_assets", "receipt_derivation_subject_sha256"], + "properties": { + "v1_semantics_binding": {"$ref": "#/$defs/v1SemanticsBinding"}, + "v2_assets": {"$ref": "#/$defs/v2AssetBinding"}, + "receipt_derivation_subject_sha256": {"$ref": "#/$defs/sha256"} + } + }, + "publicCandidateBinding": { + "type": "object", + "additionalProperties": false, + "required": ["implementation_merge_commit", "implementation_tree", "src_tree", "package_json_sha256", "package_lock_sha256", "tarball_sha256", "tarball_sha1", "package_file_count", "packed_bytes", "unpacked_bytes", "production_ts_files", "production_loc"], + "properties": { + "implementation_merge_commit": {"$ref": "#/$defs/sha"}, + "implementation_tree": {"$ref": "#/$defs/sha"}, + "src_tree": {"const": "1a37e3a58ee7b2a75ca034112506590f699b3918"}, + "package_json_sha256": {"const": "d464fd8e59b3d4d3f817ebdd6457fb3cfb02d9f3fad4fc8648f29c03a8a56b33"}, + "package_lock_sha256": {"const": "b9d179f0ee70e14d85653c5013cf2513efb22127b10fc3ee1deb5fa698993a61"}, + "tarball_sha256": {"$ref": "#/$defs/sha256"}, + "tarball_sha1": {"const": "6eee13af22e8c76113fe578e44d76a9e6d6fd899"}, + "package_file_count": {"const": 102}, + "packed_bytes": {"const": 159759}, + "unpacked_bytes": {"const": 637602}, + "production_ts_files": {"const": 43}, + "production_loc": {"const": 11956} + } + }, + "publicCampaignLock": { + "type": "object", + "additionalProperties": false, + "required": ["status", "campaign_id", "authorization_subject_sha256", "observed_proof_manifest_sha256", "role_acceptance_manifest_sha256", "lock_jcs_sha256", "provider_account_observation_sha256", "execution_started_seal_sha256", "created_at"], + "properties": { + "status": {"enum": ["complete", "incomplete"]}, + "campaign_id": {"type": "string", "pattern": "^capability-validation-v2-[0-9]{8}T[0-9]{6}Z$"}, + "authorization_subject_sha256": {"$ref": "#/$defs/sha256"}, + "observed_proof_manifest_sha256": {"$ref": "#/$defs/sha256"}, + "role_acceptance_manifest_sha256": {"$ref": "#/$defs/sha256"}, + "lock_jcs_sha256": {"$ref": "#/$defs/nullableSha256"}, + "provider_account_observation_sha256": {"$ref": "#/$defs/nullableSha256"}, + "execution_started_seal_sha256": {"$ref": "#/$defs/nullableSha256"}, + "created_at": {"oneOf": [{"$ref": "#/$defs/timestamp"}, {"type": "null"}]} + }, + "allOf": [ + {"if": {"type": "object", "properties": {"status": {"const": "complete"}}, "required": ["status"]}, "then": {"type": "object", "properties": {"lock_jcs_sha256": {"$ref": "#/$defs/sha256"}, "provider_account_observation_sha256": {"$ref": "#/$defs/sha256"}, "execution_started_seal_sha256": {"$ref": "#/$defs/sha256"}, "created_at": {"$ref": "#/$defs/timestamp"}}}}, + {"if": {"type": "object", "properties": {"status": {"const": "incomplete"}}, "required": ["status"]}, "then": {"type": "object", "properties": {"lock_jcs_sha256": {"type": "null"}, "execution_started_seal_sha256": {"type": "null"}}}} + ] + }, + "publicArchiveCopyCommitment": { + "type": "object", + "additionalProperties": false, + "required": ["copy", "archive_sha256", "archive_bytes", "copy_identity_sha256", "file_fsync_observation_sha256", "directory_fsync_observation_sha256", "independent_reread_sha256"], + "properties": { + "copy": {"enum": ["primary", "secondary"]}, + "archive_sha256": {"$ref": "#/$defs/sha256"}, + "archive_bytes": {"type": "integer", "minimum": 1}, + "copy_identity_sha256": {"$ref": "#/$defs/sha256"}, + "file_fsync_observation_sha256": {"$ref": "#/$defs/sha256"}, + "directory_fsync_observation_sha256": {"$ref": "#/$defs/sha256"}, + "independent_reread_sha256": {"$ref": "#/$defs/sha256"} + } + }, + "publicArchiveManifestRow": { + "type": "object", + "additionalProperties": false, + "required": ["ordinal", "path", "bytes", "sha256"], + "properties": { + "ordinal": {"type": "integer", "minimum": 1}, + "path": {"type": "string", "pattern": "^p/[0-9]{8}\\.bin$"}, + "bytes": {"type": "integer", "minimum": 0}, + "sha256": {"$ref": "#/$defs/sha256"} + } + }, + "publicArchiveManifest": { + "type": "object", + "additionalProperties": false, + "required": ["schema_version", "campaign_id", "files"], + "properties": { + "schema_version": {"const": "madar-capability-archive-v2"}, + "campaign_id": {"$ref": "#/$defs/nonEmptyString"}, + "files": {"type": "array", "minItems": 1, "items": {"$ref": "#/$defs/publicArchiveManifestRow"}} + } + }, + "publicArchiveCommitment": { + "type": "object", + "additionalProperties": false, + "required": ["schema_version", "private_index_schema_version", "magic_utf8", "encoding", "path_policy", "ordering", "entry_count", "manifest", "manifest_jcs_sha256", "archive_sha256", "archive_bytes", "copies", "copy_identity_record_sha256", "private_copies_re_read_at_build", "public_validation_disposition", "external_archive_verifier_required"], + "properties": { + "schema_version": {"const": "madar-capability-archive-v2"}, + "private_index_schema_version": {"const": "madar-capability-private-index-v2"}, + "magic_utf8": {"const": "MADAR-CAPABILITY-ARCHIVE-V2\n"}, + "encoding": {"const": "magic-u64be-manifest-u64be-content-no-trailing-bytes"}, + "path_policy": {"const": "p/NNNNNNNN.bin"}, + "ordering": {"const": "unsigned-utf8-artifact_kind-then-semantic_id"}, + "entry_count": {"type": "integer", "minimum": 1}, + "manifest": {"$ref": "#/$defs/publicArchiveManifest"}, + "manifest_jcs_sha256": {"$ref": "#/$defs/sha256"}, + "archive_sha256": {"$ref": "#/$defs/sha256"}, + "archive_bytes": {"type": "integer", "minimum": 1}, + "copies": {"type": "array", "minItems": 2, "maxItems": 2, "prefixItems": [ + {"allOf": [{"$ref": "#/$defs/publicArchiveCopyCommitment"}, {"type": "object", "properties": {"copy": {"const": "primary"}}}]}, + {"allOf": [{"$ref": "#/$defs/publicArchiveCopyCommitment"}, {"type": "object", "properties": {"copy": {"const": "secondary"}}}]} + ], "items": false}, + "copy_identity_record_sha256": {"$ref": "#/$defs/sha256"}, + "private_copies_re_read_at_build": {"const": true}, + "public_validation_disposition": {"const": "commitment-only"}, + "external_archive_verifier_required": {"const": true} + } + }, + "publicProviderLedger": { + "type": "object", + "additionalProperties": false, + "required": ["journal_manifest_sha256", "ledger_manifest_sha256", "last_global_sequence", "input_tokens", "output_tokens", "actual_micro_usd", "retained_micro_usd", "reserved_micro_usd", "outstanding_micro_usd", "provider_event_count", "create_reservation_count", "unknown_cost_count", "runner_ceiling_micro_usd", "provider_cap_micro_usd", "strict_ceiling_disposition"], + "properties": { + "journal_manifest_sha256": {"$ref": "#/$defs/sha256"}, + "ledger_manifest_sha256": {"$ref": "#/$defs/sha256"}, + "last_global_sequence": {"type": "integer", "minimum": 0}, + "input_tokens": {"type": "integer", "minimum": 0}, + "output_tokens": {"type": "integer", "minimum": 0}, + "actual_micro_usd": {"type": "integer", "minimum": 0}, + "retained_micro_usd": {"type": "integer", "minimum": 0}, + "reserved_micro_usd": {"type": "integer", "minimum": 0}, + "outstanding_micro_usd": {"type": "integer", "minimum": 0}, + "provider_event_count": {"type": "integer", "minimum": 0}, + "create_reservation_count": {"type": "integer", "minimum": 0}, + "unknown_cost_count": {"type": "integer", "minimum": 0}, + "runner_ceiling_micro_usd": {"const": 90000000}, + "provider_cap_micro_usd": {"const": 100000000}, + "strict_ceiling_disposition": {"enum": ["below", "reached_or_exceeded", "unknown"]} + } + }, + "publicHumanReviewCommitment": { + "type": "object", + "additionalProperties": false, + "required": ["stage", "dossier_manifest_sha256", "blind_bundle_manifest_sha256", "review_manifest_sha256", "adjudication_manifest_sha256", "reveal_mapping_manifest_sha256", "role_join_manifest_sha256"], + "properties": { + "stage": {"enum": ["not_started", "dossiers_sealed", "bundles_sealed", "reviews_sealed", "adjudications_sealed", "revealed", "stopped"]}, + "dossier_manifest_sha256": {"$ref": "#/$defs/nullableSha256"}, + "blind_bundle_manifest_sha256": {"$ref": "#/$defs/nullableSha256"}, + "review_manifest_sha256": {"$ref": "#/$defs/nullableSha256"}, + "adjudication_manifest_sha256": {"$ref": "#/$defs/nullableSha256"}, + "reveal_mapping_manifest_sha256": {"$ref": "#/$defs/nullableSha256"}, + "role_join_manifest_sha256": {"$ref": "#/$defs/nullableSha256"} + } + }, + "publicAggregatesCommitment": { + "type": "object", + "additionalProperties": false, + "required": ["cells_count", "madar_comparisons_count", "refresh_medians_count", "clean_build_medians_count", "break_even_count", "values_jcs_sha256", "source_join_manifest_sha256"], + "properties": { + "cells_count": {"const": 20}, + "madar_comparisons_count": {"const": 8}, + "refresh_medians_count": {"const": 4}, + "clean_build_medians_count": {"const": 4}, + "break_even_count": {"const": 24}, + "values_jcs_sha256": {"$ref": "#/$defs/sha256"}, + "source_join_manifest_sha256": {"$ref": "#/$defs/sha256"} + } + }, + "publicEligibility": { + "type": "object", + "additionalProperties": false, + "required": ["outcome", "passes", "reasons", "blocking_unknowns", "stop_condition_triggered", "stop_condition_id", "derivation_manifest_sha256"], + "properties": { + "outcome": {"enum": ["eligible", "not_eligible", "stopped"]}, + "passes": {"type": "boolean"}, + "reasons": {"type": "array", "items": {"$ref": "#/$defs/nonEmptyString"}}, + "blocking_unknowns": {"type": "array", "items": {"$ref": "#/$defs/nonEmptyString"}}, + "stop_condition_triggered": {"type": "boolean"}, + "stop_condition_id": {"type": ["integer", "null"], "minimum": 1, "maximum": 14}, + "derivation_manifest_sha256": {"$ref": "#/$defs/sha256"} + } + }, + "publicStopCondition": { + "type": "object", + "additionalProperties": false, + "required": ["id", "status", "matched", "observation_sha256", "evaluation_sha256", "stage"], + "properties": { + "id": {"type": "integer", "minimum": 1, "maximum": 14}, + "status": {"enum": ["not_triggered", "triggered"]}, + "matched": {"type": "boolean"}, + "observation_sha256": {"$ref": "#/$defs/sha256"}, + "evaluation_sha256": {"$ref": "#/$defs/sha256"}, + "stage": {"enum": ["setup", "campaign_lock", "preflight", "clean_build", "schedule", "provider_count", "provider_create", "tool_loop", "refresh", "human_review", "reveal", "aggregation", "receipt"]} + } + }, + "derivationRow": { + "type": "object", + "additionalProperties": false, + "required": ["subject", "input_manifest_sha256", "output_sha256"], + "properties": { + "subject": {"enum": ["v1_public_projection", "provider_cost", "ledger", "tool_bijection", "answer_kind", "machine_grade", "review_join", "aggregates", "eligibility", "stop", "lifecycle", "archive", "receipt"]}, + "input_manifest_sha256": {"$ref": "#/$defs/sha256"}, + "output_sha256": {"$ref": "#/$defs/sha256"} + } + }, + "publicValidatorAssertions": { + "type": "object", + "additionalProperties": false, + "required": ["builder_path", "receipt_build_input_sha256", "private_evidence_manifest_sha256", "derivations", "caller_supplied_derived_fields_accepted", "private_artifact_kinds", "private_copies_re_read", "live_comments_re_fetched", "public_validation_disposition"], + "properties": { + "builder_path": {"const": "tools/eval/lib/capability-validation-v2/receipt-builder.ts"}, + "receipt_build_input_sha256": {"$ref": "#/$defs/sha256"}, + "private_evidence_manifest_sha256": {"$ref": "#/$defs/sha256"}, + "derivations": {"type": "array", "minItems": 13, "maxItems": 13, "prefixItems": [ + {"allOf": [{"$ref": "#/$defs/derivationRow"}, {"type": "object", "properties": {"subject": {"const": "v1_public_projection"}}}]}, + {"allOf": [{"$ref": "#/$defs/derivationRow"}, {"type": "object", "properties": {"subject": {"const": "provider_cost"}}}]}, + {"allOf": [{"$ref": "#/$defs/derivationRow"}, {"type": "object", "properties": {"subject": {"const": "ledger"}}}]}, + {"allOf": [{"$ref": "#/$defs/derivationRow"}, {"type": "object", "properties": {"subject": {"const": "tool_bijection"}}}]}, + {"allOf": [{"$ref": "#/$defs/derivationRow"}, {"type": "object", "properties": {"subject": {"const": "answer_kind"}}}]}, + {"allOf": [{"$ref": "#/$defs/derivationRow"}, {"type": "object", "properties": {"subject": {"const": "machine_grade"}}}]}, + {"allOf": [{"$ref": "#/$defs/derivationRow"}, {"type": "object", "properties": {"subject": {"const": "review_join"}}}]}, + {"allOf": [{"$ref": "#/$defs/derivationRow"}, {"type": "object", "properties": {"subject": {"const": "aggregates"}}}]}, + {"allOf": [{"$ref": "#/$defs/derivationRow"}, {"type": "object", "properties": {"subject": {"const": "eligibility"}}}]}, + {"allOf": [{"$ref": "#/$defs/derivationRow"}, {"type": "object", "properties": {"subject": {"const": "stop"}}}]}, + {"allOf": [{"$ref": "#/$defs/derivationRow"}, {"type": "object", "properties": {"subject": {"const": "lifecycle"}}}]}, + {"allOf": [{"$ref": "#/$defs/derivationRow"}, {"type": "object", "properties": {"subject": {"const": "archive"}}}]}, + {"allOf": [{"$ref": "#/$defs/derivationRow"}, {"type": "object", "properties": {"subject": {"const": "receipt"}}}]} + ], "items": false}, + "caller_supplied_derived_fields_accepted": {"const": false}, + "private_artifact_kinds": {"const": ["lock_observation", "role_acceptance", "environment_manifest", "containment_observation", "containment_probe", "journal_frame", "ledger_frame", "provider_event", "tool_event", "transcript", "machine_grade_join", "dossier", "blind_bundle", "review", "adjudication", "reveal_mapping", "lifecycle_manifest", "stop_observation", "receipt_build_input", "raw_repository", "graph", "hidden_fixture", "provider_body", "review_working", "dossier_excerpt"]}, + "private_copies_re_read": {"const": false}, + "live_comments_re_fetched": {"const": false}, + "public_validation_disposition": {"const": "commitment-only"} + } + }, + "publicLifecycleRecord": { + "type": "object", + "additionalProperties": false, + "required": ["sequence", "stage", "occurred_at", "local_monotonic_ns", "subject_manifest_sha256", "durable_receipt_url"], + "properties": { + "sequence": {"type": "integer", "minimum": 0}, + "stage": {"$ref": "#/$defs/nonEmptyString"}, + "occurred_at": {"$ref": "#/$defs/timestamp"}, + "local_monotonic_ns": {"oneOf": [{"$ref": "#/$defs/bigint"}, {"type": "null"}]}, + "subject_manifest_sha256": {"$ref": "#/$defs/sha256"}, + "durable_receipt_url": {"oneOf": [{"$ref": "#/$defs/githubCommentUrl"}, {"type": "null"}]} + } + }, + "publicLifecycleEvidence": { + "type": "object", + "additionalProperties": false, + "required": ["ordinary_prefix", "triggering_partial_stage", "stop_finalization", "execution_manifest_sha256", "seal_plan_sha256"], + "properties": { + "ordinary_prefix": {"type": "array", "items": {"$ref": "#/$defs/publicLifecycleRecord"}}, + "triggering_partial_stage": {"oneOf": [{"$ref": "#/$defs/publicLifecycleRecord"}, {"type": "null"}]}, + "stop_finalization": {"type": "array", "maxItems": 4, "items": {"$ref": "#/$defs/publicLifecycleRecord"}}, + "execution_manifest_sha256": {"$ref": "#/$defs/sha256"}, + "seal_plan_sha256": {"$ref": "#/$defs/sha256"} + } + }, + "publicCompletedLifecycleEvidence": { + "allOf": [ + {"$ref": "#/$defs/publicLifecycleEvidence"}, + {"type": "object", "properties": {"triggering_partial_stage": {"type": "null"}, "stop_finalization": {"type": "array", "maxItems": 0}}} + ] + }, + "publicStoppedLifecycleEvidence": { + "allOf": [ + {"$ref": "#/$defs/publicLifecycleEvidence"}, + {"type": "object", "properties": { + "triggering_partial_stage": {"$ref": "#/$defs/publicLifecycleRecord"}, + "stop_finalization": {"type": "array", "minItems": 4, "maxItems": 4, "prefixItems": [ + {"allOf": [{"$ref": "#/$defs/publicLifecycleRecord"}, {"type": "object", "properties": {"stage": {"const": "stop_prefix_sealed"}}}]}, + {"allOf": [{"$ref": "#/$defs/publicLifecycleRecord"}, {"type": "object", "properties": {"stage": {"const": "prefix_archive_copies_fsynced"}}}]}, + {"allOf": [{"$ref": "#/$defs/publicLifecycleRecord"}, {"type": "object", "properties": {"stage": {"const": "rfc_stop_amendment_posted"}}}]}, + {"allOf": [{"$ref": "#/$defs/publicLifecycleRecord"}, {"type": "object", "properties": {"stage": {"const": "stopped_receipt_sealed"}}}]} + ], "items": false} + }} + ] + }, + + "gitObjectObservation": { + "type": "object", + "additionalProperties": false, + "required": ["object_type", "oid", "canonical_bytes"], + "properties": { + "object_type": {"enum": ["commit", "tree", "blob"]}, + "oid": {"$ref": "#/$defs/sha"}, + "canonical_bytes": {"$ref": "#/$defs/capturedBytes"} + } + }, + "fileObservation": { + "type": "object", + "additionalProperties": false, + "required": ["path", "realpath", "mode_octal", "device", "inode", "nlink", "size", "mtime_ns", "content"], + "properties": { + "path": {"$ref": "#/$defs/absolutePath"}, + "realpath": {"$ref": "#/$defs/absolutePath"}, + "mode_octal": {"type": "string", "pattern": "^[0-7]{4}$"}, + "device": {"$ref": "#/$defs/bigint"}, + "inode": {"$ref": "#/$defs/bigint"}, + "nlink": {"type": "integer", "minimum": 1}, + "size": {"type": "integer", "minimum": 0}, + "mtime_ns": {"$ref": "#/$defs/bigint"}, + "content": {"$ref": "#/$defs/capturedBytes"} + } + }, + "ownerCommentObservation": { + "type": "object", + "additionalProperties": false, + "required": ["repository_id", "repository_owner_id", "issue_number", "comment_numeric_id", "author_login", "author_numeric_id", "author_association", "body_utf8", "body_sha256", "created_at", "updated_at", "includes_created_edit", "html_url"], + "properties": { + "repository_id": {"type": "integer", "minimum": 1}, + "repository_owner_id": {"type": "integer", "minimum": 1}, + "issue_number": {"type": "integer", "minimum": 1}, + "comment_numeric_id": {"type": "integer", "minimum": 1}, + "author_login": {"$ref": "#/$defs/githubLogin"}, + "author_numeric_id": {"type": "integer", "minimum": 1}, + "author_association": {"const": "OWNER"}, + "body_utf8": {"type": "string"}, + "body_sha256": {"$ref": "#/$defs/sha256"}, + "created_at": {"$ref": "#/$defs/timestamp"}, + "updated_at": {"$ref": "#/$defs/timestamp"}, + "includes_created_edit": {"const": false}, + "html_url": {"$ref": "#/$defs/githubCommentUrl"} + }, + "examples": [{"repository_id":1,"repository_owner_id":1,"issue_number":612,"comment_numeric_id":1,"author_login":"mohanagy","author_numeric_id":1,"author_association":"OWNER","body_utf8":"approve","body_sha256":"0000000000000000000000000000000000000000000000000000000000000000","created_at":"2026-07-26T00:00:00Z","updated_at":"2026-07-26T00:00:00Z","includes_created_edit":false,"html_url":"https://github.com/mohanagy/madar/issues/612#issuecomment-1"}], + "$comment": "Rejection fixture: the same object with author_association NONE must fail this owner-only fragment." + }, + "roleCommentObservation": { + "type": "object", + "additionalProperties": false, + "required": ["repository_id", "repository_owner_id", "issue_number", "comment_numeric_id", "author_login", "author_numeric_id", "author_association", "body_utf8", "body_sha256", "created_at", "updated_at", "includes_created_edit", "html_url"], + "properties": { + "repository_id": {"type": "integer", "minimum": 1}, + "repository_owner_id": {"type": "integer", "minimum": 1}, + "issue_number": {"type": "integer", "minimum": 1}, + "comment_numeric_id": {"type": "integer", "minimum": 1}, + "author_login": {"$ref": "#/$defs/githubLogin"}, + "author_numeric_id": {"type": "integer", "minimum": 1}, + "author_association": {"enum": ["COLLABORATOR", "CONTRIBUTOR", "FIRST_TIMER", "FIRST_TIME_CONTRIBUTOR", "MANNEQUIN", "MEMBER", "NONE", "OWNER"]}, + "body_utf8": {"type": "string"}, + "body_sha256": {"$ref": "#/$defs/sha256"}, + "created_at": {"$ref": "#/$defs/timestamp"}, + "updated_at": {"$ref": "#/$defs/timestamp"}, + "includes_created_edit": {"const": false}, + "html_url": {"$ref": "#/$defs/githubCommentUrl"} + }, + "examples": [{"repository_id":1,"repository_owner_id":1,"issue_number":612,"comment_numeric_id":2,"author_login":"reviewer-one","author_numeric_id":2,"author_association":"NONE","body_utf8":"accept","body_sha256":"0000000000000000000000000000000000000000000000000000000000000000","created_at":"2026-07-26T00:00:00Z","updated_at":"2026-07-26T00:00:00Z","includes_created_edit":false,"html_url":"https://github.com/mohanagy/madar/issues/612#issuecomment-2"}], + "$comment": "Rejection fixture: deleting or renaming any exact observation field, adding any field, changing a locked author identity, or setting includes_created_edit true must fail validation or the semantic lock join." + }, + "usage": { + "type": "object", + "additionalProperties": false, + "required": ["input_tokens", "cache_creation_input_tokens", "cache_read_input_tokens", "output_tokens"], + "properties": { + "input_tokens": {"type": "integer", "minimum": 0}, + "cache_creation_input_tokens": {"type": "integer", "minimum": 0}, + "cache_read_input_tokens": {"type": "integer", "minimum": 0}, + "output_tokens": {"type": "integer", "minimum": 0} + } + }, + "rateRow": { + "type": "object", + "additionalProperties": false, + "required": ["category", "tokens", "micro_usd_numerator", "token_denominator", "amount_micro_usd"], + "properties": { + "category": {"enum": ["uncached_input", "cache_write_5m", "cache_write_1h", "cache_read", "output"]}, + "tokens": {"type": "integer", "minimum": 0}, + "micro_usd_numerator": {"type": "integer", "minimum": 0}, + "token_denominator": {"type": "integer", "minimum": 1}, + "amount_micro_usd": {"type": "integer", "minimum": 0} + } + }, + "requestHeaders": { + "type": "object", + "additionalProperties": false, + "required": ["accept", "accept-encoding", "anthropic-version", "content-type", "user-agent", "x-api-key", "host", "content-length"], + "properties": { + "accept": {"const": "application/json"}, + "accept-encoding": {"const": "identity"}, + "anthropic-version": {"const": "2023-06-01"}, + "content-type": {"const": "application/json"}, + "user-agent": {"const": "madar-core-reset-capability-validation-v1"}, + "x-api-key": {"const": ""}, + "host": {"const": "api.anthropic.com"}, + "content-length": {"type": "string", "pattern": "^(0|[1-9][0-9]*)$"}, + "connection": {"const": "keep-alive"}, + "accept-language": {"const": "*"}, + "sec-fetch-mode": {"const": "cors"} + } + }, + "responseHeaders": { + "type": "object", + "propertyNames": {"pattern": "^[a-z0-9!#$%&'*+.^_`|~-]+$"}, + "additionalProperties": {"type": "string"} + }, + "providerUsage": { + "type": "object", + "additionalProperties": false, + "required": ["uncached_input", "cache_write_5m", "cache_write_1h", "cache_read", "output"], + "properties": { + "uncached_input": {"type": "integer", "minimum": 0}, + "cache_write_5m": {"type": "integer", "minimum": 0}, + "cache_write_1h": {"type": "integer", "minimum": 0}, + "cache_read": {"type": "integer", "minimum": 0}, + "output": {"type": "integer", "minimum": 0} + } + }, + "providerRate": { + "type": "object", + "additionalProperties": false, + "required": ["category", "micro_usd_numerator", "token_denominator"], + "properties": { + "category": {"enum": ["uncached_input", "cache_write_5m", "cache_write_1h", "cache_read", "output"]}, + "micro_usd_numerator": {"type": "integer", "minimum": 0}, + "token_denominator": {"type": "integer", "minimum": 1} + } + }, + "providerReservation": { + "type": "object", + "additionalProperties": false, + "required": ["counted_input_tokens", "reserved_input_tokens", "reserved_output_tokens", "reserved_micro_usd", "ledger_frame_sha256", "ack_monotonic_ns"], + "properties": { + "counted_input_tokens": {"type": "integer", "minimum": 0}, + "reserved_input_tokens": {"type": "integer", "minimum": 0}, + "reserved_output_tokens": {"const": 4096}, + "reserved_micro_usd": {"type": "integer", "minimum": 0}, + "ledger_frame_sha256": {"$ref": "#/$defs/sha256"}, + "ack_monotonic_ns": {"$ref": "#/$defs/bigint"} + } + }, + "providerTranscriptEvent": { + "type": "object", + "additionalProperties": false, + "required": ["event_index", "event_kind", "provider_sequence", "count_provider_sequence", "state_before", "state_after", "monotonic_reservation_request_ns", "monotonic_reservation_ack_ns", "monotonic_send_start_ns", "monotonic_headers_ns", "monotonic_body_end_ns", "monotonic_outcome_ack_ns", "deadline_remaining_ms", "abort_ms", "request_url", "final_url", "tls_hostname", "http_method", "request_body_base64", "request_bytes", "request_sha256", "request_headers", "request_headers_sha256", "canonical_semantic_fields_sha256", "tools_sha256", "messages_sha256", "system_sha256", "tool_choice_sha256", "http_status", "response_body_base64", "response_bytes", "response_sha256", "response_headers", "response_headers_sha256", "request_id", "request_id_sha256", "request_id_header_sha256", "model", "service_tier", "inference_geo", "usage", "rate", "reservation", "actual_cost_micro_usd", "ledger_disposition", "content_classification", "assistant_content_sha256", "stop_reason", "terminal_classification"], + "properties": { + "event_index": {"type": "integer", "minimum": 0}, + "event_kind": {"enum": ["count", "create"]}, + "provider_sequence": {"type": "integer", "minimum": 1}, + "count_provider_sequence": {"type": ["integer", "null"], "minimum": 1}, + "state_before": {"$ref": "#/$defs/nonEmptyString"}, + "state_after": {"$ref": "#/$defs/nonEmptyString"}, + "monotonic_reservation_request_ns": {"oneOf": [{"$ref": "#/$defs/bigint"}, {"type": "null"}]}, + "monotonic_reservation_ack_ns": {"oneOf": [{"$ref": "#/$defs/bigint"}, {"type": "null"}]}, + "monotonic_send_start_ns": {"$ref": "#/$defs/bigint"}, + "monotonic_headers_ns": {"oneOf": [{"$ref": "#/$defs/bigint"}, {"type": "null"}]}, + "monotonic_body_end_ns": {"oneOf": [{"$ref": "#/$defs/bigint"}, {"type": "null"}]}, + "monotonic_outcome_ack_ns": {"$ref": "#/$defs/bigint"}, + "deadline_remaining_ms": {"type": "integer", "minimum": 1}, + "abort_ms": {"type": "integer", "minimum": 1, "maximum": 120000}, + "request_url": {"enum": ["https://api.anthropic.com/v1/messages/count_tokens", "https://api.anthropic.com/v1/messages"]}, + "final_url": {"type": ["string", "null"], "format": "uri"}, + "tls_hostname": {"enum": ["api.anthropic.com", null]}, + "http_method": {"const": "POST"}, + "request_body_base64": {"$ref": "#/$defs/base64"}, + "request_bytes": {"type": "integer", "minimum": 1, "maximum": 2097152}, + "request_sha256": {"$ref": "#/$defs/sha256"}, + "request_headers": {"$ref": "#/$defs/requestHeaders"}, + "request_headers_sha256": {"$ref": "#/$defs/sha256"}, + "canonical_semantic_fields_sha256": {"$ref": "#/$defs/sha256"}, + "tools_sha256": {"$ref": "#/$defs/sha256"}, + "messages_sha256": {"$ref": "#/$defs/sha256"}, + "system_sha256": {"$ref": "#/$defs/sha256"}, + "tool_choice_sha256": {"$ref": "#/$defs/sha256"}, + "http_status": {"type": ["integer", "null"], "minimum": 100, "maximum": 599}, + "response_body_base64": {"oneOf": [{"$ref": "#/$defs/base64"}, {"type": "null"}]}, + "response_bytes": {"type": ["integer", "null"], "minimum": 0, "maximum": 262144}, + "response_sha256": {"$ref": "#/$defs/nullableSha256"}, + "response_headers": {"oneOf": [{"$ref": "#/$defs/responseHeaders"}, {"type": "null"}]}, + "response_headers_sha256": {"$ref": "#/$defs/nullableSha256"}, + "request_id": {"type": ["string", "null"], "minLength": 1}, + "request_id_sha256": {"$ref": "#/$defs/nullableSha256"}, + "request_id_header_sha256": {"$ref": "#/$defs/nullableSha256"}, + "model": {"type": ["string", "null"]}, + "service_tier": {"type": ["string", "null"]}, + "inference_geo": {"type": ["string", "null"]}, + "usage": {"oneOf": [{"$ref": "#/$defs/providerUsage"}, {"type": "null"}]}, + "rate": {"type": "array", "items": {"$ref": "#/$defs/providerRate"}}, + "reservation": {"oneOf": [{"$ref": "#/$defs/providerReservation"}, {"type": "null"}]}, + "actual_cost_micro_usd": {"type": ["integer", "null"], "minimum": 0}, + "ledger_disposition": {"enum": ["zero_cost_count", "actual_reconciled", "reservation_retained"]}, + "content_classification": {"enum": ["count_tokens", "single_tool_use", "final_text", "refusal", "malformed", "unsupported", "none", "provider_error_json", "provider_error_text", "empty_body"]}, + "assistant_content_sha256": {"$ref": "#/$defs/nullableSha256"}, + "stop_reason": {"type": ["string", "null"]}, + "terminal_classification": {"enum": ["continue", "success", "terminal_zero", "campaign_stop"]} + }, + "allOf": [ + { + "if": {"type": "object", "properties": {"event_kind": {"const": "count"}}, "required": ["event_kind"]}, + "then": {"type": "object", "properties": { + "count_provider_sequence": {"type": "null"}, + "abort_ms": {"type": "integer", "maximum": 30000}, + "request_url": {"const": "https://api.anthropic.com/v1/messages/count_tokens"}, + "response_bytes": {"type": ["integer", "null"], "maximum": 65536}, + "reservation": {"type": "null"}, + "actual_cost_micro_usd": {"const": 0}, + "ledger_disposition": {"const": "zero_cost_count"} + }} + }, + { + "if": {"type": "object", "properties": {"event_kind": {"const": "create"}}, "required": ["event_kind"]}, + "then": {"type": "object", "properties": { + "count_provider_sequence": {"type": "integer", "minimum": 1}, + "request_url": {"const": "https://api.anthropic.com/v1/messages"}, + "reservation": {"$ref": "#/$defs/providerReservation"} + }} + } + ] + }, + "toolResultSubject": { + "type": "object", + "additionalProperties": false, + "required": ["kind", "is_error", "semantic_sha256"], + "properties": { + "kind": {"enum": ["raw_tool", "mcp", "stopped_prefix"]}, + "is_error": {"type": "boolean"}, + "semantic_sha256": {"$ref": "#/$defs/sha256"} + } + }, + "mcpBoundedErrorResult": { + "type": "object", + "additionalProperties": false, + "required": ["content", "isError"], + "properties": { + "content": {"type": "array", "items": {"type": "object"}}, + "isError": {"const": true} + } + }, + "toolTranscriptEvent": { + "type": "object", + "additionalProperties": false, + "required": ["event_index", "event_kind", "tool_call_index", "provider_sequence", "continuation_provider_sequence", "monotonic_start_ns", "monotonic_end_ns", "tool_use_id", "name", "input", "input_jcs_base64", "input_bytes", "input_sha256", "result", "result_jcs_base64", "result_bytes", "result_sha256", "result_subject", "status"], + "properties": { + "event_index": {"type": "integer", "minimum": 0}, + "event_kind": {"const": "tool"}, + "tool_call_index": {"type": "integer", "minimum": 1, "maximum": 12}, + "provider_sequence": {"type": "integer", "minimum": 1}, + "continuation_provider_sequence": {"type": ["integer", "null"], "minimum": 1}, + "monotonic_start_ns": {"$ref": "#/$defs/bigint"}, + "monotonic_end_ns": {"$ref": "#/$defs/bigint"}, + "tool_use_id": {"$ref": "#/$defs/nonEmptyString"}, + "name": {"$ref": "#/$defs/nonEmptyString"}, + "input": {"type": "object"}, + "input_jcs_base64": {"$ref": "#/$defs/base64"}, + "input_bytes": {"type": "integer", "minimum": 2}, + "input_sha256": {"$ref": "#/$defs/sha256"}, + "result": {"type": "object"}, + "result_jcs_base64": {"$ref": "#/$defs/base64"}, + "result_bytes": {"type": "integer", "minimum": 2}, + "result_sha256": {"$ref": "#/$defs/sha256"}, + "result_subject": {"$ref": "#/$defs/toolResultSubject"}, + "status": {"enum": ["success", "bounded_error", "timed_out", "invalid", "denied", "overflow", "protocol_lost", "process_lost", "failed"]} + }, + "allOf": [ + { + "if": {"type": "object", "properties": {"status": {"const": "bounded_error"}}, "required": ["status"]}, + "then": {"type": "object", "properties": { + "result": {"$ref": "#/$defs/mcpBoundedErrorResult"}, + "result_bytes": {"type": "integer", "maximum": 65536}, + "result_subject": {"type": "object", "properties": {"kind": {"const": "mcp"}, "is_error": {"const": true}}}, + "continuation_provider_sequence": {"type": "integer", "minimum": 1} + }} + }, + { + "if": {"type": "object", "properties": {"status": {"enum": ["protocol_lost", "process_lost", "overflow"]}}, "required": ["status"]}, + "then": {"type": "object", "properties": {"continuation_provider_sequence": {"type": "null"}}} + } + ] + }, + "toolJoinRow": { + "type": "object", + "additionalProperties": false, + "required": ["event_index", "tool_use_id", "name", "input_bytes", "input_sha256", "result_bytes", "result_sha256", "provider_sequence", "continuation_sequence", "result_subject_sha256"], + "properties": { + "event_index": {"type": "integer", "minimum": 0}, + "tool_use_id": {"$ref": "#/$defs/nonEmptyString"}, + "name": {"$ref": "#/$defs/nonEmptyString"}, + "input_bytes": {"type": "integer", "minimum": 0}, + "input_sha256": {"$ref": "#/$defs/sha256"}, + "result_bytes": {"type": "integer", "minimum": 0}, + "result_sha256": {"$ref": "#/$defs/sha256"}, + "provider_sequence": {"type": "integer", "minimum": 1}, + "continuation_sequence": {"type": ["integer", "null"], "minimum": 1}, + "result_subject_sha256": {"$ref": "#/$defs/sha256"} + } + }, + "stopEvaluation": { + "type": "object", + "additionalProperties": false, + "required": ["id", "matched", "evaluation_sha256"], + "properties": { + "id": {"type": "integer", "minimum": 1, "maximum": 14}, + "matched": {"type": "boolean"}, + "evaluation_sha256": {"$ref": "#/$defs/sha256"} + } + }, + "privateLifecycleRecord": { + "type": "object", + "additionalProperties": false, + "required": ["sequence", "stage", "occurred_at", "local_monotonic_ns", "subject_manifest_sha256", "journal_frame_sha256"], + "properties": { + "sequence": {"type": "integer", "minimum": 0}, + "stage": {"$ref": "#/$defs/nonEmptyString"}, + "occurred_at": {"$ref": "#/$defs/timestamp"}, + "local_monotonic_ns": {"$ref": "#/$defs/bigint"}, + "subject_manifest_sha256": {"$ref": "#/$defs/sha256"}, + "journal_frame_sha256": {"$ref": "#/$defs/sha256"} + } + }, + "archiveIndexRow": { + "type": "object", + "additionalProperties": false, + "required": ["ordinal", "path", "artifact_kind", "semantic_id", "bytes", "sha256"], + "properties": { + "ordinal": {"type": "integer", "minimum": 2}, + "path": {"type": "string", "pattern": "^p/[0-9]{8}\\.bin$"}, + "artifact_kind": {"enum": ["lock_observation", "role_acceptance", "environment_manifest", "containment_observation", "containment_probe", "journal_frame", "ledger_frame", "provider_event", "tool_event", "transcript", "machine_grade_join", "dossier", "blind_bundle", "review", "adjudication", "reveal_mapping", "lifecycle_manifest", "stop_observation", "receipt_build_input", "raw_repository", "graph", "hidden_fixture", "provider_body", "review_working", "dossier_excerpt"]}, + "semantic_id": {"$ref": "#/$defs/nonEmptyString"}, + "bytes": {"type": "integer", "minimum": 0}, + "sha256": {"$ref": "#/$defs/sha256"} + } + }, + "privateArchiveIndex": { + "type": "object", + "additionalProperties": false, + "required": ["schema_version", "campaign_id", "entries"], + "properties": { + "schema_version": {"const": "madar-capability-private-index-v2"}, + "campaign_id": {"$ref": "#/$defs/nonEmptyString"}, + "entries": {"type": "array", "minItems": 1, "items": {"$ref": "#/$defs/archiveIndexRow"}} + }, + "examples": [{"schema_version":"madar-capability-private-index-v2","campaign_id":"capability-validation-v2-20260726T000000Z","entries":[{"ordinal":2,"path":"p/00000002.bin","artifact_kind":"lock_observation","semantic_id":"lock-1","bytes":2,"sha256":"0000000000000000000000000000000000000000000000000000000000000000"}]}] + }, + + "privateLockObservation": { + "type": "object", "additionalProperties": false, + "required": ["artifact_kind", "schema_version", "semantic_id", "campaign_id", "observed_at", "authorization_subject_sha256", "git_objects", "files", "owner_comments", "role_comments", "provider_account_observation", "proof_package_jcs_sha256"], + "properties": { + "artifact_kind": {"const": "lock_observation"}, "schema_version": {"const": 2}, "semantic_id": {"$ref": "#/$defs/nonEmptyString"}, "campaign_id": {"$ref": "#/$defs/nonEmptyString"}, "observed_at": {"$ref": "#/$defs/timestamp"}, "authorization_subject_sha256": {"$ref": "#/$defs/sha256"}, + "git_objects": {"type": "array", "minItems": 1, "items": {"$ref": "#/$defs/gitObjectObservation"}}, "files": {"type": "array", "minItems": 1, "items": {"$ref": "#/$defs/fileObservation"}}, "owner_comments": {"type": "array", "minItems": 1, "items": {"$ref": "#/$defs/ownerCommentObservation"}}, "role_comments": {"type": "array", "minItems": 1, "items": {"$ref": "#/$defs/roleCommentObservation"}}, + "provider_account_observation": {"type": "null"}, "proof_package_jcs_sha256": {"$ref": "#/$defs/sha256"} + }, + "examples": [{"artifact_kind":"lock_observation","schema_version":2,"semantic_id":"lock-1","campaign_id":"capability-validation-v2-20260726T000000Z","observed_at":"2026-07-26T00:00:00Z","authorization_subject_sha256":"0000000000000000000000000000000000000000000000000000000000000000","git_objects":[{"object_type":"commit","oid":"0000000000000000000000000000000000000000","canonical_bytes":{"utf8_or_binary_base64":"e30=","bytes":2,"sha256":"0000000000000000000000000000000000000000000000000000000000000000"}}],"files":[{"path":"/tmp/a","realpath":"/tmp/a","mode_octal":"0600","device":"1","inode":"2","nlink":1,"size":2,"mtime_ns":"1","content":{"utf8_or_binary_base64":"e30=","bytes":2,"sha256":"0000000000000000000000000000000000000000000000000000000000000000"}}],"owner_comments":[{"repository_id":1,"repository_owner_id":1,"issue_number":612,"comment_numeric_id":1,"author_login":"mohanagy","author_numeric_id":1,"author_association":"OWNER","body_utf8":"approve","body_sha256":"0000000000000000000000000000000000000000000000000000000000000000","created_at":"2026-07-26T00:00:00Z","updated_at":"2026-07-26T00:00:00Z","includes_created_edit":false,"html_url":"https://github.com/mohanagy/madar/issues/612#issuecomment-1"}],"role_comments":[{"repository_id":1,"repository_owner_id":1,"issue_number":612,"comment_numeric_id":2,"author_login":"reviewer-one","author_numeric_id":2,"author_association":"NONE","body_utf8":"accept","body_sha256":"0000000000000000000000000000000000000000000000000000000000000000","created_at":"2026-07-26T00:00:00Z","updated_at":"2026-07-26T00:00:00Z","includes_created_edit":false,"html_url":"https://github.com/mohanagy/madar/issues/612#issuecomment-2"}],"provider_account_observation":null,"proof_package_jcs_sha256":"0000000000000000000000000000000000000000000000000000000000000000"}] + }, + "privateRoleAcceptance": { + "type": "object", "additionalProperties": false, + "required": ["artifact_kind", "schema_version", "semantic_id", "campaign_id", "role", "authorization_subject_sha256", "github_comment", "independence_statement_sha256", "observed_before_lock"], + "properties": {"artifact_kind":{"const":"role_acceptance"},"schema_version":{"const":2},"semantic_id":{"$ref":"#/$defs/nonEmptyString"},"campaign_id":{"$ref":"#/$defs/nonEmptyString"},"role":{"enum":["operator","mapping_custodian","reviewer_1","reviewer_2","adjudicator","archive_verifier"]},"authorization_subject_sha256":{"$ref":"#/$defs/sha256"},"github_comment":{"$ref":"#/$defs/roleCommentObservation"},"independence_statement_sha256":{"$ref":"#/$defs/sha256"},"observed_before_lock":{"const":true}}, + "examples": [{"artifact_kind":"role_acceptance","schema_version":2,"semantic_id":"role-operator","campaign_id":"capability-validation-v2-20260726T000000Z","role":"operator","authorization_subject_sha256":"0000000000000000000000000000000000000000000000000000000000000000","github_comment":{"repository_id":1,"repository_owner_id":1,"issue_number":612,"comment_numeric_id":2,"author_login":"operator-one","author_numeric_id":2,"author_association":"NONE","body_utf8":"accept","body_sha256":"0000000000000000000000000000000000000000000000000000000000000000","created_at":"2026-07-26T00:00:00Z","updated_at":"2026-07-26T00:00:00Z","includes_created_edit":false,"html_url":"https://github.com/mohanagy/madar/issues/612#issuecomment-2"},"independence_statement_sha256":"0000000000000000000000000000000000000000000000000000000000000000","observed_before_lock":true}] + }, + "privateEnvironmentManifest": { + "type":"object","additionalProperties":false, + "required":["artifact_kind","schema_version","semantic_id","campaign_id","stage","argv","environment","file_manifest_sha256","toolchain_manifest_sha256","sealed_at"], + "properties":{"artifact_kind":{"const":"environment_manifest"},"schema_version":{"const":2},"semantic_id":{"$ref":"#/$defs/nonEmptyString"},"campaign_id":{"$ref":"#/$defs/nonEmptyString"},"stage":{"enum":["prelock_setup","worker","mcp","relay"]},"argv":{"type":"array","minItems":1,"items":{"type":"string"}},"environment":{"type":"object","additionalProperties":{"type":"string"}},"file_manifest_sha256":{"$ref":"#/$defs/sha256"},"toolchain_manifest_sha256":{"$ref":"#/$defs/sha256"},"sealed_at":{"$ref":"#/$defs/timestamp"}}, + "examples":[{"artifact_kind":"environment_manifest","schema_version":2,"semantic_id":"env-1","campaign_id":"capability-validation-v2-20260726T000000Z","stage":"worker","argv":["/usr/bin/node"],"environment":{},"file_manifest_sha256":"0000000000000000000000000000000000000000000000000000000000000000","toolchain_manifest_sha256":"0000000000000000000000000000000000000000000000000000000000000000","sealed_at":"2026-07-26T00:00:00Z"}] + }, + "privateContainmentObservation": { + "type":"object","additionalProperties":false, + "required":["artifact_kind","schema_version","semantic_id","campaign_id","trial_id","sample_monotonic_ns","sample_gap_ns","roots","spawn_gate_closed","fork_exec_kernel_denied","monitor_source_sha256","monitor_binary_sha256","sandbox_profile_sha256"], + "properties":{"artifact_kind":{"const":"containment_observation"},"schema_version":{"const":2},"semantic_id":{"$ref":"#/$defs/nonEmptyString"},"campaign_id":{"$ref":"#/$defs/nonEmptyString"},"trial_id":{"$ref":"#/$defs/nonEmptyString"},"sample_monotonic_ns":{"$ref":"#/$defs/bigint"},"sample_gap_ns":{"type":"integer","minimum":0,"maximum":10000000},"roots":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["monotonic_ns","pid","ppid","process_group","rss_bytes","descendant_marker","fork_exec_denial","termination_state"],"properties":{"monotonic_ns":{"$ref":"#/$defs/bigint"},"pid":{"type":"integer","minimum":1},"ppid":{"type":"integer","minimum":0},"process_group":{"type":"integer","minimum":1},"rss_bytes":{"type":"integer","minimum":0},"descendant_marker":{"$ref":"#/$defs/nonEmptyString"},"fork_exec_denial":{"const":true},"termination_state":{"enum":["running","terminating","exited"]}}}},"spawn_gate_closed":{"type":"boolean"},"fork_exec_kernel_denied":{"const":true},"monitor_source_sha256":{"$ref":"#/$defs/sha256"},"monitor_binary_sha256":{"$ref":"#/$defs/sha256"},"sandbox_profile_sha256":{"$ref":"#/$defs/sha256"}}, + "examples":[{"artifact_kind":"containment_observation","schema_version":2,"semantic_id":"contain-1","campaign_id":"capability-validation-v2-20260726T000000Z","trial_id":"trial-1","sample_monotonic_ns":"1","sample_gap_ns":5000000,"roots":[{"monotonic_ns":"1","pid":123,"ppid":1,"process_group":123,"rss_bytes":4096,"descendant_marker":"worker-1","fork_exec_denial":true,"termination_state":"running"}],"spawn_gate_closed":false,"fork_exec_kernel_denied":true,"monitor_source_sha256":"0000000000000000000000000000000000000000000000000000000000000000","monitor_binary_sha256":"0000000000000000000000000000000000000000000000000000000000000000","sandbox_profile_sha256":"0000000000000000000000000000000000000000000000000000000000000000"}] + }, + "privateContainmentProbe": { + "type":"object","additionalProperties":false, + "required":["artifact_kind","schema_version","semantic_id","campaign_id","probe","target","attempted_at_monotonic_ns","result","evidence_sha256"], + "properties":{"artifact_kind":{"const":"containment_probe"},"schema_version":{"const":2},"semantic_id":{"$ref":"#/$defs/nonEmptyString"},"campaign_id":{"$ref":"#/$defs/nonEmptyString"},"probe":{"enum":["anthropic_network","sentinel_network","credential_read","escape","termination"]},"target":{"$ref":"#/$defs/nonEmptyString"},"attempted_at_monotonic_ns":{"$ref":"#/$defs/bigint"},"result":{"enum":["kernel_denied","not_readable","not_reachable","terminated","failed"]},"evidence_sha256":{"$ref":"#/$defs/sha256"}}, + "examples":[{"artifact_kind":"containment_probe","schema_version":2,"semantic_id":"probe-1","campaign_id":"capability-validation-v2-20260726T000000Z","probe":"anthropic_network","target":"api.anthropic.com","attempted_at_monotonic_ns":"1","result":"kernel_denied","evidence_sha256":"0000000000000000000000000000000000000000000000000000000000000000"}] + }, + "privateJournalFrame": { + "type":"object","additionalProperties":false, + "required":["artifact_kind","schema_version","semantic_id","campaign_id","global_sequence","previous_frame_sha256","payload_kind","payload_jcs","frame_length","frame_sha256","writer_seal_sha256","fsynced_at_monotonic_ns"], + "properties":{"artifact_kind":{"const":"journal_frame"},"schema_version":{"const":2},"semantic_id":{"$ref":"#/$defs/nonEmptyString"},"campaign_id":{"$ref":"#/$defs/nonEmptyString"},"global_sequence":{"type":"integer","minimum":0},"previous_frame_sha256":{"$ref":"#/$defs/sha256"},"payload_kind":{"enum":["reservation","provider_outcome","tool","state","answer","stop","lifecycle"]},"payload_jcs":{"$ref":"#/$defs/capturedBytes"},"frame_length":{"type":"integer","minimum":1},"frame_sha256":{"$ref":"#/$defs/sha256"},"writer_seal_sha256":{"$ref":"#/$defs/sha256"},"fsynced_at_monotonic_ns":{"$ref":"#/$defs/bigint"}}, + "examples":[{"artifact_kind":"journal_frame","schema_version":2,"semantic_id":"journal-0","campaign_id":"capability-validation-v2-20260726T000000Z","global_sequence":0,"previous_frame_sha256":"0000000000000000000000000000000000000000000000000000000000000000","payload_kind":"state","payload_jcs":{"utf8_or_binary_base64":"e30=","bytes":2,"sha256":"0000000000000000000000000000000000000000000000000000000000000000"},"frame_length":2,"frame_sha256":"0000000000000000000000000000000000000000000000000000000000000000","writer_seal_sha256":"0000000000000000000000000000000000000000000000000000000000000000","fsynced_at_monotonic_ns":"1"}] + }, + "privateLedgerFrame": { + "type":"object","additionalProperties":false, + "required":["artifact_kind","schema_version","semantic_id","campaign_id","global_sequence","previous_frame_sha256","trial_id","operation","disposition","counted_input_tokens","reserved_micro_usd","actual_micro_usd","retained_micro_usd","campaign_actual_micro_usd","campaign_retained_micro_usd","frame_length","frame_sha256","journal_frame_sha256","writer_seal_sha256","fsynced_at_monotonic_ns"], + "properties":{"artifact_kind":{"const":"ledger_frame"},"schema_version":{"const":2},"semantic_id":{"$ref":"#/$defs/nonEmptyString"},"campaign_id":{"$ref":"#/$defs/nonEmptyString"},"global_sequence":{"type":"integer","minimum":0},"previous_frame_sha256":{"$ref":"#/$defs/sha256"},"trial_id":{"$ref":"#/$defs/nonEmptyString"},"operation":{"enum":["count","create"]},"disposition":{"enum":["reserved","actual_reconciled","reservation_retained","zero_cost_count"]},"counted_input_tokens":{"type":"integer","minimum":0},"reserved_micro_usd":{"type":"integer","minimum":0},"actual_micro_usd":{"type":["integer","null"],"minimum":0},"retained_micro_usd":{"type":"integer","minimum":0},"campaign_actual_micro_usd":{"type":"integer","minimum":0},"campaign_retained_micro_usd":{"type":"integer","minimum":0},"frame_length":{"type":"integer","minimum":1},"frame_sha256":{"$ref":"#/$defs/sha256"},"journal_frame_sha256":{"$ref":"#/$defs/sha256"},"writer_seal_sha256":{"$ref":"#/$defs/sha256"},"fsynced_at_monotonic_ns":{"$ref":"#/$defs/bigint"}}, + "allOf":[ + {"if":{"type":"object","properties":{"operation":{"const":"count"}},"required":["operation"]},"then":{"type":"object","properties":{"disposition":{"const":"zero_cost_count"},"reserved_micro_usd":{"const":0},"actual_micro_usd":{"const":0},"retained_micro_usd":{"const":0}}}}, + {"if":{"type":"object","properties":{"disposition":{"enum":["reserved","reservation_retained"]}},"required":["disposition"]},"then":{"type":"object","properties":{"actual_micro_usd":{"type":"null"}}}}, + {"if":{"type":"object","properties":{"disposition":{"const":"actual_reconciled"}},"required":["disposition"]},"then":{"type":"object","properties":{"actual_micro_usd":{"type":"integer"}}}} + ], + "examples":[{"artifact_kind":"ledger_frame","schema_version":2,"semantic_id":"ledger-0","campaign_id":"capability-validation-v2-20260726T000000Z","global_sequence":0,"previous_frame_sha256":"0000000000000000000000000000000000000000000000000000000000000000","trial_id":"trial-1","operation":"count","disposition":"zero_cost_count","counted_input_tokens":5,"reserved_micro_usd":0,"actual_micro_usd":0,"retained_micro_usd":0,"campaign_actual_micro_usd":0,"campaign_retained_micro_usd":0,"frame_length":2,"frame_sha256":"0000000000000000000000000000000000000000000000000000000000000000","journal_frame_sha256":"0000000000000000000000000000000000000000000000000000000000000000","writer_seal_sha256":"0000000000000000000000000000000000000000000000000000000000000000","fsynced_at_monotonic_ns":"1"}] + }, + "privateProviderEvent": { + "type":"object","additionalProperties":false, + "required":["artifact_kind","schema_version","semantic_id","campaign_id","trial_id","event"], + "properties":{"artifact_kind":{"const":"provider_event"},"schema_version":{"const":2},"semantic_id":{"$ref":"#/$defs/nonEmptyString"},"campaign_id":{"$ref":"#/$defs/nonEmptyString"},"trial_id":{"$ref":"#/$defs/nonEmptyString"},"event":{"$ref":"#/$defs/providerTranscriptEvent"}}, + "examples":[{"artifact_kind":"provider_event","schema_version":2,"semantic_id":"provider-1","campaign_id":"capability-validation-v2-20260726T000000Z","trial_id":"trial-1","event":{"event_index":0,"event_kind":"count","provider_sequence":1,"count_provider_sequence":null,"state_before":"count_pending","state_after":"count_complete","monotonic_reservation_request_ns":null,"monotonic_reservation_ack_ns":null,"monotonic_send_start_ns":"1","monotonic_headers_ns":"2","monotonic_body_end_ns":"3","monotonic_outcome_ack_ns":"4","deadline_remaining_ms":300000,"abort_ms":30000,"request_url":"https://api.anthropic.com/v1/messages/count_tokens","final_url":"https://api.anthropic.com/v1/messages/count_tokens","tls_hostname":"api.anthropic.com","http_method":"POST","request_body_base64":"e30=","request_bytes":2,"request_sha256":"0000000000000000000000000000000000000000000000000000000000000000","request_headers":{"accept":"application/json","accept-encoding":"identity","anthropic-version":"2023-06-01","content-type":"application/json","user-agent":"madar-core-reset-capability-validation-v1","x-api-key":"","host":"api.anthropic.com","content-length":"2"},"request_headers_sha256":"0000000000000000000000000000000000000000000000000000000000000000","canonical_semantic_fields_sha256":"0000000000000000000000000000000000000000000000000000000000000000","tools_sha256":"0000000000000000000000000000000000000000000000000000000000000000","messages_sha256":"0000000000000000000000000000000000000000000000000000000000000000","system_sha256":"0000000000000000000000000000000000000000000000000000000000000000","tool_choice_sha256":"0000000000000000000000000000000000000000000000000000000000000000","http_status":200,"response_body_base64":"e30=","response_bytes":2,"response_sha256":"0000000000000000000000000000000000000000000000000000000000000000","response_headers":{},"response_headers_sha256":"0000000000000000000000000000000000000000000000000000000000000000","request_id":"req_1","request_id_sha256":"0000000000000000000000000000000000000000000000000000000000000000","request_id_header_sha256":"0000000000000000000000000000000000000000000000000000000000000000","model":null,"service_tier":null,"inference_geo":null,"usage":{"uncached_input":5,"cache_write_5m":0,"cache_write_1h":0,"cache_read":0,"output":0},"rate":[],"reservation":null,"actual_cost_micro_usd":0,"ledger_disposition":"zero_cost_count","content_classification":"count_tokens","assistant_content_sha256":null,"stop_reason":null,"terminal_classification":"continue"}}] + }, + "privateToolEvent": { + "type":"object","additionalProperties":false, + "required":["artifact_kind","schema_version","semantic_id","campaign_id","trial_id","event"], + "properties":{"artifact_kind":{"const":"tool_event"},"schema_version":{"const":2},"semantic_id":{"$ref":"#/$defs/nonEmptyString"},"campaign_id":{"$ref":"#/$defs/nonEmptyString"},"trial_id":{"$ref":"#/$defs/nonEmptyString"},"event":{"$ref":"#/$defs/toolTranscriptEvent"}}, + "examples":[{"artifact_kind":"tool_event","schema_version":2,"semantic_id":"tool-1","campaign_id":"capability-validation-v2-20260726T000000Z","trial_id":"trial-1","event":{"event_index":1,"event_kind":"tool","tool_call_index":1,"provider_sequence":2,"continuation_provider_sequence":3,"monotonic_start_ns":"5","monotonic_end_ns":"6","tool_use_id":"toolu_1","name":"tools/call","input":{},"input_jcs_base64":"e30=","input_bytes":2,"input_sha256":"0000000000000000000000000000000000000000000000000000000000000000","result":{"content":[],"isError":true},"result_jcs_base64":"e30=","result_bytes":2,"result_sha256":"0000000000000000000000000000000000000000000000000000000000000000","result_subject":{"kind":"mcp","is_error":true,"semantic_sha256":"0000000000000000000000000000000000000000000000000000000000000000"},"status":"bounded_error"}}] + }, + "privateTranscript": { + "type":"object","additionalProperties":false, + "required":["artifact_kind","schema_version","semantic_id","transcript"], + "properties":{"artifact_kind":{"const":"transcript"},"schema_version":{"const":2},"semantic_id":{"$ref":"#/$defs/nonEmptyString"},"transcript":{"type":"object","additionalProperties":false,"required":["schema_version","campaign_id","trial_id","events"],"properties":{"schema_version":{"const":"madar-capability-transcript-v2"},"campaign_id":{"$ref":"#/$defs/nonEmptyString"},"trial_id":{"$ref":"#/$defs/nonEmptyString"},"events":{"type":"array","items":{"oneOf":[{"$ref":"#/$defs/providerTranscriptEvent"},{"$ref":"#/$defs/toolTranscriptEvent"}]}}}}}, + "examples":[{"artifact_kind":"transcript","schema_version":2,"semantic_id":"transcript-1","transcript":{"schema_version":"madar-capability-transcript-v2","campaign_id":"capability-validation-v2-20260726T000000Z","trial_id":"trial-1","events":[]}}] + }, + "privateMachineGradeJoin": { + "type":"object","additionalProperties":false, + "required":["artifact_kind","schema_version","semantic_id","campaign_id","trial_id","transcript_sha256","final_answer","tool_events","public_tool_calls","machine_tool_rows","completed_tool_event_indexes","phase_rows","expected_fixture_sha256"], + "properties":{"artifact_kind":{"const":"machine_grade_join"},"schema_version":{"const":2},"semantic_id":{"$ref":"#/$defs/nonEmptyString"},"campaign_id":{"$ref":"#/$defs/nonEmptyString"},"trial_id":{"$ref":"#/$defs/nonEmptyString"},"transcript_sha256":{"$ref":"#/$defs/sha256"},"final_answer":{"$ref":"#/$defs/capturedBytes"},"tool_events":{"type":"array","items":{"$ref":"#/$defs/toolJoinRow"}},"public_tool_calls":{"type":"array","items":{"$ref":"#/$defs/toolJoinRow"}},"machine_tool_rows":{"type":"array","items":{"$ref":"#/$defs/toolJoinRow"}},"completed_tool_event_indexes":{"type":"array","uniqueItems":true,"items":{"type":"integer","minimum":0}},"phase_rows":{"type":"array","items":{"$ref":"#/$defs/capturedBytes"}},"expected_fixture_sha256":{"$ref":"#/$defs/sha256"}}, + "examples":[{"artifact_kind":"machine_grade_join","schema_version":2,"semantic_id":"grade-1","campaign_id":"capability-validation-v2-20260726T000000Z","trial_id":"trial-1","transcript_sha256":"0000000000000000000000000000000000000000000000000000000000000000","final_answer":{"utf8_or_binary_base64":"","bytes":0,"sha256":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"},"tool_events":[],"public_tool_calls":[],"machine_tool_rows":[],"completed_tool_event_indexes":[],"phase_rows":[],"expected_fixture_sha256":"0000000000000000000000000000000000000000000000000000000000000000"}] + }, + "privateDossier": { + "type":"object","additionalProperties":false, + "required":["artifact_kind","schema_version","semantic_id","campaign_id","question_id","repository_id","answer_ids","entries","dossier_sha256"], + "properties":{"artifact_kind":{"const":"dossier"},"schema_version":{"const":2},"semantic_id":{"$ref":"#/$defs/nonEmptyString"},"campaign_id":{"$ref":"#/$defs/nonEmptyString"},"question_id":{"$ref":"#/$defs/nonEmptyString"},"repository_id":{"enum":["documenso","formbricks"]},"answer_ids":{"type":"array","minItems":1,"uniqueItems":true,"items":{"$ref":"#/$defs/nonEmptyString"}},"entries":{"type":"array","items":{"$ref":"#/$defs/capturedBytes"}},"dossier_sha256":{"$ref":"#/$defs/sha256"}}, + "examples":[{"artifact_kind":"dossier","schema_version":2,"semantic_id":"dossier-1","campaign_id":"capability-validation-v2-20260726T000000Z","question_id":"documenso-document-send","repository_id":"documenso","answer_ids":["A-0000000000000000"],"entries":[],"dossier_sha256":"0000000000000000000000000000000000000000000000000000000000000000"}] + }, + "privateBlindBundle": { + "type":"object","additionalProperties":false, + "required":["artifact_kind","schema_version","semantic_id","campaign_id","answer_id","question_id","repository_id","pseudonym","answer_kind","question","final_answer","answer_sha256","dossier_sha256","bundle_sha256"], + "properties":{"artifact_kind":{"const":"blind_bundle"},"schema_version":{"const":2},"semantic_id":{"$ref":"#/$defs/nonEmptyString"},"campaign_id":{"$ref":"#/$defs/nonEmptyString"},"answer_id":{"$ref":"#/$defs/nonEmptyString"},"question_id":{"$ref":"#/$defs/nonEmptyString"},"repository_id":{"enum":["documenso","formbricks"]},"pseudonym":{"type":"string","pattern":"^A-[0-9a-f]{16}$"},"answer_kind":{"enum":["substantive","empty_zero"]},"question":{"$ref":"#/$defs/capturedBytes"},"final_answer":{"$ref":"#/$defs/capturedBytes"},"answer_sha256":{"$ref":"#/$defs/sha256"},"dossier_sha256":{"$ref":"#/$defs/sha256"},"bundle_sha256":{"$ref":"#/$defs/sha256"}}, + "examples":[{"artifact_kind":"blind_bundle","schema_version":2,"semantic_id":"bundle-1","campaign_id":"capability-validation-v2-20260726T000000Z","answer_id":"A-0000000000000000","question_id":"documenso-document-send","repository_id":"documenso","pseudonym":"A-0000000000000000","answer_kind":"empty_zero","question":{"utf8_or_binary_base64":"e30=","bytes":2,"sha256":"0000000000000000000000000000000000000000000000000000000000000000"},"final_answer":{"utf8_or_binary_base64":"","bytes":0,"sha256":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"},"answer_sha256":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","dossier_sha256":"0000000000000000000000000000000000000000000000000000000000000000","bundle_sha256":"0000000000000000000000000000000000000000000000000000000000000000"}] + }, + "privateReview": { + "type":"object","additionalProperties":false, + "required":["artifact_kind","schema_version","semantic_id","campaign_id","answer_id","answer_sha256","answer_kind","reviewer_role","score_payload","score_payload_sha256","submitted_at","attestation_comment","receipt_sha256"], + "properties":{"artifact_kind":{"const":"review"},"schema_version":{"const":2},"semantic_id":{"$ref":"#/$defs/nonEmptyString"},"campaign_id":{"$ref":"#/$defs/nonEmptyString"},"answer_id":{"$ref":"#/$defs/nonEmptyString"},"answer_sha256":{"$ref":"#/$defs/sha256"},"answer_kind":{"enum":["substantive","empty_zero"]},"reviewer_role":{"enum":["reviewer_1","reviewer_2"]},"score_payload":{"$ref":"#/$defs/capturedBytes"},"score_payload_sha256":{"$ref":"#/$defs/sha256"},"submitted_at":{"$ref":"#/$defs/timestamp"},"attestation_comment":{"$ref":"#/$defs/roleCommentObservation"},"receipt_sha256":{"$ref":"#/$defs/sha256"}}, + "examples":[{"artifact_kind":"review","schema_version":2,"semantic_id":"review-1","campaign_id":"capability-validation-v2-20260726T000000Z","answer_id":"A-0000000000000000","answer_sha256":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","answer_kind":"empty_zero","reviewer_role":"reviewer_1","score_payload":{"utf8_or_binary_base64":"e30=","bytes":2,"sha256":"0000000000000000000000000000000000000000000000000000000000000000"},"score_payload_sha256":"0000000000000000000000000000000000000000000000000000000000000000","submitted_at":"2026-07-26T00:00:00Z","attestation_comment":{"repository_id":1,"repository_owner_id":1,"issue_number":612,"comment_numeric_id":2,"author_login":"reviewer-one","author_numeric_id":2,"author_association":"NONE","body_utf8":"review","body_sha256":"0000000000000000000000000000000000000000000000000000000000000000","created_at":"2026-07-26T00:00:00Z","updated_at":"2026-07-26T00:00:00Z","includes_created_edit":false,"html_url":"https://github.com/mohanagy/madar/issues/612#issuecomment-2"},"receipt_sha256":"0000000000000000000000000000000000000000000000000000000000000000"}] + }, + "privateAdjudication": { + "type":"object","additionalProperties":false, + "required":["artifact_kind","schema_version","semantic_id","campaign_id","answer_id","answer_sha256","answer_kind","review_receipt_sha256s","score_payload","score_payload_sha256","submitted_at","attestation_comment","receipt_sha256"], + "properties":{"artifact_kind":{"const":"adjudication"},"schema_version":{"const":2},"semantic_id":{"$ref":"#/$defs/nonEmptyString"},"campaign_id":{"$ref":"#/$defs/nonEmptyString"},"answer_id":{"$ref":"#/$defs/nonEmptyString"},"answer_sha256":{"$ref":"#/$defs/sha256"},"answer_kind":{"const":"substantive"},"review_receipt_sha256s":{"type":"array","minItems":2,"maxItems":2,"uniqueItems":true,"items":{"$ref":"#/$defs/sha256"}},"score_payload":{"$ref":"#/$defs/capturedBytes"},"score_payload_sha256":{"$ref":"#/$defs/sha256"},"submitted_at":{"$ref":"#/$defs/timestamp"},"attestation_comment":{"$ref":"#/$defs/roleCommentObservation"},"receipt_sha256":{"$ref":"#/$defs/sha256"}}, + "examples":[{"artifact_kind":"adjudication","schema_version":2,"semantic_id":"adjudication-1","campaign_id":"capability-validation-v2-20260726T000000Z","answer_id":"A-0000000000000000","answer_sha256":"0000000000000000000000000000000000000000000000000000000000000000","answer_kind":"substantive","review_receipt_sha256s":["0000000000000000000000000000000000000000000000000000000000000000","1111111111111111111111111111111111111111111111111111111111111111"],"score_payload":{"utf8_or_binary_base64":"e30=","bytes":2,"sha256":"0000000000000000000000000000000000000000000000000000000000000000"},"score_payload_sha256":"0000000000000000000000000000000000000000000000000000000000000000","submitted_at":"2026-07-26T00:00:00Z","attestation_comment":{"repository_id":1,"repository_owner_id":1,"issue_number":612,"comment_numeric_id":3,"author_login":"adjudicator-one","author_numeric_id":3,"author_association":"NONE","body_utf8":"adjudicate","body_sha256":"0000000000000000000000000000000000000000000000000000000000000000","created_at":"2026-07-26T00:00:00Z","updated_at":"2026-07-26T00:00:00Z","includes_created_edit":false,"html_url":"https://github.com/mohanagy/madar/issues/612#issuecomment-3"},"receipt_sha256":"0000000000000000000000000000000000000000000000000000000000000000"}] + }, + "privateRevealMapping": { + "type":"object","additionalProperties":false, + "required":["artifact_kind","schema_version","semantic_id","campaign_id","seed","salt","aes_key","nonce","mapping_jcs","mapping_sha256","envelope","commitment_sha256","custodian","created_at"], + "properties":{"artifact_kind":{"const":"reveal_mapping"},"schema_version":{"const":2},"semantic_id":{"$ref":"#/$defs/nonEmptyString"},"campaign_id":{"$ref":"#/$defs/nonEmptyString"},"seed":{"$ref":"#/$defs/capturedBytes"},"salt":{"$ref":"#/$defs/capturedBytes"},"aes_key":{"$ref":"#/$defs/capturedBytes"},"nonce":{"$ref":"#/$defs/capturedBytes"},"mapping_jcs":{"$ref":"#/$defs/capturedBytes"},"mapping_sha256":{"$ref":"#/$defs/sha256"},"envelope":{"$ref":"#/$defs/capturedBytes"},"commitment_sha256":{"$ref":"#/$defs/sha256"},"custodian":{"$ref":"#/$defs/githubLogin"},"created_at":{"$ref":"#/$defs/timestamp"}}, + "examples":[{"artifact_kind":"reveal_mapping","schema_version":2,"semantic_id":"reveal-1","campaign_id":"capability-validation-v2-20260726T000000Z","seed":{"utf8_or_binary_base64":"e30=","bytes":2,"sha256":"0000000000000000000000000000000000000000000000000000000000000000"},"salt":{"utf8_or_binary_base64":"e30=","bytes":2,"sha256":"0000000000000000000000000000000000000000000000000000000000000000"},"aes_key":{"utf8_or_binary_base64":"e30=","bytes":2,"sha256":"0000000000000000000000000000000000000000000000000000000000000000"},"nonce":{"utf8_or_binary_base64":"e30=","bytes":2,"sha256":"0000000000000000000000000000000000000000000000000000000000000000"},"mapping_jcs":{"utf8_or_binary_base64":"e30=","bytes":2,"sha256":"0000000000000000000000000000000000000000000000000000000000000000"},"mapping_sha256":"0000000000000000000000000000000000000000000000000000000000000000","envelope":{"utf8_or_binary_base64":"e30=","bytes":2,"sha256":"0000000000000000000000000000000000000000000000000000000000000000"},"commitment_sha256":"0000000000000000000000000000000000000000000000000000000000000000","custodian":"mohanagy","created_at":"2026-07-26T00:00:00Z"}] + }, + "privateLifecycleManifest": { + "type":"object","additionalProperties":false, + "required":["artifact_kind","schema_version","semantic_id","campaign_id","events","execution_manifest_sha256","contiguous_prefix_sha256"], + "properties":{"artifact_kind":{"const":"lifecycle_manifest"},"schema_version":{"const":2},"semantic_id":{"$ref":"#/$defs/nonEmptyString"},"campaign_id":{"$ref":"#/$defs/nonEmptyString"},"events":{"type":"array","items":{"$ref":"#/$defs/privateLifecycleRecord"}},"execution_manifest_sha256":{"$ref":"#/$defs/sha256"},"contiguous_prefix_sha256":{"$ref":"#/$defs/sha256"}}, + "examples":[{"artifact_kind":"lifecycle_manifest","schema_version":2,"semantic_id":"lifecycle-1","campaign_id":"capability-validation-v2-20260726T000000Z","events":[],"execution_manifest_sha256":"0000000000000000000000000000000000000000000000000000000000000000","contiguous_prefix_sha256":"0000000000000000000000000000000000000000000000000000000000000000"}] + }, + "privateStopObservation": { + "type":"object","additionalProperties":false, + "required":["artifact_kind","schema_version","semantic_id","campaign_id","observed_at","global_sequence","stage","evaluations","simultaneous_match_ids","first_stop_condition_id","completed_schedule_prefix_sha256","triggering_partial_row_sha256","rfc_amendment_comment","observation_sha256"], + "properties":{"artifact_kind":{"const":"stop_observation"},"schema_version":{"const":2},"semantic_id":{"$ref":"#/$defs/nonEmptyString"},"campaign_id":{"$ref":"#/$defs/nonEmptyString"},"observed_at":{"$ref":"#/$defs/timestamp"},"global_sequence":{"type":"integer","minimum":0},"stage":{"$ref":"#/$defs/nonEmptyString"},"evaluations":{"type":"array","minItems":14,"maxItems":14,"prefixItems":[ + {"allOf":[{"$ref":"#/$defs/stopEvaluation"},{"type":"object","properties":{"id":{"const":1}}}]}, + {"allOf":[{"$ref":"#/$defs/stopEvaluation"},{"type":"object","properties":{"id":{"const":2}}}]}, + {"allOf":[{"$ref":"#/$defs/stopEvaluation"},{"type":"object","properties":{"id":{"const":3}}}]}, + {"allOf":[{"$ref":"#/$defs/stopEvaluation"},{"type":"object","properties":{"id":{"const":4}}}]}, + {"allOf":[{"$ref":"#/$defs/stopEvaluation"},{"type":"object","properties":{"id":{"const":5}}}]}, + {"allOf":[{"$ref":"#/$defs/stopEvaluation"},{"type":"object","properties":{"id":{"const":6}}}]}, + {"allOf":[{"$ref":"#/$defs/stopEvaluation"},{"type":"object","properties":{"id":{"const":7}}}]}, + {"allOf":[{"$ref":"#/$defs/stopEvaluation"},{"type":"object","properties":{"id":{"const":8}}}]}, + {"allOf":[{"$ref":"#/$defs/stopEvaluation"},{"type":"object","properties":{"id":{"const":9}}}]}, + {"allOf":[{"$ref":"#/$defs/stopEvaluation"},{"type":"object","properties":{"id":{"const":10}}}]}, + {"allOf":[{"$ref":"#/$defs/stopEvaluation"},{"type":"object","properties":{"id":{"const":11}}}]}, + {"allOf":[{"$ref":"#/$defs/stopEvaluation"},{"type":"object","properties":{"id":{"const":12}}}]}, + {"allOf":[{"$ref":"#/$defs/stopEvaluation"},{"type":"object","properties":{"id":{"const":13}}}]}, + {"allOf":[{"$ref":"#/$defs/stopEvaluation"},{"type":"object","properties":{"id":{"const":14}}}]} + ],"items":false},"simultaneous_match_ids":{"type":"array","minItems":1,"uniqueItems":true,"items":{"type":"integer","minimum":1,"maximum":14}},"first_stop_condition_id":{"type":"integer","minimum":1,"maximum":14},"completed_schedule_prefix_sha256":{"$ref":"#/$defs/sha256"},"triggering_partial_row_sha256":{"$ref":"#/$defs/sha256"},"rfc_amendment_comment":{"$ref":"#/$defs/ownerCommentObservation"},"observation_sha256":{"$ref":"#/$defs/sha256"}}, + "examples":[{"artifact_kind":"stop_observation","schema_version":2,"semantic_id":"stop-1","campaign_id":"capability-validation-v2-20260726T000000Z","observed_at":"2026-07-26T00:00:00Z","global_sequence":0,"stage":"preflight","evaluations":[{"id":1,"matched":true,"evaluation_sha256":"0000000000000000000000000000000000000000000000000000000000000000"},{"id":2,"matched":false,"evaluation_sha256":"0000000000000000000000000000000000000000000000000000000000000000"},{"id":3,"matched":false,"evaluation_sha256":"0000000000000000000000000000000000000000000000000000000000000000"},{"id":4,"matched":false,"evaluation_sha256":"0000000000000000000000000000000000000000000000000000000000000000"},{"id":5,"matched":false,"evaluation_sha256":"0000000000000000000000000000000000000000000000000000000000000000"},{"id":6,"matched":false,"evaluation_sha256":"0000000000000000000000000000000000000000000000000000000000000000"},{"id":7,"matched":false,"evaluation_sha256":"0000000000000000000000000000000000000000000000000000000000000000"},{"id":8,"matched":false,"evaluation_sha256":"0000000000000000000000000000000000000000000000000000000000000000"},{"id":9,"matched":false,"evaluation_sha256":"0000000000000000000000000000000000000000000000000000000000000000"},{"id":10,"matched":false,"evaluation_sha256":"0000000000000000000000000000000000000000000000000000000000000000"},{"id":11,"matched":false,"evaluation_sha256":"0000000000000000000000000000000000000000000000000000000000000000"},{"id":12,"matched":false,"evaluation_sha256":"0000000000000000000000000000000000000000000000000000000000000000"},{"id":13,"matched":false,"evaluation_sha256":"0000000000000000000000000000000000000000000000000000000000000000"},{"id":14,"matched":false,"evaluation_sha256":"0000000000000000000000000000000000000000000000000000000000000000"}],"simultaneous_match_ids":[1],"first_stop_condition_id":1,"completed_schedule_prefix_sha256":"0000000000000000000000000000000000000000000000000000000000000000","triggering_partial_row_sha256":"0000000000000000000000000000000000000000000000000000000000000000","rfc_amendment_comment":{"repository_id":1,"repository_owner_id":1,"issue_number":577,"comment_numeric_id":1,"author_login":"mohanagy","author_numeric_id":1,"author_association":"OWNER","body_utf8":"stop","body_sha256":"0000000000000000000000000000000000000000000000000000000000000000","created_at":"2026-07-26T00:00:00Z","updated_at":"2026-07-26T00:00:00Z","includes_created_edit":false,"html_url":"https://github.com/mohanagy/madar/issues/577#issuecomment-1"},"observation_sha256":"0000000000000000000000000000000000000000000000000000000000000000"}] + }, + "derivedArchiveManifest": { + "type":"object","additionalProperties":false, + "required":["record_type","schema_version","campaign_id","public_manifest","public_manifest_jcs","archive_sha256","archive_bytes"], + "properties":{"record_type":{"const":"archive_manifest_derivation"},"schema_version":{"const":2},"campaign_id":{"$ref":"#/$defs/nonEmptyString"},"public_manifest":{"$ref":"#/$defs/publicArchiveManifest"},"public_manifest_jcs":{"$ref":"#/$defs/capturedBytes"},"archive_sha256":{"$ref":"#/$defs/sha256"},"archive_bytes":{"type":"integer","minimum":1}}, + "examples":[{"record_type":"archive_manifest_derivation","schema_version":2,"campaign_id":"capability-validation-v2-20260726T000000Z","public_manifest":{"schema_version":"madar-capability-archive-v2","campaign_id":"capability-validation-v2-20260726T000000Z","files":[{"ordinal":1,"path":"p/00000001.bin","bytes":2,"sha256":"0000000000000000000000000000000000000000000000000000000000000000"},{"ordinal":2,"path":"p/00000002.bin","bytes":2,"sha256":"0000000000000000000000000000000000000000000000000000000000000000"}]},"public_manifest_jcs":{"utf8_or_binary_base64":"e30=","bytes":2,"sha256":"0000000000000000000000000000000000000000000000000000000000000000"},"archive_sha256":"0000000000000000000000000000000000000000000000000000000000000000","archive_bytes":2}] + }, + "statObservation": { + "type":"object","additionalProperties":false, + "required":["realpath","device","inode","nlink","mode_octal","size","mtime_ns","regular_file","symlink"], + "properties":{"realpath":{"$ref":"#/$defs/absolutePath"},"device":{"$ref":"#/$defs/bigint"},"inode":{"$ref":"#/$defs/bigint"},"nlink":{"const":1},"mode_octal":{"const":"0600"},"size":{"type":"integer","minimum":1},"mtime_ns":{"$ref":"#/$defs/bigint"},"regular_file":{"const":true},"symlink":{"const":false}} + }, + "derivedArchiveCopyAttestation": { + "type":"object","additionalProperties":false, + "required":["record_type","schema_version","campaign_id","copy","absolute_path","create_flags","pre_reread_stat","file_fsync_monotonic_ns","directory_fsync_monotonic_ns","reread_stat","reread","archive_sha256","manifest_sha256","copy_identity_sha256"], + "properties":{"record_type":{"const":"archive_copy_attestation"},"schema_version":{"const":2},"campaign_id":{"$ref":"#/$defs/nonEmptyString"},"copy":{"enum":["primary","secondary"]},"absolute_path":{"$ref":"#/$defs/absolutePath"},"create_flags":{"const":["O_CREAT","O_EXCL","O_NOFOLLOW","O_WRONLY"]},"pre_reread_stat":{"$ref":"#/$defs/statObservation"},"file_fsync_monotonic_ns":{"$ref":"#/$defs/bigint"},"directory_fsync_monotonic_ns":{"$ref":"#/$defs/bigint"},"reread_stat":{"$ref":"#/$defs/statObservation"},"reread":{"$ref":"#/$defs/capturedBytes"},"archive_sha256":{"$ref":"#/$defs/sha256"},"manifest_sha256":{"$ref":"#/$defs/sha256"},"copy_identity_sha256":{"$ref":"#/$defs/sha256"}}, + "examples":[{"record_type":"archive_copy_attestation","schema_version":2,"campaign_id":"capability-validation-v2-20260726T000000Z","copy":"primary","absolute_path":"/tmp/primary.archive","create_flags":["O_CREAT","O_EXCL","O_NOFOLLOW","O_WRONLY"],"pre_reread_stat":{"realpath":"/tmp/primary.archive","device":"1","inode":"2","nlink":1,"mode_octal":"0600","size":2,"mtime_ns":"1","regular_file":true,"symlink":false},"file_fsync_monotonic_ns":"1","directory_fsync_monotonic_ns":"2","reread_stat":{"realpath":"/tmp/primary.archive","device":"1","inode":"2","nlink":1,"mode_octal":"0600","size":2,"mtime_ns":"1","regular_file":true,"symlink":false},"reread":{"utf8_or_binary_base64":"e30=","bytes":2,"sha256":"0000000000000000000000000000000000000000000000000000000000000000"},"archive_sha256":"0000000000000000000000000000000000000000000000000000000000000000","manifest_sha256":"0000000000000000000000000000000000000000000000000000000000000000","copy_identity_sha256":"0000000000000000000000000000000000000000000000000000000000000000"}] + }, + "externalArchiveVerifierAttestation": { + "type":"object","additionalProperties":false, + "required":["record_type","schema_version","campaign_id","verifier_login","candidate_receipt_sha256","primary_archive_sha256","secondary_archive_sha256","manifest_sha256","copy_identity_record_sha256","reviewed_at","attestation_comment"], + "properties":{"record_type":{"const":"archive_verifier_attestation"},"schema_version":{"const":2},"campaign_id":{"$ref":"#/$defs/nonEmptyString"},"verifier_login":{"$ref":"#/$defs/githubLogin"},"candidate_receipt_sha256":{"$ref":"#/$defs/sha256"},"primary_archive_sha256":{"$ref":"#/$defs/sha256"},"secondary_archive_sha256":{"$ref":"#/$defs/sha256"},"manifest_sha256":{"$ref":"#/$defs/sha256"},"copy_identity_record_sha256":{"$ref":"#/$defs/sha256"},"reviewed_at":{"$ref":"#/$defs/timestamp"},"attestation_comment":{"$ref":"#/$defs/roleCommentObservation"}}, + "examples":[{"record_type":"archive_verifier_attestation","schema_version":2,"campaign_id":"capability-validation-v2-20260726T000000Z","verifier_login":"verifier-one","candidate_receipt_sha256":"0000000000000000000000000000000000000000000000000000000000000000","primary_archive_sha256":"0000000000000000000000000000000000000000000000000000000000000000","secondary_archive_sha256":"0000000000000000000000000000000000000000000000000000000000000000","manifest_sha256":"0000000000000000000000000000000000000000000000000000000000000000","copy_identity_record_sha256":"0000000000000000000000000000000000000000000000000000000000000000","reviewed_at":"2026-07-26T00:00:00Z","attestation_comment":{"repository_id":1,"repository_owner_id":1,"issue_number":612,"comment_numeric_id":4,"author_login":"verifier-one","author_numeric_id":4,"author_association":"NONE","body_utf8":"verify","body_sha256":"0000000000000000000000000000000000000000000000000000000000000000","created_at":"2026-07-26T00:00:00Z","updated_at":"2026-07-26T00:00:00Z","includes_created_edit":false,"html_url":"https://github.com/mohanagy/madar/issues/612#issuecomment-4"}}] + }, + "privateReceiptBuildInput": { + "type":"object","additionalProperties":false, + "required":["artifact_kind","schema_version","semantic_id","campaign_id","sealed_evidence_root_sha256","ordered_artifacts","first_stop_observation_sha256","v1_projection_input_sha256","contract_sha256","input_manifest_jcs","builder_source_sha256","created_at"], + "properties":{"artifact_kind":{"const":"receipt_build_input"},"schema_version":{"const":2},"semantic_id":{"$ref":"#/$defs/nonEmptyString"},"campaign_id":{"$ref":"#/$defs/nonEmptyString"},"sealed_evidence_root_sha256":{"$ref":"#/$defs/sha256"},"ordered_artifacts":{"type":"array","minItems":1,"items":{"$ref":"#/$defs/archiveIndexRow"}},"first_stop_observation_sha256":{"$ref":"#/$defs/nullableSha256"},"v1_projection_input_sha256":{"$ref":"#/$defs/sha256"},"contract_sha256":{"$ref":"#/$defs/sha256"},"input_manifest_jcs":{"$ref":"#/$defs/capturedBytes"},"builder_source_sha256":{"$ref":"#/$defs/sha256"},"created_at":{"$ref":"#/$defs/timestamp"}}, + "examples":[{"artifact_kind":"receipt_build_input","schema_version":2,"semantic_id":"build-1","campaign_id":"capability-validation-v2-20260726T000000Z","sealed_evidence_root_sha256":"0000000000000000000000000000000000000000000000000000000000000000","ordered_artifacts":[{"ordinal":2,"path":"p/00000002.bin","artifact_kind":"lock_observation","semantic_id":"lock-1","bytes":2,"sha256":"0000000000000000000000000000000000000000000000000000000000000000"}],"first_stop_observation_sha256":null,"v1_projection_input_sha256":"0000000000000000000000000000000000000000000000000000000000000000","contract_sha256":"0000000000000000000000000000000000000000000000000000000000000000","input_manifest_jcs":{"utf8_or_binary_base64":"e30=","bytes":2,"sha256":"0000000000000000000000000000000000000000000000000000000000000000"},"builder_source_sha256":"0000000000000000000000000000000000000000000000000000000000000000","created_at":"2026-07-26T00:00:00Z"}] + }, + + "privateRawRepository": { + "type":"object","additionalProperties":false,"required":["artifact_kind","schema_version","semantic_id","campaign_id","repository_id","commit","tree","content"],"properties":{"artifact_kind":{"const":"raw_repository"},"schema_version":{"const":2},"semantic_id":{"$ref":"#/$defs/nonEmptyString"},"campaign_id":{"$ref":"#/$defs/nonEmptyString"},"repository_id":{"$ref":"#/$defs/nonEmptyString"},"commit":{"$ref":"#/$defs/sha"},"tree":{"$ref":"#/$defs/sha"},"content":{"$ref":"#/$defs/capturedBytes"}},"examples":[{"artifact_kind":"raw_repository","schema_version":2,"semantic_id":"repo-1","campaign_id":"capability-validation-v2-20260726T000000Z","repository_id":"documenso","commit":"0000000000000000000000000000000000000000","tree":"0000000000000000000000000000000000000000","content":{"utf8_or_binary_base64":"e30=","bytes":2,"sha256":"0000000000000000000000000000000000000000000000000000000000000000"}}] + }, + "privateGraph": { + "type":"object","additionalProperties":false,"required":["artifact_kind","schema_version","semantic_id","campaign_id","trial_id","arm","checkpoint","content"],"properties":{"artifact_kind":{"const":"graph"},"schema_version":{"const":2},"semantic_id":{"$ref":"#/$defs/nonEmptyString"},"campaign_id":{"$ref":"#/$defs/nonEmptyString"},"trial_id":{"$ref":"#/$defs/nonEmptyString"},"arm":{"enum":["graphify","madar"]},"checkpoint":{"enum":["after_clean_build","before_answer","after_answer","refresh_pre","refresh_post"]},"content":{"$ref":"#/$defs/capturedBytes"}},"examples":[{"artifact_kind":"graph","schema_version":2,"semantic_id":"graph-1","campaign_id":"capability-validation-v2-20260726T000000Z","trial_id":"trial-1","arm":"madar","checkpoint":"after_answer","content":{"utf8_or_binary_base64":"e30=","bytes":2,"sha256":"0000000000000000000000000000000000000000000000000000000000000000"}}] + }, + "privateHiddenFixture": { + "type":"object","additionalProperties":false,"required":["artifact_kind","schema_version","semantic_id","campaign_id","fixture_id","repository_id","question_id","content"],"properties":{"artifact_kind":{"const":"hidden_fixture"},"schema_version":{"const":2},"semantic_id":{"$ref":"#/$defs/nonEmptyString"},"campaign_id":{"$ref":"#/$defs/nonEmptyString"},"fixture_id":{"$ref":"#/$defs/nonEmptyString"},"repository_id":{"enum":["documenso","formbricks","openstatus"]},"question_id":{"$ref":"#/$defs/nonEmptyString"},"content":{"$ref":"#/$defs/capturedBytes"}},"examples":[{"artifact_kind":"hidden_fixture","schema_version":2,"semantic_id":"fixture-1","campaign_id":"capability-validation-v2-20260726T000000Z","fixture_id":"fixture-1","repository_id":"documenso","question_id":"documenso-document-send","content":{"utf8_or_binary_base64":"e30=","bytes":2,"sha256":"0000000000000000000000000000000000000000000000000000000000000000"}}] + }, + "privateProviderBody": { + "type":"object","additionalProperties":false,"required":["artifact_kind","schema_version","semantic_id","campaign_id","trial_id","provider_sequence","direction","operation","content"],"properties":{"artifact_kind":{"const":"provider_body"},"schema_version":{"const":2},"semantic_id":{"$ref":"#/$defs/nonEmptyString"},"campaign_id":{"$ref":"#/$defs/nonEmptyString"},"trial_id":{"$ref":"#/$defs/nonEmptyString"},"provider_sequence":{"type":"integer","minimum":1},"direction":{"enum":["request","response"]},"operation":{"enum":["count","create"]},"content":{"$ref":"#/$defs/capturedBytes"}},"examples":[{"artifact_kind":"provider_body","schema_version":2,"semantic_id":"provider-body-1","campaign_id":"capability-validation-v2-20260726T000000Z","trial_id":"trial-1","provider_sequence":1,"direction":"request","operation":"count","content":{"utf8_or_binary_base64":"e30=","bytes":2,"sha256":"0000000000000000000000000000000000000000000000000000000000000000"}}] + }, + "privateReviewWorking": { + "type":"object","additionalProperties":false,"required":["artifact_kind","schema_version","semantic_id","campaign_id","role","answer_id","content"],"properties":{"artifact_kind":{"const":"review_working"},"schema_version":{"const":2},"semantic_id":{"$ref":"#/$defs/nonEmptyString"},"campaign_id":{"$ref":"#/$defs/nonEmptyString"},"role":{"enum":["reviewer_1","reviewer_2","adjudicator"]},"answer_id":{"$ref":"#/$defs/nonEmptyString"},"content":{"$ref":"#/$defs/capturedBytes"}},"examples":[{"artifact_kind":"review_working","schema_version":2,"semantic_id":"working-1","campaign_id":"capability-validation-v2-20260726T000000Z","role":"reviewer_1","answer_id":"A-0000000000000000","content":{"utf8_or_binary_base64":"e30=","bytes":2,"sha256":"0000000000000000000000000000000000000000000000000000000000000000"}}] + }, + "privateDossierExcerpt": { + "type":"object","additionalProperties":false,"required":["artifact_kind","schema_version","semantic_id","campaign_id","question_id","path","start_line","end_line","file_bytes","file_sha256","excerpt_bytes","excerpt_sha256","text"],"properties":{"artifact_kind":{"const":"dossier_excerpt"},"schema_version":{"const":2},"semantic_id":{"$ref":"#/$defs/nonEmptyString"},"campaign_id":{"$ref":"#/$defs/nonEmptyString"},"question_id":{"$ref":"#/$defs/nonEmptyString"},"path":{"type":"string","minLength":1},"start_line":{"const":1},"end_line":{"type":"integer","minimum":1},"file_bytes":{"type":"integer","minimum":1},"file_sha256":{"$ref":"#/$defs/sha256"},"excerpt_bytes":{"type":"integer","minimum":1},"excerpt_sha256":{"$ref":"#/$defs/sha256"},"text":{"$ref":"#/$defs/capturedBytes"}},"examples":[{"artifact_kind":"dossier_excerpt","schema_version":2,"semantic_id":"excerpt-1","campaign_id":"capability-validation-v2-20260726T000000Z","question_id":"documenso-document-send","path":"src/a.ts","start_line":1,"end_line":1,"file_bytes":2,"file_sha256":"0000000000000000000000000000000000000000000000000000000000000000","excerpt_bytes":2,"excerpt_sha256":"0000000000000000000000000000000000000000000000000000000000000000","text":{"utf8_or_binary_base64":"e30=","bytes":2,"sha256":"0000000000000000000000000000000000000000000000000000000000000000"}}] + }, + + "privateEvidenceEnvelope": { + "title": "Local-only closed private evidence envelope", + "description": "Implementation selects this local fragment explicitly. Each artifact kind is represented by exactly one non-overlapping branch; there is no generic or catch-all private artifact.", + "oneOf": [ + {"$ref": "#/$defs/privateLockObservation"}, + {"$ref": "#/$defs/privateRoleAcceptance"}, + {"$ref": "#/$defs/privateEnvironmentManifest"}, + {"$ref": "#/$defs/privateContainmentObservation"}, + {"$ref": "#/$defs/privateContainmentProbe"}, + {"$ref": "#/$defs/privateJournalFrame"}, + {"$ref": "#/$defs/privateLedgerFrame"}, + {"$ref": "#/$defs/privateProviderEvent"}, + {"$ref": "#/$defs/privateToolEvent"}, + {"$ref": "#/$defs/privateTranscript"}, + {"$ref": "#/$defs/privateMachineGradeJoin"}, + {"$ref": "#/$defs/privateDossier"}, + {"$ref": "#/$defs/privateBlindBundle"}, + {"$ref": "#/$defs/privateReview"}, + {"$ref": "#/$defs/privateAdjudication"}, + {"$ref": "#/$defs/privateRevealMapping"}, + {"$ref": "#/$defs/privateLifecycleManifest"}, + {"$ref": "#/$defs/privateStopObservation"}, + {"$ref": "#/$defs/privateReceiptBuildInput"}, + {"$ref": "#/$defs/privateRawRepository"}, + {"$ref": "#/$defs/privateGraph"}, + {"$ref": "#/$defs/privateHiddenFixture"}, + {"$ref": "#/$defs/privateProviderBody"}, + {"$ref": "#/$defs/privateReviewWorking"}, + {"$ref": "#/$defs/privateDossierExcerpt"} + ] + } + } +}