Skip to content

Commit d5ca84c

Browse files
committed
chore(sync): apply remaining canonical fleet drift fixes
1 parent 7ff14d0 commit d5ca84c

6 files changed

Lines changed: 164 additions & 46 deletions

File tree

.config/oxfmtrc.json

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,56 @@
5555
"**/.pnpm-store/**",
5656
"**/vendor/**",
5757
"**/wasm_exec.js",
58+
"**/.config/lockstep.schema.json",
59+
"**/.config/socket-registry-pins.json",
60+
"**/.config/socket-wheelhouse-schema.json",
61+
"**/.config/taze.config.mts",
62+
"**/.config/tsconfig.base.json",
63+
"**/packages/build-infra/lib/release-checksums/consumer.mts",
64+
"**/packages/build-infra/lib/release-checksums/core.mts",
65+
"**/packages/build-infra/lib/release-checksums/producer.mts",
66+
"**/packages/build-infra/release-assets.schema.json",
67+
"**/scripts/ai-lint-fix.mts",
68+
"**/scripts/ai-lint-fix/cli.mts",
69+
"**/scripts/ai-lint-fix/rule-guidance.mts",
70+
"**/scripts/check-paths.mts",
71+
"**/scripts/check-paths/allowlist.mts",
72+
"**/scripts/check-paths/cli.mts",
73+
"**/scripts/check-paths/exempt.mts",
74+
"**/scripts/check-paths/rules.mts",
75+
"**/scripts/check-paths/scan-code.mts",
76+
"**/scripts/check-paths/scan-script.mts",
77+
"**/scripts/check-paths/scan-workflow.mts",
78+
"**/scripts/check-paths/state.mts",
79+
"**/scripts/check-paths/types.mts",
80+
"**/scripts/check-paths/walk.mts",
81+
"**/scripts/check-prompt-less-setup.mts",
82+
"**/scripts/fix.mts",
83+
"**/scripts/install-git-hooks.mts",
84+
"**/scripts/install-sfw.mts",
85+
"**/scripts/lint-github-settings.mts",
86+
"**/scripts/lockstep-emit-schema.mts",
87+
"**/scripts/lockstep-schema.mts",
88+
"**/scripts/lockstep.mts",
89+
"**/scripts/lockstep/checks.mts",
90+
"**/scripts/lockstep/cli.mts",
91+
"**/scripts/lockstep/emit-schema.mts",
92+
"**/scripts/lockstep/git.mts",
93+
"**/scripts/lockstep/manifest.mts",
94+
"**/scripts/lockstep/report.mts",
95+
"**/scripts/lockstep/scan.mts",
96+
"**/scripts/lockstep/schema.mts",
97+
"**/scripts/lockstep/types.mts",
98+
"**/scripts/power-state.mts",
99+
"**/scripts/security.mts",
100+
"**/scripts/socket-wheelhouse-emit-schema.mts",
101+
"**/scripts/socket-wheelhouse-schema.mts",
102+
"**/scripts/test/install-git-hooks.test.mts",
103+
"**/scripts/update.mts",
104+
"**/scripts/validate-bundle-deps.mts",
105+
"**/scripts/validate-config-paths.mts",
106+
"**/scripts/validate-esbuild-minify.mts",
107+
"**/scripts/validate-file-size.mts",
58108
"#fleet-canonical-end"
59109
]
60110
}

.config/oxlintrc.json

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
"socket/export-top-level-functions": "error",
3636
"socket/inclusive-language": "error",
3737
"socket/max-file-lines": "error",
38+
"socket/no-cached-for-on-iterable": "error",
3839
"socket/no-console-prefer-logger": "error",
3940
"socket/no-default-export": "error",
4041
"socket/no-dynamic-import-outside-bundle": "error",
@@ -119,6 +120,56 @@
119120
"**/.pnpm-store/**",
120121
"**/vendor/**",
121122
"**/wasm_exec.js",
123+
"**/.config/lockstep.schema.json",
124+
"**/.config/socket-registry-pins.json",
125+
"**/.config/socket-wheelhouse-schema.json",
126+
"**/.config/taze.config.mts",
127+
"**/.config/tsconfig.base.json",
128+
"**/packages/build-infra/lib/release-checksums/consumer.mts",
129+
"**/packages/build-infra/lib/release-checksums/core.mts",
130+
"**/packages/build-infra/lib/release-checksums/producer.mts",
131+
"**/packages/build-infra/release-assets.schema.json",
132+
"**/scripts/ai-lint-fix.mts",
133+
"**/scripts/ai-lint-fix/cli.mts",
134+
"**/scripts/ai-lint-fix/rule-guidance.mts",
135+
"**/scripts/check-paths.mts",
136+
"**/scripts/check-paths/allowlist.mts",
137+
"**/scripts/check-paths/cli.mts",
138+
"**/scripts/check-paths/exempt.mts",
139+
"**/scripts/check-paths/rules.mts",
140+
"**/scripts/check-paths/scan-code.mts",
141+
"**/scripts/check-paths/scan-script.mts",
142+
"**/scripts/check-paths/scan-workflow.mts",
143+
"**/scripts/check-paths/state.mts",
144+
"**/scripts/check-paths/types.mts",
145+
"**/scripts/check-paths/walk.mts",
146+
"**/scripts/check-prompt-less-setup.mts",
147+
"**/scripts/fix.mts",
148+
"**/scripts/install-git-hooks.mts",
149+
"**/scripts/install-sfw.mts",
150+
"**/scripts/lint-github-settings.mts",
151+
"**/scripts/lockstep-emit-schema.mts",
152+
"**/scripts/lockstep-schema.mts",
153+
"**/scripts/lockstep.mts",
154+
"**/scripts/lockstep/checks.mts",
155+
"**/scripts/lockstep/cli.mts",
156+
"**/scripts/lockstep/emit-schema.mts",
157+
"**/scripts/lockstep/git.mts",
158+
"**/scripts/lockstep/manifest.mts",
159+
"**/scripts/lockstep/report.mts",
160+
"**/scripts/lockstep/scan.mts",
161+
"**/scripts/lockstep/schema.mts",
162+
"**/scripts/lockstep/types.mts",
163+
"**/scripts/power-state.mts",
164+
"**/scripts/security.mts",
165+
"**/scripts/socket-wheelhouse-emit-schema.mts",
166+
"**/scripts/socket-wheelhouse-schema.mts",
167+
"**/scripts/test/install-git-hooks.test.mts",
168+
"**/scripts/update.mts",
169+
"**/scripts/validate-bundle-deps.mts",
170+
"**/scripts/validate-config-paths.mts",
171+
"**/scripts/validate-esbuild-minify.mts",
172+
"**/scripts/validate-file-size.mts",
122173
"#fleet-canonical-end"
123174
]
124175
}

