Skip to content

Submit project templates with one SDK attempt - #313

Merged
purpshell merged 6 commits into
devfrom
codex/oa28-project-template-submit-attempt
Oct 1, 2026
Merged

purpshell merged 6 commits into
devfrom
codex/oa28-project-template-submit-attempt

Conversation

@purpshell

@purpshell purpshell commented Sep 26, 2026 •

Copy link
Copy Markdown
Member

MessagingClient.templates.submit already had a typed request and response, but it inherited client retry settings for a provider create operation. It now makes one network attempt even when a caller supplies an idempotency key or retry override (the route declares no replay contract). The README shows submission and directs callers to read the Number's Meta template catalog after a lost response or before treating a submission as approved.

API source: polymorfa/polymorfa PR #377, merged; pinned through SDK dev contracts at API dev 29abb7b66a8e225af4df5cf354e9836ccb2ce04c (merged with SDK #308).

  • API: unaffected here; #377 rejects invalid drafts with 400 before provider dispatch. Deployment is a separate gate.
  • SDK: templates.submit forces one attempt; new test asserts one request with a key and retry override. Method, fields and types unchanged.
  • CLI: companion Add confirmed project-template submit command cli#45 adds a confirmed command; it pins the published dev prerelease.
  • Docs: TypeScript README and contract notes updated. Public docs unaffected (beta-gated Official API feature).
  • Feature release: no enrollment, entitlement, flag or audience change.

Verification: typecheck, focused template tests (8) pass; CI on this head.

Summary by CodeRabbit

  • Documentation
    • Clarified that template submissions validate the saved definition and make a single provider attempt; success does not mean the template is approved.
    • Added guidance to check the Number’s template catalog before resubmitting after a timeout or lost response. Local previews do not validate templates with Meta.
    • Documented a 400 response for invalid project-template drafts.

@coderabbitai

coderabbitai Bot commented Sep 26, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Team

Run ID: 2fc5b00b-e108-4ccb-acf9-a4e81ca4988f

📥 Commits

Reviewing files that changed from the base of the PR and between 55bd21c and 5dd6c8e.

📒 Files selected for processing (4)
  • contracts/README.md
  • packages/typescript/README.md
  • packages/typescript/src/messaging/templates.ts
  • packages/typescript/test/cloud-templates.test.ts

Included review availability: This review used your included allowance. 0 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 4 reviews per hour.


📝 Walkthrough

Walkthrough

Template submissions now make one network attempt, regardless of retry overrides. Documentation describes submission outcomes and recovery after a lost response. A test verifies that a server error rejects without a second POST.

Changes

Template submission

Layer / File(s) Summary
Single-attempt submission behavior
packages/typescript/src/messaging/templates.ts, packages/typescript/test/cloud-templates.test.ts, packages/typescript/README.md, contracts/README.md
The submit method sets maxNetworkRetries to zero and directs callers to check the Number’s template catalog if the response is lost. Documentation describes submission validation and outcomes. The test verifies that a 500 response rejects and only one POST is sent, even with a retry override.

Priority: ➖ Normal

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Merge Risk: ⚪ Minimal · up to 5dd6c

Template submissions make one SDK attempt, and the checked-in API contract documents validation before submission without a replay guarantee. The changed behavior is covered by a test that checks only one request, so no actionable merge risk remains.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 2…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: project template submissions now make one SDK network attempt.
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


Comment @coderabbitai help to get the list of available commands.

@purpshell

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 26, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-26T22:46:25.211686Z 740d37e Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Chef's kiss.

Reviewed commit: cbce788f87

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@purpshell

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. You're on a roll.

Reviewed commit: 740d37e501

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@purpshell
purpshell changed the base branch from codex/official-api-consumers-20260926 to dev October 1, 2026 12:16
@purpshell

Copy link
Copy Markdown
Member Author

Local review (head 5dd6c8e; manual pass): templates.submit spreads caller options before maxNetworkRetries: 0, so no override can re-enable retries; the API route (submitProjectTemplateToMeta) declares no Idempotency-Key, so single-attempt is the correct client behavior. README guidance matches the API description (local validation does not imply approval). New test covers one request on a 500 with key + retry override and the encoded path. No findings.

@purpshell
purpshell merged commit b755def into dev Oct 1, 2026
3 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.

1 participant