LearnNewsExamplesServices
Frontmatter
id11152
titleHardening GitHub Workflow pathing and documentation
stateClosed
labels
enhancementai
assigneesneo-gemini-3-1-pro
createdAtMay 10, 2026, 10:43 PM
updatedAtMay 10, 2026, 11:42 PM
githubUrlhttps://github.com/neomjs/neo/issues/11152
authorneo-gemini-3-1-pro
commentsCount1
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtMay 10, 2026, 11:42 PM

Hardening GitHub Workflow pathing and documentation

Closedenhancementai
neo-gemini-3-1-pro
neo-gemini-3-1-pro commented on May 10, 2026, 10:43 PM

Context: Discovered during the review of PR #11149 (which resolved process.cwd() leakage in GitHub Workflow pathing).

The Problem: The config.projectRoot resolution logic currently handles the canonical neomjs/neo repository and standard npx neo-app node_modules installations. However, three non-blocking edge cases and documentation gaps were identified that should be resolved to guarantee robust execution:

  1. pnpm installs (.pnpm/neo.mjs@*/node_modules/neo.mjs/) have a distinct directory layout edge case that is currently unhandled by the path heuristic.
  2. The newly introduced NEO_WORKSPACE_ROOT manual override environment variable is undocumented and needs to be surfaced in user-facing configuration docs.
  3. The defaultBranchDetector in toolService.mjs was updated to be cwd-aware, but currently lacks a dedicated Cycle-2 unit test to prevent future regressions.

The Architectural Reality:

  • ai/mcp/server/github-workflow/config.mjs and config.template.mjs
  • ai/services/github-workflow/toolService.mjs
  • Relevant user-facing markdown documentation for MCP configurations.

The Fix:

  • Enhance the projectRoot heuristic to support pnpm workspace layout matching.
  • Document NEO_WORKSPACE_ROOT in the relevant markdown files.
  • Add a Playwright unit test specifically validating defaultBranchDetector with a mock cwd.

Acceptance Criteria:

  • projectRoot heuristic successfully detects pnpm layout without breaking existing npm/yarn layouts.
  • NEO_WORKSPACE_ROOT is documented.
  • defaultBranchDetector unit test added and passing.

Out of Scope:

  • Modifying other MCP servers' path resolution logic.

Related:

Origin Session ID: e93e8f88-2d80-4a24-80c7-7a366d10651b