-
Notifications
You must be signed in to change notification settings - Fork 731
fix: preserve Linear publication evidence for recovery #482
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
aa3e774
9d4578f
1c1fa6b
d2aa666
42e0c9a
8d99009
df6e4c4
990b35c
8acd9f0
6892c63
8759815
f7ecc7b
ff0290e
a8873fb
b1c8797
ebc1277
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -25,7 +25,6 @@ import { | |
| import { | ||
| CodexSecurityError, | ||
| ConfigurationError, | ||
| errorMessage, | ||
| safeErrorMessage, | ||
| } from "./errors.js"; | ||
| import { | ||
|
|
@@ -504,7 +503,7 @@ export async function publishScanInternal( | |
| dependencies.recordPublishedIssues ?? recordPublishedIssues | ||
| )(preparedScan, handoffResults.created, environment); | ||
| } catch (cause) { | ||
| persistenceFailure = { cause, detail: errorMessage(cause) }; | ||
| persistenceFailure = { cause, detail: safeErrorMessage(cause) }; | ||
| } | ||
| } | ||
| result.counts.created = result.created.length; | ||
|
|
@@ -538,7 +537,7 @@ export async function publishScanInternal( | |
| try { | ||
| await saveReceipt(result, environment); | ||
| } catch (error) { | ||
| const detail = errorMessage(error); | ||
| const detail = safeErrorMessage(error); | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
When receipt storage fails with an ordinary diagnostic containing the noun AGENTS.md reference: AGENTS.md:L21-L24 Useful? React with 👍 / 👎. |
||
| throw new CodexSecurityError( | ||
| `${reason} and its partial receipt could not be saved: ${detail}. ${recoveryDetails}`, | ||
| { cause: error }, | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When an error embeds a credential as
request failed with token SYNTHETIC_SECRETorinvalid access token SYNTHETIC_SECRET, the revised expression no longer matches becausetokenis preceded by whitespace rather than the start of the string or one of:="'.safeErrorMessageconsequently returns the credential unchanged at persistence and display boundaries, regressing the previous word-boundary protection; distinguish noun phrases such as “token cache” without requiring credential-bearingtoken VALUEphrases to follow special punctuation.AGENTS.md reference: sdk/typescript/AGENTS.md:L23-L23
Useful? React with 👍 / 👎.