Tighten Studio instruction-file cleanup boundaries (#7097)
* Handle linked instruction files in Bash cleanup * Limit instruction cleanup to managed dependencies * Make Bash cleanup test portable * Run junction cleanup regression on Windows * Keep instruction cleanup CI focused
This commit is contained in:
parent
9e77c1e663
commit
c570180a32
3 changed files with 49 additions and 5 deletions
|
|
@ -2339,7 +2339,10 @@ if ((Test-Path $OxcValidatorDir) -and $NodeSource -ne "skip" -and (Get-Command n
|
|||
substep "OXC validator runtime skipped (no npm found); code validation degrades until Node is available" "Yellow"
|
||||
}
|
||||
|
||||
Remove-AgentInstructionFiles -Roots @($FrontendDir, $OxcValidatorDir)
|
||||
Remove-AgentInstructionFiles -Roots @(
|
||||
(Join-Path $FrontendDir "node_modules"),
|
||||
(Join-Path $OxcValidatorDir "node_modules")
|
||||
)
|
||||
|
||||
# ==========================================================================
|
||||
# PHASE 3: Python environment + dependencies
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ _remove_agent_instruction_files() {
|
|||
for _root in "$@"; do
|
||||
[ -d "$_root" ] || continue
|
||||
[ -L "$_root" ] && continue
|
||||
find "$_root" -type f \( -name 'AGENTS.md' -o -name 'CLAUDE.md' \) \
|
||||
find "$_root" \( -type f -o -type l \) \( -name 'AGENTS.md' -o -name 'CLAUDE.md' \) \
|
||||
-exec rm -f {} + 2>/dev/null || true
|
||||
done
|
||||
}
|
||||
|
|
@ -857,7 +857,9 @@ elif [ -d "$_OXC_DIR" ] && [ "${NODE_SOURCE:-}" != skip ]; then
|
|||
substep "OXC validator runtime skipped (no npm found); code validation degrades until Node is available" "$C_WARN"
|
||||
fi
|
||||
|
||||
_remove_agent_instruction_files "$SCRIPT_DIR/frontend" "$_OXC_DIR"
|
||||
_remove_agent_instruction_files \
|
||||
"$SCRIPT_DIR/frontend/node_modules" \
|
||||
"$_OXC_DIR/node_modules"
|
||||
|
||||
# ── Python venv + deps ──
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue