Skip to content

Fix malformed box.json and guard release version extraction - #59

Merged
lmajano merged 1 commit into
mainfrom
fix/main-release-json
Sep 15, 2026
Merged

lmajano merged 1 commit into
mainfrom
fix/main-release-json

Conversation

@lmajano

@lmajano lmajano commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

Summary

The last release run on main tagged the repo as v (empty version), published cbfs+9 to ForgeBox instead of a proper semver, and then hard-failed in the GitHub Release step (INPUT_TITLE: parameter null or not set).

Root cause

box.json's scripts object had a trailing comma after its last entry — invalid strict JSON, though CommandBox's own parser tolerates it. The release workflow's version-extraction step:

echo "VERSION=`cat box.json | jq '.version' -r`" >> $GITHUB_ENV

used backtick command substitution around jq. When jq failed to parse the malformed JSON, the substitution silently produced an empty string and the step still exited 0, so VERSION was empty for the rest of the job.

(development's box.json is already clean — the automated box bump --minor step there rewrites it with CommandBox's own serializer, which doesn't emit trailing commas. Same release.yml hardening is proposed separately for development in #58.)

Fix

  • Remove the trailing comma in box.json so it's valid JSON.
  • Use jq -e (non-zero exit on a null/parse-failure result) and explicitly fail the step if VERSION ends up empty, so a broken box.json can't silently produce a broken release again.

Test plan

  • jq -e '.version' -r box.json succeeds
  • Next release run on main produces a real version tag/publish

🤖 Generated with Claude Code

https://claude.ai/code/session_01MY8vKDaEubRApVMT9BXSYk


Generated by Claude Code

…action

box.json's scripts object had a trailing comma after its last entry,
which is invalid strict JSON (CommandBox's own lenient parser tolerated
it, but jq did not). The release workflow reads the version via
`jq '.version' -r`, so on main this silently produced an empty VERSION,
which then tagged the repo as "v", published cbfs+9 to ForgeBox, and
hard-failed the GitHub Release step.

- Remove the trailing comma so box.json is valid JSON.
- Use jq -e and explicitly fail the step if VERSION is empty, so a
  malformed box.json can't silently produce a broken release again.
@github-actions

Copy link
Copy Markdown

boxlang-cfml@1 ColdBox ^8 Test Results

  1 files    5 suites   14s ⏱️
280 tests 280 ✅ 0 💤 0 ❌
284 runs  280 ✅ 4 💤 0 ❌

Results for commit 4c4b0e1.

@github-actions

Copy link
Copy Markdown

lucee@6 ColdBox ^8 Test Results

  1 files    5 suites   10s ⏱️
280 tests 280 ✅ 0 💤 0 ❌
284 runs  280 ✅ 4 💤 0 ❌

Results for commit 4c4b0e1.

@github-actions

Copy link
Copy Markdown

boxlang@1 ColdBox ^8 Test Results

  1 files    5 suites   13s ⏱️
277 tests 277 ✅ 0 💤 0 ❌
284 runs  277 ✅ 7 💤 0 ❌

Results for commit 4c4b0e1.

@github-actions

Copy link
Copy Markdown

boxlang@1 ColdBox be Test Results

  1 files    5 suites   12s ⏱️
277 tests 277 ✅ 0 💤 0 ❌
284 runs  277 ✅ 7 💤 0 ❌

Results for commit 4c4b0e1.

@github-actions

Copy link
Copy Markdown

adobe@2023 ColdBox ^8 Test Results

  1 files    5 suites   11s ⏱️
277 tests 277 ✅ 0 💤 0 ❌
284 runs  277 ✅ 7 💤 0 ❌

Results for commit 4c4b0e1.

@github-actions

Copy link
Copy Markdown

boxlang-cfml@1 ColdBox be Test Results

  1 files    5 suites   12s ⏱️
280 tests 280 ✅ 0 💤 0 ❌
284 runs  280 ✅ 4 💤 0 ❌

Results for commit 4c4b0e1.

@github-actions

Copy link
Copy Markdown

adobe@2025 ColdBox ^8 Test Results

  1 files    5 suites   11s ⏱️
277 tests 277 ✅ 0 💤 0 ❌
284 runs  277 ✅ 7 💤 0 ❌

Results for commit 4c4b0e1.

@github-actions

Copy link
Copy Markdown

adobe@2023 ColdBox be Test Results

  1 files    5 suites   13s ⏱️
277 tests 274 ✅ 0 💤 3 ❌
284 runs  274 ✅ 7 💤 3 ❌

For more details on these failures, see this check.

Results for commit 4c4b0e1.

@github-actions

Copy link
Copy Markdown

adobe@2025 ColdBox be Test Results

  1 files    5 suites   11s ⏱️
277 tests 277 ✅ 0 💤 0 ❌
284 runs  277 ✅ 7 💤 0 ❌

Results for commit 4c4b0e1.

@lmajano
lmajano merged commit f7daaa7 into main Sep 15, 2026
19 of 21 checks passed
@lmajano
lmajano deleted the fix/main-release-json branch September 15, 2026 13:58
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