Repository navigation
Let interaction-controls callers tell transient failures from rejections #1245
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
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,56 @@ | ||
| --- | ||
| links: | ||
| '#1206': https://github.com/fedify-dev/fedify/issues/1206 | ||
| '#1245': https://github.com/fedify-dev/fedify/pull/1245 | ||
| --- | ||
| - Changed the interaction control helpers to tell transient verification | ||
| failures from rejections, so that inbox listeners can retry instead of | ||
| rejecting a valid request. [[#1206], [#1245]] | ||
|
|
||
| - `verifyRequest()` now reports a failed fetch of the request's `object` | ||
| or `instrument` as `notDereferenceable` with the failed URL and the | ||
| loader's error as `cause`, instead of `missingObject` or | ||
| `missingInstrument`. Those two failures now mean that the request | ||
| really lacks the property. | ||
| - A remote JSON-LD context that cannot be loaded is now reported as | ||
| `notDereferenceable` with the context's URL instead of | ||
| `invalidJsonLd`. | ||
| - Added a `transient` property to `unverifiable` failures of | ||
| `verifyRequest()` and `verifyAuthorization()`. It is `true` for | ||
| network errors, timeouts, DNS failures, and HTTP 5xx, 408, and 429 | ||
| responses. | ||
| - The `unverifiableCollection` denial reason of `evaluatePolicy()` now | ||
| has the error thrown by `matchesApprovalCollection` as its `cause`. | ||
| Added a `collectionErrors` option; pass `"throw"` to let the error | ||
| propagate instead of denying the interaction. | ||
|
|
||
| - Added options to the interaction control helpers so that applications | ||
| with their own compatibility rules can use them without adapters. | ||
| [[#1206], [#1245]] | ||
|
|
||
| - Added `fallbackRule` and `precedence` options to `evaluatePolicy()`. | ||
| `fallbackRule` is evaluated when the subject has no rule for the | ||
| interaction, and `precedence: "automatic"` matches every | ||
| `automaticApproval` entry before any `manualApproval` entry. | ||
| - Added `resolvedInteractionTarget` and `resolvedInteractingObject` | ||
| options to `verifyRequest()`, which take already resolved objects | ||
| instead of dereferencing the request's `object` and `instrument`, and | ||
| leave the request untouched. | ||
| - Added `quoteReference`, `attribution`, and `missingAttribution` | ||
| options to `quoteInteraction.verifyRequest()` for quote posts whose | ||
| `quote` and `quoteUrl` disagree, that have several attributions, or | ||
| that have no attribution. The new `QuoteRequestValidationOptions` | ||
| type describes them. | ||
| - Added `authorizationId` and `allowOffOrigin` options to | ||
| `verifyAuthorization()`. `authorizationId` checks the ID of an | ||
| authorization given as an object, and `allowOffOrigin` lets | ||
| `verifyAuthenticity` approve an authorization whose ID is on another | ||
| origin than its attributed actor. | ||
| - Added a `contextLoader` option to `verifyRequest()` and | ||
| `verifyAuthorization()` for loading remote JSON-LD contexts | ||
| separately from objects. | ||
| - The `id` and `to` options of `createAccept()`, `createReject()`, and | ||
| `createRevocation()` are now optional. | ||
| - Added an `embedAuthorization` option to `createRevocation()`, which | ||
| embeds the authorization in the `Delete` activity with only the IDs of | ||
| its interacting object and interaction target. |
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,9 @@ | ||
| --- | ||
| links: | ||
| '#1206': https://github.com/fedify-dev/fedify/issues/1206 | ||
| '#1245': https://github.com/fedify-dev/fedify/pull/1245 | ||
| --- | ||
| - Added `isTransientFetchError()` function, which tells whether an error | ||
| thrown by a document loader is likely transient, such as a network error, | ||
| a timeout, a DNS failure, or an HTTP 5xx, 408, or 429 response, so that | ||
| applications can decide whether to retry. [[#1206], [#1245]] |
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.