Skip to content

fix: surface publish submission status#197

Merged
jcfischer merged 2 commits into
mainfrom
fix/issue-196-publish-submission-status
Jun 2, 2026
Merged

fix: surface publish submission status#197
jcfischer merged 2 commits into
mainfrom
fix/issue-196-publish-submission-status

Conversation

@jcfischer
Copy link
Copy Markdown
Contributor

Closes #196.

Plan artifact:

Changes:

  • Preserve submission_id and submission.status from MetaFactory version registration responses.
  • Preserve version.id for the current server response shape when version_id is absent.
  • Show pending review publishes as uploaded and queued for review instead of Published.
  • Treat rejected publish submissions as failures and include the review comment.

Validation:

  • rtk bun test test/unit/publish.test.ts
  • rtk bun test test/commands/publish.test.ts
  • rtk bunx tsc --noEmit
  • rtk bun run lint
  • rtk bun test (971 pass, 3 skip, 0 fail)

Copy link
Copy Markdown
Contributor Author

@jcfischer jcfischer left a comment

Choose a reason for hiding this comment

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

CodeReview — StandardReview (CodeQuality lens)

Auto-detected lenses: CodeQuality (always) — no security surface, auth, or architecture changes detected.

Assessment

Clean, well-scoped fix. Three changes working in concert:

  1. RegisterResult type (src/types.ts) — extended with submissionId + submission object to capture server review state. reviewComment correctly typed as string | null matching the server shape.

  2. registerVersion() (src/lib/publish.ts) — response parsing now captures submission_id, submission.{id,status,review_comment}. Defensive ?? fallback for version_id vs version.id handles API shape evolution gracefully.

  3. publish() + formatPublish() (src/commands/publish.ts) — rejected submissions return success: false with clear error. Pending review intercepts before the "Published" message. Other states (approved, no-submission) fall through to existing behavior. No regression path.

Test coverage: 3 new tests (unit: response parsing, command: pending_review format, command: rejected with review comment). All assert both the result object and formatted output. Good boundary coverage.

No findings. blockers=0 majors=0 nits=0

Recommend: approve.

@jcfischer jcfischer merged commit 541b979 into main Jun 2, 2026
3 checks passed
@jcfischer jcfischer deleted the fix/issue-196-publish-submission-status branch June 2, 2026 22:15
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.

publish: surface MetaFactory submission status instead of unconditional Published

1 participant