Repository navigation
refactor(net): give origin follow its own options - #7724
Conversation
Quest-Claim: 561726bd295c2cea
Co-Authored-By: GPT-6.1 Sol <noreply@openai.com>
Co-Authored-By: GPT-6.1 Sol <noreply@openai.com>
Co-Authored-By: GPT-6.1 Sol <noreply@openai.com>
kixelated
left a comment
There was a problem hiding this comment.
Automated review by review (OpenAI)
Reviewed commit: 8b73202
Separating the named option types clarifies their different lifecycles without changing the structurally compatible fields or runtime behavior. No actionable bugs found in this static review. I did not run TypeScript builds or tests.
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
A type-only split of the JS origin's resolve options; runtime and wire behavior are unchanged.
FollowOptionssplit fromRequestOptions—Consumer.follow,Producer.follow, andReader.follownow declareOrigin.FollowOptions, whilerequestkeepsOrigin.RequestOptions. Both are one-field interfaces (instance?: Instance.Valid), so the types stay mutually assignable and no caller annotation or object literal breaks.- Per-method field docs —
RequestOptions.instancenow documents refusing a different instance forrequest;FollowOptions.instancedocuments following one instance across gaps forfollow. Both descriptions match#resolve(path, instance, announced)atjs/net/src/origin.ts:2072, where the pin restricts to that instance's own routes and re-resolves when it returns (js/net/src/origin.ts:2039,js/net/src/origin.ts:2053). - API report regenerated —
js/net/api/index.api.mdrecords the new interface in correct alphabetical position and the three updatedfollowsignatures. - Quest housekeeping — deletes the completed
follow-optionsquest, drops itsRequiredentry from the parent README, and sizes the parent[M]. No remaining references to the deleted file.
The mirrored Rust follow/request take a positional instance, so this JS options-object split does not imply a cross-language type that needs mirroring.
deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏
|
No actionable comments were generated in the recent review. WalkthroughThe API adds Merge Risk:
|

Problem
Origin
followandrequestshareRequestOptions, so their declared options type documents two different lifecycles.Approach
Give
followits ownFollowOptionsonConsumer,Producer, and the borrowedReader/TableAPI. Document each method'sinstancepin separately and regenerate the API report. Delete the completed quest and its link, sizing the now-unblocked parent quest.Impact
followdeclaresOrigin.FollowOptions;requestkeepsOrigin.RequestOptions. Both interfaces contain onlyinstance?: Instance.Valid, so existing option objects andRequestOptionsannotations remain assignable. No migration is required. The quest's predicted annotation break does not occur with the current shapes.instanceis the only existing field andfollowconsumes it.Alternatives
A shared base plus aliases was allowed by the settled plan. Two one-field interfaces keep each field's lifecycle documentation with its method's options without introducing another type. No discovery semantics change.
Validation
quest gate just fix: regenerated the API report and built dependent packages.quest gate just ci: passed on the final head, including JavaScript checks, builds, dependent-package tests, and repository tooling checks.quest check --base origin/main: 600 documents passed.git diff --check origin/main...HEAD: passed.Review
Claude Code,
claude-opus-5-5, medium effort, round 2 reviewed8b732029c6e345c6678cec97bc0fdd92b07a0455againstorigin/main: no findings.Both round 1 findings were fixed: removed the unnecessary migration entry and breaking-change classification, and reverted the test-only annotation that added no coverage. The API report records the named signature split.
Follow-ups
None. No open decisions. Inspected the published JS origin and API hunks in moq-dev/moq#7678; they do not overlap this options split.
(Written by GPT-6.1 Sol)