Skip to content

[performance] Daily benchmark: BenchmarkCompileMCPWorkflow fails due to stale cache-key fixture #48676

Description

@github-actions

Summary

During the Daily CLI Performance run (§30374053812), make bench-performance failed on BenchmarkCompileMCPWorkflow (in pkg/workflow/compiler_performance_benchmark_test.go). All other 8 benchmarks compiled and ran successfully within performance baselines, so this is not a performance regression — it is a broken test fixture.

Error

--- FAIL: BenchmarkCompileMCPWorkflow
    compiler_performance_benchmark_test.go:164: warm-up compile failed: /tmp/bench-mcp.../mcp.md:1:1: error: Validation failed for field 'tools.cache-memory.key'
    Value: pr-${{ github.run_id }}
    Reason: cache key must not reference github.run_id — every run would write to a unique cache slot, preventing cross-run cache restoration

The test fixture at line 142 of pkg/workflow/compiler_performance_benchmark_test.go sets:

key: pr-${{ github.run_id }}

This is now rejected by the compiler's cache-key validation (introduced separately), which requires cache keys to omit github.run_id since it's appended automatically.

Suggested Fix

Update the fixture's cache-memory key to something like pr-${{ env.GH_AW_WORKFLOW_ID_SANITIZED }} so the benchmark warm-up compile succeeds.

Secondary Issue: corrupted benchmark history

The repo-memory file benchmark_history.jsonl (used for tracking daily performance trends) was found corrupted — multiple prior runs' JSON objects had been concatenated onto a single malformed line, preventing all historical trend comparisons. All entries prior to today (2026-07-28) were unrecoverable and have been discarded; the file now contains only today's baseline entry. Trend/regression detection will resume once a few more days of clean data accumulate. This may indicate a bug in how a previous run appended to the file (e.g., missing trailing newline before append).

Current Benchmark Results (all within target baselines)

Benchmark ns/op B/op allocs/op
CompileSimpleWorkflow 2,396,061 (2.40ms) 1,111,437 6,827
CompileComplexWorkflow 3,511,689 (3.51ms) 1,795,405 12,019
CompileMemoryUsage 3,200,220 (3.20ms) 1,679,053 10,221
ParseWorkflow 203,546 (203.55μs) 81,232 1,615
Validation 18,805 (18.80μs) 1,192 53
YAMLGeneration 2,478,775 (2.48ms) 1,095,232 6,281
ExtractWorkflowNameFromFile 3,515 (3.52μs) 216 4
FindIncludesInContent 152.2ns 64 1

All well within the <100ms simple / <500ms complex / <1s MCP targets (though MCP itself could not be measured due to the failure above).


Automatically generated by Daily CLI Performance workflow

Generated by ⚡ Daily CLI Performance Agent · sonnet50 · 40.9 AIC · ⌖ 8.75 AIC · ⊞ 15.4K ·

  • expires on Jul 30, 2026, 7:45 AM UTC-08:00

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions