luxe update and /update, editable question answers, and a version bump owed once per release

- luxe update and /update update Luxe with the command for however it was installed (cargo or
  Homebrew), run one program at a time with the terminal attached, then check that the luxe on
  PATH is the new version. Luxe never downloads or replaces its own binary. The start screen says
  "Update available · /update".
- A question's typed answer edits at its caret: arrows, word jumps, Home, End and Delete work,
  and up and down move through a wrapped answer before leaving it.
- The version check owes a bump once per release: the version on main is the next release, and
  only a released one (a v-tag) has to move.
- Dependency updates arrive through the sync, so Dependabot and the weekly jobs no longer run here.
This commit is contained in:
Evan Whittaker
2026-10-17 14:14:27 -05:00
parent 0e84deb59c
commit bf86df5098
41 changed files with 794 additions and 355 deletions

View File

@@ -1,60 +0,0 @@
# Dependabot — keeps the SHA-pinned GitHub Actions, the Cargo tree, and the website's npm deps current.
#
# For github-actions it bumps the pinned commit SHA (and the trailing `# vX` tag comment) as new
# releases land, so pinning to a SHA stays secure without going stale. Cargo updates keep the
# dependency tree fresh; the CI `--locked` + cargo-deny gates vet every bump.
#
# UPDATES ARE GROUPED, and that is a cost decision with numbers behind it. Ungrouped, one weekly run
# opened thirteen pull requests — and each one is a full CI run across three platforms, of which the
# Windows job alone takes ~17 minutes and bills at 2x. Worse, they all rebase and re-run every time
# master moves, so a single push cost hours of runner time re-testing bumps nobody had looked at yet.
# Grouped, the same week is two pull requests. Nothing is skipped and nothing auto-merges: the same
# gate runs over the same set of bumps, once instead of thirteen times.
#
# Major versions stay separate on purpose. A `thiserror 1 -> 2` is a code change to read, not a line
# in a batch, and burying it among patch bumps is how it gets waved through.
version: 2
updates:
- package-ecosystem: github-actions
directory: /
schedule:
interval: weekly
commit-message:
prefix: ci
groups:
actions:
patterns: ["*"]
update-types: [minor, patch]
- package-ecosystem: cargo
directory: /
schedule:
interval: weekly
open-pull-requests-limit: 5
commit-message:
prefix: deps
groups:
cargo:
patterns: ["*"]
update-types: [minor, patch]
# The website is a deployed surface with its own dependency tree (Astro, Svelte, the asciinema
# player, wrangler). Same deal as cargo: batch the minor/patch churn, leave the majors to read.
- package-ecosystem: npm
directory: /web
schedule:
interval: weekly
commit-message:
prefix: deps
groups:
web:
patterns: ["*"]
update-types: [minor, patch]
ignore:
# TypeScript 7 is the native compiler, and it does not ship the programmatic API that
# `astro check` drives — `npm run check` fails on load, before it type-checks anything. This is
# upstream's to fix (withastro/roadmap#1321) and not something a bump here can carry, so the
# major is muted rather than reopened weekly. Minor and patch on 5.x still come through.
# Drop this entry when `@astrojs/check` announces TypeScript 7 support.
- dependency-name: typescript
update-types: ["version-update:semver-major"]

View File

@@ -3,8 +3,8 @@
# Mirrors the local gate (AGENTS.md / PROJECT.md) and adds `--locked` everywhere
# so a PR can never silently drift `Cargo.lock` (the core supply-chain guard).
# Third-party actions are pinned to commit SHAs (trailing `# vX` = the tag);
# Dependabot (.github/dependabot.yml) bumps the SHAs. SHA-pinned `uses:` lines
# necessarily exceed 80 cols — that's expected.
# Dependabot bumps the SHAs in the development repository. SHA-pinned `uses:`
# lines necessarily exceed 80 cols — that's expected.
name: CI
# A commit that touches only prose cannot change what the compiler or the suite says, and this

View File

