Repository navigation
Conversation
Generated clone() methods do not inherit the source object's default
FEP-ef61 portable object verifier. Objects that Fedify parses for
applications, such as inbox activities and lookupObject() results, carry
ctx.verifyPortableObject as their default, so cloning them silently
turned verification off for the clone's accessors. The contract was
only mentioned in the manual.
clone() keeps its behavior, but now:
- documents the contract in its generated JSDoc, including that loaders
are not inherited either;
- logs a warning in the ["fedify", "vocab", "portable"] category when
the source has a default verifier and the call does not pass the
verifyPortableObject option. An explicit verifyPortableObject:
undefined opts out, and the option type accepts undefined so that the
opt-out also type-checks with exactOptionalPropertyTypes. The warning
is emitted only by the root class, so it fires once per call through
the subclass chain, and the options spread for $warning keeps an
inherited or non-enumerable verifyPortableObject key.
Fedify's own clone() calls no longer drop the verifier: signObject(),
autoIdAssigner(), actorDehydrator(), the key-fetching paths, and
MockFederation.receiveActivity() pass the source's default verifier on,
read through the protected _verifyPortableObject accessor, which is now
documented as an internal cross-package contract. The temporary clone
that createProof() serializes opts out explicitly.
The vocabulary and logging manuals describe the warning and how to keep
or drop the verifier.
Sacho is upgraded from 0.3.2 to 0.4.0, since 0.3.2 refuses to sync the
unreleased region of this long CHANGES.md with a spurious link-target
error ("would change a link target outside the unreleased region") as
soon as any fragment exists.
fedify-dev#1399
Assisted-by: Claude Code:claude-opus-5-5
Assisted-by: Codex:gpt-6-astra
Assisted-by: Antigravity:gemini-4-hydrogen
Assisted-by: Claude Code:claude-fable-5-2
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Codecov Report❌ Patch coverage is
... and 3 files with indirect coverage changes 🚀 New features to boost your workflow:
|
Astro 7.4.7's Rolldown binding now directly depends on @emnapi 2.0 packages and @napi-rs/wasm-runtime 1.2.6. Forcing wasm-runtime back to 1.1.6 leaves unmet @emnapi 1.x peers, so pnpm install fails. Remove the obsolete override. All five Astro compatibility cases now pass on Node.js, Deno, and Bun. Changelog: none Assisted-by: OpenCode:deepseek-flash (cherry picked from commit a042f26)
Generated
clone()methods do not inherit the source object's default FEP-ef61 portable object verifier. Objects that Fedify parses for applications, such as inbox activities andlookupObject()results, carryctx.verifyPortableObjectas their default, so cloning one silently turns verification off for the clone's accessors: they accept embedded portable objects without verifying them and refuse to dereference portable references. #1396 exposed this withnote.clone().getContextHistory(). The contract was mentioned only in one sentence of the vocabulary manual, and nothing at runtime pointed at the problem.clone()keeps its documented behavior, so this targets 2.4-maintenance; the follow-up on main that recommendsdeepClone()builds on it. The generated JSDoc now states that the clone inherits neither the verifier nor the document loaders. The root class'sclone()logs a warning in the["fedify", "vocab", "portable"]category when the source has a default verifier and the call does not pass theverifyPortableObjectoption. PassingverifyPortableObject: undefineddrops the verifier deliberately without the warning, and the option type now spells out| undefinedso that this opt-out also type-checks withexactOptionalPropertyTypes. The check looks for the key withinrather than comparing the value, and the options spread thatclone()already does for$warningkeeps an inherited or non-enumerableverifyPortableObjectkey, so the decision survives the subclass chain. Because only the root class warns, and only just before it returns, oneclone()call logs at most one warning, and a call that throws on an invalididor root property logs none. ThedeepClone()method on main always passes the key, so the warning will not fire from it after a forward port.Fedify's own
clone()calls would otherwise trigger the warning.signObject(),autoIdAssigner(),actorDehydrator(), the key-fetching paths in sig/key.ts and sig/owner.ts, andMockFederation.receiveActivity()now pass the source's default verifier on to the clone, reading it through the protected_verifyPortableObjectaccessor, which is now documented as an internal cross-package contract like_cachedJsonLd. This is a small behavior change: objects returned bysignObject()and the default activity transformers keep verifying portable objects where they used to lose the verifier. The key-fetching changes are defensive, since those keys are parsed without a verifier today.createProof()passesverifyPortableObject: undefinedfor the temporary clone it serializes.After upgrading, the warning is logged whenever an existing application clones an object that Fedify parsed for it without passing
verifyPortableObject. The changelog entry and the vocabulary manual give both remedies,verifyPortableObject: ctx.verifyPortableObjectorverifyPortableObject: undefined, and docs/manual/log.md documents the new category. The branch also raises the pinned Sacho from 0.3.2 to 0.4.0: 0.3.2 refuses to sync the unreleased region of this long CHANGES.md (“would change a link target outside the unreleased region”) as soon as any fragment exists, while 0.4.0 syncs it without the error.Fixes #1399.