Skip to content

fix(scene): normalize indexed filenames on read#369

Open
YOMXXX wants to merge 1 commit into
TencentCloud:mainfrom
YOMXXX:fix/scene-index-filename-boundary
Open

fix(scene): normalize indexed filenames on read#369
YOMXXX wants to merge 1 commit into
TencentCloud:mainfrom
YOMXXX:fix/scene-index-filename-boundary

Conversation

@YOMXXX

@YOMXXX YOMXXX commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Summary

  • normalize filenames loaded from .metadata/scene_index.json
  • prevent stale or malformed scene metadata from feeding path segments to downstream readers/navigation
  • add a regression test for ../../secret.md metadata filenames

Why

scene_index.json is normally generated by syncSceneIndex(), but stale/corrupt metadata can be consumed by persona generation and recall navigation. Normalizing on read keeps downstream code operating on safe single-segment scene filenames.

Tests

  • npm test -- src/core/scene/scene-index.test.ts
  • npm test
  • npm run build
  • git diff --check

@Maxwell-Code07

Copy link
Copy Markdown
Collaborator

Thanks for your attention! We’ll review this and get back to you as soon as possible.

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.

2 participants