Add Codex as read-only reviewer, retry blocked video autoplay
scripts/codex-review.ps1 lets the Codex CLI review a state read-only in a clean git worktree without .env or var/, as in Domira: by default everything since the last release tag, or -Seit, -Commit, -Offen, -Alles. The final answer is also saved under reports/. Review rules for KantSites live in scripts/codex-review-prompt.md; README and AGENTS.md describe the workflow. video.js: when the browser refuses to start a loop (NotAllowedError), the first touch or key press starts it; a click on the pause button only counts as that button's own decision. ADR on videos updated. Luximmo seed: Instagram and Facebook profiles in the footer, icons instead of numbers in the process steps, services as subgrid. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
6e18a476c2
commit
4a33090905
8 files changed
+168
-18
No files matched your search
@@ -0,0 +1,63 @@
|
||||
# Laesst Codex einen Stand pruefen, nur lesend und in einer sauberen Kopie ohne .env.
|
||||
# Die Datei bleibt reines ASCII, weil Windows PowerShell 5.1 sonst Umlaute falsch liest.
|
||||
# .\scripts\codex-review.ps1 alles seit dem letzten Release-Tag
|
||||
# .\scripts\codex-review.ps1 -Seit v1.42.0 alles seit einem Tag oder Commit
|
||||
# .\scripts\codex-review.ps1 -Commit <sha> einen einzelnen Commit
|
||||
# .\scripts\codex-review.ps1 -Offen die noch nicht committeten Aenderungen
|
||||
# .\scripts\codex-review.ps1 -Alles den gesamten Code
|
||||
param(
|
||||
[string]$Seit = "",
|
||||
[string]$Commit = "",
|
||||
[switch]$Offen,
|
||||
[switch]$Alles
|
||||
)
|
||||
|
||||
$utf8 = New-Object System.Text.UTF8Encoding $false
|
||||
$OutputEncoding = $utf8
|
||||
[Console]::OutputEncoding = $utf8
|
||||
|
||||
$repo = (git rev-parse --show-toplevel).Trim()
|
||||
$regeln = Get-Content -Raw -Encoding UTF8 (Join-Path $repo "scripts\codex-review-prompt.md")
|
||||
$ziel = if ($Commit) { $Commit } else { "HEAD" }
|
||||
|
||||
if ($Alles) {
|
||||
$umfang = "Scope: the whole code under src/, templates/, public/assets/ (without build/ and fonts/), plugins/, migrations/, config/ and zentrale/."
|
||||
} elseif ($Commit) {
|
||||
$umfang = "Scope: the changes from: git show $Commit"
|
||||
} elseif ($Offen) {
|
||||
$umfang = "Scope: the uncommitted changes, visible with: git diff HEAD (new untracked files are not included)."
|
||||
} else {
|
||||
if (-not $Seit) { $Seit = (git -C $repo describe --tags --abbrev=0 HEAD).Trim() }
|
||||
if ($LASTEXITCODE -ne 0 -or -not $Seit) { Write-Error "Kein Release-Tag gefunden, bitte -Seit angeben."; exit 1 }
|
||||
$umfang = "Scope: the changes from: git diff $Seit..HEAD"
|
||||
}
|
||||
Write-Host $umfang
|
||||
|
||||
$kopie = Join-Path $env:TEMP ("kantsites-review-" + [guid]::NewGuid().ToString("N").Substring(0, 8))
|
||||
|
||||
git -C $repo worktree add --quiet --detach $kopie $ziel
|
||||
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
|
||||
|
||||
try {
|
||||
if ($Offen) {
|
||||
$patch = Join-Path $env:TEMP ("kantsites-review-" + [guid]::NewGuid().ToString("N").Substring(0, 8) + ".patch")
|
||||
git -C $repo diff HEAD --binary --output="$patch"
|
||||
if ((Get-Item $patch).Length -eq 0) { Write-Host "Keine offenen Aenderungen."; Remove-Item $patch; exit 0 }
|
||||
git -C $kopie apply --whitespace=nowarn "$patch"
|
||||
$angewendet = $LASTEXITCODE
|
||||
Remove-Item $patch
|
||||
if ($angewendet -ne 0) { Write-Error "Offene Aenderungen liessen sich nicht in die Kopie uebernehmen."; exit $angewendet }
|
||||
}
|
||||
$berichte = Join-Path $repo "reports"
|
||||
if (-not (Test-Path $berichte)) { New-Item -ItemType Directory $berichte | Out-Null }
|
||||
$bericht = Join-Path $berichte ("codex-review-" + (Get-Date -Format "yyyy-MM-dd-HHmm") + ".md")
|
||||
"$umfang`n`n$regeln" | codex exec --sandbox read-only --ephemeral --cd $kopie --output-last-message $bericht -
|
||||
$status = $LASTEXITCODE
|
||||
if (Test-Path $bericht) {
|
||||
Write-Host "`n===== Ergebnis (auch in $bericht) ====="
|
||||
Get-Content -Raw -Encoding UTF8 $bericht | Write-Host
|
||||
}
|
||||
} finally {
|
||||
git -C $repo worktree remove --force $kopie
|
||||
}
|
||||
exit $status
|
||||
Reference in new issue
Block a user