Skip to content

Rename submission branches to {hash}-{listing-slug}#4805

Merged
richardhjtan merged 1 commit into
mainfrom
CS-11091-new-branch-naming-on-submission
May 13, 2026
Merged

Rename submission branches to {hash}-{listing-slug}#4805
richardhjtan merged 1 commit into
mainfrom
CS-11091-new-branch-naming-on-submission

Conversation

@richardhjtan
Copy link
Copy Markdown
Contributor

Replace the room-encoded room-<base64>/<slug> branch convention with a short {6-hex-hash}-{listing-slug} form. The hash is random per call; determinism for retries is preserved by the persisted branchName on the workflow card.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 13, 2026

Preview deployments

Host Test Results

    1 files      1 suites   2h 3m 35s ⏱️
2 658 tests 2 643 ✅ 15 💤 0 ❌
2 677 runs  2 662 ✅ 15 💤 0 ❌

Results for commit 5991528.

Realm Server Test Results

    1 files  ±0      1 suites  ±0   11m 31s ⏱️ -24s
1 345 tests ±0  1 345 ✅ ±0  0 💤 ±0  0 ❌ ±0 
1 424 runs  ±0  1 424 ✅ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit a389a2a. ± Comparison against earlier commit 5991528.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the GitHub submission branch naming scheme from the previous room-<base64>/<slug> format to a shorter {6-hex-hash}-{listing-slug} format, relying on persisting branchName on the workflow card to keep retries targeting the same branch.

Changes:

  • Reworked toBranchName to generate random 6-hex hashes and removed room-id encoding/decoding logic.
  • Updated host + bot-runner workflow codepaths to use/persist the new branchName shape.
  • Refreshed runtime-common and bot-runner tests to match the new branch convention and folder wrapping behavior.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
packages/runtime-common/github-submissions.ts Implements the new random-hash branch name generator and updated toBranchName API.
packages/runtime-common/tests/github-submissions-test.ts Updates tests for {hash6}-{slug} output and normalization behavior.
packages/host/app/commands/create-submission-workflow.ts Generates branchName once and persists it on the workflow card; sends it in the bot trigger.
packages/bot-runner/lib/pr-listing/pr-listing-workflow-handler.ts Updates branch generation calls to the new toBranchName(listingName) signature.
packages/bot-runner/lib/pr-listing/create-listing-pr-handler.ts Uses the new branch naming and now uses the full branch name as the submission folder prefix.
packages/bot-runner/tests/create-listing-pr-handler-test.ts Adjusts expectations for branch/folder names under the new convention.
packages/bot-runner/tests/bot-runner-test.ts Updates expectations around branchName presence and folder wrapping semantics.
Comments suppressed due to low confidence (1)

packages/bot-runner/lib/pr-listing/create-listing-pr-handler.ts:260

  • buildSubmissionFolderName() now returns the full branch name and is used to prefix committed file paths. Because context.head can come from unvalidated input.branchName, this enables slashes / .. segments to change where files land in the repo tree. Consider sanitizing/validating branchName (e.g., disallow /, .., and other unsafe characters) and/or keep using only the first path segment for the wrapper folder.
function buildSubmissionFolderName(context: CreateListingPRContext): string {
  return context.head;
}

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/bot-runner/lib/pr-listing/create-listing-pr-handler.ts
Comment thread packages/runtime-common/github-submissions.ts
Comment thread packages/runtime-common/github-submissions.ts
@richardhjtan richardhjtan force-pushed the CS-11091-new-branch-naming-on-submission branch from 57a2d57 to 5991528 Compare May 13, 2026 05:21
@richardhjtan richardhjtan requested a review from Copilot May 13, 2026 05:36
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.

Comment thread packages/runtime-common/github-submissions.ts
Comment thread packages/bot-runner/lib/pr-listing/create-listing-pr-handler.ts
@richardhjtan richardhjtan marked this pull request as ready for review May 13, 2026 05:46
@richardhjtan richardhjtan requested review from a team May 13, 2026 05:46
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 599152810c

ℹ️ 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".

Comment thread packages/bot-runner/lib/pr-listing/create-listing-pr-handler.ts
Comment thread packages/bot-runner/lib/pr-listing/pr-listing-workflow-handler.ts
Replace the room-encoded `room-<base64>/<slug>` branch convention with a
short `{6-hex-hash}-{listing-slug}` form. The hash is random per call;
determinism for retries is preserved by the persisted `branchName` on
the workflow card.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@richardhjtan richardhjtan force-pushed the CS-11091-new-branch-naming-on-submission branch from 5991528 to a389a2a Compare May 13, 2026 06:08
@richardhjtan richardhjtan merged commit 7f9c4ce into main May 13, 2026
94 of 102 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.

3 participants