Skip to content

Enforce restrict-try-block lint rule - #38

Merged
rdlabo merged 2 commits into
mainfrom
agent/enforce-restrict-try-block
Aug 14, 2026
Merged

Enforce restrict-try-block lint rule#38
rdlabo merged 2 commits into
mainfrom
agent/enforce-restrict-try-block

Conversation

@rdlabo

@rdlabo rdlabo commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Summary

  • enable @rdlabo/rules/restrict-try-block with the strict fleet defaults
  • update @rdlabo/eslint-plugin-rules to 21.2.6 and align its Angular tooling dependencies
  • replace broad async try blocks and Promise.resolve() escape hatches with explicit async boundaries
  • preserve synchronous-throw handling for retry, queue, KV, and test database paths
  • add regression coverage for synchronous handler, ack, retry, and KV failures

Why

The shared Workers toolkit should enforce the same narrow error-boundary policy as its consumers. Version 21.2.6 also rejects Promise.resolve() escape hatches, so existing code needed to express Promise rejection handling directly while retaining the synchronous failure behavior of the previous try blocks.

The plugin statically loads its Angular template rule without declaring the parser dependency, so the parser is declared explicitly. Angular peers are pinned to the 21.x toolchain, and their Node requirement is recorded separately in devEngines without narrowing the published runtime support.

Impact

There are no intended public API changes. Error handling remains fail-soft or retrying where it was before, including callbacks and bindings that throw before returning a Promise.

Validation

  • npm ci
  • npm run lint
  • npm run typecheck
  • npm test (64 files, 461 tests)
  • npm run format:check
  • npm run build
  • git diff --check
  • approved after iterative manager and independent third-party reviews

@rdlabo
rdlabo marked this pull request as ready for review August 14, 2026 06:05

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 2 additional findings.

Open in Devin Review

@rdlabo
rdlabo merged commit c270570 into main Aug 14, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant