[GH-ISSUE #4382] [Issue]: Docker installs always report stable and omit staging-only agents #2378

Closed
opened 2026-10-21 05:47:44 +07:00 by bsakaguchi · 0 comments
Owner

Originally created by @SpicyMarinara on GitHub (Jul 31, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/4382

Originally assigned to: @SpicyMarinara on GitHub.

Summary

Docker builds cannot detect the Git branch because .git is excluded and no branch environment variable is set. As a result, staging builds show the stable update channel and cannot discover agents available only in the staging catalog, such as Storyboard.

Expected behavior

A Docker image built from staging should report the staging update channel and list staging-only agents such as Storyboard as installable.

Actual behavior

The update channel is always reported as stable, and the agent catalog resolves to main, so Storyboard is not listed.

Steps to reproduce

  1. Build and run the app from the staging branch using Dockerfile or Dockerfile.lite.
  2. Open Settings → Updates and check the selected channel.
  3. Open Settings → Agents and search for "Storyboard".

Environment

  • Marinara Engine version: Not provided
  • Install type: docker
  • OS + version: Not provided
  • Browser or app shell: Not provided

Logs, screenshots, or video

No logs, screenshots, or video provided. Relevant behavior is traced to getBuildBranch() in packages/server/src/config/build-info.ts, updates.routes.ts, and package-manager.service.ts.

Additional context

The Docker context lacks .git because .dockerignore excludes it, and no build sets MARINARA_GIT_BRANCH or GITHUB_REF_NAME. getBuildBranch() therefore returns null; the update check falls back to stable and the official agent catalog resolves to main. Suggested fix: bake the branch into the image with an ARG or ENV such as MARINARA_GIT_BRANCH=staging for staging builds. Marinara asked whether the staging Docker tag was being used, but the context does not confirm the tag.

Discord thread: Docker installs always report stable and can't discover staging-only agents
Discord thread link: https://discord.com/channels/1417099416812392641/1532827072723030067
Requested by: Marinara (marinara_spaghetti, Discord ID 169561011928432653)

Discord thread transcript (3 messages)
[2026-07-31T19:07:32.687Z] eiriol: Every "am I staging or stable" check in the server depends on git branch detection, which is structurally broken in Docker: .dockerignore:4 excludes .git, and no build sets a branch env var. This one root cause produces two symptoms:

1. Update-channel UI always shows stable.
2. The capability-package catalog always resolves to main, so agents published only to the staging catalog — currently Storyboard — never appear as installable.

## Root cause
packages/server/src/config/build-info.ts:75-97 getBuildBranch() reads MARINARA_GIT_BRANCH/GITHUB_REF_NAME, else falls back to git branch --show-current via local .git. Docker has neither → returns null.

- Symptom 1: updates.routes.ts /check handler (~line 711-723): isGitInstall() is false in Docker → currentChannel hardcoded to UPDATE_CHANNELS.stable; getUpdateChannelForCheckout() (line 174) is never even called.
- Symptom 2: package-manager.service.ts:36-43 resolveOfficialAgentBranch(engineBranch = getBuildBranch()) returns "staging" only if engineBranch === "staging"; with null, it returns "main", so officialCatalogRoot("main") fetches the main folder of Pasta-Devs/Marinara-Agents instead of staging.

## Repro

1. Run the app via Dockerfile/Dockerfile.lite built from staging.
2. Settings → Updates: channel shows stable, not staging.
3. Settings → Agents: search "Storyboard" — not listed.

Expected: channel staging; Storyboard installable. Actual: channel stable; Storyboard absent.

## Suggested fix

Bake the branch into the image at build time (ARG/ENV MARINARA_GIT_BRANCH=staging per Dockerfile target, or --build-arg in the staging pipeline) so getBuildBranch() resolves without .git. One fix corrects both symptoms.
[Discord message: https://discord.com/channels/1417099416812392641/1532827072723030067/1532827072723030067]

[2026-07-31T19:44:00.546Z] Marinara: I thought you need to install the staging tag separately on docker.
[Discord message: https://discord.com/channels/1417099416812392641/1532827072723030067/1532836249268781108]

[2026-07-31T19:44:32.479Z] Marinara: Are you installing using the staging tag?
[Discord message: https://discord.com/channels/1417099416812392641/1532827072723030067/1532836383205490820]

Template check

Please uncheck (untick) the box below before submitting so we know you read the template. It is intentionally pre-checked:

  • I DID NOT read this template and provide the requested details.
Originally created by @SpicyMarinara on GitHub (Jul 31, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/4382 Originally assigned to: @SpicyMarinara on GitHub. ## Summary Docker builds cannot detect the Git branch because .git is excluded and no branch environment variable is set. As a result, staging builds show the stable update channel and cannot discover agents available only in the staging catalog, such as Storyboard. ## Expected behavior A Docker image built from staging should report the staging update channel and list staging-only agents such as Storyboard as installable. ## Actual behavior The update channel is always reported as stable, and the agent catalog resolves to main, so Storyboard is not listed. ## Steps to reproduce 1. Build and run the app from the staging branch using Dockerfile or Dockerfile.lite. 2. Open Settings → Updates and check the selected channel. 3. Open Settings → Agents and search for "Storyboard". ## Environment - Marinara Engine version: Not provided - Install type: docker - OS + version: Not provided - Browser or app shell: Not provided ## Logs, screenshots, or video No logs, screenshots, or video provided. Relevant behavior is traced to getBuildBranch() in packages/server/src/config/build-info.ts, updates.routes.ts, and package-manager.service.ts. ## Additional context The Docker context lacks .git because .dockerignore excludes it, and no build sets MARINARA_GIT_BRANCH or GITHUB_REF_NAME. getBuildBranch() therefore returns null; the update check falls back to stable and the official agent catalog resolves to main. Suggested fix: bake the branch into the image with an ARG or ENV such as MARINARA_GIT_BRANCH=staging for staging builds. Marinara asked whether the staging Docker tag was being used, but the context does not confirm the tag. Discord thread: Docker installs always report stable and can't discover staging-only agents Discord thread link: https://discord.com/channels/1417099416812392641/1532827072723030067 Requested by: Marinara (marinara_spaghetti, Discord ID 169561011928432653) <details> <summary>Discord thread transcript (3 messages)</summary> ```text [2026-07-31T19:07:32.687Z] eiriol: Every "am I staging or stable" check in the server depends on git branch detection, which is structurally broken in Docker: .dockerignore:4 excludes .git, and no build sets a branch env var. This one root cause produces two symptoms: 1. Update-channel UI always shows stable. 2. The capability-package catalog always resolves to main, so agents published only to the staging catalog — currently Storyboard — never appear as installable. ## Root cause packages/server/src/config/build-info.ts:75-97 getBuildBranch() reads MARINARA_GIT_BRANCH/GITHUB_REF_NAME, else falls back to git branch --show-current via local .git. Docker has neither → returns null. - Symptom 1: updates.routes.ts /check handler (~line 711-723): isGitInstall() is false in Docker → currentChannel hardcoded to UPDATE_CHANNELS.stable; getUpdateChannelForCheckout() (line 174) is never even called. - Symptom 2: package-manager.service.ts:36-43 resolveOfficialAgentBranch(engineBranch = getBuildBranch()) returns "staging" only if engineBranch === "staging"; with null, it returns "main", so officialCatalogRoot("main") fetches the main folder of Pasta-Devs/Marinara-Agents instead of staging. ## Repro 1. Run the app via Dockerfile/Dockerfile.lite built from staging. 2. Settings → Updates: channel shows stable, not staging. 3. Settings → Agents: search "Storyboard" — not listed. Expected: channel staging; Storyboard installable. Actual: channel stable; Storyboard absent. ## Suggested fix Bake the branch into the image at build time (ARG/ENV MARINARA_GIT_BRANCH=staging per Dockerfile target, or --build-arg in the staging pipeline) so getBuildBranch() resolves without .git. One fix corrects both symptoms. [Discord message: https://discord.com/channels/1417099416812392641/1532827072723030067/1532827072723030067] [2026-07-31T19:44:00.546Z] Marinara: I thought you need to install the staging tag separately on docker. [Discord message: https://discord.com/channels/1417099416812392641/1532827072723030067/1532836249268781108] [2026-07-31T19:44:32.479Z] Marinara: Are you installing using the staging tag? [Discord message: https://discord.com/channels/1417099416812392641/1532827072723030067/1532836383205490820] ``` </details> ## Template check Please **uncheck (untick)** the box below before submitting so we know you read the template. It is intentionally pre-checked: - [ ] I DID NOT read this template and provide the requested details.
bsakaguchi 2026-10-21 05:47:44 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#2378
No description provided.