Skip to content

Commit d9cdcbb

Browse files
committed
chore(sync): re-sync fleet-canonical drift blocks
Picks up the `claude_md_fleet_drift`, `oxlint_fleet_ignore_drift`, `oxfmt_fleet_ignore_drift`, and `gitattributes_fleet_drift` fixes that the prior `chore(sync): cascade fleet template@72633be` run reported as [FIXED] but didn't include in its auto-commit. Pure re-sync β€” no behavior change.
1 parent fdc1d1c commit d9cdcbb

6 files changed

Lines changed: 48 additions & 5 deletions

File tree

β€Ž.config/oxfmtrc.jsonβ€Ž

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@
7878
"**/scripts/check-paths/types.mts",
7979
"**/scripts/check-paths/walk.mts",
8080
"**/scripts/check-prompt-less-setup.mts",
81+
"**/scripts/check-soak-exclude-dates.mts",
8182
"**/scripts/fix.mts",
8283
"**/scripts/install-claude-plugins.mts",
8384
"**/scripts/install-git-hooks.mts",

β€Ž.config/oxlintrc.jsonβ€Ž

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,22 @@
11
{
22
"$schema": "https://raw.githubusercontent.com/oxc-project/oxc/main/npm/oxlint/configuration_schema.json",
3-
"plugins": ["typescript", "unicorn", "import"],
4-
"jsPlugins": ["./oxlint-plugin/index.mts"],
3+
"plugins": [
4+
"typescript",
5+
"unicorn",
6+
"import"
7+
],
8+
"jsPlugins": [
9+
"./oxlint-plugin/index.mts"
10+
],
511
"categories": {
612
"correctness": "error",
713
"suspicious": "error"
814
},
915
"rules": {
10-
"eslint/curly": ["error", "all"],
16+
"eslint/curly": [
17+
"error",
18+
"all"
19+
],
1120
"eslint/no-await-in-loop": "off",
1221
"eslint/no-console": "off",
1322
"eslint/no-control-regex": "off",
@@ -50,6 +59,7 @@
5059
"socket/no-promise-race": "error",
5160
"socket/no-promise-race-in-loop": "error",
5261
"socket/no-status-emoji": "error",
62+
"socket/no-underscore-identifier": "error",
5363
"socket/optional-explicit-undefined": "error",
5464
"socket/personal-path-placeholders": "error",
5565
"socket/prefer-async-spawn": "error",
@@ -63,6 +73,7 @@
6373
"socket/prefer-static-type-import": "error",
6474
"socket/prefer-undefined-over-null": "error",
6575
"socket/socket-api-token-env": "error",
76+
"socket/sort-boolean-chains": "error",
6677
"socket/sort-equality-disjunctions": "error",
6778
"socket/sort-named-imports": "error",
6879
"socket/sort-regex-alternations": "error",
@@ -170,6 +181,7 @@
170181
"**/scripts/check-paths/types.mts",
171182
"**/scripts/check-paths/walk.mts",
172183
"**/scripts/check-prompt-less-setup.mts",
184+
"**/scripts/check-soak-exclude-dates.mts",
173185
"**/scripts/fix.mts",
174186
"**/scripts/install-claude-plugins.mts",
175187
"**/scripts/install-git-hooks.mts",

β€Ž.gitattributesβ€Ž

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,10 @@
218218
.claude/hooks/no-token-in-dotenv-guard/package.json linguist-generated=true
219219
.claude/hooks/no-token-in-dotenv-guard/test/index.test.mts linguist-generated=true
220220
.claude/hooks/no-token-in-dotenv-guard/tsconfig.json linguist-generated=true
221+
.claude/hooks/no-underscore-identifier-guard/README.md linguist-generated=true
222+
.claude/hooks/no-underscore-identifier-guard/index.mts linguist-generated=true
223+
.claude/hooks/no-underscore-identifier-guard/package.json linguist-generated=true
224+
.claude/hooks/no-underscore-identifier-guard/tsconfig.json linguist-generated=true
221225
.claude/hooks/node-modules-staging-guard/README.md linguist-generated=true
222226
.claude/hooks/node-modules-staging-guard/index.mts linguist-generated=true
223227
.claude/hooks/node-modules-staging-guard/package.json linguist-generated=true
@@ -304,6 +308,11 @@
304308
.claude/hooks/setup-security-tools/test/setup-security-tools.test.mts linguist-generated=true
305309
.claude/hooks/setup-security-tools/test/shell-rc-bridge.test.mts linguist-generated=true
306310
.claude/hooks/setup-security-tools/tsconfig.json linguist-generated=true
311+
.claude/hooks/soak-exclude-date-annotation-guard/README.md linguist-generated=true
312+
.claude/hooks/soak-exclude-date-annotation-guard/index.mts linguist-generated=true
313+
.claude/hooks/soak-exclude-date-annotation-guard/package.json linguist-generated=true
314+
.claude/hooks/soak-exclude-date-annotation-guard/test/index.test.mts linguist-generated=true
315+
.claude/hooks/soak-exclude-date-annotation-guard/tsconfig.json linguist-generated=true
307316
.claude/hooks/stale-process-sweeper/README.md linguist-generated=true
308317
.claude/hooks/stale-process-sweeper/index.mts linguist-generated=true
309318
.claude/hooks/stale-process-sweeper/package.json linguist-generated=true
@@ -434,6 +443,7 @@
434443
.config/oxlint-plugin/rules/prefer-static-type-import.mts linguist-generated=true
435444
.config/oxlint-plugin/rules/prefer-undefined-over-null.mts linguist-generated=true
436445
.config/oxlint-plugin/rules/socket-api-token-env.mts linguist-generated=true
446+
.config/oxlint-plugin/rules/sort-boolean-chains.mts linguist-generated=true
437447
.config/oxlint-plugin/rules/sort-equality-disjunctions.mts linguist-generated=true
438448
.config/oxlint-plugin/rules/sort-named-imports.mts linguist-generated=true
439449
.config/oxlint-plugin/rules/sort-regex-alternations.mts linguist-generated=true
@@ -474,6 +484,7 @@
474484
.config/oxlint-plugin/test/prefer-static-type-import.test.mts linguist-generated=true
475485
.config/oxlint-plugin/test/prefer-undefined-over-null.test.mts linguist-generated=true
476486
.config/oxlint-plugin/test/socket-api-token-env.test.mts linguist-generated=true
487+
.config/oxlint-plugin/test/sort-boolean-chains.test.mts linguist-generated=true
477488
.config/oxlint-plugin/test/sort-equality-disjunctions.test.mts linguist-generated=true
478489
.config/oxlint-plugin/test/sort-named-imports.test.mts linguist-generated=true
479490
.config/oxlint-plugin/test/sort-regex-alternations.test.mts linguist-generated=true
@@ -559,6 +570,7 @@ scripts/check-paths/state.mts linguist-generated=true
559570
scripts/check-paths/types.mts linguist-generated=true
560571
scripts/check-paths/walk.mts linguist-generated=true
561572
scripts/check-prompt-less-setup.mts linguist-generated=true
573+
scripts/check-soak-exclude-dates.mts linguist-generated=true
562574
scripts/fix.mts linguist-generated=true
563575
scripts/install-claude-plugins.mts linguist-generated=true
564576
scripts/install-git-hooks.mts linguist-generated=true

β€ŽCLAUDE.mdβ€Ž

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,10 @@ Apply in: worktree creation, base-ref resolution for `git diff`/`git rev-list`,
6262
- **Package manager**: `pnpm`. Run scripts via `pnpm run foo --flag`, never `foo:bar`. After `package.json` edits, `pnpm install`.
6363
- 🚨 NEVER use `npx`, `pnpm dlx`, or `yarn dlx` β€” use `pnpm exec <package>` or `pnpm run <script>` # socket-hook: allow npx
6464
- 🚨 NEVER pass `--experimental-strip-types` to Node (enforced by `.claude/hooks/no-experimental-strip-types-guard/`).
65-
- **New dependencies** β€” every new dep added to `package.json` runs a Socket-score check at edit time; low-scoring deps block (enforced by `.claude/hooks/check-new-deps/`). The 7-day `minimumReleaseAge` soak is intentional malware protection; never add to `pnpm-workspace.yaml` `minimumReleaseAge.exclude[]` (bypass `Allow minimumReleaseAge bypass` for emergency CVE patches; enforced by `.claude/hooks/minimum-release-age-guard/`). Vitest `include` globs must not match `node:test` files β€” mismatched runners produce confusing "no test suite found" errors (enforced by `.claude/hooks/vitest-include-vs-node-test-guard/`).
65+
- **New dependencies** β€” every new dep added to `package.json` runs a Socket-score check at edit time; low-scoring deps block (enforced by `.claude/hooks/check-new-deps/`). The 7-day `minimumReleaseAge` soak is intentional malware protection; never add to `pnpm-workspace.yaml` `minimumReleaseAge.exclude[]` (bypass `Allow minimumReleaseAge bypass` for emergency CVE patches; enforced by `.claude/hooks/minimum-release-age-guard/`). Every per-package soak-bypass entry (the `'pkg@1.2.3'` exact-pin form) MUST carry a `# published: YYYY-MM-DD | removable: YYYY-MM-DD` annotation as the LAST comment line above the bullet β€” `published` is the version's npm publish date, `removable` is `published + 7d` so a periodic cleanup can drop entries that no longer need the bypass (enforced by `.claude/hooks/soak-exclude-date-annotation-guard/` at edit time + `scripts/check-soak-exclude-dates.mts` at commit time). Vitest `include` globs must not match `node:test` files β€” mismatched runners produce confusing "no test suite found" errors (enforced by `.claude/hooks/vitest-include-vs-node-test-guard/`).
6666
- **Bundler**: `rolldown`, NOT `esbuild`. The fleet standardizes on rolldown for direct bundling (see `template/.config/rolldown/`). Transitive esbuild deps (e.g. via vitest) are unavoidable today β€” the rule is no _new direct_ esbuild use anywhere in the fleet.
6767
- **Backward compatibility** β€” FORBIDDEN to maintain. Actively remove when encountered.
68-
- Full ruleset (packageManager field, `.config/` placement, `.mts` runners, soak time, shallow submodules, monorepo `engines.node`) in [`docs/claude.md/fleet/tooling.md`](docs/claude.md/fleet/tooling.md).
68+
- Full ruleset (packageManager field, `.config/` placement, `.mts` runners, soak time, shallow submodules, monorepo `engines.node`, `npm-run-all2` + `node --run` opt-in) in [`docs/claude.md/fleet/tooling.md`](docs/claude.md/fleet/tooling.md).
6969

7070
### Claude Code plugin pins
7171

@@ -141,6 +141,10 @@ For non-trivial work (multi-file refactor, new feature, migration), the plan its
141141

142142
Default to no comments (enforced by `.claude/hooks/no-meta-comments-guard/` for meta-labels + removed-code refs); when written, write for a junior reader. Parsers mirroring an upstream get the exception ([`docs/claude.md/fleet/parser-comments.md`](docs/claude.md/fleet/parser-comments.md)). Cross-port files (Rust↔Go↔C++↔TS acorn ports; socket-btm `temporal-infra/src/socketsecurity/temporal/*.{cc,h}` C++ port of upstream `temporal_rs` Rust crate) use `Lock-step` comments β€” `// Lock-step from <Lang>: <path>` for port provenance, `// Lock-step with <Lang>: <path>` on the canonical side, inline `// Lock-step with <Lang>: <path>:<lines>` for specific cross-refs (point up at the source-of-truth, never down at a port), and `// Lock-step note: <why>` for _deliberate_ divergence. Every member of a quadruplet also carries a byte-identical `// BEGIN LOCK-STEP HEADER` / `// END LOCK-STEP HEADER` block (single-line `// ` syntax across every language β€” no `//!` / `///` / `/** */` mixing β€” so byte-compare across the quadruplet is trivial) (full forms in [`docs/claude.md/fleet/parser-comments.md`](docs/claude.md/fleet/parser-comments.md) Β§5–7; enforced edit-time by `.claude/hooks/lock-step-ref-guard/` and CI-gate-time by `scripts/check-lock-step-refs.mts` + `scripts/check-lock-step-header.mts`; bypass: `Allow lock-step bypass`). Pointer comments (`// see X`) need both the destination and an inline one-line claim (enforced by `.claude/hooks/pointer-comment-guard/`). Heaviest invariants: no `TODO`/`FIXME`/stubs; `undefined` over `null`; `httpJson`/`httpText` from `@socketsecurity/lib/http-request` over `fetch()`; `safeDelete()` from `@socketsecurity/lib/fs` over `fs.rm`; Edit tool over `sed`/`awk`; `'CI' in process.env` presence check over truthy; `import os from 'node:os'` over named imports; `getDefaultLogger()` over `console.*` (enforced by `.claude/hooks/logger-guard/`); doc filenames `lowercase-with-hyphens.md` under `docs/` or `.claude/` (enforced by `.claude/hooks/markdown-filename-guard/`); inline `<script defer>` / `<script async>` lacking a `src=` attribute is a spec no-op β€” wrap the body in a `DOMContentLoaded` listener instead (enforced by `.claude/hooks/inline-script-defer-guard/` + the `socket/no-inline-defer-async` oxlint rule; bypass: `Allow inline-defer bypass`); ESLint/Biome config refs (`.eslintrc`, `eslint-config-*`, `biome.json`, `@biomejs/*`) are stale β€” the fleet runs oxlint/oxfmt (enforced by the `socket/no-eslint-biome-config-ref` oxlint rule). Full ruleset (object literals, imports, subprocesses, file existence, generated reports, sorting, Promise.race, Safe suffix, `node:smol-*`, inclusive language) in [`docs/claude.md/fleet/code-style.md`](docs/claude.md/fleet/code-style.md). See also [`docs/claude.md/fleet/sorting.md`](docs/claude.md/fleet/sorting.md) and [`docs/claude.md/fleet/inclusive-language.md`](docs/claude.md/fleet/inclusive-language.md).
143143

144+
### No underscore-prefixed identifiers
145+
146+
🚨 Never prefix an **identifier** (function, variable, type, export) with `_` β€” patterns like `_resetX`, `_cache`, `_doFoo`, `_internal` are banned at the symbol level. Privacy in TS is handled by module boundaries (not exporting) or by `_internal/` _directory_ layout; the underscore-as-internal-marker convention from other languages adds noise without enforcement. Exporting "internal" helpers is fine and explicitly preferred β€” easier to unit-test. **Exception:** the directory name `_internal/` is allowed (and is the documented way to signal module-private files); the rule is about identifiers inside files, not folder layout (enforced by `.claude/hooks/no-underscore-identifier-guard/` + the `socket/no-underscore-identifier` oxlint rule; bypass: `Allow underscore-identifier bypass`).
147+
144148
### File size
145149

146150
Soft cap **500 lines**, hard cap **1000 lines** per source file. Past those, split along natural seams β€” group by domain, not line count; name files for what's in them; co-locate helpers with consumers. Exceptions: a single function that legitimately needs the space (note it inline), or a generated artifact. Full playbook in [`docs/claude.md/fleet/file-size.md`](docs/claude.md/fleet/file-size.md).

β€Žpnpm-lock.yamlβ€Ž

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

β€Žpnpm-workspace.yamlβ€Ž

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ catalog:
100100
minimatch: 9.0.5
101101
normalize-package-data: 8.0.0
102102
npm-package-arg: 13.0.0
103+
'npm-run-all2': 9.0.0
103104
out-url: 1.2.2
104105
'oxfmt': 0.48.0
105106
'oxlint': 1.63.0
@@ -139,6 +140,7 @@ minimumReleaseAgeExclude:
139140
# Network-mocking lib used in fleet test suites. v15 betas pre-date
140141
# npm's `time` field for the major; allow pinned beta until v15 GA.
141142
- 'nock@15.0.0-beta.11'
143+
- 'npm-run-all2@9.0.0'
142144

143145
# Refuse transitive dependencies declared via git/tarball/local-tarball
144146
# specs β€” an npm package shouldn't be allowed to drag in a git URL we

0 commit comments

Comments
Β (0)