Skip to content

Commit 9fa4238

Browse files
committed
chore(wheelhouse): cascade template@d9ab7d2f
Auto-applied by socket-wheelhouse sync-scaffolding into socket-bin. 30 file(s) touched: - .claude/hooks/fleet/no-disable-lint-rule-guard/README.md - .claude/hooks/fleet/vitest-include-vs-node-test-guard/README.md - .claude/hooks/fleet/vitest-include-vs-node-test-guard/index.mts - .claude/skills/fleet/_shared/scripts/resolve-tools.mts - .claude/skills/fleet/scanning-quality/scans/bundle-trim.md - .claude/skills/fleet/scanning-quality/scans/deadcode-removal.md - .claude/skills/fleet/trimming-bundle/SKILL.md - .config/fleet/.markdownlint-cli2.jsonc - .config/fleet/oxlint-plugin/index.mts - .config/fleet/oxlint-plugin/rules/inclusive-language.mts - .config/fleet/oxlint-plugin/rules/max-file-lines.mts - .config/fleet/oxlint-plugin/rules/prefer-async-spawn.mts - .config/fleet/oxlint-plugin/rules/prefer-spawn-over-execsync.mts - .config/fleet/sfw-bypass-list.txt - .config/fleet/taze.config.mts - .config/fleet/tsconfig.base.json - .config/fleet/vitest.coverage.fleet.config.mts - .config/repo/rolldown/define-guarded.mts - .config/repo/rolldown/lib-stub.mts - .config/socket-registry-pins.json ... and 10 more
1 parent 10a82c8 commit 9fa4238

30 files changed

Lines changed: 734 additions & 78 deletions

.claude/hooks/fleet/no-disable-lint-rule-guard/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Lint rules catch real classes of bug or style drift. Disabling a rule globally w
1010

1111
Block examples:
1212

13-
- Adding `"socket/foo": "off"` to `.config/oxlintrc.json`
13+
- Adding `"socket/foo": "off"` to `.config/fleet/oxlintrc.json`
1414
- Adding `"no-console": "warn"` to `.eslintrc.json`
1515
- Writing a new lint config file that already contains rule disables
1616

.claude/hooks/fleet/vitest-include-vs-node-test-guard/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ the vitest config.
3939

4040
## Detection
4141

