Skip to content

fix(commands): accept hexadecimal light colors - #74

Merged
zoeyrose merged 6 commits into
1.xfrom
fix/69-command-color-parsing-1x
Aug 10, 2026
Merged

fix(commands): accept hexadecimal light colors#74
zoeyrose merged 6 commits into
1.xfrom
fix/69-command-color-parsing-1x

Conversation

@zoeyrose

@zoeyrose zoeyrose commented Aug 10, 2026

Copy link
Copy Markdown
Member

Summary

  • parse light_color command values as exactly six unprefixed hexadecimal digits, case-insensitively
  • validate all light-color input before mutating object attributes
  • make /create destroy an uninserted object and report malformed input cleanly, while /patch reports it without mutation
  • preserve generic decimal, float, quoted-string, flag, and fallback Load() coercion
  • add focused helper and command-adapter regressions to aggregate validation

Release line

This is the separately maintained Classic 1.x companion for issue #69. PR #73 on main is the only canonical closing change.

Validation

  • python3 -m unittest -v tools.tests.test_python_commands: 9/9 passed
  • python3 tools/validate.py: 99/99 tests passed, including catalog, schema, contracts, release guidance, release-line, clean runtime collection/package, and license gates
  • git diff --check: passed
  • ./atrinik build server --profile issue-69-classic --test: 36/36 server tests passed, including lighting, Python plugin, runtime, and protocol coverage
  • isolated topology issue-69-command-color with state scenario-issue-69-command-color: server and client reached ready state, completed the QUIC handshake and asset transfer, then shut down cleanly
  • GitHub Content validation, Linux/Windows syntax prototypes, and PR-title policy: passed on rebased head 7b246116e
  • definitive independent whole-diff exit review: zero actionable findings

The focused command tests prove /create and /patch convert ff0000/mixed-case RRGGBB to the expected integer, reject malformed input without mutation, and destroy an invalid uninserted /create object. The isolated server lighting suite verifies the corresponding Classic integer light-color runtime contract.

Reproduction

The preserved credentials-local scenario can be inspected with:

./atrinik scenario show issue-69-command-color --json
./atrinik scenario credentials issue-69-command-color
./atrinik topology show issue-69-classic --state scenario-issue-69-command-color --json
./atrinik up --name issue-69-command-color --profile issue-69-classic --state scenario-issue-69-command-color
./atrinik ps issue-69-command-color --json

Log in with the locally retrieved credentials, run /create torch light_color ff0000, apply the torch and observe red light; use /patch torch light_color 00FF00 for the same parser path; then confirm /create torch light_color gg0000 reports the validation error without adding an object. Finish with:

./atrinik logs issue-69-command-color server --tail 100
./atrinik down issue-69-command-color

Coordinates

  • base: 1.x at 8576f6dcf1d03ecbcbfa55c80b275568b519491b
  • head: fix/69-command-color-parsing-1x at 7b246116e
  • worktree: /workspaces/atrinik/workspace/worktrees/content-1x/issue-69-1x
  • commits: 1e224a91 fix(commands): accept hexadecimal light colors; 178cd603 fix(commands): preserve unrelated light color text; 79717621 fix(commands): align attribute whitespace parsing; 3dc148f3 fix(commands): validate complete color input; ea2ab4b0 fix(commands): reject malformed color quoting; 7b246116 fix(commands): reject quoted color attributes

Companion to #69 and #73.

@zoeyrose zoeyrose moved this to Review in Atrinik work Aug 10, 2026
@zoeyrose
zoeyrose marked this pull request as ready for review August 10, 2026 17:46
@zoeyrose
zoeyrose force-pushed the fix/69-command-color-parsing-1x branch from 6dd8947 to 7b24611 Compare August 10, 2026 17:59
zoeyrose added a commit that referenced this pull request Aug 10, 2026
## Summary

- parse `light_color` command values as exactly six unprefixed
hexadecimal digits, case-insensitively
- validate all light-color input before mutating object attributes
- make `/create` destroy an uninserted object and report malformed input
cleanly, while `/patch` reports it without mutation
- preserve generic decimal, float, quoted-string, flag, and fallback
`Load()` coercion
- add focused helper and command-adapter regressions to aggregate
validation

## Release line

This is the canonical forward-line change for `main`. PR #74 is the
separately maintained `1.x` companion with its own base, worktree,
commit, validation, and PR.

## Validation

- `python3 -m unittest -v tools.tests.test_python_commands`: 9/9 passed
- `python3 tools/validate.py`: 100/100 tests passed, including catalog,
schema, contracts, syntax, release guidance, clean runtime collection,
license, and provenance gates
- `git diff --check`: passed
- GitHub Content validation, Linux/Windows syntax prototypes, and
PR-title policy: passed on rebased head `761a9b764`
- definitive independent whole-diff exit review: zero actionable
findings

The replacement stack does not yet expose wrapper build, runtime, or
scenario adapters for authored content; that existing boundary is
tracked in `atrinik/atrinik#266`, `#269`, and `#270`. This branch
therefore uses its repository-owned validation and focused
command-adapter coverage rather than importing Classic runtime code.

## Coordinates

- base: `main` at `040e63d96cb50eb1afc8e819297ee3859ad34620`
- head: `fix/69-command-color-parsing` at `761a9b764`
- worktree:
`/workspaces/atrinik/workspace/worktrees/content/issue-69-main`
- commits: `ea5370c50 fix(commands): accept hexadecimal light colors`;
`e0d5c89f0 fix(commands): preserve unrelated light color text`;
`eb2025ca0 fix(commands): align attribute whitespace parsing`;
`b2f93d0fb fix(commands): validate complete color input`; `41901080c
fix(commands): reject malformed color quoting`; `761a9b764
fix(commands): reject quoted color attributes`

Closes #69

Companion: #74
@zoeyrose
zoeyrose merged commit 3480656 into 1.x Aug 10, 2026
5 checks passed
@zoeyrose
zoeyrose deleted the fix/69-command-color-parsing-1x branch August 10, 2026 18:07
@github-project-automation github-project-automation Bot moved this from Review to Done in Atrinik work Aug 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant