Skip to content

CL-7247 batch 1: route packages/connections catches through reportError - #511

Merged
TheGreatAxios merged 2 commits into
cl-7237-enforce-the-reporterror-convention-with-a-check-scriptfrom
cl-7247-credential-auth-report-error
Aug 30, 2026
Merged

TheGreatAxios merged 2 commits into
cl-7237-enforce-the-reporterror-convention-with-a-check-scriptfrom
cl-7247-credential-auth-report-error

Conversation

@TheGreatAxios

Copy link
Copy Markdown
Contributor

Summary

Stacked on #497 (not yet merged) — the baseline ledger this PR shrinks lives on that branch. DO NOT MERGE before #497.

CL-7247 is the burn-down of the 280 pre-existing check:report-error violations #497 baselines. Per the ticket's own ordering ("anything on a credential, auth, or payment path is fixed first"), this is batch 1: every baselined catch in packages/connections — the OAuth token exchanges (GitHub, Gmail, Hugging Face, OpenRouter), the MCP connector's own OAuth and probe mechanics, PKCE/state handling, and the fixed-registry/tenant/MCP-server connect routes.

  • 18 catches now call reportError from @corbits/error-sink with an operation name and non-secret context (connector id, slug, tenant id — never a token, authorization code, PKCE verifier, or client secret, several of which are in scope at these exact sites).
  • 4 are genuine intentional swallows, each marked report-error-ignore: CL-7247 — <reason>:
    • pkce.ts's state-decrypt failure — indistinguishable from malicious probing by design; reporting it would create a decrypt-failure oracle.
    • mcp-probe.ts's and oauth-routes.ts's malformed-input parses — a person's paste-in typo, not a system fault.
    • mcp-oauth-routes.ts's best-effort error-body sniff — the classifier already falls back safely without it.
  • scripts/checks/report-error-baseline.txt shrinks by exactly these 22 lines (280 → 258), never bulk-regenerated.

Verification

  • cd packages/connections && bun run typecheck — clean
  • cd packages/connections && bun test — 259 pass, 6 skip (DB-backed, expected locally), 0 fail
  • bun run scripts/checks/report-error.ts — 179 compliant, 11 opted out, 258 baselined, 0 new findings, 0 stale entries
  • bunx prettier --check and bunx eslint on touched files — clean

Remaining CL-7247 work

258 of 280 baselined violations remain, across ~64 other packages/apps. Tracked on CL-7247 with the running list of fixed sites.

…tches

CL-7247: expects reportError from @corbits/error-sink on every catch in
the OAuth/MCP-connection/credential-probe package that check:report-error
flags in the debt ledger. Red against the current implementation.
CL-7247 batch 1: the connections package (OAuth token exchanges, MCP
probes and OAuth, PKCE state, and the fixed-registry/tenant/MCP-server
connect routes) is the credential/auth/secret-handling surface CL-7247
calls out to fix first, since a hand-rolled log here is where material
reportError would redact is most likely to leak.

22 baselined catches addressed:
- 18 now call reportError with an operation name and non-secret context
  (connector/slug/tenant identifiers only — never a token, code,
  verifier, or client secret, all of which are in scope at several of
  these sites).
- 4 are genuine intentional swallows, marked report-error-ignore:
  pkce.ts's state-decrypt failure (indistinguishable from malicious
  probing by design), mcp-probe.ts's and oauth-routes.ts's malformed
  user-input parses (a paste-in typo, not a system fault), and
  mcp-oauth-routes.ts's best-effort error-body sniff (the classifier
  already falls back safely).

Shrinks scripts/checks/report-error-baseline.txt by exactly these 22
lines — the debt they tracked is now either fixed or ticketed with its
own ignore comment, never bulk-regenerated.
@TheGreatAxios
TheGreatAxios merged commit 668ffcb into cl-7237-enforce-the-reporterror-convention-with-a-check-script Aug 30, 2026
5 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