Skip to content

Framework facts on the spans overview + meta.framework - #176

Merged
jantimon merged 1 commit into
mainfrom
fix/bench-polish
Jul 30, 2026
Merged

Framework facts on the spans overview + meta.framework#176
jantimon merged 1 commit into
mainfrom
fix/bench-polish

Conversation

@jantimon

Copy link
Copy Markdown
Owner

Three field-verified polish items from the 1.1.0 bench dogfood.

1. React detection facts on the query spans overview

span.addons.react was drill-only. Bulk consumers reading query spans could not see framework facts, the same gap frameFloor recently graduated out of. Overview rows now carry a compact addons.react (version + build) on both SpanEntry and SpanCountsEntry; the run entry synthesized from a CpuModel.breakdown (default/node/firefox) threads the stored run span's facts through. Kept minimal on purpose: commitCount and the node-lane server phases stay in the query span drill. A React fact with no version/build (node phases only) leaves the overview addon-free rather than fabricating a field. Human side: one subtle React (addon): v… · build line under the overview, and query span names framework off in its header when the mode explains an absent React block.

2. alloc-vs-cpu JSON container, settled empirically

Recorded a node cpu + alloc pair under the gate lock and diffed the actual top-level JSON of --by package --format json:

  • query cpu -> object, keys: profile, jsSelfMs, activeMs, totalMs, sampleCount, sampleIntervalUs, system, breakdown, byPackage, byFile, hot, dropped, hints
  • query alloc -> object, keys: profile, totalBytes, sampleCount, sampling, byPackage, byFile, hot, dropped, hints

Both are an object with a byPackage[] member — already aligned. The bench's "alloc returns a bare array" does not reproduce. No code change.

3. meta.framework

A --framework off recording and a no-React-signal auto recording were indistinguishable (both carry no Span.addons). Recordings now stamp meta.framework ("off" | "auto") on every lane — browser (buildMeta), node-cpu, and node-alloc. Additive-optional, display-only (no gate branches on it), so optional per the gate-field policy. The "byte-identical under --framework off" note in addon.ts/registry.ts/CLAUDE.md is reworded: no addon facts enter the recording (the Span.addons slot stays absent), while meta.framework records the mode as core provenance.

Verification

Full gates green under the gate lock: build, lint, format:check, knip, unit (690, +4 new for the overview addon lift), measurement (6), e2e (51). Self-review: structured hostile two-pass (a subagent spawn tool was unavailable, so /review-intern-sub could not launch a fresh reviewer).

- query spans overview rows now carry a compact addons.react (version + build), so a bulk consumer reads framework identity without opening each span. The full per-span facts (commit counts, server phases) stay on query span.

- Recordings stamp meta.framework (off|auto) across all lanes (browser, node-cpu, node-alloc), so a deliberate --framework off is distinguishable from an auto run that detected no framework (both carry no Span.addons).

The query alloc and query cpu --by package JSON containers were verified empirically as already aligned (both an object with a byPackage[] member), so no alloc change was needed.
@jantimon
jantimon merged commit 20e64af into main Jul 30, 2026
4 checks passed
@jantimon
jantimon deleted the fix/bench-polish branch July 30, 2026 07:34
@github-actions github-actions Bot mentioned this pull request Jul 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant