Skip to content

🐛 fix: drop stale named furniture from the route fixture - #12

Merged
evan-ak merged 1 commit into
mainfrom
fix/content-invalid-character
Sep 30, 2026
Merged

evan-ak merged 1 commit into
mainfrom
fix/content-invalid-character

Conversation

@nevamind-agent

Copy link
Copy Markdown
Contributor

动机

The Test workflow has failed on every PR into main, including docs-only ones, because 5 tests in 3
files (package.test.ts, movement.test.ts, immutable-content.test.ts) throw Invalid character
from loadContent (prototype/content.ts:607).

All three load content/fixtures/route/. Its scenes/room.json still has 12 furniture entities with
named characters (table, stool, counter, pot, pan, steamer, poster-1, poster-2). The
loader and content/SCENE_CAPABILITIES.md only accept f1–f8, book, sprite, or a door with a
portal, so loading the fixture fails before any test logic runs.

解决方案

Remove the 12 room.furniture.* entities from the fixture. The fixture exists to cover dialogue, task
sequencing, NPC movement and portal travel (see its README), and no test or story refers to the
furniture, so I didn't re-author it as sprite entities. The file only loses lines. Nothing else
changes.

npm test now passes locally: 23 suites, 50 tests.

类型

  • ✨ feat: 添加新功能
  • 🐛 fix: 修复 bug
  • 📝 docs: 对文档进行修改
  • ♻️ refactor: 代码重构(既不是新增功能,也不是修改 bug 的代码变动)
  • ⚡ perf: 提高性能的代码修改
  • 🧑‍💻 dx: 优化开发体验
  • 🔨 workflow: 工作流变动
  • 🏷️ types: 类型声明修改
  • 🚧 wip: 工作正在进行中
  • ✅ test: 测试用例添加及修改
  • 🔨 build: 影响构建系统或外部依赖关系的更改
  • 👷 ci: 更改 CI 配置文件和脚本
  • ❓ chore: 其它不涉及源码以及测试的修改
  • ⬆️ deps: 依赖项修改
  • 🔖 release: 发布新版本

🤖 Generated with Claude Code

The route fixture's room.json still listed 12 furniture entities with
named characters (table, stool, counter, pot, pan, steamer, poster-1,
poster-2). The loader only accepts f1-f8, book, sprite, or a door with a
portal (content/SCENE_CAPABILITIES.md), so every test that loads the
fixture threw "Invalid character" and the Test workflow never passed.

The fixture covers dialogue, tasks, movement and portals, and no test
refers to the furniture, so remove it rather than re-author it as
sprites.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@evan-ak
evan-ak merged commit 8b004a2 into main Sep 30, 2026
4 of 5 checks passed
@MrXnneHang

MrXnneHang commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

prettier 是用来格式化 json 文件的。因为之前的 json 改动很频繁。

每次修改后单独运行 prettier 确实很麻烦 =-=。

我当时是直接绑到 pre-commit 里了。但存量的可能还没修。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants