Skip to content

Commit 66630fa

Browse files
Goosterhofclaude
andcommitted
docs(fs-packages): add transport-surface discipline rule under Conventions
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>
1 parent ff1688a commit 66630fa

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

CLAUDE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ Consumer territories must apply per-call timeouts at instantiation OR rely on th
5454
- **Test environment:** Browser-dependent tests use `// @vitest-environment happy-dom` file-level comments.
5555
- **Identical build config:** All packages share the same `tsdown.config.ts` structure.
5656
- **No direct axios imports in dependent packages.** Route `AxiosResponse` / `AxiosRequestConfig` / sibling types through `fs-http`'s re-exports (e.g. `Parameters<ResponseMiddlewareFunc>[0]` for response types). Direct `import type {AxiosResponse} from 'axios'` breaks rolldown's `d.cts` emission on dual-bundle packages — caught during `fs-cached-adapter-store` scaffold 2026-05-13.
57+
- **Transport-surface discipline.** Every `fs-http` transport method must inherit option-honoring from the `axios.create()` instance. Adding a new transport path that uses native `fetch` (or any non-axios transport) requires a deliberate audit against the full `HttpServiceOptions` matrix — `headers`, `withCredentials`, `withXSRFToken`, `smartCredentials`, `timeout`, plus the per-call `AxiosRequestConfig` override surface. The Library-Config-Honor Surface Audit (Sapper M3 + Surveyor M3, 2026-05-15) is the standing checklist. The pre-1.0 `streamRequest` function violated this rule on four axes (queue #22 streamRequest portion + queue #64 XSRF + Surveyor M3 F-1 headers + F-2 timeout) and was removed in 0.4.0 with zero realized consumer impact. If a future streaming use case emerges, the right design is either axios's `responseType: 'stream'` mode via the standard methods (inherits all options for free) or a deliberate `createStreamHttpService` factory designed against the option-honoring matrix from the start — not a re-add of an axios-bypassing transport.
5758

5859
### Internal Dependency Coordination
5960

0 commit comments

Comments
 (0)