fix: update stale format_c golden files after PR #1015 changed code behavior#1031
Merged
Merged
Conversation
…ged code behavior PR databricks#1022 added format_c error test files (intended as part of PR databricks#1015's %c validation coverage). However, PR databricks#1022's CI ran at 08:07 UTC, before PR databricks#1015 was merged at 16:51 UTC. The golden files were generated from code without %c rejection, so they contained success output instead of error messages. Two minutes after databricks#1015 merged, databricks#1022 was squash-merged — the stale golden files entered master without a CI re-run on the combined state. Fix both golden files to contain the actual sjsonnet.Error output: - error.format_c_multichar.jsonnet.golden: "AB" → error message - error.format_c_empty_string.jsonnet.golden: "" → error message
bddde9c to
4d8b386
Compare
Contributor
Author
|
@stephenamar-db This one need to be merged first. |
stephenamar-db
approved these changes
Jun 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
PR #1022 added format_c error test files intended as part of PR #1015
%cvalidation coverage. However, PR #1022 CI ran at 08:07 UTC, before PR #1015 was merged at 16:51 UTC. The golden files were generated from code without%crejection, so they contained success output instead of error messages.Two minutes after #1015 merged, #1022 was squash-merged. The stale golden files entered master without a CI re-run on the combined state.
Timeline
Fix
Update both golden files to contain the actual
sjsonnet.Erroroutput:error.format_c_multichar.jsonnet.golden"AB"sjsonnet.Error: [std.format] %c expected 1-sized string got: 2error.format_c_empty_string.jsonnet.golden""sjsonnet.Error: [std.format] %c expected 1-sized string got: 0Implementation behavior comparison
Behavior verified with go-jsonnet and jrsonnet latest local binary,
jrsonnet 0.5.0-pre99. Both implementations reject empty and multi-character strings for%c, and accept single Unicode code points.std.format("%c", "")%c expected 1-sized string got: 0%c expected 1 char string, got 0%c expected 1-sized string got: 0std.format("%c", "AB")%c expected 1-sized string got: 2%c expected 1 char string, got 2%c expected 1-sized string got: 2std.format("%c", "A")"A""A""A"std.format("%c", "世")"世""世""世"std.format("%c", 127757)"🌍""🌍""🌍"Verification
Test plan
%cempty, multi-character, single ASCII, single Unicode, and numeric codepoint cases