Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
fix: drop Veilweaver from player-facing asset text
The intro companion line and the debrief title card now use in-world
wording. The gate and a dialogue test fail if that name returns in
dialogue, quests, voices, npc lines, or cinematics.

Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>
  • Loading branch information
cursoragent and lazyxeon committed Oct 21, 2026
commit 81f70d279a243a371320c524bc58cdbf278ea075
3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,9 @@ jobs:
- name: Checkout
uses: actions/checkout@v5

- name: Player-facing name check
run: bash scripts/ci/player_facing_names.sh

- name: Rust CI setup
if: needs.changes.outputs.docs_only != 'true'
uses: ./.github/actions/rust-ci-setup
Expand Down
2 changes: 1 addition & 1 deletion assets/cinematics/debrief_resolution.ron
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ Cinematic(
//
// Post-cinematic:
// - Cinematic ends with fade to black
// - "VEILWEAVER — Vertical Slice Complete" title card
// - "THE LOOM HOLDS — The first span is stitched" title card
// - "Built on AstraWeave Engine" subtitle
// - Return to main menu or replay option
//
2 changes: 1 addition & 1 deletion assets/dialogue_intro.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ choices = [

[[nodes]]
id = "n2"
line = { speaker = "Companion", text = "Spoken like a true Veilweaver. Confidence helps, but the bridge still needs stitching." }
line = { speaker = "Companion", text = "Spoken like a true thread-binder. Confidence helps, but the bridge still needs stitching." }
choices = [
{ text = "Give me the plan.", go_to = "n3" },
{ text = "Lead on.", go_to = "n4" }
Expand Down
38 changes: 38 additions & 0 deletions astraweave-dialogue/src/toml_loader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,44 @@ choices = [{ text = "Go", go_to = "does_not_exist" }]
assert!(result.is_err());
}

#[test]
fn player_facing_assets_do_not_say_veilweaver() {
let root = std::path::Path::new(env!("CARGO_MANIFEST_DIR")).join("../assets");
let mut files = vec![
root.join("dialogue_intro.toml"),
root.join("quests_main.toml"),
root.join("echoes.toml"),
root.join("voices.toml"),
];
for dir in [root.join("npc"), root.join("cinematics")] {
if !dir.is_dir() {
continue;
}
let mut nested: Vec<_> = std::fs::read_dir(&dir)
.unwrap_or_else(|err| panic!("reading {}: {err}", dir.display()))
.map(|entry| entry.unwrap().path())
.filter(|path| path.is_file())
.collect();
nested.sort();
files.extend(nested);
}
let mut hits = Vec::new();
for path in files {
if !path.is_file() {
continue;
Comment on lines +261 to +275

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A missing asset tree makes this test pass. !dir.is_dir() continues, and !path.is_file() continues, so the hit list stays empty and the assertion holds. CARGO_MANIFEST_DIR/../assets is correct for this workspace layout. It is the wrong layout, or a renamed file, that goes green.

read_dir is one directory level, and line 267 keeps every file. scripts/ci/player_facing_names.sh is recursive and keeps only *.toml, *.ron, and *.txt. Both see the same 10 files today because assets/npc and assets/cinematics are flat. A nested .ron fails only the shell. A .json under assets/cinematics fails only this test, and only on a run that actually builds astraweave-dialogue (an asset-only diff does not).

Panic when a required path is missing. Recurse with the same extension filter as the shell, or have one of the two checks call the other.

}
let text = std::fs::read_to_string(&path)
.unwrap_or_else(|err| panic!("reading {}: {err}", path.display()));
if text.to_ascii_lowercase().contains("veilweaver") {
hits.push(path.display().to_string());
}
}
assert!(
hits.is_empty(),
"player-facing assets must not say Veilweaver: {hits:?}"
);
}

#[test]
fn load_actual_intro_dialogue() {
let path =
Expand Down
34 changes: 34 additions & 0 deletions scripts/ci/player_facing_names.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#!/usr/bin/env bash
# Fail when player-facing asset text says "Veilweaver".
# Scanned: dialogue, quests, echoes, voices, npc lines, and cinematic
# cards (including the title-card notes in the .ron files).
# Cell tags and editor metadata under assets/cells are not player text.
set -euo pipefail

root=$(cd "$(dirname "$0")/../.." && pwd)
cd "$root"

mapfile -t files < <(
find \
assets/dialogue_intro.toml \
assets/quests_main.toml \
assets/echoes.toml \
assets/voices.toml \
Comment on lines +12 to +16

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Include runtime UI copy in the forbidden-name scan

When the demos are run, this check is green while players still see the retired name: examples/veilweaver_demo/src/main.rs:157-178 prints it in the banner/HUD, and examples/cutscene_render_demo/src/main.rs:114-119 displays it as a title cue. Because find is rooted only at four asset files plus assets/npc and assets/cinematics, no player-visible Rust string can be caught, so the new CI gate does not enforce the repository's naming requirement; extend the scan or an explicit allowlist to cover runtime UI copy as well.

AGENTS.md reference: AGENTS.md:L2-L2

Useful? React with 👍 / 👎.

assets/npc \
assets/cinematics \
-type f \( -name '*.toml' -o -name '*.ron' -o -name '*.txt' \) | sort
)

fail=0
for file in "${files[@]}"; do
if grep -In -E -i 'veilweaver' "$file"; then
fail=1
fi
done
Comment on lines +11 to +27

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This gate exits 0 when it never saw the files. mapfile < <(find …) drops find's status, and set -euo pipefail does not apply to a process substitution. I ran this control flow with assets/dialogue_intro.toml present and a second root missing: find printed No such file or directory, then the script reported count=1 and exited 0. With both roots missing it reported count=0 and exited 0, which this script would print as Player-facing assets do not say Veilweaver (0 files).

The if grep on line 24 treats exit 2 as a clean file. A mode-000 file whose contents were the banned word produced Permission denied and fail=0. mapfile also splits on newlines, so one filename with an embedded newline becomes two paths, grep fails both, and those errors are swallowed the same way. Paths here are prefixed with assets/, so they are not grep flags. That part is fine.

Capture find's status (write the list, then test $?), and refuse to print the success line unless the count is the full set. On this tree that set is 10 files: the four root files, assets/npc/merchant.toml, and the five cinematic .ron files.


if [ "$fail" -ne 0 ]; then
echo "Player-facing assets must not say Veilweaver. Use in-world wording (the Loom, threads, Aravath)." >&2
exit 1
fi

echo "Player-facing assets do not say Veilweaver (${#files[@]} files)."
Loading