Skip to content

fix(skill-promotion): parse multi-line relay approval verdict (#2378) - #2379

Merged
jinon86 merged 1 commit into
mainfrom
fix/2378-l3-approve-output-pretty-json
Oct 19, 2026
Merged

jinon86 merged 1 commit into
mainfrom
fix/2378-l3-approve-output-pretty-json

Conversation

@jinon86

@jinon86 jinon86 commented Oct 18, 2026

Copy link
Copy Markdown
Contributor

Fixes #2378

What

_run_relay_approval now parses the relay helper's verdict from the last line that opens a JSON object through the end of stdout (_relay_result_json), instead of json.loads(last_line).

Why

approve-via-relay.sh L246 prints the verdict with jq -n (no -c) → multi-line; the last line is } → approve_output_invalid. First live #2239 L3 sweep (2026-10-19 08:30 KST, seoseo): fleet-skills#514 got a real seoseo-ai APPROVED review on exact head 3acc0f46, but the publisher recorded approve-failed and skipped the --match-head-commit merge. The 1-week dry-run never invoked the helper, and the test stub emitted single-line json.dumps.

Unchanged

ok / approved / exact-head verification, 3-failure cap, merge argv.

Evidence

  • cd scripts && python3 -m unittest ccc_skill_promotion_auto_drain_test → 57 OK (3 new)
  • Mutation: without the fix, test_pretty_printed_relay_output_is_a_verified_approval FAILs
  • All ccc_skill_promotion_*_test.py OK; ruff check passed

Deploy

Seoseo publisher picks it up via self-update (04:45/05:45 KST). Until then L3 approvals still land on GitHub but are logged as failures (capped at 3/head, no mis-approval).

🤖 Generated with Claude Code

approve-via-relay.sh prints its final verdict with `jq -n` (pretty, multi-line);
_run_relay_approval json.loads()'d only the last non-empty line (`}`), so every
#2239 L3 approval was recorded as approve_output_invalid and the
--match-head-commit merge was skipped. First live hit: fleet-skills#514 on
2026-10-19 08:30 KST (GitHub shows seoseo-ai APPROVED on 3acc0f46).

Parse from the last line opening a JSON object through the end. ok/approved/
exact-head verification is unchanged. Tests use the real indent shape now,
plus head-mismatch and non-JSON negatives; the stub previously emitted
single-line json.dumps, which is why the suite never saw it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jinon86
jinon86 requested a review from seoseo-ai as a code owner October 18, 2026 23:34

@seoseo-ai seoseo-ai left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved after exact-head validation and fresh operator authorization using the relay-held seoseo-ai credential.

@jinon86
jinon86 added this pull request to the merge queue Oct 18, 2026
Merged via the queue into main with commit ca13dd5 Oct 19, 2026
14 checks passed
@jinon86
jinon86 deleted the fix/2378-l3-approve-output-pretty-json branch October 19, 2026 00:00
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.

skill-promotion L3: approve-via-relay pretty-printed JSON read as approve_output_invalid (#2239)

2 participants