Skip to content

Commit 4aa4932

Browse files
committed
Merge remote-tracking branch 'origin/master' into HEAD
# Conflicts: # crates/lint/README.md # crates/lint/src/sol/info/mod.rs
2 parents a8c4658 + a8efff0 commit 4aa4932

160 files changed

Lines changed: 11428 additions & 1815 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/actionlint.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
self-hosted-runner:
2+
labels:
3+
- depot-ubuntu-22.04-16
4+
- depot-ubuntu-22.04-arm-16
5+
- depot-ubuntu-24.04-32
6+
- depot-ubuntu-latest-arm-16
7+
- depot-ubuntu-latest
8+
- depot-ubuntu-latest-16
9+
- depot-macos-latest
10+
- depot-windows-latest-16
11+
12+
config-variables: null

.github/scripts/bump-tempo.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ set -euo pipefail
1414
# Sets outputs in $GITHUB_OUTPUT if it exists:
1515
# - current_rev: The current tempo revision
1616
# - latest_rev: The latest tempo revision on main
17+
# - latest_rev_short: The short latest tempo revision
1718
# - updated: "true" if dependencies were updated, "false" otherwise
1819
# - changelog: Path to changelog file (if updated)
1920

@@ -107,6 +108,7 @@ main() {
107108
LATEST_REV=$(get_latest_rev)
108109
echo "Latest revision: $LATEST_REV"
109110
set_output "latest_rev" "$LATEST_REV"
111+
set_output "latest_rev_short" "${LATEST_REV:0:7}"
110112

111113
if [[ "$CURRENT_REV" == "$LATEST_REV" ]]; then
112114
echo ""

.github/scripts/compare-nightly.sh

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@ prev = json.load(open(prev_path)) if prev_path and os.path.isfile(prev_path) els
2323
with open(os.environ["TODAY_JSON"]) as f:
2424
today = json.load(f)
2525
26+
# Each value is either the current summary object ({"mean": ..., ...}) or, for
27+
# historical files, a bare mean-seconds float. Normalize to the mean.
28+
def mean_of(v):
29+
return v["mean"] if isinstance(v, dict) else v
30+
2631
print("## Nightly Benchmark Regression Report\n")
2732
print("| Benchmark | Stable | Nightly | Δ | Status |")
2833
print("|-----------|--------|---------|---|--------|")
@@ -33,12 +38,14 @@ for key in all_keys:
3338
t = today.get(key)
3439
p = prev.get(key)
3540
if t is None:
36-
print(f"| `{key}` | {p:.5f}s | N/A | — | ⚠️ Missing |")
41+
print(f"| `{key}` | {mean_of(p):.5f}s | N/A | — | ⚠️ Missing |")
3742
has_regression = True
3843
continue
3944
if p is None:
40-
print(f"| `{key}` | N/A | {t:.5f}s | — | 🆕 New |")
45+
print(f"| `{key}` | N/A | {mean_of(t):.5f}s | — | 🆕 New |")
4146
continue
47+
t = mean_of(t)
48+
p = mean_of(p)
4249
delta = (t - p) / p * 100
4350
if delta >= fail:
4451
status = "🔴 Regression"

.github/scripts/matrices.py

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@ class Expanded:
4545
runner_label: str
4646
target: str
4747
svm_target_platform: str
48-
flags: str
48+
filter: str
49+
partition_arg: str
4950
partition: int
5051

5152
def __init__(
@@ -54,14 +55,16 @@ def __init__(
5455
runner_label: str,
5556
target: str,
5657
svm_target_platform: str,
57-
flags: str,
58+
filter: str,
59+
partition_arg: str,
5860
partition: int,
5961
):
6062
self.name = name
6163
self.runner_label = runner_label
6264
self.target = target
6365
self.svm_target_platform = svm_target_platform
64-
self.flags = flags
66+
self.filter = filter
67+
self.partition_arg = partition_arg
6568
self.partition = partition
6669

6770

@@ -108,22 +111,21 @@ def main():
108111
os_str = f" ({target.target})"
109112

110113
name = case.name
111-
flags = f"-E '{case.filter}'"
114+
partition_arg = ""
112115
if case.n_partitions > 1:
113116
s = f"{partition}/{case.n_partitions}"
114117
name += f" ({s})"
115-
flags += f" --partition count:{s}"
118+
partition_arg = f"count:{s}"
116119

117120
name += os_str
118121

119-
flags += " --no-fail-fast"
120-
121122
obj = Expanded(
122123
name=name,
123124
runner_label=target.runner_label,
124125
target=target.target,
125126
svm_target_platform=target.svm_target_platform,
126-
flags=flags,
127+
filter=case.filter,
128+
partition_arg=partition_arg,
127129
partition=partition,
128130
)
129131
expanded.append(vars(obj))

.github/scripts/tempo-check.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
66

77
# Non-verification tempo checks: local tests, fork tests, cast commands, DEX operations
88

9-
# Hardfork version, defaults to T5.
10-
HARDFORK="${TEMPO_HARDFORK:-T5}"
9+
# Hardfork version, defaults to T7.
10+
HARDFORK="${TEMPO_HARDFORK:-T7}"
1111
HARDFORK_UPPER=$(echo "$HARDFORK" | tr '[:lower:]' '[:upper:]')
1212

1313
# Fee token address, defaults to native fee token

.github/workflows/benchmarks-dispatch.yml

Lines changed: 56 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ jobs:
4040
const usage = [
4141
'**Usage:** `derek bench <subcommand> [args]` (also `decofe bench ...`).\n',
4242
'- `bench invariant [compare-ref=REF] [timeout=N] [workers=N] [benchmark-type=property|optimization]`',
43+
'- `bench symex [compare-ref=REF] [timeout=N]`',
4344
].join('');
4445
const actor = context.payload.comment.user.login;
4546
const trustedAssociations = new Set(['OWNER', 'MEMBER', 'COLLABORATOR']);
@@ -81,8 +82,8 @@ jobs:
8182
const subcommand = subMatch ? subMatch[1].toLowerCase() : '';
8283
const rawArgs = (subMatch ? afterBench.slice(subMatch[0].length) : afterBench).trim();
8384
84-
// Only `invariant` is live; build/all are reserved.
85-
const supported = new Set(['invariant']);
85+
// Only `invariant` and `symex` are live; build/all are reserved.
86+
const supported = new Set(['invariant', 'symex']);
8687
const planned = new Set(['build', 'all']);
8788
if (!subcommand) {
8889
await failWithComment('Missing bench subcommand.');
@@ -207,6 +208,59 @@ jobs:
207208
].join(', ');
208209
}
209210
211+
if (subcommand === 'symex') {
212+
const opts = {
213+
'compare-ref': 'master',
214+
timeout: '600',
215+
};
216+
const { unknown, invalid } = parseArgs(
217+
opts,
218+
new Set(['compare-ref']),
219+
new Set(['timeout']),
220+
{},
221+
);
222+
223+
const safeRef = /^[A-Za-z0-9._/-]{1,128}$/;
224+
if (!safeRef.test(opts['compare-ref'])) {
225+
invalid.push("`compare-ref` may only contain letters, numbers, '.', '_', '-', and '/'");
226+
}
227+
const timeout = Number(opts.timeout);
228+
if (!Number.isInteger(timeout) || timeout < 60 || timeout > 1800) {
229+
invalid.push('`timeout` must be between 60 and 1800 seconds');
230+
}
231+
232+
const errors = [];
233+
if (unknown.length) errors.push(`Unknown argument(s): \`${unknown.join('`, `')}\``);
234+
if (invalid.length) errors.push(`Invalid value(s): ${invalid.join(', ')}`);
235+
if (errors.length) {
236+
await failWithComment(`Invalid \`bench symex\` command\n\n${errors.join('\n')}`);
237+
return;
238+
}
239+
240+
// PR identity + safe knobs only; benchmark targets and pod sizing
241+
// are owned by the server-side foundry-bench workflow.
242+
payload = {
243+
repository: repoFullName,
244+
event: 'foundry-bench',
245+
data: {
246+
subcommand: 'symex',
247+
pr_number: String(context.issue.number),
248+
head_repo: pr.head.repo.full_name,
249+
actor,
250+
foundry_git_ref: pr.head.sha,
251+
compare_foundry_git_ref: opts['compare-ref'],
252+
timeout_seconds: opts.timeout,
253+
},
254+
};
255+
256+
summary = [
257+
`subcommand: \`symex\``,
258+
`PR SHA: \`${pr.head.sha.slice(0, 12)}\``,
259+
`compare-ref: \`${opts['compare-ref']}\``,
260+
`timeout: \`${opts.timeout}s\``,
261+
].join(', ');
262+
}
263+
210264
core.setOutput('actor', actor);
211265
core.setOutput('subcommand', subcommand);
212266
core.setOutput('summary', summary);

.github/workflows/benchmarks-nightly.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
sudo apt-get install -y build-essential pkg-config z3
3636
3737
- name: Setup Rust toolchain
38-
uses: dtolnay/rust-toolchain@e97e2d8cc328f1b50210efc529dca0028893a2d9 # master
38+
uses: dtolnay/rust-toolchain@e97e2d8cc328f1b50210efc529dca0028893a2d9 # v1
3939
with:
4040
toolchain: stable
4141

@@ -204,8 +204,8 @@ jobs:
204204
DATE=$(date -u +%Y-%m-%d)
205205
shopt -s nullglob
206206
207-
stable_parts=( benches/stable-${DATE}-*.json )
208-
nightly_parts=( benches/nightly-${DATE}-*.json )
207+
stable_parts=( "benches/stable-${DATE}-"*.json )
208+
nightly_parts=( "benches/nightly-${DATE}-"*.json )
209209
210210
if [[ ${#stable_parts[@]} -eq 0 && ${#nightly_parts[@]} -eq 0 ]]; then
211211
echo "No benchmark results produced — all steps failed."

.github/workflows/benchmarks.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ jobs:
7070
sudo apt-get install -y build-essential pkg-config z3
7171
7272
- name: Setup Rust toolchain
73-
uses: dtolnay/rust-toolchain@e97e2d8cc328f1b50210efc529dca0028893a2d9 # master
73+
uses: dtolnay/rust-toolchain@e97e2d8cc328f1b50210efc529dca0028893a2d9 # v1
7474
with:
7575
toolchain: stable
7676

@@ -191,9 +191,10 @@ jobs:
191191
pull-requests: write
192192

193193
steps:
194-
- name: Checkout repository
194+
- name: Checkout repository # zizmor: ignore[artipacked] persists credentials to push benchmark data
195195
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
196-
# persist-credentials defaults to true so we can push.
196+
with:
197+
persist-credentials: true
197198

198199
- name: Download benchmark results
199200
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1

.github/workflows/bump-tempo.yml

Lines changed: 11 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -18,42 +18,22 @@ jobs:
1818
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
1919
with:
2020
fetch-depth: 0
21+
persist-credentials: false
2122

2223
- name: Bump tempo dependencies
2324
id: bump
2425
env:
2526
GH_TOKEN: ${{ github.token }}
2627
run: ./.github/scripts/bump-tempo.sh
2728

28-
- name: Create Pull Request
29+
- name: Create or update Pull Request
2930
if: steps.bump.outputs.updated == 'true'
30-
env:
31-
GH_TOKEN: ${{ github.token }}
32-
LATEST_REV: ${{ steps.bump.outputs.latest_rev }}
33-
CHANGELOG_FILE: ${{ steps.bump.outputs.changelog }}
34-
run: |
35-
BRANCH_NAME="deps/bump-tempo-${LATEST_REV:0:7}"
36-
37-
# Skip if a PR already exists for this branch
38-
EXISTING_PR=$(gh pr list --head "$BRANCH_NAME" --state open --json number --jq '.[0].number')
39-
if [[ -n "$EXISTING_PR" ]]; then
40-
echo "PR #${EXISTING_PR} already exists for ${BRANCH_NAME}, skipping."
41-
exit 0
42-
fi
43-
44-
# Configure git
45-
git config user.name "github-actions[bot]"
46-
git config user.email "github-actions[bot]@users.noreply.github.com"
47-
48-
# Create and push branch (force-push in case a stale branch exists from a prior failed run)
49-
git checkout -b "$BRANCH_NAME"
50-
git add Cargo.toml Cargo.lock
51-
git commit -m "chore(deps): bump tempo dependencies to ${LATEST_REV:0:7}"
52-
git push --force-with-lease origin "$BRANCH_NAME"
53-
54-
# Create PR
55-
gh pr create \
56-
--title "chore(deps): bump tempo dependencies to ${LATEST_REV:0:7}" \
57-
--body-file "$CHANGELOG_FILE" \
58-
--base master \
59-
--head "$BRANCH_NAME"
31+
uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 # v8.1.1
32+
with:
33+
add-paths: |
34+
Cargo.toml
35+
Cargo.lock
36+
commit-message: "chore(deps): bump tempo dependencies to ${{ steps.bump.outputs.latest_rev_short }}"
37+
title: "chore(deps): bump tempo dependencies to ${{ steps.bump.outputs.latest_rev_short }}"
38+
body-path: ${{ steps.bump.outputs.changelog }}
39+
branch: deps/bump-tempo

.github/workflows/ci-mpp.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@ jobs:
2828
contents: read
2929
steps:
3030
# Checkout the repository
31-
- uses: actions/checkout@v7.0.0
31+
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
3232
with:
3333
persist-credentials: false
34-
- uses: dtolnay/rust-toolchain@e97e2d8cc328f1b50210efc529dca0028893a2d9 # master
34+
- uses: dtolnay/rust-toolchain@e97e2d8cc328f1b50210efc529dca0028893a2d9 # v1
3535
with:
3636
toolchain: stable
3737

0 commit comments

Comments
 (0)