Skip to content

fix(scripts): preserve literal hashes in metadata - #962

Merged
bee-san merged 1 commit into
bee-san:masterfrom
rudycelekli:fix/preserve-script-metadata-hashes-20261028
Nov 4, 2026
Merged

bee-san merged 1 commit into
bee-san:masterfrom
rudycelekli:fix/preserve-script-metadata-hashes-20261028

Conversation

@rudycelekli

Copy link
Copy Markdown
Contributor

Summary

Preserve literal # characters inside custom-script TOML metadata. ScriptFile::new currently removes every hash from each metadata line, changing a tag such as C# into C and removing URL fragments or literal arguments from call_format.

Remove only the leading comment marker and surrounding whitespace. The existing TOML parser continues to interpret the resulting metadata.

Verification

The maintained test invokes the actual script metadata parser on a temporary text fixture. It fails on the original parser and passes with this change, checking both the tag and the complete command-format string. It never executes the fixture, scans ports, resolves a hostname or launches an external command.

Full native checks passed: 69 library tests, 6 binary tests, 2 integration tests and 8 doctests; one existing doctest is ignored. Both clippy checks with denied warnings, formatting and the documented documentation build pass. Tested on macOS arm64/Rust 1.90 with scoped Xcode SDK 26.4 after correcting a host SDK linker mismatch. Hosted CI is pending.

Checked all 642 historical/current PRs and refreshed the seven current open PRs; no overlapping parser correction was found. Prepared with AI assistance under the account owner's direction and independently reviewed. No merge or deployment performed.

@bee-san
bee-san merged commit ab1e69f into bee-san:master Nov 4, 2026
@sonarqubecloud

sonarqubecloud Bot commented Nov 4, 2026

Copy link
Copy Markdown

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