Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
e3d0554
Add npm metadata measurement baseline
noise64 Sep 18, 2026
9619718
Record npm metadata path frequency trace
noise64 Sep 18, 2026
fc42de3
Cache module loader realpaths per runtime
noise64 Sep 20, 2026
a492849
GOL-348: cache missing package metadata per CJS graph
noise64 Sep 20, 2026
0642f0f
Record npm loader cache experiments
noise64 Sep 20, 2026
f88f62e
GOL-350: preserve loader realpath cache boundaries
noise64 Sep 21, 2026
5c27a91
Record reviewed npm loader cache results
noise64 Sep 21, 2026
8d030cf
GOL-350: preserve loader cache initialization semantics
noise64 Sep 21, 2026
8cde99e
Refresh reviewed npm loader cache results
noise64 Sep 21, 2026
608fd53
Slim npm baseline measurement artifacts
noise64 Sep 21, 2026
0e1b252
Merge updated npm metadata baseline
noise64 Sep 21, 2026
b28c3e3
Slim npm loader cache measurement artifacts
noise64 Sep 21, 2026
8bbdc5f
Merge pull request #155 from golemcloud/feat/npm-loader-caches
noise64 Sep 21, 2026
90629f2
Refresh ESM latency measurements (GOL-347)
noise64 Sep 21, 2026
d27a150
Add ESM load phase experiment (GOL-347)
noise64 Sep 21, 2026
52c2ce1
Record ESM load phase results (GOL-347)
noise64 Sep 21, 2026
9b81042
Bulk-skip whitespace in module scanners (GOL-347)
noise64 Sep 21, 2026
1b3c54a
Narrow ESM whitespace scan optimization (GOL-347)
noise64 Sep 21, 2026
7bed8b0
Measure whitespace scan candidate (GOL-347)
noise64 Sep 21, 2026
012a07c
Record narrowed ESM scan results (GOL-347)
noise64 Sep 21, 2026
95e8bc1
Refresh TypeScript latency after ESM scan fix (GOL-347)
noise64 Sep 21, 2026
e0f2458
Add ESM phase DTS goldenfile (GOL-347)
noise64 Sep 21, 2026
5349e9e
Merge pull request #156 from golemcloud/bench/esm-module-load-latency…
noise64 Sep 22, 2026
74253b4
Record current-source TypeScript compiler profile (GOL-347)
noise64 Sep 22, 2026
d6f8ecb
Pin measurement reproduction to recorded revisions (GOL-347)
noise64 Sep 22, 2026
00a1281
Speed up TypeScript source-map discovery (GOL-347)
noise64 Sep 22, 2026
4ee0104
Merge TypeScript source-map optimization into PR #154
noise64 Sep 22, 2026
a249039
Speed up CommonJS source preparation (GOL-347)
noise64 Sep 23, 2026
9a06e2f
Refresh final TypeScript performance reports (GOL-347)
noise64 Sep 23, 2026
dd689c8
Skip fixed module-format scans (GOL-347)
noise64 Sep 23, 2026
93a82c6
Refresh final module-format reports (GOL-347)
noise64 Sep 23, 2026
525eb17
Add reproducible release performance profile
noise64 Sep 23, 2026
cef958a
Add matched TypeScript release baseline
noise64 Sep 23, 2026
19ed784
Keep measurement report pairs on one date
noise64 Sep 23, 2026
668fe1f
Record matched TypeScript release baseline
noise64 Sep 23, 2026
be63073
Add matched npm release baseline
noise64 Sep 23, 2026
fae34bd
Make npm report validation round-trip safe
noise64 Sep 23, 2026
fb2c40c
Record matched npm release baseline
noise64 Sep 24, 2026
831632c
Cache loader realpath directory prefixes
noise64 Sep 24, 2026
59146d1
Cache missing CJS path probes per graph
noise64 Sep 24, 2026
2429603
Record final npm release cache measurements
noise64 Sep 24, 2026
b280622
Revert "Record final npm release cache measurements"
noise64 Sep 24, 2026
c23b430
Revert "Cache missing CJS path probes per graph"
noise64 Sep 24, 2026
968657a
Record retained npm release cache measurements
noise64 Sep 24, 2026
04fe3cb
Skip whitespace in source code scanners
noise64 Sep 24, 2026
9ea0550
Revert "Skip whitespace in source code scanners"
noise64 Sep 24, 2026
b24c510
Record retained TypeScript release measurements
noise64 Sep 24, 2026
e7265f7
Document release performance follow-ups
noise64 Sep 24, 2026
366cd9a
Document canceled bytecode cache experiment
noise64 Sep 25, 2026
d0b778c
Document residual npm and TypeScript attribution
noise64 Sep 25, 2026
cf63185
Validate performance reports at measured revisions
noise64 Sep 25, 2026
081944a
Reconcile TypeScript release report summaries
noise64 Sep 25, 2026
d9e701a
Harden performance evidence validation
noise64 Sep 25, 2026
13517a5
Align local report checks with CI
noise64 Sep 25, 2026
e77dd88
Polish exact-source report checks
noise64 Sep 25, 2026
a79a076
Make selector assertion portable
noise64 Sep 25, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
180 changes: 161 additions & 19 deletions .github/scripts/select-agentic-ts-currentness.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set -euo pipefail
event_name=${1:?usage: select-agentic-ts-currentness.sh <event-name> <push-before> [pr-head]}
push_before=${2:-}
expected_pr_head=${3:-}
source_ref=$(git rev-parse HEAD)
event_source_ref=$(git rev-parse HEAD)
diff_base=

