mirror of
https://github.com/storytold/gridcraft.git
synced 2026-11-28 21:50:31 +00:00
diagnostic: windows feed read probe (throwaway, not a release path)
This commit is contained in:
@@ -0,0 +1,68 @@
|
||||
name: windows feed read probe (throwaway)
|
||||
# Throwaway diagnostic for the signer's "JSON changed before read" refusal on Windows. It is not part
|
||||
# of any release path, binds no environment and uses no secrets.
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
producer_run_id:
|
||||
description: Producer run whose artifacts the signer read
|
||||
required: true
|
||||
type: string
|
||||
permissions:
|
||||
contents: read
|
||||
actions: read
|
||||
jobs:
|
||||
probe:
|
||||
runs-on: windows-latest
|
||||
timeout-minutes: 15
|
||||
steps:
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
with:
|
||||
ref: ${{ github.ref }}
|
||||
path: .release-source
|
||||
persist-credentials: false
|
||||
- uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
|
||||
with:
|
||||
run-id: ${{ inputs.producer_run_id }}
|
||||
github-token: ${{ github.token }}
|
||||
path: .unsigned
|
||||
- name: Write an admission-shaped JSON, as the admit step does
|
||||
shell: bash
|
||||
run: |
|
||||
printf '%s' '{"probe":true}' > .release-source/.admission-probe.json
|
||||
- name: Dump identity fields for every file the signer reads
|
||||
shell: bash
|
||||
run: |
|
||||
python -I -B - <<'EOF'
|
||||
import json, os, pathlib, time
|
||||
roots = [".release-source", ".unsigned"]
|
||||
rows = []
|
||||
for root in roots:
|
||||
for path in sorted(pathlib.Path(root).rglob("*")):
|
||||
if not path.is_file():
|
||||
continue
|
||||
resolved = str(path.resolve())
|
||||
with open(path, "rb") as stream:
|
||||
first = os.fstat(stream.fileno())
|
||||
time.sleep(1.0)
|
||||
second = os.fstat(stream.fileno())
|
||||
entry = os.lstat(path)
|
||||
fields = ("st_dev", "st_ino", "st_size", "st_mtime_ns", "st_ctime_ns")
|
||||
row = {
|
||||
"path": str(path), "resolved": resolved,
|
||||
"lstat": {k: getattr(entry, k) for k in fields},
|
||||
"fstat": {k: getattr(first, k) for k in fields},
|
||||
"fstat_again": {k: getattr(second, k) for k in fields},
|
||||
}
|
||||
row["path_matches_handle"] = row["lstat"] == row["fstat"]
|
||||
row["handle_stable"] = row["fstat"] == row["fstat_again"]
|
||||
rows.append(row)
|
||||
print(json.dumps(rows, indent=1))
|
||||
disagree = [r for r in rows if not r["path_matches_handle"]]
|
||||
print("files:", len(rows), "path/handle disagreements:", len(disagree))
|
||||
EOF
|
||||
- name: Volume information
|
||||
shell: bash
|
||||
run: |
|
||||
fsutil fsinfo volumeinfo "$(cygpath -w .release-source | cut -d: -f1):" || true
|
||||
python -I -B -c "import os;print('cwd',os.getcwd());print('tmp',__import__('tempfile').gettempdir())"
|
||||
Reference in New Issue
Block a user