You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Introduce the first deprecation step for special symlink handling:
Warn when FileHelper or existing Python symlink-specific handling encounters a symlink, including archive and native Windows recognition. Do not scan unrelated project paths.
Explain that symlinks are not specifically supported and users are responsible for their outcomes.
Preserve existing allow/reject behavior, containment checks, and machine-readable output. JSON errors include the notice in their existing error message.
Update the README, core overview, and FileHelper design documentation to describe the transition. This does not remove existing protections or --allow-symlinks.
Testing
Set up this checkout's .venv and editable install using the local development guide. Run commands from the checkout root.
Tested locally with .venv/bin/specify --help (Windows PowerShell: .\.venv\Scripts\specify.exe --help)
Ran relevant existing tests with .venv/bin/python -m pytest tests -q (Windows PowerShell: .\.venv\Scripts\python.exe -m pytest tests -q); use affected test paths for focused checks and LC_ALL=en_US.UTF-8 on macOS
Tested with a sample project (if applicable)
Automated validation on macOS:
.venv/bin/specify --help: passed.
COLUMNS=1000 LC_ALL=en_US.UTF-8 .venv/bin/python -m pytest tests/test_symlink_warning.py tests/integrations/test_integration_opencode.py tests/test_shared_infra_gitignore.py tests/test_shared_infra_lock.py tests/test_shared_infra_integrity.py -q --disable-warnings: 113 passed. Includes sample-project CLI initialization/status, strict JSON failures, warning-state isolation, and the newly added upstream OpenCode checks.
Native Windows execution was not run on this macOS host; the focused tests model native symlink/reparse-point classification.
AI Disclosure
I did not use AI assistance for this contribution
I did use AI assistance (fill in the disclosure below)
AI disclosure: GitHub Copilot using GPT-6.1 Sol (gpt-6.1-sol) in agent/autonomous mode; reasoning effort was not specified. Used for implementation, automated tests, documentation, and PR preparation.
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
Symlink-policy notices are lost or omitted in workflow errors, artifact/MCP responses, and POSIX cache checks, while the documentation leaves their applicability to generated development symlinks unclear.
Introduces encounter-based symlink deprecation warnings across Specify CLI’s existing filesystem checks, beginning the transition away from special symlink handling without removing current protections or --allow-symlinks.
Changes:
Adds shared warning helpers for existing path, metadata, archive, and native Windows checks.
Defers notices during JSON commands and folds them into selected error renderers.
Adds behavioral coverage and documents the transition policy.
AI-assisted review by GitHub Copilot for the requester; model/settings unavailable; autonomous analysis and fix suggestions.
File
Description
tests/test_symlink_warning.py
Tests notices, policy preservation, and JSON handling.
The reason will be displayed to describe this comment to others. Learn more.
I've kept MCP response fields and error messages unchanged and documented/tested the existing server-stderr warning channel for artifact list/info. Introducing client-visible warning data would expand this first-step warning/documentation change, so I've taken the intentional adapter-transport alternative you suggested instead. On behalf of @mnriem: GitHub Copilot using GPT-6.1 Sol (gpt-6.1-sol), autonomous mode with reasoning effort unspecified; implementation, tests, documentation, and this reply.
Keep lookup and workflow JSON notices in their final error renderer and warn for confirmed POSIX cache symlink refusals without changing refusal behavior. Clarify generated development links and retain MCP server-stderr diagnostics rather than expanding response contracts. Add focused regressions and isolate plain JSON cases from OS path aliases.
Assisted-by: GitHub Copilot (model: GPT-6.1 Sol, autonomous)
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Pushed 0d9615d to preserve encounter notices in the final lookup/workflow JSON errors and confirmed POSIX cache refusals. The policy now explicitly includes generated development links without changing link-or-copy behavior. MCP response contracts remain unchanged; the existing server-stderr warning channel is documented and tested instead. On behalf of @mnriem: GitHub Copilot using GPT-6.1 Sol (gpt-6.1-sol), autonomous mode with reasoning effort unspecified; implementation, automated tests, documentation, and this summary.
The artifact CLI error now includes the notice, while the equivalent MCP error leaves it only on server stderr. design/shared.md (“Typed outcome contract”) requires structured operation warnings, and design/mcp.md (“Design goals: Adapter parity”) requires semantically equivalent warnings and errors. Document and justify a process-diagnostic exception in both designs, or carry a structured notice through both adapters.
AI-generated review by GitHub Copilot (model/settings unavailable; autonomous), for the review requester; review only.
Include deferred notices in failed workflow JSON errors
src/specify_cli/workflows/_commands.py:106
A shell step that exits nonzero returns a failed state, so both workflow run --json and workflow resume --json bypass this exception handler. If a symlink was encountered earlier, their JSON error omits the notice and teardown emits a separate stderr warning instead. Consume deferred notices for existing failed/aborted error messages in _emit_workflow_json, and cover returned failures in both commands.
AI-generated review by GitHub Copilot (model/settings unavailable; autonomous), for the review requester; review only.
"""Confirm a failed no-follow open without changing the caller's refusal."""
if error.errno not in (errno.ELOOP, errno.ENOTDIR):
This branch has not been deployed
No deployments
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
triage-nice-to-haveVerdict: evidence-backed fix or greenlit feature — land after review
2 participants
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Introduce the first deprecation step for special symlink handling:
Update the README, core overview, and FileHelper design documentation to describe the transition. This does not remove existing protections or
--allow-symlinks.Testing
Set up this checkout's
.venvand editable install using the local development guide. Run commands from the checkout root..venv/bin/specify --help(Windows PowerShell:.\.venv\Scripts\specify.exe --help).venv/bin/python -m pytest tests -q(Windows PowerShell:.\.venv\Scripts\python.exe -m pytest tests -q); use affected test paths for focused checks andLC_ALL=en_US.UTF-8on macOSAutomated validation on macOS:
.venv/bin/specify --help: passed.COLUMNS=1000 LC_ALL=en_US.UTF-8 .venv/bin/python -m pytest tests/test_symlink_warning.py tests/integrations/test_integration_opencode.py tests/test_shared_infra_gitignore.py tests/test_shared_infra_lock.py tests/test_shared_infra_integrity.py -q --disable-warnings: 113 passed. Includes sample-project CLI initialization/status, strict JSON failures, warning-state isolation, and the newly added upstream OpenCode checks.COLUMNS=1000 LC_ALL=en_US.UTF-8 .venv/bin/python -m pytest -n auto -q --disable-warnings: 17,196 passed, 254 skipped.uvx ruff@0.15.0 check src tests --output-format concise: passed.npx --no-install markdownlint-cli2 README.md docs/overview/core.md design/file-helper.md: passed.git diff --check: passed.Native Windows execution was not run on this macOS host; the focused tests model native symlink/reparse-point classification.
AI Disclosure
AI disclosure: GitHub Copilot using GPT-6.1 Sol (
gpt-6.1-sol) in agent/autonomous mode; reasoning effort was not specified. Used for implementation, automated tests, documentation, and PR preparation.