Skip to content

Commit 7a357a6

Browse files
Record perf runner provenance for bounded-growth evidence
Record perf runner provenance
1 parent 6dc4922 commit 7a357a6

4 files changed

Lines changed: 27 additions & 0 deletions

File tree

.github/workflows/server-perf.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ jobs:
111111
DW_PERF_MAX_FINAL_POLLING_KEYS: "0"
112112
DW_PERF_MAX_SERVER_CACHE_KEYS_BY_POLICY: '{"workflow_task_poll_requests":512,"long_poll_signals":512,"workflow_query_tasks":64,"task_queue_admission_locks":128,"task_queue_dispatch_counters":128,"workflow_task_expired_lease_recovery":128,"history_retention_inline":64,"readiness_probe":16}'
113113
DW_PERF_MAX_FINAL_SERVER_CACHE_KEYS_BY_POLICY: '{"workflow_task_poll_requests":0,"long_poll_signals":0,"workflow_query_tasks":0,"task_queue_admission_locks":0,"task_queue_dispatch_counters":0,"workflow_task_expired_lease_recovery":0,"history_retention_inline":0,"readiness_probe":0}'
114+
RUNNER_ENVIRONMENT: "github-hosted"
114115
run: scripts/perf/run-server-soak.sh
115116

116117
- name: Upload perf artifacts
@@ -147,6 +148,7 @@ jobs:
147148
DW_PERF_REMOTE_WRITE_URL: ${{ vars.DW_PERF_REMOTE_WRITE_URL }}
148149
DW_PERF_REMOTE_WRITE_USERNAME: ${{ vars.DW_PERF_REMOTE_WRITE_USERNAME }}
149150
DW_PERF_REMOTE_WRITE_PASSWORD: ${{ secrets.DW_PERF_REMOTE_WRITE_PASSWORD }}
151+
RUNNER_ENVIRONMENT: "self-hosted"
150152
run: scripts/perf/run-server-soak.sh
151153

152154
- name: Upload perf artifacts

docs/bounded-growth.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,8 @@ classified as ineligible for the issue-closing trusted evidence unless they run
117117
for at least one hour, use compose-backed resource sampling, run on a
118118
self-hosted runner with an explicit `RUNNER_ENVIRONMENT=self-hosted` provenance
119119
value, meet sample coverage, and have no bounded-growth assertion failures.
120+
The CI smoke workflow sets `RUNNER_ENVIRONMENT=github-hosted` so those artifacts
121+
are traceable without being eligible for the trusted long-soak profile.
120122

121123
Per-policy limits can be enforced with JSON maps keyed by policy ID:
122124
`DW_PERF_MAX_SERVER_CACHE_KEYS_BY_POLICY` for maximum observed keys and

docs/perf-runner.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,11 @@ cache-key drain path. The long soak runs on the labeled self-hosted runner and
6060
enforces the memory slope budget after the run is long enough to make that
6161
signal meaningful.
6262

63+
Both workflow modes pass explicit runner provenance into the artifact. Short
64+
smokes set `RUNNER_ENVIRONMENT=github-hosted`; long soaks set
65+
`RUNNER_ENVIRONMENT=self-hosted`, which is required before `summary.json` can be
66+
classified as trusted long-soak evidence.
67+
6368
## Local Run
6469

6570
From the server repo:

tests/Unit/ServerPerfHarnessContractTest.php

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,24 @@ public function test_ci_perf_jobs_enforce_per_policy_cache_thresholds(): void
116116
}
117117
}
118118

119+
public function test_ci_perf_jobs_set_runner_environment_provenance(): void
120+
{
121+
$workflow = file_get_contents(dirname(__DIR__, 2).'/.github/workflows/server-perf.yml');
122+
$this->assertNotFalse($workflow, '.github/workflows/server-perf.yml must be readable');
123+
124+
$this->assertMatchesRegularExpression(
125+
'/name:\s+Polling cache bounded-growth smoke.*?RUNNER_ENVIRONMENT:\s+"github-hosted"/s',
126+
$workflow,
127+
'Short perf smokes must record github-hosted runner provenance.',
128+
);
129+
130+
$this->assertMatchesRegularExpression(
131+
'/name:\s+Self-hosted polling cache soak.*?RUNNER_ENVIRONMENT:\s+"self-hosted"/s',
132+
$workflow,
133+
'Trusted long soaks must explicitly record self-hosted runner provenance.',
134+
);
135+
}
136+
119137
/**
120138
* @return array<string, string>
121139
*/

0 commit comments

Comments
 (0)