Skip to content

Commit 7fa596c

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 19fb746 commit 7fa596c

6 files changed

Lines changed: 36 additions & 2 deletions

File tree

.config/oxfmtrc.json

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

.config/oxlintrc.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@
5858
"socket/no-promise-race": "error",
5959
"socket/no-promise-race-in-loop": "error",
6060
"socket/no-status-emoji": "error",
61+
"socket/no-underscore-identifier": "error",
6162
"socket/optional-explicit-undefined": "error",
6263
"socket/personal-path-placeholders": "error",
6364
"socket/prefer-async-spawn": "error",
@@ -71,6 +72,7 @@
7172
"socket/prefer-static-type-import": "error",
7273
"socket/prefer-undefined-over-null": "error",
7374
"socket/socket-api-token-env": "error",
75+
"socket/sort-boolean-chains": "error",
7476
"socket/sort-equality-disjunctions": "error",
7577
"socket/sort-named-imports": "error",
7678
"socket/sort-regex-alternations": "error",
@@ -151,6 +153,7 @@
151153
"**/scripts/check-paths/types.mts",
152154
"**/scripts/check-paths/walk.mts",
153155
"**/scripts/check-prompt-less-setup.mts",
156+
"**/scripts/check-soak-exclude-dates.mts",
154157
"**/scripts/fix.mts",
155158
"**/scripts/install-claude-plugins.mts",
156159
"**/scripts/install-git-hooks.mts",

.gitattributes

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,10 @@ pnpm-lock.yaml -diff
253253
.claude/hooks/no-token-in-dotenv-guard/package.json linguist-generated=true
254254
.claude/hooks/no-token-in-dotenv-guard/test/index.test.mts linguist-generated=true
255255
.claude/hooks/no-token-in-dotenv-guard/tsconfig.json linguist-generated=true
256+
.claude/hooks/no-underscore-identifier-guard/README.md linguist-generated=true
257+
.claude/hooks/no-underscore-identifier-guard/index.mts linguist-generated=true
258+
.claude/hooks/no-underscore-identifier-guard/package.json linguist-generated=true
259+
.claude/hooks/no-underscore-identifier-guard/tsconfig.json linguist-generated=true
256260
.claude/hooks/node-modules-staging-guard/README.md linguist-generated=true
257261
.claude/hooks/node-modules-staging-guard/index.mts linguist-generated=true
258262
.claude/hooks/node-modules-staging-guard/package.json linguist-generated=true
@@ -339,6 +343,11 @@ pnpm-lock.yaml -diff
339343
.claude/hooks/setup-security-tools/test/setup-security-tools.test.mts linguist-generated=true
340344
.claude/hooks/setup-security-tools/test/shell-rc-bridge.test.mts linguist-generated=true
341345
.claude/hooks/setup-security-tools/tsconfig.json linguist-generated=true
346+
.claude/hooks/soak-exclude-date-annotation-guard/README.md linguist-generated=true
347+
.claude/hooks/soak-exclude-date-annotation-guard/index.mts linguist-generated=true
348+
.claude/hooks/soak-exclude-date-annotation-guard/package.json linguist-generated=true
349+
.claude/hooks/soak-exclude-date-annotation-guard/test/index.test.mts linguist-generated=true
350+
.claude/hooks/soak-exclude-date-annotation-guard/tsconfig.json linguist-generated=true
342351
.claude/hooks/stale-process-sweeper/README.md linguist-generated=true
343352
.claude/hooks/stale-process-sweeper/index.mts linguist-generated=true
344353
.claude/hooks/stale-process-sweeper/package.json linguist-generated=true
@@ -469,6 +478,7 @@ pnpm-lock.yaml -diff
469478
.config/oxlint-plugin/rules/prefer-static-type-import.mts linguist-generated=true
470479
.config/oxlint-plugin/rules/prefer-undefined-over-null.mts linguist-generated=true
471480
.config/oxlint-plugin/rules/socket-api-token-env.mts linguist-generated=true
481+
.config/oxlint-plugin/rules/sort-boolean-chains.mts linguist-generated=true
472482
.config/oxlint-plugin/rules/sort-equality-disjunctions.mts linguist-generated=true
473483
.config/oxlint-plugin/rules/sort-named-imports.mts linguist-generated=true
474484
.config/oxlint-plugin/rules/sort-regex-alternations.mts linguist-generated=true
@@ -509,6 +519,7 @@ pnpm-lock.yaml -diff
509519
.config/oxlint-plugin/test/prefer-static-type-import.test.mts linguist-generated=true
510520
.config/oxlint-plugin/test/prefer-undefined-over-null.test.mts linguist-generated=true
511521
.config/oxlint-plugin/test/socket-api-token-env.test.mts linguist-generated=true
522+
.config/oxlint-plugin/test/sort-boolean-chains.test.mts linguist-generated=true
512523
.config/oxlint-plugin/test/sort-equality-disjunctions.test.mts linguist-generated=true
513524
.config/oxlint-plugin/test/sort-named-imports.test.mts linguist-generated=true
514525
.config/oxlint-plugin/test/sort-regex-alternations.test.mts linguist-generated=true
@@ -594,6 +605,7 @@ scripts/check-paths/state.mts linguist-generated=true
594605
scripts/check-paths/types.mts linguist-generated=true
595606
scripts/check-paths/walk.mts linguist-generated=true
596607
scripts/check-prompt-less-setup.mts linguist-generated=true
608+
scripts/check-soak-exclude-dates.mts linguist-generated=true
597609
scripts/fix.mts linguist-generated=true
598610
scripts/install-claude-plugins.mts linguist-generated=true
599611
scripts/install-git-hooks.mts linguist-generated=true

CLAUDE.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,10 @@ Apply in: worktree creation, base-ref resolution for `git diff`/`git rev-list`,
7777
- **Package manager**: `pnpm`. Run scripts via `pnpm run foo --flag`, never `foo:bar`. After `package.json` edits, `pnpm install`.
7878
- 🚨 NEVER use `npx`, `pnpm dlx`, or `yarn dlx` — use `pnpm exec <package>` or `pnpm run <script>` # socket-hook: allow npx
7979
- 🚨 NEVER pass `--experimental-strip-types` to Node (enforced by `.claude/hooks/no-experimental-strip-types-guard/`).
80-
- **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/`).
80+
- **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/`).
8181
- **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.
8282
- **Backward compatibility** — FORBIDDEN to maintain. Actively remove when encountered.
83-
- 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).
83+
- 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).
8484

8585
### Claude Code plugin pins
8686

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

157157
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).
158158

159+
### No underscore-prefixed identifiers
160+
161+
🚨 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`).
162+
159163
### File size
160164

161165
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
@@ -26,6 +26,7 @@ catalog:
2626
husky: 9.1.7
2727
'mdast-util-from-markdown': 2.0.3
2828
'micromark': 4.0.2
29+
'npm-run-all2': 9.0.0
2930
oxfmt: 0.37.0
3031
oxlint: 1.52.0
3132
taze: 19.9.2
@@ -54,6 +55,7 @@ minimumReleaseAgeExclude:
5455
# Network-mocking lib used in fleet test suites. v15 betas pre-date
5556
# npm's `time` field for the major; allow pinned beta until v15 GA.
5657
- 'nock@15.0.0-beta.11'
58+
- 'npm-run-all2@9.0.0'
5759

5860
pmOnFail: error
5961
resolutionMode: highest

0 commit comments

Comments
 (0)