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
This commit is contained in:
ed
2026-06-18 14:37:58 -04:00
parent da151f74ba
commit 9ee6d4eeb8
+5 -21
View File
@@ -5,10 +5,9 @@
.DESCRIPTION .DESCRIPTION
Clones the main repo to C:\projects\manual_slop_tier2\, sets origin 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 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 templates, installs the git hooks, and creates a "Tier 2 (Sandboxed)"
restricted ACLs, and creates a "Tier 2 (Sandboxed)" desktop shortcut. desktop shortcut. Idempotent: re-running updates templates and
Idempotent: re-running updates templates and re-fetches, but does not re-fetches, but does not destroy existing feature branches in the clone.
destroy existing feature branches in the clone.
.PARAMETER WhatIf .PARAMETER WhatIf
Show what would happen without making changes. Show what would happen without making changes.
.PARAMETER MainRepoPath .PARAMETER MainRepoPath
@@ -19,15 +18,13 @@
[CmdletBinding(SupportsShouldProcess = $true)] [CmdletBinding(SupportsShouldProcess = $true)]
param( param(
[string]$MainRepoPath = "C:\projects\manual_slop", [string]$MainRepoPath = "C:\projects\manual_slop",
[string]$Tier2ClonePath = "C:\projects\manual_slop_tier2", [string]$Tier2ClonePath = "C:\projects\manual_slop_tier2"
[string]$AppDataDir = "$env:LOCALAPPDATA\manual_slop\tier2"
) )
$ErrorActionPreference = "Stop" $ErrorActionPreference = "Stop"
# Resolve to absolute paths # Resolve to absolute paths
$MainRepoPath = (Resolve-Path $MainRepoPath).Path $MainRepoPath = (Resolve-Path $MainRepoPath).Path
$AppDataFailuresDir = "$env:LOCALAPPDATA\manual_slop\tier2_failures"
if ($PSCmdlet.ShouldProcess("Bootstrap Tier 2 clone at $Tier2ClonePath")) { if ($PSCmdlet.ShouldProcess("Bootstrap Tier 2 clone at $Tier2ClonePath")) {
Write-Host "[tier2-bootstrap] starting bootstrap" 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\pre-push" "$Tier2ClonePath\.git\hooks\pre-push"
Copy-Item -Force "$MainRepoPath\conductor\tier2\githooks\post-checkout" "$Tier2ClonePath\.git\hooks\post-checkout" Copy-Item -Force "$MainRepoPath\conductor\tier2\githooks\post-checkout" "$Tier2ClonePath\.git\hooks\post-checkout"
# 5. Create app-data dir with restricted ACLs # 5. Create desktop shortcut
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
Write-Host "[tier2-bootstrap] creating desktop shortcut" Write-Host "[tier2-bootstrap] creating desktop shortcut"
$shell = New-Object -ComObject WScript.Shell $shell = New-Object -ComObject WScript.Shell
$shortcut = $shell.CreateShortcut("$env:USERPROFILE\Desktop\Tier 2 (Sandboxed).lnk") $shortcut = $shell.CreateShortcut("$env:USERPROFILE\Desktop\Tier 2 (Sandboxed).lnk")