.gitattributes

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -308,13 +308,15 @@
308308
.claude/skills/worktree-management/SKILL.md linguist-generated=true
309309
.config/lockstep.schema.json linguist-generated=true
310310
.config/oxlint-plugin/index.mts linguist-generated=true
311+
.config/oxlint-plugin/lib/iterable-kind.mts linguist-generated=true
311312
.config/oxlint-plugin/lib/rule-tester.mts linguist-generated=true
312313
.config/oxlint-plugin/lib/rule-types.mts linguist-generated=true
313314
.config/oxlint-plugin/package.json linguist-generated=true
314315
.config/oxlint-plugin/rules/_inject-import.mts linguist-generated=true
315316
.config/oxlint-plugin/rules/export-top-level-functions.mts linguist-generated=true
316317
.config/oxlint-plugin/rules/inclusive-language.mts linguist-generated=true
317318
.config/oxlint-plugin/rules/max-file-lines.mts linguist-generated=true
319+
.config/oxlint-plugin/rules/no-cached-for-on-iterable.mts linguist-generated=true
318320
.config/oxlint-plugin/rules/no-console-prefer-logger.mts linguist-generated=true
319321
.config/oxlint-plugin/rules/no-default-export.mts linguist-generated=true
320322
.config/oxlint-plugin/rules/no-dynamic-import-outside-bundle.mts linguist-generated=true
@@ -348,6 +350,7 @@
348350
.config/oxlint-plugin/test/export-top-level-functions.test.mts linguist-generated=true
349351
.config/oxlint-plugin/test/inclusive-language.test.mts linguist-generated=true
350352
.config/oxlint-plugin/test/max-file-lines.test.mts linguist-generated=true
353+
.config/oxlint-plugin/test/no-cached-for-on-iterable.test.mts linguist-generated=true
351354
.config/oxlint-plugin/test/no-console-prefer-logger.test.mts linguist-generated=true
352355
.config/oxlint-plugin/test/no-default-export.test.mts linguist-generated=true
353356
.config/oxlint-plugin/test/no-dynamic-import-outside-bundle.test.mts linguist-generated=true
@@ -477,6 +480,7 @@ scripts/socket-wheelhouse-emit-schema.mts linguist-generated=true
477480
scripts/socket-wheelhouse-schema.mts linguist-generated=true
478481
scripts/test/install-git-hooks.test.mts linguist-generated=true
479482
scripts/update.mts linguist-generated=true
483+
scripts/validate-bundle-deps.mts linguist-generated=true
480484
scripts/validate-config-paths.mts linguist-generated=true
481485
scripts/validate-esbuild-minify.mts linguist-generated=true
482486
scripts/validate-file-size.mts linguist-generated=true

