Skip to content

Commit e8f896c

Browse files
Merge PR #97 (fix/tui-chat-model-discovery) into PR #105 (EAI-7360 stale chat_url recovery)
Layer PR #105's stale persisted-URL recovery onto PR #97's configured-endpoint model discovery (which already includes current main). Manually resolve the chat.rs/mod.rs conflicts, preserving both behaviors: - PR #97: discover_configured_chat_model() adopts a served /v1/models id for a reachable configured endpoint that has no explicit model (probe_ok path). - PR #105 (EAI-7360): stale_chat_url_replacement() swaps a dead persisted tui.chat_url for a genuinely-different live local engine on the Configured + !probe_ok path, emits a "server changed" notice pointing at `/detect save`, and normalize_base_url() treats trailing slash and /v1 formatting as the same endpoint. Gated on chat_url.is_some() + no api_key/auth_header so env URLs and authenticated remote gateways are never silently replaced. The two paths are mutually exclusive on the Configured branch's probe_ok, so they compose without interference; resolve_llm_config's CLI>config>env>probe precedence is untouched. Matrix verified: no URL/model -> local detection; reachable configured -> /v1/models discovery; stale persisted -> live replacement + notice; unreachable env/explicit URL -> fail honestly; explicit auth -> no silent fallback. Signed-off-by: Michael Roy <michael.roy@amd.com>
2 parents ed0b00e + 15f449e commit e8f896c

47 files changed

Lines changed: 9699 additions & 164 deletions

Some content is hidden

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

.github/dependabot.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
version: 2
2+
updates:
3+
# Keep GitHub Actions pinned to SHAs but current: Dependabot reads the version
4+
# from the trailing `# vX.Y.Z` comment on each `uses:` and opens PRs that bump
5+
# the SHA when a new release lands, so pinning for supply-chain safety does not
6+
# mean going stale.
7+
- package-ecosystem: github-actions
8+
directory: /
9+
schedule:
10+
interval: weekly
11+
groups:
12+
github-actions:
13+
patterns:
14+
- "*"

.github/workflows/ci.yml

Lines changed: 700 additions & 29 deletions
Large diffs are not rendered by default.

.github/workflows/nightly.yml

Lines changed: 85 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
short_sha: ${{ steps.meta.outputs.short_sha }}
2222
staging_tag: ${{ steps.staging.outputs.tag }}
2323
steps:
24-
- uses: actions/checkout@v6
24+
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
2525

2626
- name: Check for changes since last nightly
2727
id: check
@@ -41,7 +41,7 @@ jobs:
4141
4242
- name: Cache Cargo home and build artifacts
4343
if: steps.check.outputs.skip != 'true'
44-
uses: actions/cache@v5
44+
uses: actions/cache@caa296126883cff596d87d8935842f9db880ef25 # v5.1.0
4545
with:
4646
path: |
4747
~/.cargo/bin
@@ -178,9 +178,9 @@ jobs:
178178
needs: nightly
179179
if: needs.nightly.outputs.skip != 'true'
180180
steps:
181-
- uses: actions/checkout@v6
181+
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
182182

183-
- uses: actions-rust-lang/setup-rust-toolchain@v1
183+
- uses: actions-rust-lang/setup-rust-toolchain@166cdcfd11aee3cb47222f9ddb555ce30ddb9659 # v1.17.0
184184

185185
- name: Build release binaries
186186
shell: pwsh
@@ -235,7 +235,7 @@ jobs:
235235
- windows-nightly
236236
if: needs.nightly.outputs.skip != 'true'
237237
steps:
238-
- uses: actions/checkout@v6
238+
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
239239

240240
- name: Publish staged nightly
241241
env:
@@ -309,3 +309,83 @@ jobs:
309309
GH_TOKEN: ${{ github.token }}
310310
GH_REPO: ${{ github.repository }}
311311
run: gh release delete "${{ needs.nightly.outputs.staging_tag }}" --yes --cleanup-tag 2>/dev/null || true
312+
313+
# Full E2E on app-dev MI300X INCLUDING the expensive `@nightly` scenarios (the
314+
# large-model serve), which the per-PR ci.yml `e2e-gpu` job skips to stay fast.
315+
# Runs unconditionally on the schedule/dispatch (independent of the nightly
316+
# BUILD skip above — a regression run is worth doing even with no new commits).
317+
# Non-blocking, mirrors ci.yml's e2e-gpu job but sets E2E_INCLUDE_NIGHTLY.
318+
e2e-gpu-nightly:
319+
name: E2E tests (GPU, incl. nightly-only)
320+
timeout-minutes: 90
321+
runs-on: [self-hosted, linux, amd-gpu]
322+
continue-on-error: true
323+
env:
324+
# Include @nightly scenarios (the large-model serve). See src/expectation.rs.
325+
E2E_INCLUDE_NIGHTLY: "1"
326+
# Serve-readiness floor; a `@serve-timeout` tag lengthens it for the large
327+
# model (its cold ~54 GiB load exceeds this default).
328+
E2E_SERVE_TIMEOUT_SECS: "300"
329+
steps:
330+
- uses: actions/checkout@v6
331+
332+
# Reclaim the GPU before running: kill only e2e leftovers scoped to
333+
# /tmp/rocm-e2e-* and the e2e-target/e2e-shared trees — never the runner or
334+
# any /workload manual-testing processes (see ci.yml e2e-gpu for the same).
335+
- name: Reclaim GPU from stray E2E processes
336+
run: |
337+
pkill -f '/tmp/rocm-e2e.*llama-server' 2>/dev/null || true
338+
pkill -f '/tmp/rocm-e2e.*vllm serve' 2>/dev/null || true
339+
pkill -f 'e2e-shared.*llama-server' 2>/dev/null || true
340+
pkill -f '__engine-serve-http.*rocm-e2e' 2>/dev/null || true
341+
pkill -f 'e2e-target/release/rocm daemon' 2>/dev/null || true
342+
rm -rf /tmp/rocm-e2e-* 2>/dev/null || true
343+
echo "reclaimed"
344+
345+
# cache: false — this self-hosted runner persists the build cache itself via
346+
# CARGO_TARGET_DIR (below), so the action's rust-cache is pure overhead.
347+
- uses: actions-rust-lang/setup-rust-toolchain@v1
348+
with:
349+
cache: false
350+
351+
- name: Run full E2E on GPU hardware (incl. nightly-only)
352+
run: |
353+
export CARGO_TARGET_DIR="$RUNNER_WORKSPACE/e2e-target"
354+
export E2E_SHARED_CACHE_DIR="$RUNNER_WORKSPACE/e2e-shared"
355+
# Share uv's wheel cache off the near-full PVC, on the roomy `/` overlay
356+
# (see ci.yml e2e-gpu): warm `rocm install sdk` ~34s vs cold ~160s.
357+
export E2E_SHARED_UV_CACHE_DIR="/var/tmp/rocm-e2e-uv-cache"
358+
# Share ONE installed managed runtime across serve/chat scenarios so
359+
# install sdk runs once per runner, not per scenario (see ci.yml e2e-gpu).
360+
# The shared dir IS the pre-warm's own data/runtimes; NEVER move it — a
361+
# post-install mv invalidates the absolute paths install sdk bakes into
362+
# the runtime manifest and every serve fails instantly (run 29320025393).
363+
prewarm="$RUNNER_WORKSPACE/e2e-prewarm"
364+
export E2E_SHARED_RUNTIMES_DIR="$prewarm/data/runtimes"
365+
366+
# Build once; reuse for pre-warm + suite so xtask doesn't rebuild.
367+
cargo build --release -p rocm
368+
export ROCM_CLI_BINARY="$CARGO_TARGET_DIR/release/rocm"
369+
370+
# Pre-warm the shared runtime once/serially before the suite; skipped
371+
# once populated (persists across runs). Install in place (no mv) so the
372+
# manifest's absolute paths stay valid. See ci.yml e2e-gpu for rationale.
373+
if [ ! -d "$E2E_SHARED_RUNTIMES_DIR/registry" ]; then
374+
echo "pre-warming shared runtime (first run on this runner)…"
375+
mkdir -p "$prewarm"/{data,config,cache}
376+
ROCM_CLI_CONFIG_DIR="$prewarm/config" \
377+
ROCM_CLI_DATA_DIR="$prewarm/data" \
378+
ROCM_CLI_CACHE_DIR="$prewarm/cache" \
379+
HF_HOME="$E2E_SHARED_CACHE_DIR/huggingface" \
380+
UV_CACHE_DIR="$E2E_SHARED_UV_CACHE_DIR" \
381+
"$ROCM_CLI_BINARY" install sdk
382+
fi
383+
384+
cargo xtask e2e
385+
386+
- name: Upload E2E report
387+
if: always()
388+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
389+
with:
390+
name: e2e-gpu-nightly-report
391+
path: tests/e2e-cucumber/results/

