Skip to content

docs: fix DEVKIT_COMMIT_APP_ENVIRONMENT guard quoting claim - #1740

Merged
c-vigo merged 1 commit into
devfrom
docs/1738-commit-app-environment-quoting-comment
Sep 28, 2026
Merged

c-vigo merged 1 commit into
devfrom
docs/1738-commit-app-environment-quoting-comment

Conversation

@c-vigo

@c-vigo c-vigo commented Sep 28, 2026

Copy link
Copy Markdown
Contributor

Description

Fixes a factually wrong guard comment above the DEVKIT_COMMIT_APP_ENVIRONMENT
validation guard in assets/init-workspace.sh (around line 515). The comment
claimed the value is rendered as an unquoted YAML scalar, "exactly as for
DEVKIT_SYNC_TARGET above". render_commit_app_environment() (around line
2351, unchanged by this PR) actually emits environment: '<name>' —
single-quoted, unconditionally — precisely because the allowed charset
admits YAML 1.1 bool/number shapes (true/no parse as booleans, 0755 as
the integer 493, 1e3 as a float), and an unquoted scalar would hand GitHub a
non-string environment it rejects at dispatch, a failure actionlint does
not catch.

Type of Change

  • docs -- Documentation only

Modifiers

  • Breaking change (!)

Changes Made

Reworded the guard comment only, in assets/init-workspace.sh:

  • States the value is rendered as a single-quoted YAML scalar
    (environment: '<name>'), not unquoted.
  • Keeps the charset allowlist as the LOAD-BEARING guard, now explicitly because
    it refuses ', so the quoted splice never needs escaping.
  • Keeps the cross-reference to DEVKIT_SYNC_TARGET but makes the quoting
    difference explicit (mixed quoted/unquoted splices there) instead of
    implying the two keys behave alike.
  • Preserves the rest of the comment's content unchanged: the GitHub 255-char /
    case-insensitive constraint, the "pure .vig-os key, no CLI flag, so only a
    format guard" note, and the #1710 reference.

No code changed — git diff -- assets/init-workspace.sh touches only #
comment lines. render_commit_app_environment() and the validation guard's
if body are untouched, so this is a byte-identical render for every existing
consumer.

Changelog Entry

No changelog needed. This is a comment-only change with no rendered byte
difference and no consumer-visible effect (confirmed by diff + the existing
render test suite passing unchanged), so it carries no user-visible impact per
CLAUDE.md's changelog scoping rule.

Testing

  • Tests pass locally (uv run pytest tests/test_commit_app_environment.py -v -s --tb=short — 48 passed)
  • prek run --all-files — green, no findings
  • git diff -- assets/init-workspace.sh reviewed by hand: only comment
    lines change; the guard's code and render_commit_app_environment() are
    untouched

Manual Testing Details

N/A — no CLI-visible or rendered behavior to exercise manually; verification is
the diff review + the existing automated render-test suite above.

Checklist

  • My code follows the project's style guidelines (comment wrapped to match
    the surrounding column width and tone)
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have updated the documentation accordingly -- N/A, no docs/templates/
    content is affected
  • I have updated CHANGELOG.md -- intentionally skipped, see Changelog
    Entry above
  • My changes generate no new warnings or errors
  • I have added tests that prove my fix is effective -- TDD skipped per
    CLAUDE.md's carve-out for non-testable constructs (a comment has no
    observable behavior to pin); verified instead by running the existing
    tests/test_commit_app_environment.py suite unchanged (48 passed) and by
    hand-confirming the diff is comment-only
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published

Additional Notes

This cannot ride the release-neutral lane: assets/init-workspace.sh is baked
into devkitImage, so even a comment-only edit moves that derivation's path
and gate 2 will refuse it. It needs a normal release train to reach main.

Refs: #1738

The guard comment above the DEVKIT_COMMIT_APP_ENVIRONMENT validation
guard claimed the value is rendered as an UNQUOTED YAML scalar,
"exactly as for DEVKIT_SYNC_TARGET above". render_commit_app_environment()
actually emits `environment: '<name>'` single-quoted, unconditionally,
precisely because the allowed charset admits YAML 1.1 bool/number
shapes that an unquoted scalar would let YAML mistype. Reword the
comment to state the single-quoting, keep the charset allowlist as
load-bearing (it refuses `'`, so no escaping is ever needed), and make
the quoting difference from DEVKIT_SYNC_TARGET's mixed quoted/unquoted
splices explicit instead of implying the two behave alike. No other
content of the comment changes.

Comment-only change with no rendered byte difference, so TDD is
skipped per CLAUDE.md's carve-out for non-testable constructs; verified
instead by confirming `git diff` touches only comment lines and by
running the existing tests/test_commit_app_environment.py suite (48
passed) unchanged.

Refs: #1738
@c-vigo
c-vigo merged commit 66ba41f into dev Sep 28, 2026
15 checks passed
@c-vigo
c-vigo deleted the docs/1738-commit-app-environment-quoting-comment branch September 28, 2026 08:54
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.

1 participant