Skip to content

test(cli): stabilize cross-platform env and path assertions#490

Closed
tonyblu331 wants to merge 1 commit into
Gentleman-Programming:mainfrom
tonyblu331:feat/cli-cross-platform-tests
Closed

test(cli): stabilize cross-platform env and path assertions#490
tonyblu331 wants to merge 1 commit into
Gentleman-Programming:mainfrom
tonyblu331:feat/cli-cross-platform-tests

Conversation

@tonyblu331
Copy link
Copy Markdown
Contributor

🔗 Linked Issue

Closes #103


🏷️ PR Type

  • type:chore — Build, CI, or tooling changes

📝 Summary

Stabilizes internal/cli tests on Windows: isolate HOME / USERPROFILE / APPDATA for agent discovery, set USERPROFILE in restore tests, use cmd.exe for quiet failure output on Windows, normalize path assertions with filepath.ToSlash, and use a temp GOBIN on PATH for the post-install note test.


📂 Changes

File / Area What Changed
internal/cli/cli_home_env_test.go Shared helpers isolateAgentDiscoveryEnv, ensureOpenCodeSDDNodeStub
internal/cli/sync_test.go, restore_test.go, … Call sites and SDD node stub for OpenCode
internal/cli/command_output_test.go Windows vs Unix command for failure capture
internal/cli/run_path_guidance_test.go, run_notes_test.go Path / env fixes

🧪 Test Plan

go test ./internal/cli/... -count=1

🤖 Automated Checks

Review budget: 172 / 400 (additions + deletions).


✅ Contributor Checklist

  • PR is linked to an issue with status:approved
  • PR stays within 400 changed lines, or I have requested/obtained maintainer-applied size:exception with rationale documented
  • I have added the appropriate type:* label to this PR
  • Unit tests pass (go test ./...)
  • E2E tests pass (cd e2e && ./docker-test.sh)
  • I have updated documentation if necessary
  • My commits follow Conventional Commits format
  • My commits do not include Co-Authored-By trailers

Chain Context

Field Value
Chain Standalone (Windows CLI test hardening)
Tracker PR Not applicable
Position 1 / 1
Base main
Depends on None
Follow-up None
Review budget 172 / 400
Starts at main
Ends with Green go test ./internal/cli/... on Windows

Chain Overview

main
 └── 📍 This PR (standalone)

Scope

  • Includes: CLI test harness only
  • Excludes: Engram feature code (see feat/engram-dd-* branches)

Autonomy

  • CI is expected to pass for this PR branch
  • This PR has one deliverable scope
  • This PR can be rolled back without unrelated changes
  • Tests cover this unit

💬 Notes for Reviewers

Can land independently of the Engram data-directory stack. Supersedes overlapping test changes that were briefly on feat/engram-data-dir-wiring-v2.

Isolate HOME/profile discovery side effects and normalize path-sensitive assertions so CLI integration tests behave consistently on Windows and Unix.
@tonyblu331 tonyblu331 force-pushed the feat/cli-cross-platform-tests branch from 92f5af1 to aa752ba Compare May 13, 2026 10:45
@Alan-TheGentleman Alan-TheGentleman added the type:chore Maintenance, dependencies, tooling label May 22, 2026
@tonyblu331
Copy link
Copy Markdown
Contributor Author

Closing this stale draft to clean up the Engram data-dir PR surface. The corrected work is being kept as a properly chained fork stack where each PR targets the previous branch and stays under the 400-line review budget.

@tonyblu331 tonyblu331 closed this May 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type:chore Maintenance, dependencies, tooling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(tests): fallos de tests pre-existentes en entornos Windows

2 participants