Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .cursor/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ env_line() {
grep -qxF "$1" "$profile" 2>/dev/null || printf '%s\n' "$1" >>"$profile"
}

# --- Node, from .node-version via nvm --------------------------------------
if [[ -f .node-version ]]; then
node_pin="$(tr -d '[:space:]' <.node-version)"
export NVM_DIR="${NVM_DIR:-$HOME/.nvm}"
Expand Down Expand Up @@ -73,7 +72,6 @@ if [[ -f .node-version ]]; then
fi
fi

# --- .NET SDK, from global.json --------------------------------------------
if [[ -f global.json ]]; then
sdk=""
if command -v node >/dev/null 2>&1; then
Expand Down Expand Up @@ -114,7 +112,6 @@ if [[ -f global.json ]]; then
fi
fi

# --- Git history ------------------------------------------------------------
# Several checks diff against origin/main; deepen a shallow clone and make the
# ref resolvable. Best effort — a fetch failure must not fail environment setup.
git_dir="$(git rev-parse --git-dir 2>/dev/null || true)"
Expand Down
1 change: 0 additions & 1 deletion .github/actions/_shared/install-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ fi

if [[ -n "$cached_asset" && -f "$cached_asset" ]] &&
printf '%s %s\n' "$SHA256" "$cached_asset" | sha256sum -c - >/dev/null 2>&1; then
# Cache hit: reuse the already-verified release asset (skip the network).
cp -- "$cached_asset" "$asset"
else
# Nine backed-off attempts span ~4-5 minutes to outlast an upstream outage; a
Expand Down
24 changes: 0 additions & 24 deletions .github/actions/bump-versions/bump.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,6 @@ def failure_text(exc: Exception) -> str:
return str(exc) if isinstance(exc, BumpError) else f"{type(exc).__name__}: {exc}"


# ---------------------------------------------------------------- pure logic


def parse_version(text: str) -> tuple[int, ...] | None:
"""Numeric dotted version, or None for anything else (prereleases included)."""
return tuple(int(p) for p in text.split(".")) if VERSION_RE.match(text) else None
Expand Down Expand Up @@ -305,9 +302,6 @@ def targets_marker(rows: list[dict[str, Any]]) -> str:
return ",".join(f"{r['tool']}={r['target']}" for r in rows)


# ---------------------------------------------------------------- registry integrity


def npm_signed_message(name: str, version: str, integrity: str) -> bytes:
"""What the npm registry signs for a version: `<name>@<version>:<integrity>`."""
return f"{name}@{version}:{integrity}".encode()
Expand Down Expand Up @@ -415,9 +409,6 @@ def uv_cpython_builds(metadata: dict[str, Any]) -> dict[str, int]:
return builds


# ---------------------------------------------------------------- process helpers


def run_raw(
args: list[str], *, env: dict[str, str] | None = None, input_text: str | None = None
) -> subprocess.CompletedProcess[str]:
Expand Down Expand Up @@ -533,9 +524,6 @@ def parse_date(text: str) -> dt.datetime:
return dt.datetime.fromisoformat(text.replace("Z", "+00:00"))


# ---------------------------------------------------------------- resolve


def list_releases(
source: dict[str, Any], policy: dict[str, Any], now: dt.datetime
) -> list[Release]:
Expand Down Expand Up @@ -696,9 +684,6 @@ def release_url(source: dict[str, Any], release: Release) -> str:
return f"https://www.python.org/downloads/release/{release.meta['slug']}/"


# ---------------------------------------------------------------- verify and compute new values


class Verifier:
def __init__(
self, tool: dict[str, Any], release: Release, work: Path, policy: dict[str, Any]
Expand Down Expand Up @@ -1175,9 +1160,6 @@ def file_list_edits(
return edits


# ---------------------------------------------------------------- rewrite


def rewrite(edits: list[dict[str, Any]]) -> None:
for name in dict.fromkeys(e["file"] for e in edits):
file = Path(name)
Expand Down Expand Up @@ -1206,9 +1188,6 @@ def changed_paths() -> list[str]:
return run(["git", "diff", "--name-only"]).split()


# ---------------------------------------------------------------- commands


def synced_cooldown_days(path: Path, policy_path: Path) -> dict[str, int]:
"""cooldownDays from the standards dependabot-policy copy the standards sync places here."""
try:
Expand Down Expand Up @@ -1439,9 +1418,6 @@ def write_results(out: Path, results: dict[str, Any]) -> None:
)


# ---------------------------------------------------------------- publish


def pr_title(bump: dict[str, Any], rows: list[dict[str, Any]]) -> str:
if len(rows) == 1:
return f"chore(deps): bump {rows[0]['tool']} to {rows[0]['target']}"
Expand Down
6 changes: 0 additions & 6 deletions .github/actions/check-exec-bit/check-exec-bit.test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ commit_all() {
git -C "$repo" -c user.name='CI Test' -c user.email='ci-test@example.invalid' commit -qm 'test'
}

# 100755 shebang script is clean.
good="$temporary_directory/good"
init_repo "$good"
printf '#!/usr/bin/env bash\necho ok\n' >"$good/tool.sh"
Expand All @@ -69,7 +68,6 @@ commit_all "$good"
run_case '100755 shebang is clean' 0 "$good"
expect_contains 'success message on a clean tree' 'All shebang files are mode 100755 in the index.'

# 100644 shebang script fails with the exact annotation.
bad="$temporary_directory/bad"
init_repo "$bad"
printf '#!/usr/bin/env bash\necho bad\n' >"$bad/tool.sh"
Expand All @@ -92,7 +90,6 @@ commit_all "$docs"
run_case 'later-line #! in 100644 markdown is clean' 0 "$docs"
expect_contains 'docs with a fenced shebang pass' 'All shebang files are mode 100755 in the index.'

# Path containing a space.
space="$temporary_directory/space"
init_repo "$space"
mkdir -p -- "$space/bin dir"
Expand All @@ -101,7 +98,6 @@ commit_all "$space"
run_case '100644 shebang whose path contains a space fails' 1 "$space"
expect_contains 'space path in the annotation' '::error file=bin dir/run me.sh::bin dir/run me.sh has a shebang but git index mode is 100644'

# PATHS pathspec that excludes the bad file.
scoped="$temporary_directory/scoped"
init_repo "$scoped"
mkdir -p -- "$scoped/keep" "$scoped/skip"
Expand All @@ -116,15 +112,13 @@ PATHS='skip' run_case 'PATHS still fails an in-scope 100644 shebang' 1 "$scoped"
expect_contains 'scoped scan reports skip/bad.sh' '::error file=skip/bad.sh::'
unset PATHS

# Empty repo / no shebang files.
empty="$temporary_directory/empty"
init_repo "$empty"
printf 'plain text\n' >"$empty/notes.txt"
commit_all "$empty"
run_case 'no shebang files is clean' 0 "$empty"
expect_contains 'empty shebang set prints success' 'All shebang files are mode 100755 in the index.'

# Mixed: one good 100755 and one bad 100644.
mixed="$temporary_directory/mixed"
init_repo "$mixed"
printf '#!/usr/bin/env bash\necho good\n' >"$mixed/good.sh"
Expand Down
9 changes: 0 additions & 9 deletions .github/actions/pr-require-checks/aggregate-results/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -256,13 +256,11 @@ write_status() {
return 1
}

# ---------------------------------------------------------------------------
# Pending mode. Only the full run a contract-only run would wait for marks its
# verdict pending: a contract-only run marking it would fail itself and every
# sibling with nothing coming to replace the marker, a fork's token cannot
# write, and a push has no contract-only sibling to protect. Each of those
# passes with a notice, so the step is safe in a job that runs on every event.
# ---------------------------------------------------------------------------
if [[ "$record_pending" == true ]]; then
if [[ "$contract_only" == true ]]; then
echo "::notice::contract-only event: ${STATUS_CONTEXT} is not marked pending; only a full run marks its own verdict pending."
Expand All @@ -287,14 +285,12 @@ if [[ "$record_pending" == true ]]; then
exit 0
fi

# ---------------------------------------------------------------------------
# Carry-forward mode. Branched on first, before `same-repo`: the caller's
# predicate makes `contract-only` false for every fork event, so the
# true/false combination is unreachable from the defaults — but a caller that
# overrides `contract-only` owns the claim that the lanes did not run, and the
# runner honors it rather than second-guessing it into an aggregation over
# results that are all `skipped`.
# ---------------------------------------------------------------------------

# Newest `status-context` state written by the Actions bot on this SHA, or the
# empty string when the context is absent. Sets `carried_state` rather than
Expand Down Expand Up @@ -1488,9 +1484,6 @@ if [[ "$contract_only" == true ]]; then
finish_carry_forward
fi

# ---------------------------------------------------------------------------
# Full mode — aggregate the lane results.
# ---------------------------------------------------------------------------
# Unquoted expansion word-splits on all of IFS (space, tab, newline), so a YAML
# block scalar spanning lines is parsed in full. `read` would stop at the first
# newline and silently skip every later lane.
Expand Down Expand Up @@ -1536,13 +1529,11 @@ if [[ "$lanes_state" == success ]]; then
echo "$lanes_description"
fi

# ---------------------------------------------------------------------------
# Record the verdict as a commit status (see `write_status`).
#
# A fork pull request is the one exception: its token cannot write a status at
# all, and nothing will ever read one for it, so the run reports the lanes
# verdict and stops.
# ---------------------------------------------------------------------------
if [[ "$same_repo" != true ]]; then
echo "::notice::fork pull request: lane state is not recorded; every event runs the full workflow"
if [[ "$lanes_state" == failure ]]; then
Expand Down
Loading
Loading