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:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user