feat(http)!: remove streamRequest in 0.4.0 — closes queue #64 + supersedes PR #86#87
Open
Goosterhof wants to merge 3 commits into
Open
feat(http)!: remove streamRequest in 0.4.0 — closes queue #64 + supersedes PR #86#87Goosterhof wants to merge 3 commits into
Goosterhof wants to merge 3 commits into
Conversation
Removes streamRequest entirely: source, type signature, tests, docs. Closes enforcement queue #64 (XSRF bypass) and the streamRequest portion of queue #22 in one structural stroke; also closes Surveyor M3 findings F-1 (headers ignored) and F-2 (timeout ignored). Supersedes PR #86. streamRequest was a parallel transport built on native fetch that bypassed the option-honoring discipline the axios-routed methods inherit from axios.create(). Four documented library-invariant violations had accumulated on its option-honor surface (headers, withXSRFToken, withCredentials — withCredentials was fixed in 0.3.0, the others remained). Zero realized consumers across the war-room fleet (Engineer + Sapper M3 + Liaison M3 grep convergence) — every per-defect fix was a band-aid on a parallel- transport divergence. Removal closes all four queue rows. Mock objects in fs-loading and fs-cached-adapter-store tests dropped their streamRequest: vi.fn() entries to keep the HttpService type contract honest. The docs page download/preview API Reference rows were corrected to the 0.3.0 signature in the same pass (Warden M2 standing drift). Surveyor M3 field report: reports/fs-packages/field/2026-05-15-surveyor-library-config-honor-surface-audit.md Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Pre-1.0 caret semver treats every minor bump as breaking, so the structural removal of streamRequest requires: - fs-http 0.3.0 → 0.4.0 (breaking removal) - fs-loading 0.1.2 → 0.1.3 + peer range widened to include ^0.4.0 - fs-adapter-store 0.1.6 → 0.1.7 + peer range widened to include ^0.4.0 - fs-cached-adapter-store 0.1.0 → 0.1.1 + peer range widened to include ^0.4.0 Lockfile regenerated; every node_modules/@script-development/* resolves to the workspace (link: true). No nested registry copies. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…tions Codifies the audit checklist for any future fs-http transport addition: every transport method must inherit option-honoring from axios.create(), or explicitly document and test each HttpServiceOptions cell as HONORED or N/A-by-construction. The Library-Config-Honor Surface Audit (Sapper M3 + Surveyor M3 convergent, 2026-05-15) is the standing checklist. Precedent: streamRequest violated this rule on four axes and was removed in 0.4.0 with zero realized consumer impact (this PR). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Deploying fs-packages with
|
| Latest commit: |
e2e91a9
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://f1ae5624.fs-packages.pages.dev |
| Branch Preview URL: | https://engineer-streamrequest-remov.fs-packages.pages.dev |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Removes
streamRequestentirely from@script-development/fs-http's public API in version0.4.0. This structural close supersedes PR #86 (queue #64 in-place fix-shape) — Commander dispositioned 2026-05-15 that removal is the right answer once Surveyor M3 evidence converged with the queue #64 + queue #22 stream-portion findings into a four-defect picture against a zero-consumer surface.The four documented library-invariant violations on the removed surface
All shared the same root cause:
streamRequestwas a parallel transport built directly on nativefetch, bypassing the option-honoring discipline that the axios-routed methods inherit for free fromaxios.create().withXSRFTokennot honored uniformly across transport paths; streamRequest was the divergent path.streamRequestreaddocument.cookieforXSRF-TOKENand emittedX-XSRF-TOKENunconditionally, ignoringoptions?.withXSRFToken.streamRequest × headersIGNORED. Service-wideoptions?.headerssilently dropped; no per-call override surface.streamRequest × timeoutIGNORED. Doctrine feat: add @script-development/fs-adapter-store package #8 silently bypassed on the streaming path. Overlaps queue feat(fs-http)!: remove DOM coupling from download/preview (0.3.0) — closes #59 #62 (AbortSignal absence).Every per-defect fix would have been a band-aid on a parallel-transport divergence; the next refactor that added a new transport would reproduce the same gap class.
Zero realized consumer evidence
reports/fs-packages/field/2026-05-15-sapper-m3-staleness-refresh.md).reports/fs-packages/field/2026-05-15-liaison-m3-staleness-refresh.md) — no consumer territory passes data tostreamRequest.Three-spy grep convergence: the function had zero production call-sites across the entire war-room consumer fleet.
Cross-references
reports/fs-packages/field/2026-05-15-surveyor-library-config-honor-surface-audit.md.Replacement guidance
If a future streaming use case emerges in a consumer territory, prefer either:
responseType: 'stream'via the standardgetRequest/postRequestmethods — inherits allHttpServiceOptions(headers, withCredentials, withXSRFToken, smartCredentials, timeout) and the per-callAxiosRequestConfigoverride surface for free.createStreamHttpServicefactory designed against the option-honoring matrix codified in fs-packagesCLAUDE.md§ Conventions (this PR adds the "Transport-surface discipline" bullet). Such a factory must enumerate everyHttpServiceOptionsfield on day one with a corresponding test pinning each cell as HONORED or N/A-by-construction.Changes
streamRequestremoved frompackages/http/src/http.ts(the function body + the registration entry in the returned service object). TheapiUrllocal remains — still used byaxios.create({baseURL})and the smartCredentials middleware.streamRequestmethod signature removed fromHttpServiceinpackages/http/src/types.ts. No helper type existed solely for it.describe('streamRequest', ...)block removed frompackages/http/tests/http.spec.ts(8 tests). ThestreamRequesttoHaveProperty assertion removed from the factory-creation expectation. The top-of-filedocument.cookieandfetchglobal stubs removed (only streamRequest exercised them).streamRequest: vi.fn()entries dropped frompackages/loading/tests/middleware.spec.tsandpackages/cached-adapter-store/tests/cached-adapter-store.spec.ts— both usedHttpServicetyping on their fakes and would have failed typecheck after the signature removal.docs/packages/http.mdand replaced with a deprecation-note callout pointing at the CHANGELOG. README's streamRequest bullet dropped. The download/preview API Reference rows in both surfaces also corrected to the current 0.3.0 signature ((endpoint, options?) → Promise<AxiosResponse<Blob>>) — caught the Warden M2 standing drift in the same pass.## 0.4.0 — 2026-05-15section with the breaking-removal record and replacement guidance.Version cascade (pre-1.0 caret semver)
fs-http0.3.0 → 0.4.0 (breaking removal)fs-loading0.1.2 → 0.1.3 — peer range widened to^0.1.0 || ^0.2.0 || ^0.3.0 || ^0.4.0fs-adapter-store0.1.6 → 0.1.7 — same peer-range wideningfs-cached-adapter-store0.1.0 → 0.1.1 — same peer-range wideningLockfile regenerated; every
node_modules/@script-development/*resolves to the workspace (link: true). No nested registry copies.CLAUDE.md doctrine
A new bullet under
## Conventionscodifies the "Transport-surface discipline" rule — every fs-http transport method must inherit option-honoring fromaxios.create(), or explicitly enumerate and honor everyHttpServiceOptionsfield with a test pinning each cell as HONORED or N/A-by-construction. The streamRequest removal is the precedent record.Verification (all 8 gates, locally)
npm auditnpm run format:checknpm run lintnpm run buildnpm run typechecknpm run lint:pkgsideEffectsSuggestion across all 11 packages, blanket-fails the wrapper from queue #31. Identical posture to currentmain. Out-of-scope for this PR; flagged in execution report for follow-up Armorer.npm run test:coveragenpx stryker run(per package)main); fs-loading 92.50%; fs-adapter-store 100%; fs-cached-adapter-store 94.81%. All ≥90%; no new survivors introduced by this PR.Out of scope
withXSRFTokendefault-flip deliberation — separate open General disposition; this PR closes only the streamRequest portion.^0.4.0retargeting) — separate dispatch in lockstep with this PR.