.github/workflows/release.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
outputs:
2323
version: ${{ steps.version.outputs.value }}
2424
steps:
25-
- uses: actions/checkout@v6
25+
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
2626

2727
- name: Determine version
2828
id: version
@@ -47,7 +47,7 @@ jobs:
4747
echo "value=${VERSION}" >> "$GITHUB_OUTPUT"
4848
4949
- name: Cache Cargo home and build artifacts
50-
uses: actions/cache@v5
50+
uses: actions/cache@caa296126883cff596d87d8935842f9db880ef25 # v5.1.0
5151
with:
5252
path: |
5353
~/.cargo/bin
@@ -162,9 +162,9 @@ jobs:
162162
runs-on: windows-latest
163163
needs: release
164164
steps:
165-
- uses: actions/checkout@v6
165+
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
166166

167-
- uses: actions-rust-lang/setup-rust-toolchain@v1
167+
- uses: actions-rust-lang/setup-rust-toolchain@166cdcfd11aee3cb47222f9ddb555ce30ddb9659 # v1.17.0
168168

169169
- name: Build release binaries
170170
shell: pwsh

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,5 @@ current-user-asks.md
1212
__pycache__/
1313
/.hawkeye-bin/
1414
/.claude
15+
/workspace/
16+
/e2e-consolidated-report.md

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,15 +108,15 @@ repos:
108108
pass_filenames: false
109109
- id: cargo-clippy
110110
name: cargo clippy
111-
entry: cargo clippy --workspace --all-targets -- -D warnings
111+
entry: cargo clippy --workspace --all-targets --exclude e2e-cucumber -- -D warnings
112112
language: system
113113
types: [rust]
114114
pass_filenames: false
115115
stages: [pre-push] # compiles the workspace; too slow for every commit
116116
groups: [local-tools] # runs in the dedicated `clippy` CI job
117117
- id: cargo-test
118118
name: cargo test
119-
entry: cargo test --workspace --all-targets
119+
entry: cargo test --workspace --all-targets --exclude e2e-cucumber
120120
language: system
121121
types: [rust]
122122
pass_filenames: false

AGENTS.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,15 +55,16 @@ the full range on push (`verify-commits`), and a blocking CI gate
5555
Content restrictions for upstream surfaces:
5656

5757
- do not include internal/proprietary names, aliases, URLs, hostnames, gateways, cluster names, or registry paths
58-
- do not include internal ticket identifiers, links to internal tracking systems, or unrelated internal usernames
58+
- do not include links to internal tracking systems or unrelated internal usernames
59+
- bare Jira/EAI-style ticket IDs (e.g. `EAI-1234`) are permitted anywhere this rule applies; do not flag them
5960
- apply this rule to PR titles/bodies, issue text, comments, review replies, commit messages, branch names, code comments, fixtures, and logs
6061

6162
Use neutral external framing (for example: "backend" or "gateway") rather than internal or vendor-specific ownership phrasing.
6263

6364
Leak scan before each upstream push/PR/comment batch:
6465

6566
```bash
66-
INTERNAL_KEYWORDS_PATTERN='internal|confidential|proprietary|private|ticket-[0-9]+|jira|confluence|\.corp|\.internal'
67+
INTERNAL_KEYWORDS_PATTERN='internal|confidential|proprietary|private|jira|confluence|\.corp|\.internal'
6768
git diff <upstream-base>..HEAD \
6869
| grep -inE "$INTERNAL_KEYWORDS_PATTERN" \
6970
&& echo "REVIEW each hit" || echo "diff clean"
@@ -104,7 +105,7 @@ grep -rn "^<<<<<<<\|^=======\|^>>>>>>>" .
104105
For leak scans, use upstream base `origin/main` (or upstream default branch if different):
105106

106107
```bash
107-
INTERNAL_KEYWORDS_PATTERN='internal|confidential|proprietary|private|ticket-[0-9]+|jira|confluence|\.corp|\.internal'
108+
INTERNAL_KEYWORDS_PATTERN='internal|confidential|proprietary|private|jira|confluence|\.corp|\.internal'
108109
git diff origin/main..HEAD \
109110
| grep -inE "$INTERNAL_KEYWORDS_PATTERN" \
110111
&& echo "REVIEW each hit" || echo "diff clean"

0 commit comments

Comments
 (0)