Skip to content

Commit 3e20a92

Browse files
committed
Remove legacy migration paths
The hook installer and the vendor fetch carried branches for trees laid out the way this one no longer is, and nothing left in the repository can reach them. Require the current behavior outright. The docs go with them: the Java lane needs a working toolchain rather than a version nobody here tested, and the connection notes drop a claim about which assertions moved that was never checked.
1 parent 6981527 commit 3e20a92

12 files changed

Lines changed: 22 additions & 119 deletions

‎.gitignore‎

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,6 @@ DONT-MERGE/
4949
web/vendor/face-detection/*.binarypb
5050
web/vendor/face-detection/*.tflite
5151
web/vendor/face-detection/*.wasm
52-
# A retired local artifact, not a vendored file: the avatar model is fetched by
53-
# the browser now and nothing puts it here any more. Ignored so that a checkout
54-
# predating that change keeps its leftover copy invisible to git until
55-
# scripts/fetch-vendor.sh removes it. Delete this line once no such checkout is
56-
# plausible.
57-
web/vendor/avatar/jim.vrm
5852
# Same rule for Pyodide, pinned in web/vendor/pyodide/SHA256SUMS: 13.7 MB of
5953
# interpreter, glue and stdlib, none of which changes without a version bump.
6054
web/vendor/pyodide/*.js

‎docs/development.md‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,8 @@ not packaged as widely, so the gate falls back to its container image, pinned to
3131
the version the workflow installs, whenever the binary is absent and a docker
3232
daemon answers. CI installs all three, so what is optional locally is enforced
3333
on a pull request — the summary exists so that a contributor knows which of the
34-
two they are looking at. One lane needs `javac` 16 or newer and is skipped on an
35-
older JDK; that is the Java class-harness fixture and nothing else depends on
36-
it.
34+
two they are looking at. One lane needs working `javac` and `java`; the Java
35+
class-harness fixture uses Java 8 syntax, and nothing else depends on it.
3736

3837
Where the time goes, measured on this repo rather than guessed, because the
3938
answer is not the one a first look gives. Warm, the two Rust lanes are seconds:

‎docs/livekit-connection-troubleshooting.md‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,7 @@ rest.
6565
- `tests/web.rs`: `responses_carry_baseline_security_headers`,
6666
`production_policy_names_no_loopback_origins`, and
6767
`the_recording_template_is_reachable_under_a_policy_that_permits_its_room`
68-
all pass. Each asserts with `contains`, and this change only adds entries, so
69-
no existing assertion moved.
68+
all pass.
7069
- `cargo fmt --check` and `cargo clippy --lib` clean.
7170
- Confirmed against the live symptom: the CSP refusal disappeared from the
7271
browser console and the request reached LiveKit.

‎scripts/fetch-vendor.sh‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,11 @@ VENDOR="$ROOT/web/vendor"
1414

1515
[ -d "$VENDOR" ] || exit 0
1616

17-
# Releases no longer embed or serve this model; browser Cache API owns it now.
18-
# Remove the ignored file left by pre-migration checkouts on their next build.
17+
# The avatar model used to be pinned here and fetched like everything else; it
18+
# is loaded from its own origin into the browser cache now. A checkout from
19+
# before that still has the file, nothing pins it any more, and
20+
# `verify-vendor.sh` refuses an unpinned file in this tree, so the first build
21+
# after upgrading fails on a leftover this script is the one placed to clear.
1922
rm -f "$VENDOR/avatar/jim.vrm"
2023

2124
download()

‎scripts/git-pre-push.sh‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ set -u
99

1010
remote=${1:-}
1111

12-
# From the repository, not from $0: git invokes the hook through the symlink in
12+
# From the repository, not from $0: git invokes the hook through the wrapper in
1313
# .git/hooks, so dirname of $0 names that directory and not scripts/. Hooks run
1414
# with the working tree root as the working directory.
1515
script_dir=$(git rev-parse --show-toplevel)/scripts

‎scripts/install-git-hooks.sh‎

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -32,23 +32,9 @@ ours()
3232
[ -f "$1" ] && wrapper "$2" | cmp -s - "$1"
3333
}
3434

35-
# Before wrappers, this installer made absolute links into a worktree. Accept
36-
# only one that names a worktree Git says belongs to this repository, so an
37-
# unrelated local hook remains untouched while an upgrade fixes the old link.
38-
legacy_ours()
39-
{
40-
[ -L "$1" ] || return 1
41-
link=$(readlink "$1") || return 1
42-
base=${link%/scripts/git-"$2".sh}
43-
[ "$base" != "$link" ] && [ -d "$base" ] || return 1
44-
worktree=$(git -C "$base" rev-parse --show-toplevel 2> /dev/null) || return 1
45-
git worktree list --porcelain | grep -Fqx "worktree $worktree"
46-
}
47-
4835
if [ "$mode" = uninstall ]; then
4936
for target in "$hooks"/*; do
50-
ours "$target" "${target##*/}" \
51-
|| legacy_ours "$target" "${target##*/}" || continue
37+
ours "$target" "${target##*/}" || continue
5238
rm -f "$target"
5339
printf ' RM %s\n' "${target##*/}"
5440
done
@@ -70,11 +56,6 @@ for hook in "$ROOT"/scripts/git-*.sh; do
7056
# nothing runs.
7157
chmod +x "$target" || failed=1
7258
printf ' OK %s\n' "$name"
73-
elif legacy_ours "$target" "$name" \
74-
&& rm -f "$target" \
75-
&& wrapper "$name" > "$target" \
76-
&& chmod +x "$target"; then
77-
printf ' HOOK %s\n' "$name"
7859
elif [ -e "$target" ] || [ -L "$target" ]; then
7960
printf ' KEEP %s already exists; remove it to install ours\n' "$target"
8061
elif wrapper "$name" > "$target" && chmod +x "$target"; then

‎scripts/test-git-hooks.sh‎

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -212,13 +212,9 @@ git worktree add -q -b linked "$work/linked" || exit 1
212212
&& cp scripts/git-*.sh scripts/install-git-hooks.sh "$work/linked/scripts/") \
213213
|| exit 1
214214
rm -f "$hooks/pre-commit"
215-
ln -s "$PWD/scripts/git-pre-commit.sh" "$hooks/pre-commit" || exit 1
216215
(cd "$work/linked" && ./scripts/install-git-hooks.sh > "$work/linked.out") || exit 1
217-
absent "linked installer keeps no hook from another worktree" "$work/linked.out" "KEEP"
216+
contains "linked installer installs its hook" "$work/linked.out" "HOOK pre-commit"
218217
cases=$((cases + 1))
219-
if [ -L "$hooks/pre-commit" ]; then
220-
fail "linked installer did not replace the old link"
221-
fi
222218
printf '#!/bin/sh\nexit 1\n' > scripts/git-pre-commit.sh
223219
(cd "$work/linked" \
224220
&& printf '#!/bin/sh\n\necho staged\n' > linked.sh \

‎scripts/verify-vendor.sh‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,7 @@ status=0
4242
# Every vendored file needs a line in the SHA256SUMS beside it. `basename` is
4343
# what the sums files record, matching the `cd && sha256sum -c` convention.
4444
# README and LICENSE are provenance, not bytes the browser runs, so they are the
45-
# only things allowed to be unpinned. The ignored legacy model is no longer
46-
# shipped or served, but can remain in pre-migration worktrees.
45+
# only things allowed to be unpinned.
4746
#
4847
# Collected rather than piped into the loop, for two reasons. A pipeline reports
4948
# the status of its last command, so `find | while` skips a subtree it cannot
@@ -54,7 +53,7 @@ status=0
5453
# The `||` has to stay out here rather than move into a helper the two walks
5554
# share: `exit` inside `$(...)` leaves the substitution, not the script, and the
5655
# silent pass is back.
57-
files=$(find "$VENDOR" -type f ! -path "$VENDOR/avatar/jim.vrm" ! -name SHA256SUMS ! -name FETCH ! -name 'README*' ! -name 'LICENSE*') \
56+
files=$(find "$VENDOR" -type f ! -name SHA256SUMS ! -name FETCH ! -name 'README*' ! -name 'LICENSE*') \
5857
|| {
5958
echo "verify-vendor: cannot scan ${VENDOR#"$ROOT"/}" >&2
6059
exit 1

‎src/web/assets.rs‎

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -193,18 +193,6 @@ fn static_candidates(path: &str) -> Option<Vec<String>> {
193193
.collect::<Vec<_>>()
194194
.join("/");
195195

196-
// `jim.vrm` used to be fetched into checkouts and disk assets override the
197-
// embedded store. It is now browser-cached from its pinned source, so
198-
// refuse the retired URL even when an old ignored file remains on disk.
199-
//
200-
// Case-insensitively, because the comparison has to be at least as
201-
// forgiving as the filesystem underneath it. macOS and Windows both resolve
202-
// `JIM.VRM` to the leftover file, so an exact match refused one spelling
203-
// and served 10.9 MB for every other. ASCII is the whole alphabet a
204-
// vendored filename may use, which `is_refused_segment` already enforces.
205-
if clean.eq_ignore_ascii_case("vendor/avatar/jim.vrm") {
206-
return None;
207-
}
208196
if clean.is_empty() {
209197
return Some(vec!["index.html".to_string()]);
210198
}

‎tests/browser/avatar.test.js‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,7 @@ test("avatar vendor manifest pins every redistributed file", () => {
6666
// SHA256SUMS cannot pin itself, and licenses are provenance rather than bytes
6767
// the browser runs, which is the same carve-out scripts/verify-vendor.sh
6868
// makes. Nothing in this directory is fetched any more, so there is no FETCH.
69-
// Old checkouts can retain the once-fetched model. It is neither served nor
70-
// embedded now, and verify-vendor likewise ignores that retired local path.
71-
const exempt = new Set(["SHA256SUMS", "README.md", "LICENSE-three.txt", "LICENSE-three-vrm.txt", "LICENSE-jim-vrm.txt", "jim.vrm"]);
69+
const exempt = new Set(["SHA256SUMS", "README.md", "LICENSE-three.txt", "LICENSE-three-vrm.txt", "LICENSE-jim-vrm.txt"]);
7270
assert.deepEqual(vendored.filter((name) => !hashed.has(name) && !exempt.has(name)), []);
7371
for (const license of ["LICENSE-three.txt", "LICENSE-three-vrm.txt"]) {
7472
assert.match(read(`web/vendor/avatar/${license}`), /MIT/, `${license} must carry its terms`);
@@ -108,9 +106,11 @@ test("avatar vendor manifest pins every redistributed file", () => {
108106
assert.match(read("Makefile"), /verify-vendor:\n\t@\.\/scripts\/verify-vendor\.sh/);
109107
// And the checker must find directories by glob, not by name, or a new
110108
// vendor directory is unpinned and silent about it.
111-
assert.match(read("scripts/verify-vendor.sh"), /find "\$VENDOR" -name SHA256SUMS/);
112-
assert.match(read("scripts/verify-vendor.sh"), /! -path "\$VENDOR\/avatar\/jim\.vrm"/);
113-
assert.doesNotMatch(read("scripts/verify-vendor.sh"), /face-detection/);
109+
const verifier = read("scripts/verify-vendor.sh");
110+
assert.match(verifier, /find "\$VENDOR" -name SHA256SUMS/);
111+
assert.match(verifier, /find "\$VENDOR" -type f ! -name SHA256SUMS/);
112+
assert.doesNotMatch(verifier, /! -path/);
113+
assert.doesNotMatch(verifier, /face-detection/);
114114
});
115115

116116
test("avatar dom contract", () => {

0 commit comments

Comments
 (0)