@@ -1,103 +0,0 @@
name: models.dev snapshot
# The embedded snapshot is the offline/first-run floor for model metadata. The runtime refresh
# keeps live installs current, so this only has to move at release cadence — but a fresh clone or
# an air-gapped install should still know about models that shipped since the last release.
#
# Everything is verified *here*, in the job, rather than on the pull request it opens. A PR created
# with the default `GITHUB_TOKEN` does not trigger workflows — that is GitHub's loop guard, not a
# misconfiguration — so the PR's check list is empty by construction and always will be. Whatever
# has to hold before these bytes ship is therefore asserted below, before the PR exists.
on:
schedule:
- cron: "0 6 * * 1" # Mondays, 06:00 UTC
workflow_dispatch:
permissions:
contents: write
pull-requests: write
# The same build settings as `ci.yml`, which this job used to go without. Regenerating the site
# assets lists every test binary in the workspace, and with full debug info that build filled the
# runner's disk: the listing came back empty and the job died on a JSON parse, having said nothing
# about why.
env:
CARGO_TERM_COLOR: always
CARGO_NET_RETRY: "3"
CARGO_PROFILE_DEV_DEBUG: line-tables-only
CARGO_PROFILE_TEST_DEBUG: line-tables-only
jobs:
refresh:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Regenerate the snapshot
run: scripts/update-models-snapshot.sh
# The script writes deterministic bytes, so an unchanged catalog means there is nothing to
# build, test or open. Skip the expensive half rather than spending a release build to
# discover it.
- name: Did anything change?
id: changed
run: |
if git diff --quiet -- crates/luxe-providers/data/models-dev-snapshot.json.gz; then
echo "snapshot unchanged"
echo "changed=false" >>"$GITHUB_OUTPUT"
else
echo "changed=true" >>"$GITHUB_OUTPUT"
fi
- name: Install Rust
if: steps.changed.outputs.changed == 'true'
uses: dtolnay/rust-toolchain@4cda84d5c5c54efe2404f9d843567869ab1699d4 # stable
- uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2
if: steps.changed.outputs.changed == 'true'
- name: Install nextest
if: steps.changed.outputs.changed == 'true'
uses: taiki-e/install-action@26e9283f268b880168bdbd2c545dfcd60ec2c6ab # v2.87.13
with:
tool: nextest
# What upstream churn actually breaks: a provider id that was renamed, or a preference list
# whose first entry was retired, which would hand every new account fallback metadata. Those
# live in `luxe-providers`' catalog tests; `luxe-cli` owns resolution on top of them.
- name: Verify the catalog still holds
if: steps.changed.outputs.changed == 'true'
run: cargo nextest run -p luxe-providers -p luxe-cli
# `facts.json` counts the snapshot's providers and models, so a refresh makes the generated
# site assets stale. Regenerating here keeps the PR self-consistent — shipping the snapshot
# alone turns the stale-assets gate red on master the moment it merges.
- name: Regenerate the site assets
if: steps.changed.outputs.changed == 'true'
run: |
scripts/site-assets.sh
scripts/site-assets.sh --check
- uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 # v8.1.1
if: steps.changed.outputs.changed == 'true'
with:
branch: chore/models-dev-snapshot
title: "chore: refresh the embedded models.dev snapshot"
commit-message: "chore: refresh the embedded models.dev snapshot"
body: |
Automated refresh of `crates/luxe-providers/data/models-dev-snapshot.json.gz`
from https://models.dev/api.json, with the derived counts in
`web/src/assets/generated/facts.json`.
Verified in the job that produced it — a PR opened with `GITHUB_TOKEN` gets no
workflow runs, so an empty check list here is expected, not a failure:
- `cargo nextest run -p luxe-providers -p luxe-cli`
- `scripts/site-assets.sh --check`
Regenerate locally with `scripts/update-models-snapshot.sh` followed by
`scripts/site-assets.sh`. The script writes deterministic bytes, so an unchanged
catalog produces no PR.
add-paths: |
crates/luxe-providers/data/models-dev-snapshot.json.gz
web/src/assets/generated/facts.json

View File

@@ -1,80 +0,0 @@
name: real language servers
# The `#[ignore]`d LSP tests, run against servers that are actually installed.
#
# They are ignored for a good reason — each one spawns a real server, which the canonical gate has
# no business doing on every push — and that reason is also how they rot: nothing ran them, so a
# TypeScript adapter that reported every `.ts` file as clean sat green for months. An ignored test
# nobody runs is worth roughly nothing.
#
# So: weekly, and on demand, off the PR path entirely. What it catches is drift *underneath* Luxe —
# a server that changed its handshake, a language whose toolchain moved to a protocol Luxe does not
# speak — which is a class of failure no amount of stub testing sees, and which arrives on a
# calendar rather than in a diff.
on:
schedule:
- cron: "0 7 * * 1" # Mondays, 07:00 UTC
workflow_dispatch:
permissions:
contents: read
concurrency:
group: real-servers-${{ github.ref }}
cancel-in-progress: true
env:
CARGO_TERM_COLOR: always
CARGO_NET_RETRY: "3"
CARGO_PROFILE_TEST_DEBUG: line-tables-only
jobs:
servers:
name: lsp against installed servers
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Install Rust (stable + rust-analyzer)
uses: dtolnay/rust-toolchain@4cda84d5c5c54efe2404f9d843567869ab1699d4 # stable
with:
components: rust-analyzer
- name: Cache cargo + target
uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2
- name: Install nextest
uses: taiki-e/install-action@26e9283f268b880168bdbd2c545dfcd60ec2c6ab # v2.87.13
with:
tool: nextest
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: 24
# Every test here skips itself when its server is absent, so this list is what gets covered
# rather than what is required. `typescript` is installed beside its language server because
# `typescript-language-server` is a driver and does nothing without one.
- name: Install language servers
run: |
npm i -g typescript typescript-language-server pyright \
bash-language-server yaml-language-server vscode-langservers-extracted \
svelte-language-server
go install golang.org/x/tools/gopls@latest
echo "$(go env GOPATH)/bin" >>"${GITHUB_PATH}"
- name: Which servers answered
run: |
for server in rust-analyzer typescript-language-server tsc pyright-langserver \
gopls clangd bash-language-server yaml-language-server \
vscode-json-language-server svelteserver; do
printf '%-32s %s\n' "${server}" "$(command -v "${server}" || echo 'not installed')"
done
# Serially: several of these index a project, and a runner with two cores running six
# language servers at once measures the runner rather than the adapter.
- name: Real-server suite
run: >
cargo nextest run -p luxe-lsp --locked --run-ignored all
--test-threads 1 --no-fail-fast -E 'test(/real_/)'