You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
perf(d-2): wire in-process loopback backend so proxy-200 scenario measures real dial-and-read (#14)
The Phase D-1 scaffold (PR #12) dialled http://127.0.0.1:1 on the allow
path so the gateway returned 502 quickly. That isolated the in-gateway
cost up to the proxy dial, but it did not measure the cost the gateway
actually pays in production: the Req-based outbound HTTP request, the
response read, and the forwarding back to the caller. A baseline
collected against that scaffold would have been useless for catching
proxy-path regressions or for sizing the Phase E rollout SLA.
Phase D-2 (this change, hyperpolymath/standards#99 sub-deliverable;
runbook checklist item 1.1 in boj-server's
docs/integration/hcg-tier2-rollout-runbook.md) replaces the dial-port-1
hack with an in-process Plug.Cowboy listener that responds 200 with a
tiny JSON body. The pattern mirrors the MockBoj backend already used by
test/e2e_boj_integration_test.exs (just on port 19_877 instead of
19_876 so the two can never collide). The scenario is renamed from
"exact route allow (proxy short-circuits)" to "exact route allow
(proxy 200)" in both the harness and bench/baseline.json so the
comparator's per-scenario diff stays correctly keyed.
bench/baseline.json `_status` stays "scaffold-placeholder" because D-2
does not collect real numbers — D-4 does, via the `perf: rebaseline`
ritual in docs/perf-contract.md. The CI gate remains non-blocking until
that flip. With D-2 landed, the prerequisites for D-4 baseline
collection are: (a) the harness now exercises a production-shaped allow
path, (b) the scenario names are stable, (c) D-3 mTLS-handshake and
trust-header rewrite scenarios are additive and won't disturb the
existing three.
Unblocks: standards#99 D-4 (real baseline collection + gate arming) and,
downstream, the Phase E rollout-prerequisite checklist in
boj-server's hcg-tier2-rollout-runbook.md section 1.1.
Refs hyperpolymath/standards#91
Refs hyperpolymath/standards#99
Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: bench/baseline.json
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
{
2
-
"_comment": "Phase D scaffoldplaceholder baseline (standards#99). Numbers are TODO. Real collection in Phase D-4 — see docs/perf-contract.md §Baseline collection. DO NOT trust these numbers; the perf-regression CI gate is intentionally non-blocking until this file is populated by a baseline-collection PR.",
2
+
"_comment": "Phase D scaffold-placeholder baseline (standards#99). Numbers are TODO. Phase D-1 (PR #12) wired the Benchee harness + this file + the CI gate; Phase D-2 (this PR) added a real in-process loopback backend so the 'exact route allow (proxy 200)' scenario measures real dial-and-read cost instead of port-1 connection-refused. Phase D-4 collects real numbers via the `perf: rebaseline` ritual in docs/perf-contract.md and flips `_status` to 'active' to arm the CI gate. DO NOT trust these numbers; the perf-regression CI gate is intentionally non-blocking until that flip.",
3
3
"_schema_version": "0.1.0-scaffold",
4
4
"_generated_at": "TODO(Phase D-4): replace with ISO8601 timestamp from collection run",
|`health endpoint`| Cheapest path. No policy lookup, no proxy. Floor of any plug-pipeline overhead. |
29
36
|`policy deny (405 fast-path)`| Verb-rejection path. Policy table hit, no proxy. Cost of the deny short-circuit. |
30
-
|`exact route allow (proxy short-circuits)`| Allow path with backend dial that intentionally refuses, isolating in-gateway cost.|
37
+
|`exact route allow (proxy 200)`| Allow path that proxies to an in-process loopback backend returning 200. Captures the real dial-and-read cost the gateway pays in production. |
31
38
32
39
## Published latency SLOs
33
40
@@ -43,13 +50,13 @@ Reported per scenario, per CI run:
0 commit comments