fix: surface publish submission status#197
Conversation
jcfischer
left a comment
There was a problem hiding this comment.
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:
-
RegisterResulttype (src/types.ts) — extended withsubmissionId+submissionobject to capture server review state.reviewCommentcorrectly typed asstring | nullmatching the server shape. -
registerVersion()(src/lib/publish.ts) — response parsing now capturessubmission_id,submission.{id,status,review_comment}. Defensive??fallback forversion_idvsversion.idhandles API shape evolution gracefully. -
publish()+formatPublish()(src/commands/publish.ts) — rejected submissions returnsuccess: falsewith 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.
Closes #196.
Plan artifact:
Plans/2026-06-03-arc-issues-196-183-184-sequential-plan.mdfor the requested publish: surface MetaFactory submission status instead of unconditional Published #196 -> arc install/upgrade re-appends provides.hooks non-idempotently → duplicate PreToolUse registrations #183 -> arc upgrade: extracted-tarball install + version-check both broken (soma#127 reproducer) #184 queue.Changes:
submission_idandsubmission.statusfrom MetaFactory version registration responses.version.idfor the current server response shape whenversion_idis absent.Published.Validation:
rtk bun test test/unit/publish.test.tsrtk bun test test/commands/publish.test.tsrtk bunx tsc --noEmitrtk bun run lintrtk bun test(971 pass, 3 skip, 0 fail)