From 9ee6d4eeb878ace547a7de9cb7202cc7b817592e Mon Sep 17 00:00:00 2001 From: Ed_ Date: Thu, 18 Jun 2026 14:37:58 -0400 Subject: [PATCH] fix(tier2): setup_tier2_clone.ps1 - stop creating AppData dirs Removed: - The [string]\ parameter - The \ variable - The 'Create app-data dir with restricted ACLs' step block - The AppData reference in the .DESCRIPTION docstring Per the user's 2026-06-18 'NEVER USE APPDATA' directive. Tier 2 state and failure reports now live inside the clone (scripts/tier2/state/ and scripts/tier2/failures/); no external dir needs to be created. Refs: conductor/tracks/tier2_no_appdata_20260618 --- scripts/tier2/setup_tier2_clone.ps1 | 26 +++++--------------------- 1 file changed, 5 insertions(+), 21 deletions(-) diff --git a/scripts/tier2/setup_tier2_clone.ps1 b/scripts/tier2/setup_tier2_clone.ps1 index 3a614582..f6be3606 100644 --- a/scripts/tier2/setup_tier2_clone.ps1 +++ b/scripts/tier2/setup_tier2_clone.ps1 @@ -5,10 +5,9 @@ .DESCRIPTION Clones the main repo to C:\projects\manual_slop_tier2\, sets origin to the main repo's local path, copies the agent/command/opencode.json - templates, installs the git hooks, creates the app-data temp dir with - restricted ACLs, and creates a "Tier 2 (Sandboxed)" desktop shortcut. - Idempotent: re-running updates templates and re-fetches, but does not - destroy existing feature branches in the clone. + templates, installs the git hooks, and creates a "Tier 2 (Sandboxed)" + desktop shortcut. Idempotent: re-running updates templates and + re-fetches, but does not destroy existing feature branches in the clone. .PARAMETER WhatIf Show what would happen without making changes. .PARAMETER MainRepoPath @@ -19,15 +18,13 @@ [CmdletBinding(SupportsShouldProcess = $true)] param( [string]$MainRepoPath = "C:\projects\manual_slop", - [string]$Tier2ClonePath = "C:\projects\manual_slop_tier2", - [string]$AppDataDir = "$env:LOCALAPPDATA\manual_slop\tier2" + [string]$Tier2ClonePath = "C:\projects\manual_slop_tier2" ) $ErrorActionPreference = "Stop" # Resolve to absolute paths $MainRepoPath = (Resolve-Path $MainRepoPath).Path -$AppDataFailuresDir = "$env:LOCALAPPDATA\manual_slop\tier2_failures" if ($PSCmdlet.ShouldProcess("Bootstrap Tier 2 clone at $Tier2ClonePath")) { Write-Host "[tier2-bootstrap] starting bootstrap" @@ -119,20 +116,7 @@ extra_dirs = [] Copy-Item -Force "$MainRepoPath\conductor\tier2\githooks\pre-push" "$Tier2ClonePath\.git\hooks\pre-push" Copy-Item -Force "$MainRepoPath\conductor\tier2\githooks\post-checkout" "$Tier2ClonePath\.git\hooks\post-checkout" - # 5. Create app-data dir with restricted ACLs - Write-Host "[tier2-bootstrap] creating app-data dir: $AppDataDir" - New-Item -ItemType Directory -Force -Path $AppDataDir | Out-Null - New-Item -ItemType Directory -Force -Path $AppDataFailuresDir | Out-Null - $acl = Get-Acl $AppDataDir - $acl.SetAccessRuleProtection($true, $false) - $userRule = New-Object System.Security.AccessControl.FileSystemAccessRule( - $env:USERNAME, "FullControl", "ContainerInherit,ObjectInherit", "None", "Allow" - ) - $acl.AddAccessRule($userRule) - Set-Acl $AppDataDir $acl - Set-Acl $AppDataFailuresDir (Get-Acl $AppDataDir) - - # 6. Create desktop shortcut + # 5. Create desktop shortcut Write-Host "[tier2-bootstrap] creating desktop shortcut" $shell = New-Object -ComObject WScript.Shell $shortcut = $shell.CreateShortcut("$env:USERPROFILE\Desktop\Tier 2 (Sandboxed).lnk")