Skip to content

refactor: apply sonar quick wins - #44

Merged
BryanFRD merged 1 commit into
mainfrom
fix/sonar-quick-wins
Nov 9, 2026
Merged

BryanFRD merged 1 commit into
mainfrom
fix/sonar-quick-wins

Conversation

@BryanFRD

@BryanFRD BryanFRD commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

Sonar quick wins:

  • typescript:S7785: top-level await instead of promise chains in the MCP entrypoint and smoke script
  • typescript:S4782: drop the redundant | undefined on an optional property

Skipped:

  • docker:S8431 (Dockerfile tag plus digest): the pin is deliberate, the digest gives reproducible builds and the tag keeps Renovate updates readable. Dropping either loses one of the two.

Signed-off-by: BryanFRD <bryanferrando59@gmail.com>
@BryanFRD
BryanFRD enabled auto-merge (squash) November 9, 2026 15:34

@ferrfleet-interne ferrfleet-interne Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Approved. Behaviour-preserving Sonar cleanups, no findings from the code review and nothing for formal verification to prove.

Code review: no findings. The three changes:

  • mcp/packages/ferrgrowth-mcp/src/api-base.ts: orgId?: string | undefined becomes orgId?: string. This is type-only. exactOptionalPropertyTypes is off, so both spellings are identical to the compiler and callers passing org_id: string | undefined still typecheck.
  • mcp/packages/ferrgrowth-mcp/src/index.ts: the .catch() chain becomes top-level await in try/catch with the same error handling. Valid because the package is "type": "module", module ESNext, target ES2022, Node >=22.
  • mcp/scripts/smoke.ts: same rewrite in a dev script run by tsx under a "type": "module" root. Not production code.

Formal verification: verdict nothing_to_prove. No properties, harnesses or counterexamples. It reached the same equivalence conclusions as the review for all three files.

@BryanFRD
BryanFRD merged commit 2392ae9 into main Nov 9, 2026
17 checks passed
@BryanFRD
BryanFRD deleted the fix/sonar-quick-wins branch November 9, 2026 16:14
ferrflow Bot added a commit that referenced this pull request Nov 9, 2026
## [10.19.4] - 2026-11-09

### Refactoring

- refactor: apply sonar quick wins (#44)
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