[PR #2096] [MERGED] Guard launcher browser auto-open command #5438

Closed
opened 2026-10-22 04:16:19 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/2096
Author: @cha1latte
Created: 6/3/2026
Status: ✅ Merged
Merged: 6/3/2026
Merged by: @cha1latte

Base: refactor ← Head: fix/issue-2089-safe-browser-open


📝 Commits (2)

  • a5b63b3 Guard launcher browser auto-open command
  • 429c085 Tighten launcher safety guard

📊 Changes

2 files changed (+97 additions, -1 deletions)

View changed files

📝 package.json (+2 -1)
➕ scripts/check-launcher-safety.mjs (+95 -0)

📄 Description

Linked issue

Closes #2089

Why this change

  • Issue #2089 reported antivirus warnings for the legacy Windows browser auto-open command shape: nested cmd /c, timeout /t, start, and explorer.
  • refactor no longer has the old start.bat launcher path, so this PR adds a refactor-side guard to keep that command pattern from being reintroduced in launcher/script/docs surfaces.

What changed

  • Added scripts/check-launcher-safety.mjs to scan tracked launcher/script/docs-style files for the reported suspicious delayed browser-open command pattern.
  • Added a --self-test mode that proves the checker catches the issue #2089 command shape and does not flag the safe PowerShell Start-Sleep / Start-Process shape.
  • Wired pnpm check:launcher-safety into the full pnpm check gate.

Refactor impact

Primary owner:

Repo tooling / refactor workflow guard.

Impact areas reviewed:

  • package.json check pipeline.
  • Tracked launcher/script/docs-style files scanned by the new guard.
  • Refactor branch launcher ownership: no start.bat / AUTO_OPEN_BROWSER path exists on refactor.

Boundary notes:

  • No product runtime boundary changes.
  • No engine, feature, shared API, Rust command, storage, remote runtime, schema, dependency, or version changes.

Pressure points touched:

  • None; this is repo check tooling only.

Validation

  • Matching validation command passes locally (for example pnpm typecheck, pnpm build, pnpm check:architecture, pnpm check:docs, or full pnpm check when warranted)
  • Full pnpm check passes before PR push/handoff
  • Human/manual validation completed by contributor or reviewer

Manual verification notes

  • Codex proof: node scripts\check-launcher-safety.mjs --self-test passed.
  • Codex proof: pnpm check:launcher-safety passed and scanned 495 tracked files.
  • Codex proof: full pnpm check passed locally after wiring the new guard into the check pipeline.
  • Bunny review: pass before opening this draft PR.

Feature Discoverability

Check exactly one:

  • Updated src/features/shell/discovery/ because this PR adds or materially changes a user-discoverable feature, workflow, setting, mode, panel, import path, agent, media capability, or advanced tool.
  • N/A because this PR is only a bugfix, refactor, test, docs, internal wiring, visual polish, copy edit, or compatibility fix and does not add a new thing users need to find.

Reason:

  • Internal compatibility guard only; no user-discoverable product behavior is added.

Docs and release impact

  • No docs changes needed
  • Updated README.md
  • Updated CONTRIBUTING.md
  • Updated docs/developer/
  • Updated repo skills or AGENTS.md
  • Confirmed this PR does not restore old staging/package-workspace/release claims

No docs, release, dependency, or version changes.

UI evidence

Not a UI change. The proof is command output from the launcher safety self-test, focused scan, and full pnpm check.

Summary by CodeRabbit

  • Chores
    • Introduced a new launcher safety validation check integrated into the build verification process. The check automatically scans tracked repository files for potentially unsafe browser auto-open command patterns and generates detailed reports when issues are detected, strengthening security assurance throughout the development workflow.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Pasta-Devs/Marinara-Engine/pull/2096 **Author:** [@cha1latte](https://github.com/cha1latte) **Created:** 6/3/2026 **Status:** ✅ Merged **Merged:** 6/3/2026 **Merged by:** [@cha1latte](https://github.com/cha1latte) **Base:** `refactor` ← **Head:** `fix/issue-2089-safe-browser-open` --- ### 📝 Commits (2) - [`a5b63b3`](https://github.com/Pasta-Devs/Marinara-Engine/commit/a5b63b3b84c901d5ba863a9d3f0e7ce380b17e23) Guard launcher browser auto-open command - [`429c085`](https://github.com/Pasta-Devs/Marinara-Engine/commit/429c085a7eb3535f362251833ded2aeb78c75e37) Tighten launcher safety guard ### 📊 Changes **2 files changed** (+97 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `package.json` (+2 -1) ➕ `scripts/check-launcher-safety.mjs` (+95 -0) </details> ### 📄 Description <!-- Target branch: `refactor`. Change the base to `refactor` before submitting unless a maintainer explicitly asked for another base. --> <!-- Keep all checkboxes unchecked until a human has actually verified them. --> ## Linked issue <!-- Every user-facing PR should reference a feature request or issue report when practical. --> Closes #2089 ## Why this change <!-- What user problem, bug, refactor goal, or maintenance need does this solve? --> - Issue #2089 reported antivirus warnings for the legacy Windows browser auto-open command shape: nested `cmd /c`, `timeout /t`, `start`, and `explorer`. - `refactor` no longer has the old `start.bat` launcher path, so this PR adds a refactor-side guard to keep that command pattern from being reintroduced in launcher/script/docs surfaces. ## What changed <!-- List the key changes in this PR. --> - Added `scripts/check-launcher-safety.mjs` to scan tracked launcher/script/docs-style files for the reported suspicious delayed browser-open command pattern. - Added a `--self-test` mode that proves the checker catches the issue #2089 command shape and does not flag the safe PowerShell `Start-Sleep` / `Start-Process` shape. - Wired `pnpm check:launcher-safety` into the full `pnpm check` gate. ## Refactor impact Primary owner: <!-- Examples: app shell, catalog, chat mode, roleplay mode, game mode, runtime generation, world-state, shared API, engine generation, Rust storage, imports, remote runtime. --> Repo tooling / refactor workflow guard. Impact areas reviewed: - `package.json` check pipeline. - Tracked launcher/script/docs-style files scanned by the new guard. - Refactor branch launcher ownership: no `start.bat` / `AUTO_OPEN_BROWSER` path exists on `refactor`. Boundary notes: <!-- Note engine/shared-api/feature/Rust/remote-runtime boundaries. Say "none" only if you checked. --> - No product runtime boundary changes. - No engine, feature, shared API, Rust command, storage, remote runtime, schema, dependency, or version changes. Pressure points touched: <!-- Mention ModeSurface, GameSurface, shared mode UI, src-tauri/src/lib.rs command registration, or import modules if touched. --> - None; this is repo check tooling only. ## Validation <!-- Check only what you personally ran or manually verified. Treat unchecked items as explicit TODOs. --> <!-- Do not submit *.test.ts or *.test.tsx files as PR proof; cite existing checks, command output, app/browser/Tauri verification, or manual notes instead. --> - [ ] Matching validation command passes locally (for example `pnpm typecheck`, `pnpm build`, `pnpm check:architecture`, `pnpm check:docs`, or full `pnpm check` when warranted) - [ ] Full `pnpm check` passes before PR push/handoff - [ ] Human/manual validation completed by contributor or reviewer ### Manual verification notes <!-- Describe exact commands and manual steps, including typecheck/build/docs/architecture/Rust/browser/remote-runtime checks when they apply. If an AI agent filled this out, verify it yourself before ticking boxes. --> - Codex proof: `node scripts\check-launcher-safety.mjs --self-test` passed. - Codex proof: `pnpm check:launcher-safety` passed and scanned 495 tracked files. - Codex proof: full `pnpm check` passed locally after wiring the new guard into the check pipeline. - Bunny review: pass before opening this draft PR. ## Feature Discoverability Check exactly one: - [ ] Updated `src/features/shell/discovery/` because this PR adds or materially changes a user-discoverable feature, workflow, setting, mode, panel, import path, agent, media capability, or advanced tool. - [ ] N/A because this PR is only a bugfix, refactor, test, docs, internal wiring, visual polish, copy edit, or compatibility fix and does not add a new thing users need to find. Reason: - Internal compatibility guard only; no user-discoverable product behavior is added. ## Docs and release impact - [ ] No docs changes needed - [ ] Updated `README.md` - [ ] Updated `CONTRIBUTING.md` - [ ] Updated `docs/developer/` - [ ] Updated repo skills or `AGENTS.md` - [ ] Confirmed this PR does not restore old staging/package-workspace/release claims No docs, release, dependency, or version changes. ## UI evidence Not a UI change. The proof is command output from the launcher safety self-test, focused scan, and full `pnpm check`. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Chores** * Introduced a new launcher safety validation check integrated into the build verification process. The check automatically scans tracked repository files for potentially unsafe browser auto-open command patterns and generates detailed reports when issues are detected, strengthening security assurance throughout the development workflow. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-22 04:16:19 +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#5438
No description provided.