Repository navigation
Promote dev to stable: update diagnostics cleanup #2477
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 6 commits
618f4de
5ad86f8
8612628
1c08286
9af2e31
0f3fade
50177b6
7e7283a
99f5c24
ab2ddcc
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -94,7 +94,7 @@ jobs: | |
| runs-on: ubuntu-latest | ||
| timeout-minutes: 10 | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: actions/checkout@v5 | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
FILE=".github/workflows/release-publish.yml"
echo "== File = $FILE =="
test -f "$FILE" || { echo "Missing $FILE"; exit 1; }
echo "== Checkout occurrences =="
rg -n "uses:\s*actions/checkout@" "$FILE" || true
echo "== Lines around checkout@v5 =="
# Print a tight window around first occurrence(s)
rg -n "uses:\s*actions/checkout@v5" "$FILE" | cut -d: -f1 | head -n 20 | while read -r ln; do
start=$((ln-10)); end=$((ln+10));
echo "--- around line $ln ($start-$end) ---"
sed -n "${start},${end}p" "$FILE" | nl -ba -w2 -s' | '
done
echo "== persist-credentials / git push presence =="
rg -n "persist-credentials|git push|push origin|checkout@v" "$FILE" || true
echo "== timeout-minutes presence =="
rg -n "timeout-minutes" "$FILE" || true
echo "== caching keys presence =="
rg -n "actions/cache|cache" "$FILE" || trueRepository: automagik-dev/genie Length of output: 303 🏁 Script executed: #!/bin/bash
set -euo pipefail
FILE=".github/workflows/release-publish.yml"
echo "== Checkout occurrences =="
rg -n "uses:\s*actions/checkout@" "$FILE" || true
echo "== Context around actions/checkout@v5 (line(s) found) =="
rg -n "uses:\s*actions/checkout@v5" "$FILE" | cut -d: -f1 | head -n 20 | while read -r ln; do
start=$((ln-15)); end=$((ln+15));
echo "--- around line $ln (${start}-${end}) ---"
sed -n "${start},${end}p" "$FILE"
done
echo "== persist-credentials / git push presence =="
rg -n "persist-credentials|git push|push origin|checkout@" "$FILE" || true
echo "== timeout-minutes presence =="
rg -n "timeout-minutes" "$FILE" || true
echo "== caching keys presence =="
rg -n "actions/cache|cache" "$FILE" || trueRepository: automagik-dev/genie Length of output: 1631 🏁 Script executed: #!/bin/bash
set -euo pipefail
FILE=".github/workflows/release-publish.yml"
echo "== persist-credentials occurrences =="
rg -n "persist-credentials" "$FILE" || true
echo "== git push occurrences =="
rg -n "git push" "$FILE" || true
rg -n "push origin" "$FILE" || true
echo "== checkout step options near line 97 =="
sed -n '90,110p' "$FILE" | nl -ba -w2 -s' | ' || sed -n '90,110p' "$FILE"
echo "== Context around git push (around first match) =="
first=$(rg -n "git push" "$FILE" | head -n1 | cut -d: -f1 || true)
if [[ -n "${first:-}" ]]; then
start=$((first-25)); end=$((first+25));
sed -n "${start},${end}p" "$FILE"
fi
echo "== Any other actions/checkout uses (including non-v5) =="
rg -n "uses:\s*actions/checkout@" "$FILE" || trueRepository: automagik-dev/genie Length of output: 2584 Pin The workflow uses Suggested patch- - uses: actions/checkout@v5
+ - uses: actions/checkout@<full-commit-sha-for-v5>🧰 Tools🪛 zizmor (1.25.2)[warning] 97-97: credential persistence through GitHub Actions artifacts (artipacked): does not set persist-credentials: false (artipacked) [error] 97-97: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy) (unpinned-uses) 🤖 Prompt for AI Agents |
||
|
|
||
| - name: Resolve upstream sign-attest run-id | ||
| id: src | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -195,7 +195,7 @@ jobs: | |
| - darwin-arm64 | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: actions/checkout@v5 | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
FILE=".github/workflows/sign-attest.yml"
echo "== File: $FILE =="
ls -l "$FILE"
echo "== Lines around 198 =="
nl -ba "$FILE" | sed -n '160,230p'Repository: automagik-dev/genie Length of output: 277 🏁 Script executed: #!/bin/bash
set -euo pipefail
FILE=".github/workflows/sign-attest.yml"
echo "== Lines around 198 =="
awk 'NR>=175 && NR<=215 {printf "%4d: %s\n", NR, $0}' "$FILE"Repository: automagik-dev/genie Length of output: 1921 🏁 Script executed: #!/bin/bash
set -euo pipefail
FILE=".github/workflows/sign-attest.yml"
echo "== Matching persist-credentials =="
rg -n "persist-credentials" "$FILE" || true
echo "== Matching actions/checkout@ =="
rg -n "uses:\s*actions/checkout@" "$FILE" || true
echo "== Matching secrets usage =="
rg -n "secrets\." "$FILE" || true
echo "== Matching caches =="
rg -n "cache|actions/cache" "$FILE" || true
echo "== Print sign job steps (approx) =="
# Print from start of sign job through a bit further so we can see checkout's `with:` block if present.
awk 'NR>=160 && NR<=280 {print NR ":" $0}' "$FILE"Repository: automagik-dev/genie Length of output: 6082 🏁 Script executed: #!/bin/bash
set -euo pipefail
FILE=".github/workflows/sign-attest.yml"
echo "== Any git push/commit/config usage =="
rg -n "git (push|commit|config|add)" "$FILE" || true
echo "== Any actions/checkout usage count =="
rg -n "uses:\s*actions/checkout@" "$FILE" || trueRepository: automagik-dev/genie Length of output: 179 Harden checkout in the signing job (pin immutable SHA + disable persisted credentials). In Suggested patch- - uses: actions/checkout@v5
+ - uses: actions/checkout@<full-commit-sha-for-v5>
+ with:
+ persist-credentials: false🧰 Tools🪛 zizmor (1.25.2)[warning] 198-198: credential persistence through GitHub Actions artifacts (artipacked): does not set persist-credentials: false (artipacked) [error] 198-198: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy) (unpinned-uses) 🤖 Prompt for AI Agents |
||
|
|
||
| - name: Download tarball artifact (${{ matrix.platform }}) | ||
| uses: actions/download-artifact@v4 | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -1235,6 +1235,26 @@ function summarizeJsonlSignals(path: string): RecentLogSignal[] { | |||||
| return [...signals.values()].sort((a, b) => b.count - a.count).slice(0, 10); | ||||||
| } | ||||||
|
|
||||||
| export function isGenieProcessSnapshotLine(line: string): boolean { | ||||||
| if (/pgserve|autopg|postgres-server\.js|postgres -D /.test(line)) return false; | ||||||
| return ( | ||||||
| line.includes(' serve start ') || | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The trailing space in ' serve start ' makes the filter fragile. If the genie serve start command is invoked without additional arguments (like --daemon), the line.trim() call on line 1251 will remove any trailing whitespace from the ps output, causing this includes check to fail. Removing the trailing space ensures it matches both cases correctly.
Suggested change
|
||||||
| line.includes('/dist/genie.js') || | ||||||
| line.includes('/src/genie.ts') || | ||||||
| line.includes('tmux -L genie-tui') | ||||||
| ); | ||||||
| } | ||||||
|
|
||||||
| function collectGenieProcessSnapshot(): string | null { | ||||||
| const snapshot = safeExec('ps -axo pid,ppid,pgid,stat,pcpu,pmem,etime,command -r', 2000) | ||||||
| .split(/\r?\n/) | ||||||
| .map((line) => line.trim()) | ||||||
| .filter(Boolean) | ||||||
| .filter(isGenieProcessSnapshotLine) | ||||||
| .join('\n'); | ||||||
| return snapshot || null; | ||||||
| } | ||||||
|
|
||||||
| interface UpdateDiagnosticsExtras { | ||||||
| verify: VerifyResult; | ||||||
| cleanups: CleanupReport; | ||||||
|
|
@@ -1297,11 +1317,7 @@ async function collectUpdateDiagnostics( | |||||
| tuiCrashLog, | ||||||
| }, | ||||||
| processSnapshot: { | ||||||
| genie: | ||||||
| safeExec( | ||||||
| "ps -axo pid,ppid,pgid,stat,pcpu,pmem,etime,command -r | rg -i 'dist/genie.js|/src/genie.ts|pgserve|postgres -D .*\\.genie/data/pgserve|tmux -L genie-tui|bun' || true", | ||||||
| 2000, | ||||||
| ) || null, | ||||||
| genie: collectGenieProcessSnapshot(), | ||||||
| tuiTmux: safeExec('tmux -L genie-tui ls 2>/dev/null || true', 1000) || null, | ||||||
| }, | ||||||
| maintenance: { | ||||||
|
|
||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Repository: automagik-dev/genie
Length of output: 202
🏁 Script executed:
Repository: automagik-dev/genie
Length of output: 8105
🌐 Web query:
GitHub actions/checkout persist-credentials default value true/false documentation💡 Result:
The
persist-credentialsinput inactions/checkoutdefaults to true. The action’s README states: “Whether to configure the token or SSH key with the local git config” and shows “# Default: true” forpersist-credentials. [1][2][3] If you setpersist-credentials: false, the token is not persisted in the local git config (and is intended to be opted out of); otherwise the token/credentials are persisted for subsequent steps and are removed during post-job cleanup. [1][3]Citations:
Pin
actions/checkoutand disable credential persistence in this read-only job.github/workflows/release-orphan-alert.ymlline 46 uses the mutableactions/checkout@v5, andactions/checkoutdefaultspersist-credentialstotrue, so it configuresGITHUB_TOKENcredentials for git even though the workflow only does read-only git operations (git fetch/git tag/git log) and never pushes.Suggested patch
🧰 Tools
🪛 zizmor (1.25.2)
[warning] 46-46: credential persistence through GitHub Actions artifacts (artipacked): does not set persist-credentials: false
(artipacked)
[error] 46-46: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)
(unpinned-uses)
🤖 Prompt for AI Agents