Skip to content

fix(tests): resolve macOS /var symlink in OpenCode plugin test - #190

Open
Franky100-pig wants to merge 1 commit into
ayghri:mainfrom
Franky100-pig:fix/opencode-test-macos-realpath
Open

fix(tests): resolve macOS /var symlink in OpenCode plugin test#190
Franky100-pig wants to merge 1 commit into
ayghri:mainfrom
Franky100-pig:fix/opencode-test-macos-realpath

Conversation

@Franky100-pig

Copy link
Copy Markdown

On macOS /var is a symlink to /private/var. setUp built self.plugin_root from tempfile's un-resolved path (/var/...), while the Node plugin resolves its own location to /private/var/... via import.meta.url, so the skill-path assertions compared mismatched strings and 5 OpenCodePluginTest cases failed on macOS. Linux CI stayed green because /var is not a symlink there, hiding the bug.

Resolve the temp root with os.path.realpath in setUp so both sides use the same canonical path. No behavior change to the skill or plugin; on Linux realpath is a no-op, so CI is unaffected.

Verification: python3 -m unittest discover -s tests — before: 5 failures (OpenCodePluginTest skill-path assertions); after: Ran 51 tests ... OK.

Summary

Authorship and provenance — select exactly one

  • Human-authored — substantive implementation and text were produced by a human.
  • Autonomous agent-authored — an agent planned and produced most of the substantive change.
  • Hybrid — a human and one or more agents both made substantive contributions.

Agent/tool and model/version:

Agent contribution:

Human verification:

Known limitations or uncertain results:

Labels

Target label:

Author label:

Workflow labels:

Safety and side effects

  • The change does not access or expose secrets, private files, or unrelated user/repository data.
  • Scripts, hooks, workflows, and evals are bounded and do not create surprising or irreversible side effects.
  • No destructive, privileged, production, externally visible, or persistent action occurs without explicit user intent and appropriate safeguards.
  • Network access, third-party code, permissions, and provider costs are minimized and documented.
  • Prompt text, examples, and fixtures contain no hidden instructions that weaken safety or expand agent authority.

Side effects, permissions, network access, and cost:

Compatibility

  • This is not a breaking change.
  • This is a breaking change; it was discussed, and migration/deprecation documentation is included below.
  • Canonical and mirrored skill files are synchronized when applicable.
  • Relevant platform manifests and installation documentation were reviewed.

Migration or rollback notes:

Verification

  • <command><result>

Behavior evals:

Final accountability

  • I reviewed the complete diff, removed unrelated generated changes, and take responsibility for the submitted content.
  • All failed, skipped, or unrun checks are disclosed above.

On macOS /var is a symlink to /private/var. setUp built self.plugin_root from tempfile's un-resolved path (/var/...), while the Node plugin resolves its own location to /private/var/... via import.meta.url, so the skill-path assertions compared mismatched strings and 5 OpenCodePluginTest cases failed on macOS. Linux CI stayed green because /var is not a symlink there, hiding the bug.

Resolve the temp root with os.path.realpath in setUp so both sides use the same canonical path. No behavior change to the skill or plugin; on Linux realpath is a no-op, so CI is unaffected.

Verification: python3 -m unittest discover -s tests — before: 5 failures (OpenCodePluginTest skill-path assertions); after: Ran 51 tests ... OK.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant