Repository navigation
chore(#1505): convert the remaining ~94 empty catches to noteSuppressed, forbid empty catch bodies by lint, show the count in sequant logs - #1577
Merged
admarble merged 5 commits intoOct 22, 2026
Conversation
…nd forbid them in lint Entire-Checkpoint: 0f801e80c77e
Entire-Checkpoint: f3dc17d30d89
Entire-Checkpoint: 7a8f683acd39
…ssed import Entire-Checkpoint: 342594bb030c
admarble
deleted the
feature/1505-chore-lib-convert-the-remaining-94-empty-catches-t
branch
October 22, 2026 01:09
This was referenced Oct 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Every empty catch in
src/andbin/is gone, lint rejects new ones, andsequant logsprints the suppressed-error count. I pushed the branch (feature/1505-chore-lib-convert-the-remaining-94-empty-catches-t) and left the PR to the orchestrator.What changed
noteSuppressed(scope, err, context). Scopes arestate,platformorother, picked by file. Nothing after the error changed.bin/preflight.ts(1 site): it keeps an explicitvoid err;with a reason comment. It runs before the Node floor check and must not import beyondversion-check.CatchClause > BlockStatement[body.length=0]aterrorforsrc/**andbin/**, and repeated it in thephase-executor.tsblock.sequant logs: it printsSuppressed errors: N (scope n, …)when a log has the field, and nothing otherwise. The newsrc/commands/logs.test.tshas two tests, one for each case.emptyCatchinscripts/qa/health-baseline.jsonis now{total: 0, byFile: {}}. I hand-edited only that key, because a full--write-baselinealso moved unrelated metrics. The CHANGELOG has an[Unreleased]entry under### Changed.run.tssize: the new import pushedsrc/commands/run.tsto 202 lines, over the 200-line cap inrun-orchestrator.integration.test.ts. I collapsed a multi-line object to bring it to 197.AC verification
health-report.ts --jsongivesemptyCatch.total0eslint.config.js; the five scratch-edit proofs are belownpm run lintandnpm run buildare clean;lint:healthreports no risenpx vitest run src/commands/logs.test.ts -t suppressedpasses 2/2jq '.emptyCatch.total' scripts/qa/health-baseline.jsongives 0The five lint proofs (each a scratch edit, then reverted):
phase-executor.tserrors.console.loginphase-executor.tsstill errors.src/lib/fs.tserrors.require()insrc/still errors.scripts/qa/health-report.tsgives nono-restricted-syntaxerror.Out of scope: the 9 empty-catch sites in 6
scripts/files are untouched:mcp-launch.mjs3,analytics/ready-backtest.ts2, and one each inanalytics/analyze-runs.ts,generate-constitution-dod.ts,probes/claude-cloud-probe.tsandspec/ground-check.ts. Converted sites on CLI paths outsidesequant runcount errors that are never persisted, which is harmless.Tests: I ran
npx vitest run --changed origin/mainas three shards, 227 affected files, plusscripts/qa/tautology-detector-cli.test.ts. Two tests failed.run.tsline-cap test (my change) is fixed and passes.driver-conformance.test.ts, "git add and git commit succeed") fails identically atorigin/main. It is already tracked as test(drivers): codex conformance commit item fails locally on macOS — git add exits 128 inside the sandbox #1480.I did not re-run the three shards after the
run.tsfix. I re-ran only that test file, which passes.Mutation record (AC-4): I removed the renderer line from
src/commands/logs.ts. Only the new "prints the suppressed count" test failed, and I restored the line.Pre-PR confidence check
othersites may deserve a better scope. The count is correct either way.Fixes #1505
Follow-ups
file:function(Class.methodfor methods,#2,#3for a repeat inside one function). Labels only; lint, typecheck,lint:health, AC-1 and the suppressed, logs and run-orchestrator tests pass after the change.🤖 Generated by
sequant run