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
19 changes: 18 additions & 1 deletion .github/workflows/gc-ratchet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,27 @@ jobs:

# Fast structural failure first: a broken harness or a tampered artifact
# should not cost a 20-minute compiler build to discover.
#
# `--scope structural` is load-bearing and is the #7554 repair. This step
# runs BEFORE the measurement step, so anything it fails on costs the
# entire run's coverage — twelve probes that never execute. That price is
# correct for "this artifact is unreadable or tampered with" and badly
# wrong for "one of its 144 cells is not bit-identical", which is what
# actually happened: one cell's 6,768-byte spread failed this step and the
# ratchet measured NOTHING on any branch for three days, while two GC
# pacing changes (#7594, #7596) merged with hand-run A/Bs in its place.
#
# Under `structural` a per-cell defect is printed loudly and deferred; the
# `check` step below re-derives the same defect list and fails on it, after
# the probes have run and with the full table attached. So this cannot
# wave a defect through to a green job — `check` is where the verdict is,
# and tests/test_gc_ratchet.py's
# `test_structural_preflight_defers_every_defect_it_waves_through` asserts
# that coupling one planted defect shape at a time.
- name: Harness unit tests and artifact validation
run: |
python3 -m unittest discover -s tests -p 'test_gc_ratchet.py' -v
python3 benchmarks/gc_ratchet/gc_ratchet.py validate
python3 benchmarks/gc_ratchet/gc_ratchet.py validate --scope structural
Comment on lines +91 to +101

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

Make gc-ratchet a required context before this deferral lands.

This change moves the verdict for per-cell defects from the preflight step to the check step, and the comment on Lines 91-97 states that check is where the verdict is. The PR objectives list "making gc-ratchet a required context" as a follow-up, so the job is not required today. A deferred defect therefore produces a red check step in a job that cannot block a merge. That converts the deferral into effective suppression for merge purposes, which is the outcome the comment says the design prevents.

Add gc-ratchet to the branch-protection required contexts in the same change, not as a follow-up.

Run the following script to confirm the current protection settings:

#!/bin/bash
# Description: List required status checks on the default branch.
branch="$(gh repo view --json defaultBranchRef --jq '.defaultBranchRef.name')"
repo="$(gh repo view --json nameWithOwner --jq '.nameWithOwner')"
gh api "repos/$repo/branches/$branch/protection/required_status_checks" --jq '.contexts, .checks' 2>&1 || \
  echo "no required_status_checks configured or insufficient token scope"

As per coding guidelines: "A CI gate must not use continue-on-error, must be included in required branch-protection contexts, must avoid unconditional cancellation of main runs, and must assert that the behavior it measures actually executed."

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/gc-ratchet.yml around lines 91 - 101, Add the gc-ratchet
workflow’s check context to the repository’s default-branch required status
checks alongside the workflow change, ensuring the deferred defect verdict can
block merges. Update the branch-protection configuration or automation that
defines required contexts, using the existing gc-ratchet status-check name and
preserving the gate’s non-canceling, non-continue-on-error behavior.

Source: Coding guidelines


- name: Decide whether this change can affect the collector
id: relevance
Expand Down
2 changes: 1 addition & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co

Perry is a native TypeScript compiler written in Rust that compiles TypeScript source code directly to native executables. It uses SWC for TypeScript parsing and LLVM for code generation.

**Current Version:** 0.5.1347
**Current Version:** 0.5.1348


## TypeScript Parity Status
Expand Down
Loading
Loading