Skip to content

HLE: read manifest fields past inline XML comments - #487

Merged
Marvisak merged 1 commit into
Marvisak:mainfrom
Quat3rnion:victory-manifest-comments
Nov 25, 2026
Merged

Marvisak merged 1 commit into
Marvisak:mainfrom
Quat3rnion:victory-manifest-comments

Conversation

@Quat3rnion

Copy link
Copy Markdown
Contributor

What

elements() read a field's text up to the next <. A manifest generator
that writes <TitleId><!-- generated -->639AA8DD</TitleId> therefore
produced an empty TitleId, giving the title id 0 and the wrong save
namespace. The same affected StoreId and storage size. Field text now skips
comments instead of stopping at them; other markup still ends the field.

An AI tool wrote part of this change.

Tested

  • Linux: cargo test --workspace: 165 passed, 0 failed, 3 ignored. The existing manifest test still passes; a new regression puts inline comments inside TitleId, StoreId and SizeMB and checks all three values.
  • Windows cross-build: cargo check --target x86_64-pc-windows-gnu --workspace --tests passes. No Windows host here.
  • cargo xtask policy passes (150 files ok). No game files or data from them were added.

Checklist

  • Workspace tests and Windows cross-check pass.
  • cargo xtask policy passes. No game files or data from them were added.
  • AI authorship is disclosed above.

@Quat3rnion
Quat3rnion force-pushed the victory-manifest-comments branch from 9bcb02c to be484a1 Compare November 24, 2026 07:24

@mercuryVM mercuryVM left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Tested be484a1 on Windows 11, RTX 5070, MSVC: cargo test --workspace --no-fail-fast passes (248 passed, 0 failed; older base), including inline_comments_do_not_truncate_a_field.

field_text keeps the old rule that any other markup ends the text, and only steps over <!-- … -->. Entities are still decoded afterwards on the joined text (the 9&amp;<!-- -->C case shows that). An unterminated comment stops at the text read so far rather than swallowing the rest. It also merges cleanly with #359 (quoted > in attributes), which is in our fork: together they handle both directions of this parser's edge cases.

No issues found.

AI-assisted (Claude Code).

mercuryVM added a commit to mercuryVM/VIctory that referenced this pull request Nov 24, 2026
… XML comments

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
elements() took field text up to the next '<', so a generator comment before the value made TitleId, StoreId or SizeMB empty. Skip comments while gathering the text. Add a regression with comments inside all three fields.
@Quat3rnion
Quat3rnion force-pushed the victory-manifest-comments branch from be484a1 to ca362a4 Compare November 24, 2026 14:11
@jeremygold02

Copy link
Copy Markdown
Contributor

Focused verification on current head ca362a42473bb0f8f9a83377091287a621e94527:

cargo test --locked -p victory-hle --lib inline_comments_do_not_truncate_a_field -- --test-threads=1 passed (1 passed, 0 failed). This exercises manifest parsing through Title::from_manifest: inline comments are skipped before TitleId and storage size values, and 9&amp;<!-- keep -->C becomes 9&C. The earlier review cites a workspace run on be484a1; this result is specifically for the current SHA above.

This verification was AI-assisted.

@Marvisak
Marvisak merged commit 805317b into Marvisak:main Nov 25, 2026
1 check passed
geiyiliyabumo pushed a commit to geiyiliyabumo/VIctory that referenced this pull request Nov 25, 2026
…ack-log-487-111a

GPU: host texture fallback ladder and refusal logging (Marvisak#487)
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.

4 participants