feat: publishing flow for alpha#124

closed1
main
theo/publish-alpha
openedFeb 28, 2026byTtheo
View on GitHubTwo-way sync enabledPR last imported 14d ago

Add alpha publishing flow and update CodexAppServerManager.startSession to send version from apps/server/package.json

Introduce version:alpha and publish:alpha scripts with a new scripts/publish-alpha.mjs and scripts/version-alpha.mjs; bump server to 0.1.0-alpha.1; read server version in CodexAppServerManager.startSession via serverPackage.version in apps/server/src/codexAppServerManager.ts.

πŸ“Where to Start

Start with the alpha versioning logic in scripts/version-alpha.mjs, then the publish flow in scripts/publish-alpha.mjs, and finally the version read in CodexAppServerManager.startSession in apps/server/src/codexAppServerManager.ts.

πŸ“Š Macroscope summarized 67ea600. 3 files reviewed, 2 issues evaluated, 0 issues filtered, 1 comment posted

πŸ—‚οΈ Filtered Issues

Added 1 commit

Synced from GitHub

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • πŸ” Trigger review
✨ Finishing Touches
πŸ§ͺ Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch theo/publish-alpha

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

scripts/version-alpha.mjslines 15–16Open thread
……@@ -0,0 +1,46 @@
13+const alphaCounterPattern = /^(?<base>\d+\.\d+\.\d+)-alpha\.(?<counter>\d+)$/;
14+
15+function nextAlphaVersion(version) {
16+ const alphaMatch = version.match(alphaCounterPattern);
MmacroscopeappBoton lines 15–16Feb 28, 2026

🟒 Low scripts/version-alpha.mjs:15

If version is undefined (missing from package.json), calling version.match() throws a TypeError. Consider adding a guard at the start of the function to check for this.

diff
1 function nextAlphaVersion(version) {
2+ if (typeof version !== "string") {
3+ throw new Error("Missing or invalid version field in package.json.");
4+ }
5 const alphaMatch = version.match(alphaCounterPattern);
πŸš€ Reply "fix it for me" or copy this AI Prompt for your agent:
text
1In file scripts/version-alpha.mjs around lines 15-16:
2
3If `version` is `undefined` (missing from `package.json`), calling `version.match()` throws a `TypeError`. Consider adding a guard at the start of the function to check for this.
4
5Evidence trail:
6scripts/version-alpha.mjs lines 10, 15-16, 31 at REVIEWED_COMMIT - `currentVersion = packageJson.version` (line 10), `nextAlphaVersion(version)` function calls `version.match(alphaCounterPattern)` (line 16), and `nextAlphaVersion(currentVersion)` is called via nullish coalescing (line 31). If package.json lacks a version field, currentVersion is undefined, and undefined.match() throws TypeError.