{
  "date": "2026-09-21",
  "kind": "One exploratory agent migration, reviewed against its initial snapshot",
  "repository": "https://github.com/tetrodotoxin-dev/Godot",
  "base_revision": "f0d7e1817ebefb6f46b9c17b3aef34765dca385e",
  "task_summary": "Change convolution apply to borrow const image_kernel* instead of passing image_kernel by value, retaining the UUID, unchanged semantics and ownership, with old by-value representation rejected before invocation.",
  "supplied_constraints": [
    "Kernel record and coefficient storage are borrowed only until the synchronous call returns.",
    "Keep the UUID, pixel behavior, source immutability and output ownership unchanged.",
    "Update native CPU/CUDA and GDScript bridge producers and consumers.",
    "Reject the old by-value callable representation under the unchanged UUID before invocation.",
    "Use existing relevant checks and add meaningful boundary coverage.",
    "Work only in the isolated checkout; no dependency edits, commits or Markdown edits."
  ],
  "agent_context": {
    "conversation_history": "None; a fresh agent received the task and repository paths.",
    "available_material": "Checkout, normal workspace contributor instructions and dependency sources.",
    "model": "Inherited session default; no separate model/version or sampling comparison recorded.",
    "parent_intervention": "Requested initial inventory and an evidence handoff with retained logs. No implementation advice was sent after assignment.",
    "external_sources_consulted": [
      "AGENTS.md",
      "tetrodotoxin/tetrodotoxin/language/dialect.hpp",
      "tetrodotoxin/ttx/semantic/negotiation/binding.hpp",
      "tetrodotoxin/ttx/semantic/negotiation/binding.cpp",
      "tetrodotoxin/ttx/semantic/negotiation/query.hpp",
      "tetrodotoxin/ttx/data/form/native.hpp",
      "tetrodotoxin/.vscode/format.sh",
      "tetrodotoxin/.clang-format"
    ]
  },
  "baseline_exclusions": [
    "demo/lab.gd",
    "demo/lab.tscn",
    "adapters/imaging/editor/operations.gd"
  ],
  "baseline_exclusions_preserved_byte_for_byte": true,
  "predeclared_review_criteria": [
    "All direct producers and consumers agree",
    "Existing pixel behavior and lifetime assertions unchanged",
    "Old callable representation rejects without invocation",
    "Inventory new public surfaces, compatibility routes, owners and retained state",
    "Distinguish necessary migration work from unrelated machinery; do not equate line count with bloat"
  ],
  "changed_files": [
    "adapters/imaging/scripts/image.cpp",
    "adapters/imaging/scripts/image.hpp",
    "imaging/contracts/convolve.hpp",
    "imaging/contracts/image.h",
    "imaging/cpu/convolve.cpp",
    "imaging/cpu/convolve.hpp",
    "imaging/cpu/image.cpp",
    "imaging/cuda/convolve.cpp",
    "imaging/cuda/convolve.hpp",
    "imaging/cuda/image.cpp",
    "imaging/graph/operation.hpp",
    "tests/image_check.cpp"
  ],
  "delta": {
    "production_files": 11,
    "production_lines_added": 31,
    "production_lines_removed": 25,
    "test_files": 1,
    "test_lines_added": 66,
    "test_lines_removed": 0,
    "new_production_files": 0,
    "additional_production_apis": 0,
    "compatibility_branches_added": 0
  },
  "review": [
    "All direct native producers, both script bridge table paths and the typed native consumer use the pointer signature.",
    "Existing UUID and checked Binding::provide implementation are unchanged.",
    "Existing algorithm bodies, storage owners and behavioral assertions were retained.",
    "The new fixture requests the old signature from real CPU/CUDA providers and observes Rejected with untouched output API storage.",
    "The old signature exists only as a negative-test description; it is not exposed as an alternate production path.",
    "The positive fixture observes an identity convolution result after the local kernel and coefficient scopes end. This is behavioral coverage, not proof of all lifetime behavior.",
    "The script provider selector reads TTX_IMAGE_PROVIDER; the three installed client checks exercise distinct provider choices.",
    "Eleven production files still repeat or forward parts of this signature. Representation agreement does not automate source migration."
  ],
  "validation": [
    {
      "name": "cpu-native",
      "command": "bazel --output_user_root=$CHECKOUT/.bin/bazel-user-root test //tests:image_check --config=release --test_output=all --repo_contents_cache= --nocache_test_results",
      "exit_code": 0,
      "original_log_sha256": "ac7b98a9786b1a45609654351e9fdc1527f438a24e8da5e17a96206ff3c354e9"
    },
    {
      "name": "addon-cuda",
      "command": "bazel --output_user_root=$CHECKOUT/.bin/bazel-user-root build //:addon --config=release --config=cuda --repo_contents_cache=",
      "exit_code": 0,
      "original_log_sha256": "8d89851159ff74c8155612a8efc01813ee05103ea0c4fe9acf9cc6f90df68c66"
    },
    {
      "name": "cuda-native",
      "command": "bazel --output_user_root=$CHECKOUT/.bin/bazel-user-root test //tests:image_check --config=release --config=cuda --test_output=all --repo_contents_cache= --nocache_test_results",
      "exit_code": 0,
      "original_log_sha256": "579fd1958bbb1107b4d4fd6e1ac6a7ab6c7fadb7031b8183e6148bcd3cf720d7"
    },
    {
      "name": "addon-install",
      "command": "tools/install-addon.sh .bin/contract-project",
      "exit_code": 0,
      "original_log_sha256": "a8430a8ae41e11514d6b5dd09dbbbc883080c9886415fb2cc4f8fcccfb4234a3"
    },
    {
      "name": "godot-import",
      "command": "godot --headless --editor --path .bin/contract-project --import",
      "exit_code": 0,
      "original_log_sha256": "32d26967e2e458eeabf4e54d932cc39a5f19a9655dfe22912a57f0c739e846fe"
    },
    {
      "name": "godot-cpu",
      "command": "env TTX_IMAGE_PROVIDER=cpu godot --headless --path .bin/contract-project --script res://addons/godot_ttx/godot_check.gd",
      "exit_code": 0,
      "original_log_sha256": "8c97a353e80da7403e140bf72ab0742aa63e2f8d040a229c1a85f56618cfded5"
    },
    {
      "name": "godot-gdscript",
      "command": "env TTX_IMAGE_PROVIDER=gdscript godot --headless --path .bin/contract-project --script res://addons/godot_ttx/godot_check.gd",
      "exit_code": 0,
      "original_log_sha256": "8c97a353e80da7403e140bf72ab0742aa63e2f8d040a229c1a85f56618cfded5"
    },
    {
      "name": "godot-cuda",
      "command": "env TTX_IMAGE_PROVIDER=cuda godot --headless --path .bin/contract-project --script res://addons/godot_ttx/godot_check.gd",
      "exit_code": 0,
      "original_log_sha256": "8c97a353e80da7403e140bf72ab0742aa63e2f8d040a229c1a85f56618cfded5"
    },
    {
      "name": "gdscript-provider",
      "command": "godot --headless --path .bin/contract-project --script $CHECKOUT/tests/gdscript/check.gd -- --cuda",
      "exit_code": 0,
      "original_log_sha256": "40b1aba3733704456f256c35104f3b2926a3ea96e101ed291c982429f25215dd"
    },
    {
      "name": "project-compute",
      "command": "godot --headless --path .bin/contract-project --script $CHECKOUT/tests/compute/check.gd",
      "exit_code": 0,
      "original_log_sha256": "031a6883a2792102be5590391c24f484b36d6212f40dee8d5680900283cd3e75"
    },
    {
      "name": "diff-check",
      "command": "git diff --check",
      "exit_code": 0,
      "original_log_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
    },
    {
      "name": "comments",
      "command": "bash .bin/contract-comment-check.sh",
      "exit_code": 0,
      "original_log_sha256": "15d907547019156c4456e0247ff925a476199dfdf109322e592efffff8cf125f"
    }
  ],
  "validation_environment": {
    "gpu": "NVIDIA GeForce RTX 5070",
    "godot": "4.7.2.stable.arch_linux.ed1daf0bf",
    "bazel": "9.2.0"
  },
  "dependency_revisions_observed_after_validation": {
    "Tetrodotoxin": "046c4a3d450a5b7c59f7e9e90166db0dc3c25e59",
    "CUDA": "af54997bb408609d9779370530bf516398972157",
    "working_trees": "Both clean when inspected after validation; dependencies were read through sibling symlinks, not snapshotted before the experiment."
  },
  "setup": [
    "mkdir -p .bin/contract-project/.godot",
    "sed '/^run\\/main_scene=/d' demo/project.godot > .bin/contract-project/project.godot",
    "cp -r demo/compute demo/policies .bin/contract-project/",
    "printf '%s\\n' res://addons/godot_ttx/godot_ttx.gdextension > .bin/contract-project/.godot/extension_list.cfg"
  ],
  "notes": [
    "Validation commands were repeated once to retain their console logs; this is still one implementation run.",
    "Both native tests used --nocache_test_results. Build actions reused valid cached results.",
    "Local Bazel cache flags and elevated execution were needed for sandbox/server access and the GPU.",
    "The published patch excludes the three inherited UI edits and has not been merged into the lab.",
    "Log paths are substituted with $CHECKOUT and $WORKSPACE. Log hashes refer to the original local logs, before substitution."
  ],
  "limitations": [
    "A small, explicit ABI migration is not an open-ended feature design task.",
    "The prompt supplied the compatibility policy and the repository supplied existing tests; the agent did not independently decide either.",
    "No repeated samples, alternative architecture, human comparison or model comparison was performed.",
    "There was no before/after latency benchmark, full repository suite, rendered comparison or sanitizer run.",
    "The old ABI was directly injected only into native CPU/CUDA bindings. GDScript bridge rejection was inspected through its shared binding implementation, not tested with an old ABI request.",
    "A single result cannot establish causality, productivity improvement or long-term code growth."
  ],
  "artifacts": {
    "patch": "/experiments/convolution-contract.patch",
    "checks": "/experiments/convolution-contract-checks.txt"
  }
}
