Skip to content

[codex] Fix builder code parsing in register script#115

Draft
Kubudak90 wants to merge 1 commit into
base:masterfrom
Kubudak90:codex/fix-register-builder-code-json
Draft

[codex] Fix builder code parsing in register script#115
Kubudak90 wants to merge 1 commit into
base:masterfrom
Kubudak90:codex/fix-register-builder-code-json

Conversation

@Kubudak90

Copy link
Copy Markdown

Summary

  • parse the builder code API response with jq instead of a whitespace-sensitive grep pattern
  • add a shell regression test that fakes the API response with pretty-printed JSON

Root cause

The register script searched for "builder_code":"...", so valid JSON with a space after the colon produced no match. Because the script runs with set -euo pipefail, the failed grep could exit before the existing empty-value guard ran.

Fixes #54.

Validation

  • bash -n skills/build-on-base/scripts/register.sh
  • bash -n skills/build-on-base/scripts/register_test.sh
  • bash skills/build-on-base/scripts/register_test.sh

@cb-heimdall

Copy link
Copy Markdown
Collaborator

🟡 Heimdall Review Status

Requirement Status More Info
Reviews 🟡 0/1
Denominator calculation
Show calculation
1 if user is bot 0
1 if user is external 0
2 if repo is sensitive 0
From .codeflow.yml 1
Additional review requirements
Show calculation
Max 0
0
From CODEOWNERS 0
Global minimum 0
Max 1
1
1 if commit is unverified 1
Sum 2

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.

register.sh: grep pattern fails when API response has space after colon in JSON key ("builder_code": vs "builder_code":")

2 participants