-
Notifications
You must be signed in to change notification settings - Fork 0
fix(gst): consolidate scoped artifact refusal and recovery handling #359
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
Draft
lamemustafa
wants to merge
48
commits into
master
Choose a base branch
from
tapish-codex/runtime-stack-reviewed
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
48 commits
Select commit
Hold shift + click to select a range
2c7d303
fix(gst): bind refusals and retain uncertain acquisition state
lamemustafa 646346e
test(gst): verify declined artifact recovery and result evidence
lamemustafa 030b9b4
fix(gst): preserve terminal refusal recovery boundaries
lamemustafa 39db6f5
test(gst): verify refusal persistence and resumed bundle cleanup
lamemustafa d72e299
fix(gst): retain mismatched recovery state
lamemustafa 947983e
test(gst): cover durable recovery boundaries
lamemustafa 755029a
fix(gst): keep cleanup failure summaries durable
lamemustafa 282c48a
test(gst): persist retained cleanup state
lamemustafa 699ae22
fix(gst): reconcile empty bundle cleanup before portal lookup
lamemustafa 9b2515f
test(gst): exercise local absence cleanup through the entrypoint
lamemustafa 12e22cb
fix(gst): bind bundle missing reasons to artifacts
lamemustafa 93bcf3d
test(gst): reject mismatched bundle absence state
lamemustafa 13ce422
fix(gst): reject conflicting bundle refusal reasons
lamemustafa ef887f2
test(gst): preserve canonical bundle reason storage
lamemustafa 3aac993
refactor(gst): derive recorded refusal reasons from canonical signals
lamemustafa 0e7c0e4
refactor(gst): centralize scoped refusal proof recognition
lamemustafa c5c08f6
fix(gst): require binding proof for recovered refusal completion
lamemustafa 307d91e
test(gst): reject unproved recovered refusal summaries
lamemustafa 87740ba
fix(popup): present stated artifact absences
lamemustafa d6c470f
test(popup): preserve blocked absence recovery
lamemustafa e169c20
fix(gst): retain bundle absence without run-bound proof
lamemustafa 866b2f2
test(gst): preserve unproved bundle recovery for review
lamemustafa 38e0050
fix(gst): clear only the owned durable refusal review
lamemustafa fa5a7b2
test(gst): cover refusal cleanup ownership and failures
lamemustafa 59ea23b
fix(gst): require bound proof for durable not-generated
lamemustafa d12a2d2
test(gst): prove bound full-year refusal persistence
lamemustafa 789d695
fix(gst): retain owned review until checkpoint cleanup succeeds
lamemustafa 7e579b9
test(gst): cover checkpoint cleanup races and bound refusal recovery
lamemustafa ffe16b3
fix(gst): surface ordinary checkpoint cleanup failures
lamemustafa 4926fdc
test(gst): cover ordinary checkpoint cleanup failures
lamemustafa 7825a90
fix(gst): preserve ordinary checkpoint mismatch no-op
lamemustafa dfa0f3a
test(gst): cover checkpoint failure callers
lamemustafa 54cd39d
test(gst): prove successful ordinary checkpoint cleanup
lamemustafa d57151d
fix(gst): reject staged artifacts beside refusal
lamemustafa dc6cd5f
test(gst): retain staged refusal evidence
lamemustafa 437d3ed
fix(full-year): block retained artifacts on bound refusals
lamemustafa f0f8ed3
test(full-year): assert bounded refusal message
lamemustafa f10cb71
test(full-year): cover ordinary bound refusal recovery
lamemustafa 6ca0dd0
test(full-year): assert ordinary response checkpoint
lamemustafa e14c0b7
fix(full-year): canonicalize retained refusal recovery
lamemustafa 8cc1a66
fix(full-year): share retained refusal classification and recovery
lamemustafa 3028e81
test(full-year): exercise fresh staged refusal and reopen paths
lamemustafa d838918
style(full-year): restore canonical ledger formatting
lamemustafa 84d292e
test(full-year): report unexpected export as runner regression
lamemustafa 7b50fd2
fix(bundle): preserve refusal binding proof
lamemustafa 9d25865
feat(evidence): account for not-generated GSTR-2B periods
lamemustafa a6e0d50
docs(evidence): identify GSTR-2B as auto-drafted
lamemustafa 7b69dad
style(tests): format refusal and evidence assertions
lamemustafa File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| // Enough to name a thrown failure, and nothing that could carry portal text. | ||
| // | ||
| // An error's message is not safe to render: it can quote a page, a URL, or a field value. Its | ||
| // class name and the innermost stack symbol can name where a failure happened without repeating | ||
| // anything the portal said -- but only if each is established to be this bundle's, rather than | ||
| // merely made to look harmless. | ||
| // | ||
| // Stripping punctuation was the earlier approach and it was worse than no filter: a frame pointing | ||
| // at a portal URL came back with its slashes deleted, so the value *looked* like a symbol | ||
| // precisely because the characters that would have exposed it were gone. A filter that launders | ||
| // its input is not a guard. | ||
| // | ||
| // This keeps durable failure fingerprints useful without retaining untrusted error text. | ||
|
|
||
| // A frame names a place in this bundle only when the file it points at is this bundle's. The | ||
| // symbol is what is kept; the URL is what proves the symbol is ours, and it is never kept. An | ||
| // anonymous frame has no symbol to take, and a frame from anywhere else does not match at all. | ||
| const BUNDLE_FRAME = /^\s*at\s+(?:async\s+)?([A-Za-z_$][\w$.]{0,59})\s+\(chrome-extension:\/\//u; | ||
|
|
||
| // Every error class in this bundle ends in `Error`, as do the platform's own; `DOMException` is | ||
| // the one exception the platform makes. Letters and that suffix cannot spell a GSTIN, an ARN, or | ||
| // a URL, and a name that fails the shape degrades to `Error` rather than being laundered into one. | ||
| const BUNDLE_ERROR_NAME = /^[A-Za-z]{1,40}Error$/u; | ||
|
|
||
| function safeErrorName(name: string): string { | ||
| if (name === "DOMException") return name; | ||
| return BUNDLE_ERROR_NAME.test(name) ? name : "Error"; | ||
| } | ||
|
|
||
| export function backgroundFailureFingerprint(error: unknown): string { | ||
| if (!(error instanceof Error)) return "NonError"; | ||
| const name = safeErrorName(error.name || "Error"); | ||
| const symbol = | ||
| typeof error.stack === "string" | ||
| ? (error.stack | ||
| .split("\n") | ||
| .slice(1) | ||
| .map((line) => BUNDLE_FRAME.exec(line)?.[1]) | ||
| .find(Boolean) ?? "") | ||
| : ""; | ||
| return symbol ? `${name} at ${symbol}` : name; | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.