Skip to content

chore(test): shrink Discord assertion baseline - #128203

Merged
steipete merged 1 commit into
mainfrom
codex/fix-discord-assertion-ratchet
Aug 23, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/fix-discord-assertion-ratchet

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

Resolves a problem where the fast baseline-ratchet CI job fails on current main after Discord gateway assertion usage dropped from 9 to 8.

Why This Change Was Made

Updates the assertion-safety ledger to the lower count already enforced by the Discord source. No production behavior changes.

User Impact

No user-visible behavior change. Required CI can correctly accept the stricter assertion count instead of reporting a stale-baseline failure.

Evidence

@clawsweeper

clawsweeper Bot commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@openclaw-barnacle openclaw-barnacle Bot added size: XS maintainer Maintainer-authored PR labels Aug 23, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Aug 23, 2026
@clawsweeper

clawsweeper Bot commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 23, 2026, 7:58 AM ET / 11:58 UTC.

ClawSweeper review

What this changes

Updates the Discord type-assertion safety ledger from nine to eight assertions.

Regression provenance

Possible regression — suspected (reviewed change). No predecessor PR is attributed.

Merge readiness

⚠️ Ready for maintainer review - 2 items remain

Keep open: the checker’s AST rule and the eight current unsafe assertions support the new ledger value; no functional or security finding. The protected maintainer label requires normal maintainer handling rather than automated cleanup.

Priority: P2
Reviewed head: 4bccf98ef113bdd43b983bac85657e0885cd1712

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) Direct checker and source inspection support this narrow correction; normal exact-head CI remains the merge gate.
Proof confidence 🌊 off-meta tidepool Not applicable: This maintainer-authored CI-ledger correction is outside the external-contributor real-behavior-proof gate.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This maintainer-authored CI-ledger correction is outside the external-contributor real-behavior-proof gate.
Evidence reviewed 6 items Patch scope: The PR changes only the Discord ledger entry from 9 to 8.
Checker contract: The ratchet parses TypeScript AST assertion expressions and counts only non-const, non-unknown assertions lacking a SAFETY comment.
Source count: The Discord gateway contains eight applicable as expressions at lines 223, 281, 350, 363, 413, 505, 509, and 522; the source and checker are unchanged from the PR base while the ledger is the only changed path.
Findings None None.
Security None None.

Live Verification

Command: pnpm check:assertion-safety --base main

Result: PASS (completed)

pnpm check:assertion-safety --base main
runner@runnervm76f27:/tmp/clawsweeper-live-proof-128203-SHYj09/target$ pnpm check:assertion-safety --base main
$ node --import tsx scripts/check-assertion-safety-ratchet.mts --base main
pnpm check:assertion-safety --base main
assertion SAFETY ratchet OK: 4281 files, 13497 grandfathered assertions.
runner@runnervm76f27:/tmp/clawsweeper-live-proof-128203-SHYj09/target$ pnpm check:assertion-safety --base main
$ node --import tsx scripts/check-assertion-safety-ratchet.mts --base main












































Assertions:

  • PASS expect_output: assertion SAFETY ratchet OK:

How this fits together

The assertion-safety ledger is a shrink-only CI baseline for unsafe TypeScript assertions. The checker parses production source, compares its count with the ledger, and fails the fast CI lane when the ledger is stale or expands.

flowchart LR
A[Discord gateway source] --> B[TypeScript AST assertion counter]
C[Assertion safety ledger] --> D[Baseline comparison]
B --> D
D --> E[Fast CI ratchet]
E --> F[Pass or stale-baseline failure]
Loading

Before merge

  • Resolve merge risk (P1) - Exact-head CI was still in progress; merge only after the ratchet check passes against the merge base.
  • Complete next step (P2) - No repair job is needed: this PR already contains the narrow correction and is protected for maintainer handling.
Agent review details

Security

None.

PR surface

Other 0. Total 0 across 1 file.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 0 0 0 0
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 1 1 0
Total 1 1 1 0

Review metrics

Metric Value Why it matters
Production versus test-support LOC production 0; test-support/CI ledger 0 net (one line replaced) The patch changes no runtime behavior; it synchronizes an existing CI ratchet with source.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Retain the shrink-only checker and its corrected value of eight, then let exact-head CI verify the merge result.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best possible solution:

Retain the shrink-only checker and its corrected value of eight, then let exact-head CI verify the merge result.

Do we have a high-confidence way to reproduce the issue?

Yes—source-reproducible: the checker’s AST rule counts eight eligible assertions while the base ledger records nine. The review remained read-only, so the command itself was not run locally.

Is this the best way to solve the issue?

Yes—the ledger is explicitly shrink-only, so correcting its stale count is preferable to changing the source or weakening the checker to preserve nine.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 1e9d493be9b9.

Labels

Label changes:

  • add P2: A stale baseline blocks a required fast CI guard, with limited blast radius and no runtime user impact.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This maintainer-authored CI-ledger correction is outside the external-contributor real-behavior-proof gate.

Label justifications:

  • P2: A stale baseline blocks a required fast CI guard, with limited blast radius and no runtime user impact.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This maintainer-authored CI-ledger correction is outside the external-contributor real-behavior-proof gate.

Evidence

What I checked:

Likely related people:

  • Vito Cappello: Commit 967696b touched both the assertion ledger and Discord gateway path shortly before this baseline correction. (role: recent adjacent contributor; confidence: medium; commits: 967696b74367; files: config/assertion-safety-baseline.txt, extensions/discord/src/internal/gateway.ts)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

Copy link
Copy Markdown
Contributor Author

Land-ready at 4bccf98ef113bdd43b983bac85657e0885cd1712.

  • Exact-head CI is green: run 32637840563, including checks-fast-baseline-ratchets and openclaw/ci-gate.
  • Focused local proof passed: pnpm check:assertion-safety, node scripts/check-changed.mjs -- config/assertion-safety-baseline.txt, and git diff --check.
  • Repo-native review artifacts validated with READY FOR /prepare-pr, zero findings, and issue validation valid; OPENCLAW_TESTBOX=1 scripts/pr prepare-run 128203 passed in hosted_exact_or_recent_parent mode and verified the remote head tree.
  • ClawSweeper's exact-head-CI move is resolved by run 32637840563. Its protected-maintainer-handling move is resolved by the repo-native maintainer review/prepare flow; no repair job is needed.

This is a one-line shrink-only CI ledger correction with no product behavior change. Live behavior proof is not applicable, and no proof gap remains.

@steipete
steipete merged commit 7d816a2 into main Aug 23, 2026
148 checks passed
@steipete
steipete deleted the codex/fix-discord-assertion-ratchet branch August 23, 2026 12:17

Copy link
Copy Markdown
Contributor Author

Merged via squash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintainer Maintainer-authored PR P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XS status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants