Skip to content

publish: fix red publish-on-merge — handle rich submissions, null-safe pointer fields#83

Merged
TeoSlayer merged 1 commit into
mainfrom
fix/publish-rich-submission-skip
Jul 13, 2026
Merged

publish: fix red publish-on-merge — handle rich submissions, null-safe pointer fields#83
TeoSlayer merged 1 commit into
mainfrom
fix/publish-rich-submission-skip

Conversation

@TeoSlayer

Copy link
Copy Markdown
Contributor

Problem

publish-on-merge has failed on every run since 2026-07-06 (last success 06-29) with:

missing bundle submissions/io.pilot.tldr/null

Root cause: every submission merged since early July uses the RICH shape (backend/methods spec — bundles are built + signed by the publisher's own key via pilot-app submit / publish-api), but scripts/publish-submission.sh only understands the legacy POINTER shape (bundle + bundle_sha256 + namespace). jq -r .bundle on a rich submission prints the literal string null, which flowed into the bundle path. The tldr submission itself is valid — pilot-app verify-submission passes all 4 platforms.

Fix

  • scripts/publish-submission.sh
    • extract every field with jq -r '… // empty' and validate each with a specific, loud error (no more silent null propagation into paths/tags)
    • RICH submissions (backend object + methods, no .bundle) are skipped with a clear notice and exit 0 — CI holds no publisher key, so this pointer publisher cannot build/sign them
    • pointer submissions missing .namespace / .bundle_sha256 now fail with an exact message
  • .github/workflows/publish-on-merge.yml
    • workflow_dispatch input to manually (re)publish a single submissions/<id> dir
    • --diff-filter=d so a deleted submission.json no longer errors
    • header comment: platform repo is pilot-protocol/pilotprotocol
  • User-facing instructions pointed at the wrong repo (TeoSlayer/pilotprotocolpilot-protocol/pilotprotocol):
    • cmd/pilot-app/main.go:654
    • internal/scaffold/templates/Makefile.tmpl:65

Verification (local)

  • rich submission submissions/io.pilot.tldr → skip notice, exit 0
  • pointer submission submissions/io.pilot.sixtyfour → resolves tag=sixtyfour-v0.1.0, primary file, sha, release URL correctly
  • synthetic malformed submissions (no shape / missing namespace / missing id) → each fails loudly with a specific error
  • go build ./... + go test ./cmd/... ./internal/scaffold/... pass; workflow YAML parses

After merge, a workflow_dispatch run against submissions/io.pilot.tldr will confirm green in CI.

🤖 Generated with Claude Code

…ointers

publish-on-merge has been red since 2026-07-06: every submission merged since
then uses the RICH shape (backend/methods spec, no pre-built .bundle), but
publish-submission.sh only knows the legacy POINTER shape. jq -r on the
missing fields printed the literal string "null", producing
"missing bundle submissions/io.pilot.tldr/null".

- publish-submission.sh: extract fields with `// empty` and validate each one
  with a clear error; detect rich submissions (backend object + methods) and
  skip them with a notice — they are built and signed with the publisher's own
  key via pilot-app submit / publish-api, which CI cannot do (no publisher
  key); error loudly when a pointer submission lacks .namespace/.bundle_sha256.
- publish-on-merge.yml: add workflow_dispatch (manually (re)publish one
  submission dir); ignore DELETED submission.json files (--diff-filter=d);
  update the header comment (platform repo is pilot-protocol/pilotprotocol).
- cmd/pilot-app/main.go:654 + internal/scaffold/templates/Makefile.tmpl:65:
  the printed publish instructions pointed users at TeoSlayer/pilotprotocol;
  the catalogue lives on pilot-protocol/pilotprotocol.

Verified locally: rich submission (io.pilot.tldr) → skip exit 0; pointer
submission (io.pilot.sixtyfour) resolves tag/sha/url correctly; missing
id/namespace/sha each fail with a specific message; go build + tests pass.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@TeoSlayer TeoSlayer merged commit 1381cf6 into main Jul 13, 2026
6 checks passed
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