Skip to content

Commit ac6396c

Browse files
authored
Merge branch 'fix/scan-report-large-output' into jdalton/report-version-main
2 parents 7972020 + 9b5db2c commit ac6396c

19 files changed

Lines changed: 607 additions & 186 deletions

‎.config/repo/lockstep.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@
101101
"honors a custom stdio",
102102
"merges options.env"
103103
],
104-
"notes": "The patch adapter resolves and executes socket-patch with argument, environment, and stdio forwarding. The sparse upstream contains core implementation, CLI commands, and behavioral tests for incorporation. This row covers the execution adapter; patch algorithms are implemented by the upstream executable."
104+
"notes": "The adapter resolves and executes `socket-patch` with argument, environment, and stdio forwarding. It remains the CLI implementation until the in-process TypeScript port reaches the upstream contract. The public SocketDev/socket-patch source pin is `15a6ba6f416c244e918ff01260a1bc91f67bc945` on `main`, with a depth-one single-branch checkout of core, CLI, and tests. The upstream license is MIT."
105105
}
106106
]
107107
}

‎.gitignore‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,9 @@ opencode.json
189189
.claude/commands/fleet/update-hooks-dry.md
190190
.claude/commands/fleet/update-pricing.md
191191
.claude/commands/fleet/update-security.md
192+
.claude/hooks/fleet/_dist/fleet-pack.excluded.generated.cjs
192193
.claude/hooks/fleet/_dist/fleet-pack.generated.cjs
194+
.claude/hooks/fleet/_dist/fleet-pack.snapshot.generated.cjs
193195
.claude/hooks/fleet/_dist/launchers/dispatch-launcher-darwin-arm64
194196
.claude/hooks/fleet/_dist/launchers/dispatch-launcher-darwin-x64
195197
.claude/hooks/fleet/_dist/launchers/dispatch-launcher-linux-arm64

‎.gitmodules‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,13 @@
4545
verify = none
4646

4747
# no-release-tag: Development reference pins the explicitly selected main commit.
48-
# socket-patch-main (2026-09-08) sha256:40c6e9c3f5663a32d73eb2f3398be23ec2ea15f356a2a56fadc7749662dd3b49
48+
# socket-patch-main (2026-09-23) sha256:f557f5cac56056ca409478af4884bfd7de7bc4b37453412d058b5d5669c32fbe
4949
[submodule "upstream/socket-patch"]
5050
ignore = dirty
51-
ref = a0b04807d158ae5c0d980370ad31a15fcc9b030e
51+
ref = 15a6ba6f416c244e918ff01260a1bc91f67bc945
5252
path = upstream/socket-patch
5353
url = https://github.com/SocketDev/socket-patch.git
5454
branch = main
5555
shallow = true
56-
sparse-checkout = crates/socket-patch-core/src crates/socket-patch-core/tests crates/socket-patch-cli/src tests
56+
sparse-checkout = crates/socket-patch-core/src crates/socket-patch-core/tests crates/socket-patch-cli tests
5757
verify = none

‎.node-version‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
26.8.1
1+
26.10.0

‎AGENTS.md‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,3 +169,11 @@
169169
- A written mermaid fence gets rewritten GitHub-safe at edit time. [`hook-registry`](docs/fleet/agents.md/hook-registry.md)
170170

171171
<!-- </fleet> -->
172+
173+
## 🏗️ CLI-Specific
174+
175+
- Build production native binaries with `pnpm run build:native:prod`; inspect them with `pnpm run check:native-package`.
176+
- Use `pnpm test <path>` for focused tests. Native release tests live under `test/repo/unit/build/sea/` and `test/repo/unit/sea/`.
177+
- Version selection, reservation, and source tagging belong to the npm release pipeline. Use the `next` dist-tag for prereleases; do not edit the package version to start a release.
178+
- Native release signing and notarization run in macOS CI. The Apple certificate passphrase is CI-only. The workflow qualifies one packed artifact on all eight supported targets. See [native release](docs/repo/agents.md/native-release.md).
179+
- Inspect staged package state with `pnpm run npm:staged`. After validation, approve eligible stages with `pnpm stage approve`; use the AI Drive/browser path only for CLI fallback or an npm challenge.
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# Native release
2+
3+
The npm release pipeline owns the release version, changelog, source commit, and reserved tag. Start it through `pnpm run publish:npm --dist-tag next` for the prerelease channel. Do not edit `package.json` to reserve a release. The native workflow consumes the reserved source SHA and package version.
4+
5+
## Local checks
6+
7+
Build the production native matrix and inspect the resulting package:
8+
9+
```sh
10+
pnpm run build:native:prod
11+
pnpm run check:native-package
12+
```
13+
14+
Focused release tests:
15+
16+
```sh
17+
pnpm test test/repo/unit/build/sea/release.test.mts
18+
pnpm test test/repo/unit/check/publish-contract-is-valid.test.mts
19+
pnpm test test/repo/unit/sea/check.test.mts
20+
```
21+
22+
## CI qualification
23+
24+
The `publish: native` workflow builds and signs the package on macOS. The Apple certificate passphrase is supplied only as a CI secret. The workflow uploads one package archive, verifier, and receipt. Qualification jobs check the archive and digests, then run that verifier for all eight targets:
25+
26+
- `darwin-arm64`
27+
- `darwin-x64`
28+
- `linux-arm64`
29+
- `linux-arm64-musl`
30+
- `linux-x64`
31+
- `linux-x64-musl`
32+
- `win32-arm64`
33+
- `win32-x64`
34+
35+
The macOS jobs also run Gatekeeper qualification. Treat the artifact as qualified only when the workflow reports success for every target.
36+
37+
## Stage
38+
39+
Inspect the staged package with `pnpm run npm:staged`. After artifact validation and the configured malware scan pass, approve eligible stages with `pnpm stage approve`. Ignore and monitor findings do not block approval. Use the AI Driver/browser fallback when the CLI cannot complete authentication or npm presents a challenge.

‎package.json‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,6 @@
9292
"check:hooks": "node scripts/fleet/check.mts --category=hooks",
9393
"check:native-package": "node scripts/repo/build/sea/check.mts",
9494
"check:paths": "node scripts/fleet/check/paths-are-valid.mts",
95-
"docs:commands:check": "node scripts/repo/check/docs-commands.mts",
96-
"docs:commands:test": "node scripts/fleet/test.mts test/repo/unit/check/docs-command-inventory.test.mts test/repo/unit/check/docs-commands.test.mts",
9795
"check:test": "node scripts/fleet/commands/run.mts check test",
9896
"check:test-budget-headroom": "node scripts/fleet/check/test-budget-headroom.mts",
9997
"check:types": "node scripts/fleet/check.mts --category=types",
@@ -205,7 +203,6 @@
205203
"publish:npm": "node scripts/fleet/npm/publish/run.mts",
206204
"release:github": "node scripts/fleet/release/github/remote.mts",
207205
"release:hint": "node scripts/fleet/release/hint.mts",
208-
"release:nightly:plan": "node scripts/fleet/release/nightly/cli.mts",
209206
"review:comments": "node scripts/fleet/comment-review/run.mts",
210207
"review:pr": "node scripts/fleet/ai/review/jev/run.mts",
211208
"ruleset:bypass": "node scripts/fleet/grant-ruleset-bypass.mts",
@@ -286,6 +283,9 @@
286283
"weekly-update": "node scripts/fleet/weekly-update.mts",
287284
"weekly-update:ci": "gh workflow run cron-weekly-update.yml",
288285
"worktree:create": "node scripts/fleet/worktree/create/run.mts",
286+
"docs:commands:check": "node scripts/repo/check/docs-commands.mts",
287+
"docs:commands:test": "node scripts/fleet/test.mts test/repo/unit/check/docs-command-inventory.test.mts test/repo/unit/check/docs-commands.test.mts",
288+
"release:nightly:plan": "node scripts/fleet/release/nightly/cli.mts",
289289
"ci:fix:preview": "node scripts/fleet/ci/fix/preview.mts"
290290
},
291291
"devDependencies": {

‎pnpm-workspace.yaml‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,6 @@ catalog:
292292
mock-fs: 5.5.0
293293
nanotar: 0.2.1
294294
npm-package-arg: 13.0.2
295-
npm-run-all2: 9.0.3
296295
octokit: 5.0.5
297296
open: 10.2.0
298297
packageurl-js: npm:@socketregistry/packageurl-js@^1.5.0

‎scripts/repo/build-infra/unicode-property-escape-transform.mts‎

Lines changed: 35 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -149,18 +149,41 @@ export function hasUnsupportedUnicodeFeatures(pattern: string) {
149149
* Transform a regex pattern by replacing \p{Property} with character classes.
150150
*/
151151
export function transformRegexPattern(pattern: string) {
152-
let transformed = pattern
153-
154-
// Replace \p{Property} with character class equivalents.
155-
for (const [prop, replacement] of Object.entries(unicodePropertyMap)) {
156-
const escapedProp = prop.replace(/[\\{}]/g, '\\$&')
157-
// Replace \p{Property} with [replacement].
158-
transformed = transformed.replace(
159-
new RegExp(`\\\\p\\{${escapedProp}\\}`, 'g'),
160-
() => `[${replacement}]`,
161-
)
152+
let transformed = ''
153+
let inCharacterClass = false
154+
for (let index = 0; index < pattern.length; index += 1) {
155+
const character = pattern[index]!
156+
if (character === '\\') {
157+
if (
158+
pattern.charCodeAt(index + 1) === 112 /* 'p' */ &&
159+
pattern.charCodeAt(index + 2) === 123 /* '{' */
160+
) {
161+
const propertyEnd = pattern.indexOf('}', index + 3)
162+
if (propertyEnd !== -1) {
163+
const property = pattern.slice(index + 3, propertyEnd)
164+
if (Object.hasOwn(unicodePropertyMap, property)) {
165+
const replacement =
166+
unicodePropertyMap[property as keyof typeof unicodePropertyMap]
167+
transformed += inCharacterClass ? replacement : `[${replacement}]`
168+
index = propertyEnd
169+
continue
170+
}
171+
}
172+
}
173+
transformed += character
174+
if (index + 1 < pattern.length) {
175+
transformed += pattern[index + 1]
176+
index += 1
177+
}
178+
continue
179+
}
180+
if (character === '[' && !inCharacterClass) {
181+
inCharacterClass = true
182+
} else if (character === ']' && inCharacterClass) {
183+
inCharacterClass = false
184+
}
185+
transformed += character
162186
}
163-
164187
return transformed
165188
}
166189

@@ -230,15 +253,7 @@ export function transformUnicodePropertyEscapes(content: string) {
230253
const originalPattern = originalRegex.slice(1, lastSlash)
231254
const originalFlags = originalRegex.slice(lastSlash + 1)
232255

233-
// Do the same transformations on the source text.
234-
let newPattern = originalPattern
235-
for (const [prop, replacement] of Object.entries(unicodePropertyMap)) {
236-
const escapedProp = prop.replace(/[\\{}]/g, '\\$&')
237-
newPattern = newPattern.replace(
238-
new RegExp(`\\\\p\\{${escapedProp}\\}`, 'g'),
239-
() => `[${replacement}]`,
240-
)
241-
}
256+
const newPattern = transformRegexPattern(originalPattern)
242257

243258
// Remove /u and /v flags from the original flags.
244259
const newFlags = originalFlags.replace(/[uv]/g, '')

‎scripts/repo/build/sea/build.mts‎

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { isMainModule } from '../../../fleet/process/is-main-module.mts'
88
import { runMain } from '../../../fleet/process/main/run.mts'
99
import { BINJECT_VERSION, NODE_SMOL_VERSION } from '../constants/sea-assets.mts'
1010
import { fetchSeaAsset } from './assets.mts'
11-
import { relocateDarwinInitializerOffsets } from './initializer-offsets.mts'
11+
import { repairDarwinInitializerOffsets } from './initializer-repair.mts'
1212
import { extractSmolRuntime } from './runtime.mts'
1313
import { signAndNotarizeSeaBinary } from './sign.mts'
1414
import type { SeaSigningReceipt } from './sign.mts'
@@ -344,11 +344,7 @@ async function buildSeaTarget(
344344
)
345345
}
346346
if (target === 'darwin-x64') {
347-
const injected = await readFile(output)
348-
const relocated = relocateDarwinInitializerOffsets(runtime, injected)
349-
if (relocated !== injected) {
350-
await writeFile(output, relocated)
351-
}
347+
await repairDarwinInitializerOffsets(runtime, output)
352348
}
353349
}
354350
if (entitlementsPath) {

0 commit comments

Comments
 (0)