42-
Reads `.config/vitest.config.mts` (or the standard fleet alternatives),
42+
Reads `.config/repo/vitest.config.mts` (or the standard fleet alternatives),
4343
parses the `include: [...]` literal array, converts each glob to a regex,
4444
and tests the target file's repo-relative path. Fails open if the config
4545
isn't found or the include globs aren't string literals (dynamic includes

.claude/hooks/fleet/vitest-include-vs-node-test-guard/index.mts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
// - Fires on Write/Edit operations whose target file path imports
1212
// `node:test`.
1313
// - Reads the repo's `vitest.config.*` from the standard fleet locations
14-
// (`.config/vitest.config.mts`, `vitest.config.mts/mjs/ts/js`, or the
14+
// (`.config/repo/vitest.config.mts`, `vitest.config.mts/mjs/ts/js`, or the
1515
// `template/.config/` mirror for wheelhouse).
1616
// - Parses the config's `include` globs (string-literal extraction; if
1717
// the config uses dynamic globs, we fail open).
@@ -40,7 +40,7 @@ const BYPASS_PHRASE = 'Allow node-test-in-vitest-include bypass'
4040

4141
// Standard fleet vitest config locations, checked in order.
4242
const VITEST_CONFIG_CANDIDATES = [
43-
'.config/vitest.config.mts',
43+
'.config/repo/vitest.config.mts',
4444
'.config/vitest.config.mjs',
4545
'.config/vitest.config.ts',
4646
'.config/vitest.config.js',

.claude/skills/fleet/_shared/scripts/resolve-tools.mts

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.claude/skills/fleet/scanning-quality/scans/bundle-trim.md

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.claude/skills/fleet/scanning-quality/scans/deadcode-removal.md

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.claude/skills/fleet/trimming-bundle/SKILL.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ allowed-tools: Read, Edit, Grep, Glob, AskUserQuestion, Bash(pnpm:*), Bash(node:
77

88
# trimming-bundle
99

10-
Iteratively stub heavyweight modules that the bundler statically pulls in but the runtime never reaches. Apply on repos that ship a built bundle. Today: rolldown only (socket-packageurl-js, socket-sdk-js; any repo with `.config/rolldown.config.mts`). The skill is named generically because the dead-path-stubbing pattern applies to any bundler; today the only fleet bundler is rolldown.
10+
Iteratively stub heavyweight modules that the bundler statically pulls in but the runtime never reaches. Apply on repos that ship a built bundle. Today: rolldown only (socket-packageurl-js, socket-sdk-js; any repo with `.config/repo/rolldown.config.mts`). The skill is named generically because the dead-path-stubbing pattern applies to any bundler; today the only fleet bundler is rolldown.
1111

1212
## When to invoke
1313

@@ -18,19 +18,19 @@ Iteratively stub heavyweight modules that the bundler statically pulls in but th
1818

1919
## Skip when
2020

21-
- The repo doesn't build a rolldown bundle (no `.config/rolldown.config.mts`).
21+
- The repo doesn't build a rolldown bundle (no `.config/repo/rolldown.config.mts`).
2222
- The bundle is consumed by code that uses dynamic feature detection (rare; flagged by the rolldown plugin's `moduleSideEffects: false` annotation).
2323
- Tests aren't running (`pnpm test` fails before any trim). Fix tests first; trim depends on the test signal.
2424

2525
## Required: rolldown/lib-stub.mts
2626

27-
🚨 This skill **REQUIRES** `.config/rolldown/lib-stub.mts` to be present and to export `createLibStubPlugin`. The file is fleet-canonical (cascades from `socket-wheelhouse/template/.config/rolldown/lib-stub.mts` via sync-scaffolding) and must NOT be edited locally per the no-fleet-fork rule.
27+
🚨 This skill **REQUIRES** `.config/repo/rolldown/lib-stub.mts` to be present and to export `createLibStubPlugin`. The file is fleet-canonical (cascades from `socket-wheelhouse/template/.config/rolldown/lib-stub.mts` via sync-scaffolding) and must NOT be edited locally per the no-fleet-fork rule.
2828

2929
Before doing anything else:
3030

3131
```bash
32-
[ -f .config/rolldown/lib-stub.mts ] || {
33-
echo "ERROR: .config/rolldown/lib-stub.mts is missing."
32+
[ -f .config/repo/rolldown/lib-stub.mts ] || {
33+
echo "ERROR: .config/repo/rolldown/lib-stub.mts is missing."
3434
echo "Cascade it from socket-wheelhouse:"
3535
echo " cd /Users/<user>/projects/socket-wheelhouse &&" # socket-hook: allow cross-repo
3636
echo " node scripts/sync-scaffolding/cli.mts --target <this-repo> --fix"
@@ -43,8 +43,8 @@ If the file is missing, STOP and run the cascade. Do NOT inline a copy of the pl
4343
Verify the rolldown config imports it:
4444

4545
```bash
46-
grep -q "createLibStubPlugin" .config/rolldown.config.mts || {
47-
echo "ERROR: .config/rolldown.config.mts doesn't import createLibStubPlugin."
46+
grep -q "createLibStubPlugin" .config/repo/rolldown.config.mts || {
47+
echo "ERROR: .config/repo/rolldown.config.mts doesn't import createLibStubPlugin."
4848
echo "Add: import { createLibStubPlugin } from './rolldown/lib-stub.mts'"
4949
echo "And: plugins: [createLibStubPlugin({ stubPattern: /...regex.../ })]"
5050
exit 1
@@ -54,7 +54,7 @@ grep -q "createLibStubPlugin" .config/rolldown.config.mts || {
5454
## Inputs
5555

5656
- `dist/`: the most recent build output (run `pnpm build` first if missing or stale).
57-
- `.config/rolldown.config.mts`: already imports `createLibStubPlugin` from `.config/rolldown/lib-stub.mts` (fleet-canonical; cascaded via sync-scaffolding).
57+
- `.config/repo/rolldown.config.mts`: already imports `createLibStubPlugin` from `.config/repo/rolldown/lib-stub.mts` (fleet-canonical; cascaded via sync-scaffolding).
5858
- `pnpm test`: must pass at start; the trim loop's signal is "tests still pass after stub."
5959

6060
## Process
@@ -112,7 +112,7 @@ If any of these find a hit, the candidate is reachable; skip it. Only candidates
112112

113113
### Phase 4: Stub one candidate
114114

115-
Edit `.config/rolldown.config.mts` to extend the `stubPattern` regex:
115+
Edit `.config/repo/rolldown.config.mts` to extend the `stubPattern` regex:
116116

117117
```ts
118118
const stubPattern = /(?:globs|sorts|<new-candidate>)\.js$/
@@ -153,15 +153,15 @@ All four must pass before committing.
153153
### Phase 7: Commit
154154

155155
```bash
156-
git add .config/rolldown.config.mts
156+
git add .config/repo/rolldown.config.mts
157157
git commit -m "perf(bundle): stub <N> unused lib internals (<size> saved)"
158158
```
159159

160160
The commit message states the count + size delta. If the trim is significant (say >50KB), also update `docs/rolldown-migration.md` with the new baseline.
161161

162162
## Reference
163163

164-
- `.config/rolldown/lib-stub.mts`: fleet-canonical plugin (cascade via sync-scaffolding; never edit locally per the no-fleet-fork rule).
164+
- `.config/repo/rolldown/lib-stub.mts`: fleet-canonical plugin (cascade via sync-scaffolding; never edit locally per the no-fleet-fork rule).
165165
- `docs/rolldown-migration.md`: repo-specific (in repos that ran the migration). Records baseline numbers from before/after the esbuild → rolldown switch.
166166
- `socket-packageurl-js/.config/rolldown.config.mts`: the worked example of `createLibStubPlugin` use, with a populated `stubPattern`.
167167

.config/fleet/.markdownlint-cli2.jsonc

Lines changed: 58 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.config/fleet/oxlint-plugin/index.mts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
* Why a plugin instead of a separate scanner: oxlint's native plugin surface
55
* integrates with the existing `pnpm run lint` pipeline, inherits oxlint's
66
* AST + sourcemap + fix-application machinery, and keeps the rule set
7-
* discoverable via `oxlint --rules`. Wiring: `.config/oxlintrc.json` adds
8-
* this plugin via `jsPlugins: ["./oxlint-plugin/index.mts"]` and enables
7+
* discoverable via `oxlint --rules`. Wiring: `.config/fleet/oxlintrc.json`
8+
* adds this plugin via `jsPlugins: ["./oxlint-plugin/index.mts"]` and enables
99
* rules under the `socket/` namespace.
1010
*/
1111

.config/fleet/oxlint-plugin/rules/inclusive-language.mts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@
1818
* Allowed exceptions (skipped — no report, no fix):
1919
* - Third-party API field references: comment with `inclusive-language:
2020
* external-api` adjacent to the line.
21-
* - Vendored / fixture paths: handled at the .config/oxlintrc.json
21+
* - Vendored / fixture paths: handled at the .config/fleet/oxlintrc.json
2222
* ignorePatterns level; this rule trusts the include set.
2323
* - The literal phrase "main / primary" / etc. inside a doc that spells out the
2424
* substitution table — handled by the
2525
* `docs/references/inclusive-language.md` ignore pattern in
26-
* .config/oxlintrc.json (caller adds the override).
26+
* .config/fleet/oxlintrc.json (caller adds the override).
2727
*/
2828

2929
// [legacyStem, replacementStem]. The detector matches the stem

0 commit comments

Comments
 (0)