Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion config/main-sync-spawn-baseline.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
1 src/main/daemon/daemon-process-identity-query.ts
1 src/main/daemon/daemon-process-start-time.ts
1 src/main/daemon/daemon-user-manager-lifetime.ts
1 src/main/daemon/pty-process-ceiling-runtime.ts
1 src/main/daemon/pty-process-ceiling.ts
1 src/main/daemon/pty-subprocess/shell-launch-plan.ts
1 src/main/emulator/serve-sim-runtime-materializer.ts
1 src/main/git/command-runner/git-exec-file.ts
Expand Down Expand Up @@ -57,7 +59,6 @@
1 src/main/pwsh.ts
3 src/main/runtime/device-registry.ts
1 src/main/runtime/e2ee-keypair.ts
1 src/main/runtime/mobile-notification-dismissal-store.ts
1 src/main/runtime/push/push-unregister-outbox.ts
1 src/main/runtime/relay/relay-region-preference.ts
1 src/main/runtime/relay/relay-revoke-outbox.ts
Expand Down
14 changes: 7 additions & 7 deletions config/scripts/check-main-sync-spawn-ratchet.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import { pathToFileURL } from 'node:url'
import ts from 'typescript-api'
import {
diffCounts,
formatBaseline,
parseBaseline,
parseBaselineNotes
} from './check-focus-read-ratchet.mjs'
formatCountBaseline,
parseCountBaseline,
parseCountNotes
} from './ratchet-baseline.mjs'
import { literalString, propertyName, unwrap } from './static-module-specifiers.mjs'
import { isTestOnlySourcePath } from './test-only-source-path.mjs'

Expand Down Expand Up @@ -392,7 +392,7 @@ export function main(root = ROOT) {
const { counts, symbols } = countSyncSpawnUses(collectSyncSpawnSources(root))
const { grown, shrunk } = diffCounts(
counts,
parseBaseline(readFileSync(path.join(root, BASELINE_PATH), 'utf8'))
parseCountBaseline(readFileSync(path.join(root, BASELINE_PATH), 'utf8'))
)
for (const { file, now, allowed } of grown) {
console.error(
Expand All @@ -419,12 +419,12 @@ export function prune(root = ROOT) {
const { counts } = countSyncSpawnUses(collectSyncSpawnSources(root))
// Lowers entries only; growth still has to be fixed in the code.
const pruned = new Map(
[...parseBaseline(text)].map(([file, allowed]) => [
[...parseCountBaseline(text)].map(([file, allowed]) => [
file,
Math.min(allowed, counts.get(file) ?? 0)
])
)
writeFileSync(baselineFile, formatBaseline(pruned, BASELINE_HEADER, parseBaselineNotes(text)))
writeFileSync(baselineFile, formatCountBaseline(pruned, BASELINE_HEADER, parseCountNotes(text)))
console.log(`Pruned ${BASELINE_PATH} to ${total(pruned)} use(s).`)
}

Expand Down
Loading