Revert "fix(memory): bound OOM-prone accumulators (#10179)" (#10255)

Co-authored-by: Orca <help@stably.ai>
This commit is contained in:
Neil
2026-07-23 18:35:31 -07:00
committed by GitHub
co-authored by Orca
parent 6eb70d8370
commit aab112933e
1577 changed files with 15167 additions and 91655 deletions
+4 -4
View File
@@ -1,12 +1,11 @@
import type { LinearErrorCode, LinearIncludeErrorCode } from '../../shared/linear-agent-access'
import { boundedIntegrationErrorMessage } from '../integration-error-message'
export class LinearAgentAccessError extends Error {
readonly code: LinearErrorCode
readonly data?: unknown
constructor(code: LinearErrorCode, message: string, data?: unknown) {
super(boundedIntegrationErrorMessage(message))
super(message)
this.name = 'LinearAgentAccessError'
this.code = code
this.data = data
@@ -59,12 +58,13 @@ export function classifyLinearError(error: unknown): LinearErrorCode {
}
export function linearMessage(error: unknown): string {
return sanitizeLinearErrorMessage(boundedIntegrationErrorMessage(error))
const message = error instanceof Error ? error.message : String(error)
return sanitizeLinearErrorMessage(message)
}
export function sanitizeLinearErrorMessage(message: string): string {
// Why: provider text is useful in CLI errors, but raw SDK failures can embed secrets or user payloads.
return stripLinearStackTrace(boundedIntegrationErrorMessage(message))
return stripLinearStackTrace(message)
.replace(
/(headers?\s*[:=]\s*)\{[^{}]*(?:authorization|token|api[-_]?key)[^{}]*\}/gi,
'$1[REDACTED]'