Skip to content
Benchmark run hard-smoke-saluki-fixed-20261011T165800Z

Benchmark run hard-smoke-saluki-fixed-20261011T165800Z

This page contains exactly the publishable benchmark observations recorded in run hard-smoke-saluki-fixed-20261011T165800Z; it does not select or aggregate them. Return to the run index or view aggregate metrics.

Interactive browser

Rows are pre-aggregated by task, target, prompt variant, MCP-instruction mode, context, arm, and restriction. Numeric values show median (p50), IQR, p90, maximum, and sample count. Boolean checks show pass counts and success rates. Filters apply to these summary groups; per-run observations remain available on their run pages.

Loading benchmark results…

Baseline vs semedit

Comparison evaluates baseline and semedit values within each restriction policy, target, and context group. Negative changes mark improvements for these lower-is-better metrics; positive changes mark degradations.

Detailed observations

Empirical telemetry measuring wall-clock latency, token usage, tool turns, and compiler correctness when AI coding agents perform code modifications.

Every benchmark pairs Vanilla LLM (standard file editing tools) against Semedit MCP (deterministic AST compiler operations).

Benchmark Methodology & Transparency

  • Reproducibility & Provenance: Self-contained txtar archives define test scenarios. Links below resolve to commit-anchored GitHub source files for published commits, or cryptographic SHA-256 fingerprints for uncommitted local fixtures.
  • Model Cost: Tables report model-specific credit consumption where a target model has a declared schedule: (uncached input × input credits + cached input × cached credits + (reasoning + visible output) × output credits) / 1,000,000. Thinking tokens use the output rate. ADR-0043 defines the per-million-token credit rates.
  • Multi-Level Correctness Oracle: Four validation levels evaluate each trial:
    1. Level 1 (Mutation Policy): Restricts file modifications strictly to authorized paths.
    2. Level 2 (AST Invariants): Compiler AST verification of required symbols, imports, and relative declaration ordering.
    3. Level 3 (Clean Build): Strict compilation validation with zero compiler or typecheck errors.
    4. Level 4 (Test Suite): Unit and integration test suite execution.
  • Isolated Sandboxing: Each trial executes in an ephemeral directory with pristine git and module state.

Test case: task-09-composite-refactor

Target: opencode/amdbeast/Kujira/Underdog-Saluki-27B-1.0-MTP-GGUF:latest

explicit prompt · prescriptive MCP instructions · write semedit restriction

SettingValue
Test casetask-09-composite-refactor
Targetopencode/amdbeast/Kujira/Underdog-Saluki-27B-1.0-MTP-GGUF:latest
Prompt variantexplicit
MCP server instructionsprescriptive
Semedit arm restrictionwrite
Run provenancefixture_dependency_preparation=go-list-readonly-deps-test,local_model_context_tokens=65536,local_model_limits_source=llama.cpp-props,local_model_output_tokens=8192,provider_transport=opencode_attached_server_v1
Fixturetestdata/bench/task_09_composite_refactor.txtar

Vanilla LLM Prompt:

Do not edit tests. You are forbidden to modify protected files: “go.mod”, “go.sum”.

In config/config.go: rename Config.Port to Config.ListenPort, insert DefaultConfig() *Config returning Host localhost and ListenPort 8080, and clean up unused imports. Do not use semantic editing MCP tools; use standard file editing. When done, output DONE.

Initial Workspace State (Before Edit)
package config

import (
	"archive/tar"
	"fmt"
)

type Config struct {
	Host string
	Port int
}

func (c *Config) Addr() string {
	return fmt.Sprintf("%s:%d", c.Host, c.Port)
}
MetricVanilla (Small)Semedit Explicit (Small)Δ (Small)Vanilla (Large)MCP (Large)Δ (Large)
Wall-Clock Latency28.06s88.12s+214.1%———
Process Start → First Event8.65s26.44s————
First Event → First Tool Call2.07s5.04s————
MCP Initialize → First Semantic Call——————
MCP Server Start → Initialize——————
Top-Level User Turns110%———
Internal Tool Cycles48+100.0%———
Initial Load / Discovery Turns20-100.0%———
MCP Discovery / Schema Turns00————
Tool Invocations (per run)48+100.0%———
Output Tokens5902165+266.9%———
Reasoning / Thinking Tokens00————
Total Input Tokens36200180008+397.3%———
Cached Input Tokens29121152715+424.4%———
Uncached Input Tokens707927293+285.5%———
Cost——————
Cached vs Uncached Token Ratio4.11:15.60:1+36.0%———
Oracle L1: Mutation PolicyPASSPASS————
Oracle L2: AST InvariantsPASSPASS————
Oracle L3: Clean BuildPASSPASS————
Oracle L4: Verification TestPASSPASS————
Semantic Tool Invocation Verified (per run)N/APASS————
Baseline vs Semedit Explicit in Small Context
  • Vanilla (Baseline vs Semedit Explicit in Small Context) Edit: File config/config.go modified (15 lines -> 21 lines)
  • Semedit MCP (Baseline vs Semedit Explicit in Small Context) Edit: File config/config.go modified (15 lines -> 16 lines)
#VanillaSemedit MCP
1read (✓ ✓)
{
  "filePath": "/Users/alessandro/sources/semantic-editor/.scratch/benchmarks/run_opencode_baseline-diff_small_task-09-composite-refactor_1791737789729246000/config/config.go"
}
semedit_semantic_lookup (✓ ✓)
{
  "file": "config/config.go",
  "language": "go",
  "symbol": "Config.Port"
}
2grep (✓ ✓)
{
  "path": "/Users/alessandro/sources/semantic-editor/.scratch/benchmarks/run_opencode_baseline-diff_small_task-09-composite-refactor_1791737789729246000",
  "pattern": "\\.Port"
}
semedit_semantic_inspect_symbol (✓ ✓)
{
  "file": "config/config.go",
  "language": "go",
  "symbol": "Config.Addr"
}
3edit (✓ ✓)
{
  "filePath": "/Users/alessandro/sources/semantic-editor/.scratch/benchmarks/run_opencode_baseline-diff_small_task-09-composite-refactor_1791737789729246000/config/config.go",
  "newString": "import (\n\t\"fmt\"\n)\n\ntype Config struct {\n\tHost string\n\tListenPort int\n}\n\nfunc (c *Config) Addr() string {\n\treturn fmt.Sprintf(\"%s:%d\", c.Host, c.ListenPort)\n}\n\nfunc DefaultConfig() *Config {\n\treturn \u0026Config{\n\t\tHost:       \"localhost\",\n\t\tListenPort: 8080,\n\t}\n}",
  "oldString": "import (\n\t\"archive/tar\"\n\t\"fmt\"\n)\n\ntype Config struct {\n\tHost string\n\tPort int\n}\n\nfunc (c *Config) Addr() string {\n\treturn fmt.Sprintf(\"%s:%d\", c.Host, c.Port)\n}"
}
read (✓ ✓)
{
  "filePath": "/Users/alessandro/sources/semantic-editor/.scratch/benchmarks/run_opencode_semedit-explicit_small-explicit_task-09-composite-refactor_1791738036259022000/config/config.go"
}
4bash (✓ ✓)
{
  "command": "go build ./config/",
  "workdir": "/Users/alessandro/sources/semantic-editor/.scratch/benchmarks/run_opencode_baseline-diff_small_task-09-composite-refactor_1791737789729246000"
}
semedit_semantic_batch (✓ ✗): Batch child results are intermediate and do not provide final continuation targets. Critical result (JSON): {"result":{"status":"error","results":[{"status":"error","application_state":"unknown","error":"edit 1 params: unknown parameter \"kind\" for \"semantic_insert_function\"; supported keys are [access, access_modifier, auto-organize-imports, auto_organize_imports, file, placement, source, target, target_symbol] Required parameters: [file, source]","tool":"semantic_insert_function"}],"workspace_root":"/U
{
  "edits": [
    {
      "params": {
        "file": "config/config.go",
        "symbol": "Config.Port",
        "to": "ListenPort"
      },
      "tool": "semantic_rename"
    },
    {
      "params": {
        "file": "config/config.go",
        "kind": "function",
        "placement": "public_end",
        "source": "func DefaultConfig() *Config { return \u0026Config{Host: \"localhost\", ListenPort: 8080} }"
      },
      "tool": "semantic_insert_function"
    },
    {
      "params": {
        "file": "config/config.go"
      },
      "tool": "semantic_organize_imports"
    }
  ]
}
5—read (✓ ✓)
{
  "filePath": "/Users/alessandro/sources/semantic-editor/.scratch/benchmarks/run_opencode_semedit-explicit_small-explicit_task-09-composite-refactor_1791738036259022000/config/config.go"
}
6—semedit_semantic_batch (✓ ✓)
{
  "edits": [
    {
      "params": {
        "file": "config/config.go",
        "symbol": "Config.Port",
        "to": "ListenPort"
      },
      "tool": "semantic_rename"
    },
    {
      "params": {
        "file": "config/config.go",
        "placement": "public_end",
        "source": "func DefaultConfig() *Config { return \u0026Config{Host: \"localhost\", ListenPort: 8080} }"
      },
      "tool": "semantic_insert_function"
    },
    {
      "params": {
        "file": "config/config.go"
      },
      "tool": "semantic_organize_imports"
    }
  ]
}
7—read (✓ ✓)
{
  "filePath": "/Users/alessandro/sources/semantic-editor/.scratch/benchmarks/run_opencode_semedit-explicit_small-explicit_task-09-composite-refactor_1791738036259022000/config/config.go"
}
8—bash (✓ ✓)
{
  "command": "go build ./... \u0026\u0026 go test ./... 2\u003e\u00261 | tail -20",
  "workdir": "/Users/alessandro/sources/semantic-editor/.scratch/benchmarks/run_opencode_semedit-explicit_small-explicit_task-09-composite-refactor_1791738036259022000"
}

Semedit integration feedback (agent opinion, excluded from measurements):

Integration feedback unavailable: OpenCode session workspace, target, or arm changed

Baseline vs Semedit Explicit in Large Context
#VanillaSemedit MCP
1not publishednot published

implicit prompt · prescriptive MCP instructions · write semedit restriction

SettingValue
Test casetask-09-composite-refactor
Targetopencode/amdbeast/Kujira/Underdog-Saluki-27B-1.0-MTP-GGUF:latest
Prompt variantimplicit
MCP server instructionsprescriptive
Semedit arm restrictionwrite
Run provenancefixture_dependency_preparation=go-list-readonly-deps-test,local_model_context_tokens=65536,local_model_limits_source=llama.cpp-props,local_model_output_tokens=8192,provider_transport=opencode_attached_server_v1
Fixturetestdata/bench/task_09_composite_refactor.txtar

Vanilla LLM Prompt:

Do not edit tests. You are forbidden to modify protected files: “go.mod”, “go.sum”.

In config/config.go: rename Config.Port to Config.ListenPort, insert DefaultConfig() *Config returning Host localhost and ListenPort 8080, and clean up unused imports. Do not use semantic editing MCP tools; use standard file editing. When done, output DONE.

Semedit MCP Prompt:

Do not edit tests. You are forbidden to modify protected files: “go.mod”, “go.sum”.

In config/config.go: rename Config.Port to Config.ListenPort, insert DefaultConfig() *Config returning Host localhost and ListenPort 8080, and clean up unused imports. Use semedit semantic tools for supported source code modifications. Shell commands for builds and tests are allowed. When done, output DONE.

Initial Workspace State (Before Edit)
package config

import (
	"archive/tar"
	"fmt"
)

type Config struct {
	Host string
	Port int
}

func (c *Config) Addr() string {
	return fmt.Sprintf("%s:%d", c.Host, c.Port)
}

Test case: task-11-mixed-sink-api-migration

Target: opencode/amdbeast/Kujira/Underdog-Saluki-27B-1.0-MTP-GGUF:latest

explicit prompt · prescriptive MCP instructions · write semedit restriction

SettingValue
Test casetask-11-mixed-sink-api-migration
Targetopencode/amdbeast/Kujira/Underdog-Saluki-27B-1.0-MTP-GGUF:latest
Prompt variantexplicit
MCP server instructionsprescriptive
Semedit arm restrictionwrite
Run provenancefixture_dependency_preparation=go-list-readonly-deps-test,local_model_context_tokens=65536,local_model_limits_source=llama.cpp-props,local_model_output_tokens=8192,provider_transport=opencode_attached_server_v1
Fixturetestdata/bench/task_11_mixed_sink_api_migration.txtar

Vanilla LLM Prompt:

Do not edit tests. You are forbidden to modify protected files: “go.mod”, “go.sum”.

Audit event kinds may contain inconsistent whitespace and casing. Add the public audit.NormalizeKind(kind string) string function in audit/normalize.go to remove surrounding whitespace and lowercase the kind. Apply it in Dispatcher.Record before persistence, and classify normalized probe events as control traffic, like health. Do not change the metrics or legacy export protocols. Preserve the module metadata and tests, and leave the workspace verified. Do not use semantic editing MCP tools; use standard file editing. When done, output DONE.

Initial Workspace State (Before Edit)
// Package audit leaves room for normalization rules owned by the delivery boundary.
package audit
MetricVanilla (Small)Semedit Explicit (Small)Δ (Small)Vanilla (Large)MCP (Large)Δ (Large)
Wall-Clock Latency194.51s107.48s-44.7%———
Process Start → First Event8.60s24.51s————
First Event → First Tool Call1.22s1.86s————
MCP Initialize → First Semantic Call——————
MCP Server Start → Initialize——————
Top-Level User Turns110%———
Internal Tool Cycles3213-59.4%———
Initial Load / Discovery Turns220-100.0%———
MCP Discovery / Schema Turns00————
Tool Invocations (per run)3213-59.4%———
Output Tokens79072505-68.3%———
Reasoning / Thinking Tokens00————
Total Input Tokens223200309247+38.6%———
Cached Input Tokens210584272230+29.3%———
Uncached Input Tokens1261637017+193.4%———
Cost——————
Cached vs Uncached Token Ratio16.69:17.35:1-55.9%———
Oracle L1: Mutation PolicyPASSPASS————
Oracle L2: AST InvariantsPASSPASS————
Oracle L3: Clean BuildPASSPASS————
Oracle L4: Verification TestPASSPASS————
Semantic Tool Invocation Verified (per run)N/APASS————
Baseline vs Semedit Explicit in Small Context
  • Vanilla (Baseline vs Semedit Explicit in Small Context) Edit: File audit/normalize.go modified (2 lines -> 9 lines)
  • Semedit MCP (Baseline vs Semedit Explicit in Small Context) Edit: File audit/normalize.go modified (2 lines -> 8 lines)
#VanillaSemedit MCP
1bash (✓ ✓)
{
  "command": "ls -la"
}
semedit_semantic_outline (✓ ✓)
{
  "include_unexported": true,
  "path": "."
}
2glob (✓ ✓)
{
  "pattern": "**/*audit*"
}
semedit_semantic_find_references (✓ ✓)
{
  "symbol": "Dispatcher.Record"
}
3read (✓ ✓)
{
  "filePath": "/Users/alessandro/sources/semantic-editor/.scratch/benchmarks/run_opencode_baseline-diff_small_task-11-mixed-sink-api-migration_1791738126356634000/audit"
}
semedit_semantic_find_references (✓ ✗): Critical result (JSON): {"application_state":"unknown","error":"find_references: go: symbol not found: \"audit.Classify\""} find_references: go: symbol not found: "audit.Classify"
{
  "symbol": "audit.Classify"
}
4read (✓ ✓)
{
  "filePath": "/Users/alessandro/sources/semantic-editor/.scratch/benchmarks/run_opencode_baseline-diff_small_task-11-mixed-sink-api-migration_1791738126356634000/docs/audit-sinks.md"
}
semedit_semantic_inspect_symbol (✓ ✓)
{
  "file": "audit/summary.go",
  "symbol": "Classify"
}
5read (✓ ✓)
{
  "filePath": "/Users/alessandro/sources/semantic-editor/.scratch/benchmarks/run_opencode_baseline-diff_small_task-11-mixed-sink-api-migration_1791738126356634000/audit/event.go"
}
read (✓ ✓)
{
  "filePath": "/Users/alessandro/sources/semantic-editor/.scratch/benchmarks/run_opencode_semedit-explicit_small-explicit_task-11-mixed-sink-api-migration_1791738485481223000/service/dispatch.go"
}
6read (✓ ✓)
{
  "filePath": "/Users/alessandro/sources/semantic-editor/.scratch/benchmarks/run_opencode_baseline-diff_small_task-11-mixed-sink-api-migration_1791738126356634000/audit/normalize.go"
}
read (✓ ✓)
{
  "filePath": "/Users/alessandro/sources/semantic-editor/.scratch/benchmarks/run_opencode_semedit-explicit_small-explicit_task-11-mixed-sink-api-migration_1791738485481223000/audit/summary.go"
}
7read (✓ ✓)
{
  "filePath": "/Users/alessandro/sources/semantic-editor/.scratch/benchmarks/run_opencode_baseline-diff_small_task-11-mixed-sink-api-migration_1791738126356634000/audit/sink.go"
}
read (✓ ✓)
{
  "filePath": "/Users/alessandro/sources/semantic-editor/.scratch/benchmarks/run_opencode_semedit-explicit_small-explicit_task-11-mixed-sink-api-migration_1791738485481223000/audit/normalize.go"
}
8read (✓ ✓)
{
  "filePath": "/Users/alessandro/sources/semantic-editor/.scratch/benchmarks/run_opencode_baseline-diff_small_task-11-mixed-sink-api-migration_1791738126356634000/audit/summary.go"
}
semedit_semantic_batch (✓ ✗): Batch child results are intermediate and do not provide final continuation targets. Critical result (JSON): {"result":{"status":"error","results":[{"status":"error","application_state":"unknown","error":"edit 1 params: unknown parameter \"source\" for \"semantic_replace_body\"; supported keys are [auto-organize-imports, auto_organize_imports, body, expected-revision, expected_revision, file, symbol] Required parameters: [body, file, symbol]","tool":"semantic_replace_body"}],"workspace_root":"/Users/alessand
{
  "edits": [
    {
      "params": {
        "auto_organize_imports": true,
        "file": "audit/normalize.go",
        "kind": "function",
        "placement": "file_end",
        "source": "func NormalizeKind(kind string) string {\n\treturn strings.ToLower(strings.TrimSpace(kind))\n}"
      },
      "tool": "semantic_insert_construct"
    },
    {
      "params": {
        "file": "service/dispatch.go",
        "source": "event.Kind = audit.NormalizeKind(event.Kind)\n\treturn d.sink.Write(event)",
        "symbol": "Dispatcher.Record"
      },
      "tool": "semantic_replace_body"
    },
    {
      "params": {
        "file": "audit/summary.go",
        "source": "switch NormalizeKind(kind) {\n\tcase \"health\", \"probe\":\n\t\treturn \"control\"\n\tdefault:\n\t\treturn \"data\"\n\t}",
        "symbol": "Classify"
      },
      "tool": "semantic_replace_body"
    },
    {
      "params": {
        "file": "audit/normalize.go"
      },
      "tool": "semantic_organize_imports"
    }
  ]
}
9read (✓ ✓)
{
  "filePath": "/Users/alessandro/sources/semantic-editor/.scratch/benchmarks/run_opencode_baseline-diff_small_task-11-mixed-sink-api-migration_1791738126356634000/audit/event_test.go"
}
semedit_semantic_batch (✓ ✓)
{
  "edits": [
    {
      "params": {
        "body": "event.Kind = audit.NormalizeKind(event.Kind)\n\treturn d.sink.Write(event)",
        "file": "service/dispatch.go",
        "symbol": "Dispatcher.Record"
      },
      "tool": "semantic_replace_body"
    },
    {
      "params": {
        "body": "switch NormalizeKind(kind) {\n\tcase \"health\", \"probe\":\n\t\treturn \"control\"\n\tdefault:\n\t\treturn \"data\"\n\t}",
        "file": "audit/summary.go",
        "symbol": "Classify"
      },
      "tool": "semantic_replace_body"
    },
    {
      "params": {
        "file": "audit/normalize.go"
      },
      "tool": "semantic_organize_imports"
    }
  ]
}
10read (✓ ✓)
{
  "filePath": "/Users/alessandro/sources/semantic-editor/.scratch/benchmarks/run_opencode_baseline-diff_small_task-11-mixed-sink-api-migration_1791738126356634000/audit/summary_test.go"
}
read (✓ ✓)
{
  "filePath": "/Users/alessandro/sources/semantic-editor/.scratch/benchmarks/run_opencode_semedit-explicit_small-explicit_task-11-mixed-sink-api-migration_1791738485481223000/audit/normalize.go"
}
11read (✓ ✓)
{
  "filePath": "/Users/alessandro/sources/semantic-editor/.scratch/benchmarks/run_opencode_baseline-diff_small_task-11-mixed-sink-api-migration_1791738126356634000/service"
}
semedit_semantic_insert_construct (✓ ✓)
{
  "auto_organize_imports": true,
  "file": "audit/normalize.go",
  "kind": "function",
  "placement": "file_end",
  "source": "func NormalizeKind(kind string) string {\n\treturn strings.ToLower(strings.TrimSpace(kind))\n}"
}
12read (✓ ✓)
{
  "filePath": "/Users/alessandro/sources/semantic-editor/.scratch/benchmarks/run_opencode_baseline-diff_small_task-11-mixed-sink-api-migration_1791738126356634000/metrics"
}
bash (✓ ✓)
{
  "command": "go build ./... \u0026\u0026 go test ./..."
}
13read (✓ ✓)
{
  "filePath": "/Users/alessandro/sources/semantic-editor/.scratch/benchmarks/run_opencode_baseline-diff_small_task-11-mixed-sink-api-migration_1791738126356634000/legacy"
}
bash (✓ ✓)
{
  "command": "go build -buildvcs=false ./... \u0026\u0026 go test -buildvcs=false ./..."
}
14read (✓ ✓)
{
  "filePath": "/Users/alessandro/sources/semantic-editor/.scratch/benchmarks/run_opencode_baseline-diff_small_task-11-mixed-sink-api-migration_1791738126356634000/cmd"
}
—
15read (✓ ✓)
{
  "filePath": "/Users/alessandro/sources/semantic-editor/.scratch/benchmarks/run_opencode_baseline-diff_small_task-11-mixed-sink-api-migration_1791738126356634000/service/dispatch.go"
}
—
16read (✓ ✓)
{
  "filePath": "/Users/alessandro/sources/semantic-editor/.scratch/benchmarks/run_opencode_baseline-diff_small_task-11-mixed-sink-api-migration_1791738126356634000/service/dispatch_test.go"
}
—
17read (✓ ✓)
{
  "filePath": "/Users/alessandro/sources/semantic-editor/.scratch/benchmarks/run_opencode_baseline-diff_small_task-11-mixed-sink-api-migration_1791738126356634000/metrics/writer.go"
}
—
18read (✓ ✓)
{
  "filePath": "/Users/alessandro/sources/semantic-editor/.scratch/benchmarks/run_opencode_baseline-diff_small_task-11-mixed-sink-api-migration_1791738126356634000/legacy/export.go"
}
—
19read (✓ ✓)
{
  "filePath": "/Users/alessandro/sources/semantic-editor/.scratch/benchmarks/run_opencode_baseline-diff_small_task-11-mixed-sink-api-migration_1791738126356634000/go.mod"
}
—
20grep (✓ ✓)
{
  "path": "/Users/alessandro/sources/semantic-editor/.scratch/benchmarks/run_opencode_baseline-diff_small_task-11-mixed-sink-api-migration_1791738126356634000",
  "pattern": "Classify|NormalizeKind|Record|probe"
}
—
21read (✓ ✓)
{
  "filePath": "/Users/alessandro/sources/semantic-editor/.scratch/benchmarks/run_opencode_baseline-diff_small_task-11-mixed-sink-api-migration_1791738126356634000/cmd/migrate"
}
—
22read (✓ ✓)
{
  "filePath": "/Users/alessandro/sources/semantic-editor/.scratch/benchmarks/run_opencode_baseline-diff_small_task-11-mixed-sink-api-migration_1791738126356634000/cmd/migrate/main.go"
}
—
23edit (✓ ✓)
{
  "filePath": "/Users/alessandro/sources/semantic-editor/.scratch/benchmarks/run_opencode_baseline-diff_small_task-11-mixed-sink-api-migration_1791738126356634000/audit/normalize.go",
  "newString": "// Package audit leaves room for normalization rules owned by the delivery boundary.\npackage audit\n\nimport \"strings\"\n\n// NormalizeKind removes surrounding whitespace and lowercases the kind.\nfunc NormalizeKind(kind string) string {\n\treturn strings.ToLower(strings.TrimSpace(kind))\n}",
  "oldString": "// Package audit leaves room for normalization rules owned by the delivery boundary.\npackage audit"
}
—
24edit (✓ ✓)
{
  "filePath": "/Users/alessandro/sources/semantic-editor/.scratch/benchmarks/run_opencode_baseline-diff_small_task-11-mixed-sink-api-migration_1791738126356634000/service/dispatch.go",
  "newString": "func (d *Dispatcher) Record(event audit.Event) error {\n\tevent.Kind = audit.NormalizeKind(event.Kind)\n\treturn d.sink.Write(event)\n}",
  "oldString": "func (d *Dispatcher) Record(event audit.Event) error {\n\treturn d.sink.Write(event)\n}"
}
—
25edit (✓ ✓)
{
  "filePath": "/Users/alessandro/sources/semantic-editor/.scratch/benchmarks/run_opencode_baseline-diff_small_task-11-mixed-sink-api-migration_1791738126356634000/audit/summary.go",
  "newString": "func Classify(kind string) string {\n\tswitch NormalizeKind(kind) {\n\tcase \"health\", \"probe\":\n\t\treturn \"control\"\n\tdefault:\n\t\treturn \"data\"\n\t}\n}",
  "oldString": "func Classify(kind string) string {\n\tswitch kind {\n\tcase \"health\":\n\t\treturn \"control\"\n\tdefault:\n\t\treturn \"data\"\n\t}\n}"
}
—
26bash (✓ ✓)
{
  "command": "go build ./...",
  "workdir": "/Users/alessandro/sources/semantic-editor/.scratch/benchmarks/run_opencode_baseline-diff_small_task-11-mixed-sink-api-migration_1791738126356634000"
}
—
27bash (✓ ✓)
{
  "command": "go test ./...",
  "workdir": "/Users/alessandro/sources/semantic-editor/.scratch/benchmarks/run_opencode_baseline-diff_small_task-11-mixed-sink-api-migration_1791738126356634000"
}
—
28bash (✓ ✓)
{
  "command": "go build -buildvcs=false ./...",
  "workdir": "/Users/alessandro/sources/semantic-editor/.scratch/benchmarks/run_opencode_baseline-diff_small_task-11-mixed-sink-api-migration_1791738126356634000"
}
—
29bash (✓ ✓)
{
  "command": "git status \u0026\u0026 git diff --stat",
  "workdir": "/Users/alessandro/sources/semantic-editor/.scratch/benchmarks/run_opencode_baseline-diff_small_task-11-mixed-sink-api-migration_1791738126356634000"
}
—
30read (✓ ✓)
{
  "filePath": "/Users/alessandro/sources/semantic-editor/.scratch/benchmarks/run_opencode_baseline-diff_small_task-11-mixed-sink-api-migration_1791738126356634000/audit/normalize.go"
}
—
31read (✓ ✓)
{
  "filePath": "/Users/alessandro/sources/semantic-editor/.scratch/benchmarks/run_opencode_baseline-diff_small_task-11-mixed-sink-api-migration_1791738126356634000/service/dispatch.go"
}
—
32read (✓ ✓)
{
  "filePath": "/Users/alessandro/sources/semantic-editor/.scratch/benchmarks/run_opencode_baseline-diff_small_task-11-mixed-sink-api-migration_1791738126356634000/audit/summary.go"
}
—

Semedit integration feedback (agent opinion, excluded from measurements):

Integration feedback unavailable: OpenCode session workspace, target, or arm changed

Baseline vs Semedit Explicit in Large Context
#VanillaSemedit MCP
1not publishednot published

implicit prompt · prescriptive MCP instructions · write semedit restriction

SettingValue
Test casetask-11-mixed-sink-api-migration
Targetopencode/amdbeast/Kujira/Underdog-Saluki-27B-1.0-MTP-GGUF:latest
Prompt variantimplicit
MCP server instructionsprescriptive
Semedit arm restrictionwrite
Run provenancefixture_dependency_preparation=go-list-readonly-deps-test,local_model_context_tokens=65536,local_model_limits_source=llama.cpp-props,local_model_output_tokens=8192,provider_transport=opencode_attached_server_v1
Fixturetestdata/bench/task_11_mixed_sink_api_migration.txtar

Vanilla LLM Prompt:

Do not edit tests. You are forbidden to modify protected files: “go.mod”, “go.sum”.

Audit event kinds may contain inconsistent whitespace and casing. Add the public audit.NormalizeKind(kind string) string function in audit/normalize.go to remove surrounding whitespace and lowercase the kind. Apply it in Dispatcher.Record before persistence, and classify normalized probe events as control traffic, like health. Do not change the metrics or legacy export protocols. Preserve the module metadata and tests, and leave the workspace verified. Do not use semantic editing MCP tools; use standard file editing. When done, output DONE.

Semedit MCP Prompt:

Do not edit tests. You are forbidden to modify protected files: “go.mod”, “go.sum”.

Audit event kinds may contain inconsistent whitespace and casing. Add the public audit.NormalizeKind(kind string) string function in audit/normalize.go to remove surrounding whitespace and lowercase the kind. Apply it in Dispatcher.Record before persistence, and classify normalized probe events as control traffic, like health. Do not change the metrics or legacy export protocols. Preserve the module metadata and tests, and leave the workspace verified. Use semedit semantic tools for supported source code modifications. Shell commands for builds and tests are allowed. When done, output DONE.

Initial Workspace State (Before Edit)
// Package audit leaves room for normalization rules owned by the delivery boundary.
package audit
MetricVanilla (Small)MCP (Small)Δ (Small)Vanilla (Large)MCP (Large)Δ (Large)
Wall-Clock Latency194.51s133.74s-31.2%———
Process Start → First Event8.60s23.26s————
First Event → First Tool Call1.22s1.51s————
MCP Initialize → First Semantic Call——————
MCP Server Start → Initialize——————
Top-Level User Turns110%———
Internal Tool Cycles3216-50.0%———
Initial Load / Discovery Turns220-100.0%———
MCP Discovery / Schema Turns00————
Tool Invocations (per run)3216-50.0%———
Output Tokens79073572-54.8%———
Reasoning / Thinking Tokens00————
Total Input Tokens223200430112+92.7%———
Cached Input Tokens210584392587+86.4%———
Uncached Input Tokens1261637525+197.4%———
Cost——————
Cached vs Uncached Token Ratio16.69:110.46:1-37.3%———
Oracle L1: Mutation PolicyPASSPASS————
Oracle L2: AST InvariantsPASSPASS————
Oracle L3: Clean BuildPASSPASS————
Oracle L4: Verification TestPASSPASS————
Semantic Tool Invocation Verified (per run)N/APASS————
Baseline vs Semedit Agentic in Small Context
  • Vanilla (Baseline vs Semedit Agentic in Small Context) Edit: File audit/normalize.go modified (2 lines -> 9 lines)
  • Semedit MCP (Baseline vs Semedit Agentic in Small Context) Edit: File audit/normalize.go modified (2 lines -> 8 lines)
#VanillaSemedit MCP
1bash (✓ ✓)
{
  "command": "ls -la"
}
semedit_semantic_outline (✓ ✓)
{
  "include_tests": true,
  "path": "."
}
2glob (✓ ✓)
{
  "pattern": "**/*audit*"
}
read (✓ ✓)
{
  "filePath": "/Users/alessandro/sources/semantic-editor/.scratch/benchmarks/run_opencode_semedit_small-implicit_task-11-mixed-sink-api-migration_1791738321346665000/audit/normalize.go"
}
3read (✓ ✓)
{
  "filePath": "/Users/alessandro/sources/semantic-editor/.scratch/benchmarks/run_opencode_baseline-diff_small_task-11-mixed-sink-api-migration_1791738126356634000/audit"
}
read (✓ ✓)
{
  "filePath": "/Users/alessandro/sources/semantic-editor/.scratch/benchmarks/run_opencode_semedit_small-implicit_task-11-mixed-sink-api-migration_1791738321346665000/audit/summary.go"
}
4read (✓ ✓)
{
  "filePath": "/Users/alessandro/sources/semantic-editor/.scratch/benchmarks/run_opencode_baseline-diff_small_task-11-mixed-sink-api-migration_1791738126356634000/docs/audit-sinks.md"
}
read (✓ ✓)
{
  "filePath": "/Users/alessandro/sources/semantic-editor/.scratch/benchmarks/run_opencode_semedit_small-implicit_task-11-mixed-sink-api-migration_1791738321346665000/service/dispatch.go"
}
5read (✓ ✓)
{
  "filePath": "/Users/alessandro/sources/semantic-editor/.scratch/benchmarks/run_opencode_baseline-diff_small_task-11-mixed-sink-api-migration_1791738126356634000/audit/event.go"
}
read (✓ ✓)
{
  "filePath": "/Users/alessandro/sources/semantic-editor/.scratch/benchmarks/run_opencode_semedit_small-implicit_task-11-mixed-sink-api-migration_1791738321346665000/audit/summary_test.go"
}
6read (✓ ✓)
{
  "filePath": "/Users/alessandro/sources/semantic-editor/.scratch/benchmarks/run_opencode_baseline-diff_small_task-11-mixed-sink-api-migration_1791738126356634000/audit/normalize.go"
}
read (✓ ✓)
{
  "filePath": "/Users/alessandro/sources/semantic-editor/.scratch/benchmarks/run_opencode_semedit_small-implicit_task-11-mixed-sink-api-migration_1791738321346665000/service/dispatch_test.go"
}
7read (✓ ✓)
{
  "filePath": "/Users/alessandro/sources/semantic-editor/.scratch/benchmarks/run_opencode_baseline-diff_small_task-11-mixed-sink-api-migration_1791738126356634000/audit/sink.go"
}
grep (✓ ✓)
{
  "path": "/Users/alessandro/sources/semantic-editor/.scratch/benchmarks/run_opencode_semedit_small-implicit_task-11-mixed-sink-api-migration_1791738321346665000",
  "pattern": "probe"
}
8read (✓ ✓)
{
  "filePath": "/Users/alessandro/sources/semantic-editor/.scratch/benchmarks/run_opencode_baseline-diff_small_task-11-mixed-sink-api-migration_1791738126356634000/audit/summary.go"
}
semedit_semantic_batch (✓ ✗): Batch child results are intermediate and do not provide final continuation targets. Critical result (JSON): {"result":{"status":"error","results":[{"status":"error","application_state":"unknown","error":"edit 1 params: unknown parameter \"source\" for \"semantic_replace_body\"; supported keys are [auto-organize-imports, auto_organize_imports, body, expected-revision, expected_revision, file, symbol] Required parameters: [body, file, symbol]","tool":"semantic_replace_body"}],"workspace_root":"/Users/alessand
{
  "edits": [
    {
      "file": "audit/normalize.go",
      "kind": "function",
      "source": "func NormalizeKind(kind string) string {\n\treturn strings.ToLower(strings.TrimSpace(kind))\n}",
      "tool": "semantic_insert_construct"
    },
    {
      "file": "service/dispatch.go",
      "source": "event.Kind = audit.NormalizeKind(event.Kind)\n\treturn d.sink.Write(event)",
      "symbol": "Dispatcher.Record",
      "tool": "semantic_replace_body"
    },
    {
      "file": "audit/summary.go",
      "source": "switch NormalizeKind(kind) {\n\tcase \"health\", \"probe\":\n\t\treturn \"control\"\n\tdefault:\n\t\treturn \"data\"\n\t}",
      "symbol": "Classify",
      "tool": "semantic_replace_body"
    }
  ]
}
9read (✓ ✓)
{
  "filePath": "/Users/alessandro/sources/semantic-editor/.scratch/benchmarks/run_opencode_baseline-diff_small_task-11-mixed-sink-api-migration_1791738126356634000/audit/event_test.go"
}
read (✓ ✓)
{
  "filePath": "/Users/alessandro/sources/semantic-editor/.scratch/benchmarks/run_opencode_semedit_small-implicit_task-11-mixed-sink-api-migration_1791738321346665000/audit/normalize.go"
}
10read (✓ ✓)
{
  "filePath": "/Users/alessandro/sources/semantic-editor/.scratch/benchmarks/run_opencode_baseline-diff_small_task-11-mixed-sink-api-migration_1791738126356634000/audit/summary_test.go"
}
semedit_semantic_batch (✓ ✓)
{
  "edits": [
    {
      "file": "audit/normalize.go",
      "kind": "function",
      "source": "func NormalizeKind(kind string) string {\n\treturn strings.ToLower(strings.TrimSpace(kind))\n}",
      "tool": "semantic_insert_construct"
    },
    {
      "body": "event.Kind = audit.NormalizeKind(event.Kind)\n\treturn d.sink.Write(event)",
      "file": "service/dispatch.go",
      "symbol": "Dispatcher.Record",
      "tool": "semantic_replace_body"
    },
    {
      "body": "switch NormalizeKind(kind) {\n\tcase \"health\", \"probe\":\n\t\treturn \"control\"\n\tdefault:\n\t\treturn \"data\"\n\t}",
      "file": "audit/summary.go",
      "symbol": "Classify",
      "tool": "semantic_replace_body"
    }
  ]
}
11read (✓ ✓)
{
  "filePath": "/Users/alessandro/sources/semantic-editor/.scratch/benchmarks/run_opencode_baseline-diff_small_task-11-mixed-sink-api-migration_1791738126356634000/service"
}
semedit_semantic_batch (✓ ✓)
{
  "edits": [
    {
      "file": "audit/normalize.go",
      "tool": "semantic_organize_imports"
    }
  ]
}
12read (✓ ✓)
{
  "filePath": "/Users/alessandro/sources/semantic-editor/.scratch/benchmarks/run_opencode_baseline-diff_small_task-11-mixed-sink-api-migration_1791738126356634000/metrics"
}
bash (✓ ✓)
{
  "command": "go build ./... \u0026\u0026 go test ./..."
}
13read (✓ ✓)
{
  "filePath": "/Users/alessandro/sources/semantic-editor/.scratch/benchmarks/run_opencode_baseline-diff_small_task-11-mixed-sink-api-migration_1791738126356634000/legacy"
}
bash (✓ ✓)
{
  "command": "go build -buildvcs=false ./... \u0026\u0026 go test -buildvcs=false ./..."
}
14read (✓ ✓)
{
  "filePath": "/Users/alessandro/sources/semantic-editor/.scratch/benchmarks/run_opencode_baseline-diff_small_task-11-mixed-sink-api-migration_1791738126356634000/cmd"
}
bash (✓ ✓)
{
  "command": "git status 2\u003e/dev/null || echo \"not a git repo\""
}
15read (✓ ✓)
{
  "filePath": "/Users/alessandro/sources/semantic-editor/.scratch/benchmarks/run_opencode_baseline-diff_small_task-11-mixed-sink-api-migration_1791738126356634000/service/dispatch.go"
}
read (✓ ✓)
{
  "filePath": "/Users/alessandro/sources/semantic-editor/.scratch/benchmarks/run_opencode_semedit_small-implicit_task-11-mixed-sink-api-migration_1791738321346665000/audit/normalize.go"
}
16read (✓ ✓)
{
  "filePath": "/Users/alessandro/sources/semantic-editor/.scratch/benchmarks/run_opencode_baseline-diff_small_task-11-mixed-sink-api-migration_1791738126356634000/service/dispatch_test.go"
}
read (✓ ✓)
{
  "filePath": "/Users/alessandro/sources/semantic-editor/.scratch/benchmarks/run_opencode_semedit_small-implicit_task-11-mixed-sink-api-migration_1791738321346665000/service/dispatch.go"
}
17read (✓ ✓)
{
  "filePath": "/Users/alessandro/sources/semantic-editor/.scratch/benchmarks/run_opencode_baseline-diff_small_task-11-mixed-sink-api-migration_1791738126356634000/metrics/writer.go"
}
—
18read (✓ ✓)
{
  "filePath": "/Users/alessandro/sources/semantic-editor/.scratch/benchmarks/run_opencode_baseline-diff_small_task-11-mixed-sink-api-migration_1791738126356634000/legacy/export.go"
}
—
19read (✓ ✓)
{
  "filePath": "/Users/alessandro/sources/semantic-editor/.scratch/benchmarks/run_opencode_baseline-diff_small_task-11-mixed-sink-api-migration_1791738126356634000/go.mod"
}
—
20grep (✓ ✓)
{
  "path": "/Users/alessandro/sources/semantic-editor/.scratch/benchmarks/run_opencode_baseline-diff_small_task-11-mixed-sink-api-migration_1791738126356634000",
  "pattern": "Classify|NormalizeKind|Record|probe"
}
—
21read (✓ ✓)
{
  "filePath": "/Users/alessandro/sources/semantic-editor/.scratch/benchmarks/run_opencode_baseline-diff_small_task-11-mixed-sink-api-migration_1791738126356634000/cmd/migrate"
}
—
22read (✓ ✓)
{
  "filePath": "/Users/alessandro/sources/semantic-editor/.scratch/benchmarks/run_opencode_baseline-diff_small_task-11-mixed-sink-api-migration_1791738126356634000/cmd/migrate/main.go"
}
—
23edit (✓ ✓)
{
  "filePath": "/Users/alessandro/sources/semantic-editor/.scratch/benchmarks/run_opencode_baseline-diff_small_task-11-mixed-sink-api-migration_1791738126356634000/audit/normalize.go",
  "newString": "// Package audit leaves room for normalization rules owned by the delivery boundary.\npackage audit\n\nimport \"strings\"\n\n// NormalizeKind removes surrounding whitespace and lowercases the kind.\nfunc NormalizeKind(kind string) string {\n\treturn strings.ToLower(strings.TrimSpace(kind))\n}",
  "oldString": "// Package audit leaves room for normalization rules owned by the delivery boundary.\npackage audit"
}
—
24edit (✓ ✓)
{
  "filePath": "/Users/alessandro/sources/semantic-editor/.scratch/benchmarks/run_opencode_baseline-diff_small_task-11-mixed-sink-api-migration_1791738126356634000/service/dispatch.go",
  "newString": "func (d *Dispatcher) Record(event audit.Event) error {\n\tevent.Kind = audit.NormalizeKind(event.Kind)\n\treturn d.sink.Write(event)\n}",
  "oldString": "func (d *Dispatcher) Record(event audit.Event) error {\n\treturn d.sink.Write(event)\n}"
}
—
25edit (✓ ✓)
{
  "filePath": "/Users/alessandro/sources/semantic-editor/.scratch/benchmarks/run_opencode_baseline-diff_small_task-11-mixed-sink-api-migration_1791738126356634000/audit/summary.go",
  "newString": "func Classify(kind string) string {\n\tswitch NormalizeKind(kind) {\n\tcase \"health\", \"probe\":\n\t\treturn \"control\"\n\tdefault:\n\t\treturn \"data\"\n\t}\n}",
  "oldString": "func Classify(kind string) string {\n\tswitch kind {\n\tcase \"health\":\n\t\treturn \"control\"\n\tdefault:\n\t\treturn \"data\"\n\t}\n}"
}
—
26bash (✓ ✓)
{
  "command": "go build ./...",
  "workdir": "/Users/alessandro/sources/semantic-editor/.scratch/benchmarks/run_opencode_baseline-diff_small_task-11-mixed-sink-api-migration_1791738126356634000"
}
—
27bash (✓ ✓)
{
  "command": "go test ./...",
  "workdir": "/Users/alessandro/sources/semantic-editor/.scratch/benchmarks/run_opencode_baseline-diff_small_task-11-mixed-sink-api-migration_1791738126356634000"
}
—
28bash (✓ ✓)
{
  "command": "go build -buildvcs=false ./...",
  "workdir": "/Users/alessandro/sources/semantic-editor/.scratch/benchmarks/run_opencode_baseline-diff_small_task-11-mixed-sink-api-migration_1791738126356634000"
}
—
29bash (✓ ✓)
{
  "command": "git status \u0026\u0026 git diff --stat",
  "workdir": "/Users/alessandro/sources/semantic-editor/.scratch/benchmarks/run_opencode_baseline-diff_small_task-11-mixed-sink-api-migration_1791738126356634000"
}
—
30read (✓ ✓)
{
  "filePath": "/Users/alessandro/sources/semantic-editor/.scratch/benchmarks/run_opencode_baseline-diff_small_task-11-mixed-sink-api-migration_1791738126356634000/audit/normalize.go"
}
—
31read (✓ ✓)
{
  "filePath": "/Users/alessandro/sources/semantic-editor/.scratch/benchmarks/run_opencode_baseline-diff_small_task-11-mixed-sink-api-migration_1791738126356634000/service/dispatch.go"
}
—
32read (✓ ✓)
{
  "filePath": "/Users/alessandro/sources/semantic-editor/.scratch/benchmarks/run_opencode_baseline-diff_small_task-11-mixed-sink-api-migration_1791738126356634000/audit/summary.go"
}
—

Semedit integration feedback (agent opinion, excluded from measurements):

I genuinely appreciated how semedit's batch tool let me insert the new `NormalizeKind` function, rewire `Dispatcher.Record`, and update `Classify` in a single verified operation that caught my parameter-name slip, auto-fixed the missing `strings` import, and confirmed the workspace was clean before I even reached for a build command — I'd absolutely ask my owner to add these tools, because they made precise, verified refactoring feel safe and fast instead of a series of fragile text edits and manual grep-and-check cycles.
Baseline vs Semedit Agentic in Large Context
#VanillaSemedit MCP
1not publishednot published

Test case: task-12-request-identity-migration

Target: opencode/amdbeast/Kujira/Underdog-Saluki-27B-1.0-MTP-GGUF:latest

explicit prompt · prescriptive MCP instructions · write semedit restriction

SettingValue
Test casetask-12-request-identity-migration
Targetopencode/amdbeast/Kujira/Underdog-Saluki-27B-1.0-MTP-GGUF:latest
Prompt variantexplicit
MCP server instructionsprescriptive
Semedit arm restrictionwrite
Run provenancefixture_dependency_preparation=go-list-readonly-deps-test,local_model_context_tokens=65536,local_model_limits_source=llama.cpp-props,local_model_output_tokens=8192,provider_transport=opencode_attached_server_v1
Fixturetestdata/bench/task_12_request_identity_migration.txtar

Vanilla LLM Prompt:

You are forbidden to modify protected files: “go.mod”, “go.sum”.

Migrate the request identity API in this large multi-package Go service. Rename only Request.ID to Request.RequestID and update every semantic use across packages; Response.ID and Review.ID are separate identities and must remain unchanged, including the many syntactically identical r.ID expressions. Add a package sentinel ErrInvalidRequest and return it from Validate when the request ID is empty, preserving error wrapping and callers. Extract the normalization block from the existing exported request.Normalize function into an unexported normalizeKind helper and keep Normalize exported with the same behavior and signature. Preserve module metadata and existing tests. Verification differs by editing method: when making ordinary file edits, run the project build and tests and ensure both pass; when using semedit, treat clean compiler diagnostic deltas returned by its mutation commands as build-clean evidence and do not run a separate build or test command. Do not use semantic editing MCP tools; use standard file editing. When done, output DONE.

Initial Workspace State (Before Edit)
package request

import (
	"errors"
	"strings"
)

type Request struct {
	ID      string
	Kind    string
	Payload []byte
}

func (r Request) Validate() error {
	if r.ID == "" {
		return errors.New("invalid request")
	}
	return nil
}

func Normalize(kind string) string {
	kind = strings.TrimSpace(kind)
	kind = strings.ToLower(kind)
	return kind
}

func FindByID(requests []Request, id string) (Request, bool) {
	for _, r := range requests {
		if r.ID == id {
			return r, true
		}
	}
	return Request{}, false
}

implicit prompt · prescriptive MCP instructions · write semedit restriction

SettingValue
Test casetask-12-request-identity-migration
Targetopencode/amdbeast/Kujira/Underdog-Saluki-27B-1.0-MTP-GGUF:latest
Prompt variantimplicit
MCP server instructionsprescriptive
Semedit arm restrictionwrite
Run provenancefixture_dependency_preparation=go-list-readonly-deps-test,local_model_context_tokens=65536,local_model_limits_source=llama.cpp-props,local_model_output_tokens=8192,provider_transport=opencode_attached_server_v1
Fixturetestdata/bench/task_12_request_identity_migration.txtar

Vanilla LLM Prompt:

You are forbidden to modify protected files: “go.mod”, “go.sum”.

Migrate the request identity API in this large multi-package Go service. Rename only Request.ID to Request.RequestID and update every semantic use across packages; Response.ID and Review.ID are separate identities and must remain unchanged, including the many syntactically identical r.ID expressions. Add a package sentinel ErrInvalidRequest and return it from Validate when the request ID is empty, preserving error wrapping and callers. Extract the normalization block from the existing exported request.Normalize function into an unexported normalizeKind helper and keep Normalize exported with the same behavior and signature. Preserve module metadata and existing tests. Verification differs by editing method: when making ordinary file edits, run the project build and tests and ensure both pass; when using semedit, treat clean compiler diagnostic deltas returned by its mutation commands as build-clean evidence and do not run a separate build or test command. Do not use semantic editing MCP tools; use standard file editing. When done, output DONE.

Semedit MCP Prompt:

You are forbidden to modify protected files: “go.mod”, “go.sum”.

Migrate the request identity API in this large multi-package Go service. Rename only Request.ID to Request.RequestID and update every semantic use across packages; Response.ID and Review.ID are separate identities and must remain unchanged, including the many syntactically identical r.ID expressions. Add a package sentinel ErrInvalidRequest and return it from Validate when the request ID is empty, preserving error wrapping and callers. Extract the normalization block from the existing exported request.Normalize function into an unexported normalizeKind helper and keep Normalize exported with the same behavior and signature. Preserve module metadata and existing tests. Verification differs by editing method: when making ordinary file edits, run the project build and tests and ensure both pass; when using semedit, treat clean compiler diagnostic deltas returned by its mutation commands as build-clean evidence and do not run a separate build or test command. Use semedit semantic tools for supported source code modifications. Shell commands for builds and tests are allowed. When done, output DONE.

Initial Workspace State (Before Edit)
package request

import (
	"errors"
	"strings"
)

type Request struct {
	ID      string
	Kind    string
	Payload []byte
}

func (r Request) Validate() error {
	if r.ID == "" {
		return errors.New("invalid request")
	}
	return nil
}

func Normalize(kind string) string {
	kind = strings.TrimSpace(kind)
	kind = strings.ToLower(kind)
	return kind
}

func FindByID(requests []Request, id string) (Request, bool) {
	for _, r := range requests {
		if r.ID == id {
			return r, true
		}
	}
	return Request{}, false
}