case "$event_name" in
Expand All @@ -18,8 +18,8 @@ case "$event_name" in
echo "pull-request checkout is not a two-parent synthetic merge" >&2
exit 1
fi
source_ref=$(git rev-parse HEAD^2)
if [[ "$source_ref" != "$(git rev-parse "$expected_pr_head")" ]]; then
event_source_ref=$(git rev-parse HEAD^2)
if [[ "$event_source_ref" != "$(git rev-parse "$expected_pr_head")" ]]; then
echo "synthetic merge second parent does not match the pull-request head" >&2
exit 1
fi
Expand All @@ -40,10 +40,10 @@ case "$event_name" in
if [[ ${#head_commit[@]} -eq 3 \
&& "$(git rev-parse HEAD^1)" == "$(git rev-parse "$push_before")" ]]; then
# A normal PR merge combines an already-advanced main tree with
# the exact measured PR tree. Validate newly introduced reports
# against that PR tree, not unrelated first-parent changes.
# the reviewed PR tree. Select report artifacts from that PR
# side, not unrelated first-parent changes.
diff_base=HEAD^1
source_ref=$(git rev-parse HEAD^2)
event_source_ref=$(git rev-parse HEAD^2)
fi
fi
;;
Expand All @@ -53,23 +53,158 @@ case "$event_name" in
;;
esac

reports_to_check=()
reports_count=0
agentic_manifest=tests/agentic_ts/results/current-reports.txt
npm_manifest=tests/npm_metadata/results/current-reports.txt

validate_manifest() {
local manifest=$1
local expected_prefix=$2
local source_ref
local report
local report_source_ref
local extra
local manifest_source_ref=
local seen=
local reports_count=0
local p2_count=0
local p3_count=0
local p2_report=
local p3_report=
while read -r source_ref report extra; do
if [[ ! "$source_ref" =~ ^[0-9a-f]{40}$ || -n "$extra" \
|| -z "$report" || "$report" != "$expected_prefix"*.json ]]; then
echo "invalid current report entry in $manifest: $source_ref $report $extra" >&2
exit 1
fi
if [[ ! -f "$report" ]]; then
echo "current report does not exist: $report" >&2
exit 1
fi
report_source_ref=$(jq -er '.environment.commitHint' "$report") || {
echo "current report has no commit hint: $report" >&2
exit 1
}
if [[ "$report_source_ref" != "$source_ref" ]]; then
echo "current report source does not match $manifest: $report" >&2
exit 1
fi
if grep -Fqx "$report" <<<"$seen"; then
echo "duplicate current report in $manifest: $report" >&2
exit 1
fi
if [[ -n "$manifest_source_ref" && "$source_ref" != "$manifest_source_ref" ]]; then
echo "current reports in $manifest name different source revisions" >&2
exit 1
fi
manifest_source_ref=$source_ref
seen="${seen}${seen:+$'\n'}$report"
reports_count=$((reports_count + 1))
if [[ "$report" == *-p2-* ]]; then
p2_count=$((p2_count + 1))
p2_report=$report
fi
if [[ "$report" == *-p3-* ]]; then
p3_count=$((p3_count + 1))
p3_report=$report
fi
done <"$manifest"
if [[ $reports_count -ne 2 || $p2_count -ne 1 || $p3_count -ne 1 ]]; then
echo "current report manifest must name exactly one P2/P3 pair: $manifest" >&2
exit 1
fi
if [[ "${p2_report/-p2-/-p3-}" != "$p3_report" ]]; then
echo "current report manifest does not name a companion P2/P3 pair: $manifest" >&2
exit 1
fi
if ! git cat-file -e "$manifest_source_ref^{commit}" 2>/dev/null; then
git fetch --no-tags --depth=1 origin "$manifest_source_ref" >&2 || true
fi
if ! git cat-file -e "$manifest_source_ref^{commit}" 2>/dev/null; then
echo "current report source commit is unavailable: $manifest_source_ref" >&2
exit 1
fi
if ! git merge-base --is-ancestor "$manifest_source_ref" HEAD; then
echo "current report source is not an ancestor of the checked-out source: $manifest_source_ref" >&2
exit 1
fi
printf '%s\n' "$manifest_source_ref"
}

agentic_source_ref=$(validate_manifest "$agentic_manifest" tests/agentic_ts/results/)
npm_source_ref=$(validate_manifest "$npm_manifest" tests/npm_metadata/results/)

manifest_contains() {
local manifest=$1
local expected_report=$2
local source_ref
local report
while read -r source_ref report; do
if [[ "$report" == "$expected_report" ]]; then
return 0
fi
done <"$manifest"
return 1
}

agentic_reports_to_check=()
npm_reports_to_check=()
changed_reports_count=0
if [[ -n "$diff_base" ]]; then
report_list=$(mktemp)
trap 'rm -f "$report_list"' EXIT
changed_paths=$(mktemp)
report_candidates=$(mktemp)
trap 'rm -f "$changed_paths" "$report_candidates"' EXIT
if ! git diff --name-only --diff-filter=ACMR "$diff_base" HEAD \
-- 'tests/agentic_ts/results/*.json' >"$report_list"; then
echo "failed to select changed agentic TypeScript reports" >&2
-- 'tests/agentic_ts/results/*.json' 'tests/npm_metadata/results/*.json' \
"$agentic_manifest" "$npm_manifest" >"$changed_paths"; then
echo "failed to select changed performance reports" >&2
exit 1
fi
while IFS= read -r path; do
case "$path" in
"$agentic_manifest")
while read -r _ report; do
printf '%s\n' "$report" >>"$report_candidates"
done <"$agentic_manifest"
changed_reports_count=$((changed_reports_count + 1))
;;
"$npm_manifest")
while read -r _ report; do
printf '%s\n' "$report" >>"$report_candidates"
done <"$npm_manifest"
changed_reports_count=$((changed_reports_count + 1))
;;
tests/agentic_ts/results/*.json|tests/npm_metadata/results/*.json)
printf '%s\n' "$path" >>"$report_candidates"
changed_reports_count=$((changed_reports_count + 1))
;;
*)
echo "unexpected currentness input path: $path" >&2
exit 1
;;
esac
done <"$changed_paths"
sort -u -o "$report_candidates" "$report_candidates"
while IFS= read -r report; do
reports_to_check+=("$report")
reports_count=$((reports_count + 1))
done <"$report_list"
case "$report" in
tests/agentic_ts/results/*.json)
if manifest_contains "$agentic_manifest" "$report"; then
agentic_reports_to_check+=("$report")
fi
;;
tests/npm_metadata/results/*.json)
if manifest_contains "$npm_manifest" "$report"; then
npm_reports_to_check+=("$report")
fi
;;
*)
echo "unexpected performance report path: $report" >&2
exit 1
;;
esac
done <"$report_candidates"
fi

if [[ "$event_name" == push && $reports_count -gt 0 ]]; then
if [[ "$event_name" == push && $changed_reports_count -gt 0 ]]; then
read -r -a head_commit <<<"$(git rev-list --parents -n 1 HEAD)"
if [[ ${#head_commit[@]} -gt 2 \
&& "$(git rev-parse HEAD^1)" != "$(git rev-parse "$push_before")" ]]; then
Expand All @@ -78,9 +213,16 @@ if [[ "$event_name" == push && $reports_count -gt 0 ]]; then
fi
fi

echo "source-ref=$source_ref"
echo "source-ref=$event_source_ref"
echo "agentic-source-ref=$agentic_source_ref"
echo "npm-source-ref=$npm_source_ref"
echo "reports-to-check<<AGENTIC_TS_REPORTS"
if [[ $reports_count -gt 0 ]]; then
printf '%s\n' "${reports_to_check[@]}"
if [[ ${#agentic_reports_to_check[@]} -gt 0 ]]; then
printf '%s\n' "${agentic_reports_to_check[@]}"
fi
echo "AGENTIC_TS_REPORTS"
echo "npm-reports-to-check<<NPM_METADATA_REPORTS"
if [[ ${#npm_reports_to_check[@]} -gt 0 ]]; then
printf '%s\n' "${npm_reports_to_check[@]}"
fi
echo "NPM_METADATA_REPORTS"
27 changes: 19 additions & 8 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,10 @@ jobs:
- uses: actions/checkout@v4
with:
submodules: true
# PR checkouts and ordinary main pushes need both merge parents:
# the first selects newly introduced reports, while the second is
# the exact source tree against which those reports were measured.
fetch-depth: 2
# Full history keeps the exact measured source revisions named by
# current-report manifests available while merge parents select
# newly introduced report artifacts.
fetch-depth: 0
- uses: ./.github/actions/setup
- name: Test agentic TypeScript CI currentness selection
run: tests/agentic_ts/test-select-ci-currentness.sh
Expand All @@ -73,12 +73,15 @@ jobs:
PUSH_BEFORE: ${{ github.event.before }}
PR_HEAD: ${{ github.event.pull_request.head.sha }}
run: .github/scripts/select-agentic-ts-currentness.sh "$GITHUB_EVENT_NAME" "$PUSH_BEFORE" "$PR_HEAD" >> "$GITHUB_OUTPUT"
- name: Prepare pristine agentic TypeScript hash inputs
run: git worktree add --detach "$RUNNER_TEMP/agentic-ts-source" "${{ steps.agentic-ts-currentness.outputs.source-ref }}"
- name: Prepare pristine performance-report hash inputs
run: |
git worktree add --detach "$RUNNER_TEMP/agentic-ts-source" "${{ steps.agentic-ts-currentness.outputs.agentic-source-ref }}"
git worktree add --detach "$RUNNER_TEMP/npm-metadata-source" "${{ steps.agentic-ts-currentness.outputs.npm-source-ref }}"
- name: Enable Golem wasmtime fork
run: bash .github/scripts/enable-wasmtime-fork.sh
# Validation mode checks committed report contracts and changed-report
# content hashes; the manual measurement workloads do not run in CI.
# Validation mode checks supported committed report contracts and the content
# hashes of changed reports designated current for each suite, evaluated
# at each manifest's exact measured source; manual workloads do not run.
- name: Validate agentic TypeScript reports
shell: bash
env:
Expand All @@ -87,6 +90,14 @@ jobs:
run: |
AGENTIC_TS_VALIDATE_REPORTS=1 \
cargo test --test agentic_ts $CI_WASMTIME_FORK_FEATURES
- name: Validate npm release reports
shell: bash
env:
NPM_METADATA_SOURCE_ROOT: ${{ runner.temp }}/npm-metadata-source
NPM_METADATA_REPORTS_TO_CHECK: ${{ steps.agentic-ts-currentness.outputs.npm-reports-to-check }}
run: |
NPM_METADATA_VALIDATE_REPORTS=1 \
cargo test --test npm_metadata $CI_WASMTIME_FORK_FEATURES
- name: Compilation, DTS and error tests
run: cargo test --test compilation --test dts --test errors $CI_WASMTIME_FORK_FEATURES -- --report-time --format ctrf --logfile target/ctrf.json
- name: Local test profile contracts
Expand Down
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ http = { workspace = true }
http-body = { workspace = true }
http-body-util = { workspace = true }
indoc = { workspace = true }
libc = "0.2"
pretty_assertions = "1.4.1"
rand = { workspace = true }
serde = { workspace = true }
Expand Down Expand Up @@ -102,10 +103,18 @@ harness = false
name = "agentic_ts"
harness = false

[[test]]
name = "npm_metadata"
harness = false

[[test]]
name = "typescript_transform_latency"
harness = false

[[test]]
name = "esm_module_load_phases"
harness = false

[[test]]
name = "migrate_config_split"
harness = false
Expand Down
Loading
Loading