Skip to content

Commit ab461fd

Browse files
committed
chore(wheelhouse): cascade template@7aa47e23
Backfill soak-exclude-scope-guard tests + README, CLAUDE.md fleet block, and docs/claude.md/wheelhouse/no-local-fork-canonical.md. Removes the 4 stale .mjs duplicates of the .mts markdownlint rule modules (tombstoned in socket-wheelhouse manifest).
1 parent a3e93c2 commit ab461fd

9 files changed

Lines changed: 71 additions & 270 deletions

File tree

.claude/hooks/fleet/soak-exclude-scope-guard/README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,11 @@ The hook fires on Edit/Write to `pnpm-workspace.yaml` when the
2929
edit adds an entry under `minimumReleaseAgeExclude:` whose package
3030
name is NOT scoped to one of:
3131

32-
@socketsecurity/*
33-
@socketregistry/*
34-
@socketbin/*
3532
@socketaddon/*
33+
@socketbin/*
34+
@socketregistry/*
35+
@socketsecurity/*
36+
@stuie/*
3637

3738
Both glob-form (`@socketsecurity/*`) and exact-pin form
3839
(`@socketsecurity/lib@6.0.0`) are accepted; the hook splits on

.claude/hooks/fleet/soak-exclude-scope-guard/index.mts

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,16 @@ const logger = getDefaultLogger()
2929

3030
const BYPASS_PHRASE = 'Allow soak-exclude-third-party bypass'
3131

32+
// Fleet-internal first-party scopes published by trusted Socket pipelines —
33+
// soak-exempt by design. The danger the guard targets is a third-party
34+
// scope-glob (the 2026-04-06 `@anthropic-ai/*` incident), not a fleet repo's
35+
// own scope. `@stuie` is the first-party scope of the stuie fleet repo.
3236
const ALLOWED_SCOPES = new Set([
33-
'@socketsecurity',
34-
'@socketregistry',
35-
'@socketbin',
3637
'@socketaddon',
38+
'@socketbin',
39+
'@socketregistry',
40+
'@socketsecurity',
41+
'@stuie',
3742
])
3843

3944
const SECTION_HEADER = /^minimumReleaseAgeExclude:\s*$/
@@ -179,7 +184,7 @@ await withEditGuard((filePath, content, payload) => {
179184
' `minimumReleaseAgeExclude:` is a security-policy bypass for Socket',
180185
' first-party scopes only:',
181186
'',
182-
' @socketsecurity/* @socketregistry/* @socketbin/* @socketaddon/*',
187+
' @socketaddon/* @socketbin/* @socketregistry/* @socketsecurity/* @stuie/*',
183188
'',
184189
' Adding a third-party package weakens the malware-protection soak gate.',
185190
'',

.claude/hooks/fleet/soak-exclude-scope-guard/test/index.test.mts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,19 @@ test('adding @socketsecurity/* glob passes', async () => {
6363
assert.strictEqual(r.code, 0)
6464
})
6565

66+
test('adding @stuie/* first-party glob passes', async () => {
67+
const p = tmpYaml('minimumReleaseAgeExclude:\n - \'@socketregistry/*\'\n')
68+
const r = await runHook({
69+
tool_name: 'Write',
70+
tool_input: {
71+
file_path: p,
72+
content:
73+
"minimumReleaseAgeExclude:\n - '@socketregistry/*'\n - '@stuie/*'\n",
74+
},
75+
})
76+
assert.strictEqual(r.code, 0)
77+
})
78+
6679
test('adding @socketsecurity/lib@6.0.0 exact pin passes', async () => {
6780
const p = tmpYaml('minimumReleaseAgeExclude:\n - \'@socketregistry/*\'\n')
6881
const r = await runHook({

.config/markdownlint-rules/_shared/wheelhouse-self-skip.mjs

Lines changed: 0 additions & 40 deletions
This file was deleted.

.config/markdownlint-rules/socket-no-private-wheelhouse-leak.mjs

Lines changed: 0 additions & 61 deletions
This file was deleted.

.config/markdownlint-rules/socket-no-relative-sibling-script.mjs

Lines changed: 0 additions & 67 deletions
This file was deleted.

.config/markdownlint-rules/socket-readme-required-sections.mjs

Lines changed: 0 additions & 93 deletions
This file was deleted.

CLAUDE.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,11 +157,11 @@ For non-trivial work (multi-file refactor, new feature, migration), the plan its
157157

158158
### Stranded cascades
159159

160-
🚨 Local-only `chore(wheelhouse): cascade template@<sha>` commits + `chore/wheelhouse-<sha>` worktrees whose template SHA has been superseded on origin accumulate from interrupted cascade waves and silently block future pushes. The wheelhouse cascade auto-runs `socket-wheelhouse/scripts/fleet/cleanup-stranded.mts --target <repo>` at the start of every wave (default = fix; pass `--dry-run` to report only). Safety rails: cascade-subject regex match + trusted commit author + strict-ancestor proof of supersession + cascade-allowlist file check. Any ambiguity → bail the whole repo. Full algorithm + recovery instructions in [`docs/claude.md/fleet/stranded-cascades.md`](docs/claude.md/fleet/stranded-cascades.md).
160+
🚨 Local-only `chore(wheelhouse): cascade template@<sha>` commits + `chore/wheelhouse-<sha>` worktrees whose template SHA has been superseded on origin accumulate from interrupted cascade waves and silently block future pushes. The wheelhouse cascade auto-runs `socket-wheelhouse/scripts/fleet/cleanup-stranded.mts --target <repo>` at the start of every wave (default = fix; pass `--dry-run` to report only). Safety rails + recovery in [`docs/claude.md/fleet/stranded-cascades.md`](docs/claude.md/fleet/stranded-cascades.md).
161161

162162
### Never fork fleet-canonical files locally
163163

164-
🚨 Edit fleet-canonical files ONLY in `socket-wheelhouse/template/...` — never downstream. Lift missing helpers upstream + re-cascade. **Trust the wheelhouse:** don't grep / read / debug canonical files in downstream repos to verify contents — treat the wheelhouse as oracle (enforced by `.claude/hooks/fleet/no-fleet-fork-guard/`; bypass: `Allow fleet-fork bypass`). Full ruleset: [`docs/claude.md/wheelhouse/no-local-fork-canonical.md`](docs/claude.md/wheelhouse/no-local-fork-canonical.md).
164+
🚨 Edit fleet-canonical files ONLY in `socket-wheelhouse/template/...` — never downstream. **Trust the wheelhouse:** don't grep / read / debug canonical files downstream — treat the wheelhouse as oracle. **Composite-file rule:** in `CLAUDE.md` only the `BEGIN/END FLEET-CANONICAL` block is canonical; preamble + `🏗️ Project-Specific` postamble are repo-owned — trim them when the whole-file total approaches the 40 KB cap (enforced by `.claude/hooks/fleet/no-fleet-fork-guard/`; bypass: `Allow fleet-fork bypass`). Full ruleset: [`docs/claude.md/wheelhouse/no-local-fork-canonical.md`](docs/claude.md/wheelhouse/no-local-fork-canonical.md).
165165

166166
### Code style
167167

docs/claude.md/wheelhouse/no-local-fork-canonical.md

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

0 commit comments

Comments
 (0)