CLAUDE.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,9 @@ Apply in: worktree creation, base-ref resolution for `git diff`/`git rev-list`,
4949
- **Real customer / company names** — never write one into a commit, PR, issue, comment, or release note. Replace with `Acme Inc` or rewrite the sentence to not need the reference. (No enumerated denylist exists — a denylist is itself a leak.)
5050
- **Private repos / internal project names** — never mention. Omit the reference entirely; don't substitute "an internal tool" — the placeholder is a tell.
5151
- **Linear refs** — never put `SOC-123`/`ENG-456`/Linear URLs in code, comments, or PR text. Linear lives in Linear.
52-
- **Publish / release / build-release workflows** — never `gh workflow run|dispatch` or `gh api …/dispatches`. Dispatches are irrevocable. The user runs them manually. Bypass: either a `gh workflow run -f dry-run=true` when the workflow declares a `dry-run:` input and no force-prod override (`-f release=true` / `-f publish=true` / `-f prod=true`) is set, OR `Allow workflow-dispatch bypass: <workflow>` typed verbatim by the user — **one phrase authorizes one dispatch of that exact workflow**. A re-dispatch (same workflow) or a different workflow needs its own fresh phrase. `<workflow>` is the workflow filename, basename, or numeric id (e.g. `publish.yml`, `publish`, `12345` all work). The per-trigger shape replaces the older blanket `Allow workflow-dispatch bypass` — a single phrase shouldn't open the door for unrelated dispatches later in the session.
53-
- **Workflow input naming**`workflow_dispatch.inputs` keys are kebab-case (`dry-run`, `build-mode`), not snake_case. The release-workflow-guard hook only recognizes kebab; a `dry_run` input silently fails the dry-run bypass.
54-
- **`uses:` SHA-pin comment format** — every `uses: <action>@<40-char-sha>` line must carry a trailing `# <tag-or-version-or-branch> (YYYY-MM-DD)` comment, e.g. `# v6.4.0 (2026-05-15)` or `# main (2026-05-15)`. The date is the day the SHA was pinned/refreshed and gives the staleness signal at-a-glance during reviews (enforced by `.claude/hooks/workflow-uses-comment-guard/`).
55-
- **`pull_request_target` is privileged** — it runs in the BASE repo's context with secrets. Never combine it with `actions/checkout` of `${{ github.event.pull_request.head.* }}` AND a step that executes the checked-out fork code (`pnpm i` / `npm i` / `pnpm build` / `cargo build` / `make` / etc.). Prefer the split-workflow pattern (build in `pull_request`, publish artifact, separate `workflow_run` posts the comment) or gate `pull_request_target` on `types: [labeled]` so only maintainers can trigger. Enforced by `.claude/hooks/pull-request-target-guard/`.
52+
- **Publish / release / build-release workflows** — never `gh workflow run|dispatch`. The user runs them manually. Bypass: either `gh workflow run -f dry-run=true` (workflow must declare `dry-run:` input, no force-prod override set) OR `Allow workflow-dispatch bypass: <workflow>` typed verbatim — one phrase authorizes one dispatch. `workflow_dispatch.inputs` keys are kebab-case (`dry-run`, `build-mode`); snake_case silently fails the bypass.
53+
- **`uses:` SHA-pin comment format** — every `uses: <action>@<40-char-sha>` line must carry a trailing `# <tag-or-version-or-branch> (YYYY-MM-DD)` comment, e.g. `# v6.4.0 (2026-05-15)`. The date is when the SHA was pinned/refreshed (enforced by `.claude/hooks/workflow-uses-comment-guard/`).
54+
- **`pull_request_target` is privileged** — runs in BASE-repo context with secrets. Never combine it with `actions/checkout` of fork head + a step that executes the checked-out code (enforced by `.claude/hooks/pull-request-target-guard/`). Full threat model + safer patterns in [`docs/claude.md/fleet/pull-request-target.md`](docs/claude.md/fleet/pull-request-target.md).
5655
- **No external issue/PR refs in commit messages or PR bodies.** GitHub auto-links `<owner>/<repo>#<num>` and `https://github.com/<owner>/<repo>/(issues|pull)/<num>` mentions back to the target issue, spamming the maintainer with `added N commits that reference this issue` events. Only SocketDev-owned refs are allowed (`SocketDev/<repo>#<num>` is fine). For upstream maintainer issues, link them in _the PR description prose_ (which doesn't trigger backrefs from commits) or use `[#1203](https://npmx.dev/...)` link form that omits the `owner/repo#` token. Bypass: `Allow external-issue-ref bypass` (enforced by `.claude/hooks/no-external-issue-ref-guard/`).
5756

5857
### Commits & PRs
@@ -87,6 +86,8 @@ Apply in: worktree creation, base-ref resolution for `git diff`/`git rev-list`,
8786

8887
🚨 See a lint/type/test error or broken comment in your reading window — fix it. Stop current task, fix the issue in a sibling commit, resume. Don't label as "pre-existing", "unrelated", or "out of scope" — the labels are rationalizations (enforced by `.claude/hooks/excuse-detector/`).
8988

89+
🚨 Don't blame the user (or "the linter") when your own edits get reverted between turns. The cause is almost always your own scripts: pre-commit autofix, sync-cascade from `template/`, oxlint --fix. Investigate with `git log -S`, run pre-commit phases in isolation, diff `template/` canonical sources. Only attribute to the user with direct evidence (enforced by `.claude/hooks/dont-blame-user-reminder/`).
90+
9091
🚨 Never offer "fix vs accept-as-gap" as a choice — pick the fix.
9192

9293
Exceptions (state the trade-off and ask): genuinely large refactor on a small bug, file belongs to another session, fix needs off-machine action.

pnpm-lock.yaml

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

pnpm-workspace.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ catalog:
2525
'@socketsecurity/lib': 5.28.0
2626
'@socketsecurity/lib-stable': npm:@socketsecurity/lib@5.28.0
2727
'@socketsecurity/registry': 2.0.2
28+
'@socketsecurity/registry-stable': npm:@socketsecurity/registry@2.0.2
2829
'@socketsecurity/sdk': 4.0.1
2930
'@socketsecurity/sdk-stable': npm:@socketsecurity/sdk@4.0.1
3031
'@types/mdast': 4.0.4

0 commit comments

Comments
 (0)