MCPcopy Create free account
hub / github.com/garrytan/gstack / curateWindowsSafe

Function curateWindowsSafe

scripts/test-free-shards.ts:176–195  ·  view source on GitHub ↗
(files: string[], rootDir = ROOT)

Source from the content-addressed store, hash-verified

174}
175
176export function curateWindowsSafe(files: string[], rootDir = ROOT): CurationResult {
177 const safe: string[] = [];
178 const excluded: Array<{ file: string; reason: string }> = [];
179 const knownBad = new Map(KNOWN_WINDOWS_INCOMPATIBLE.map((e) => [e.file, e.reason]));
180 for (const relativePath of files) {
181 const knownReason = knownBad.get(relativePath);
182 if (knownReason) {
183 excluded.push({ file: relativePath, reason: knownReason });
184 continue;
185 }
186 const absolute = path.join(rootDir, relativePath);
187 const fragility = detectWindowsFragility(absolute);
188 if (fragility) {
189 excluded.push({ file: relativePath, reason: fragility.reason });
190 } else {
191 safe.push(relativePath);
192 }
193 }
194 return { safe, excluded };
195}
196
197export function stableHash(input: string): number {
198 let hash = 0x811c9dc5;

Callers 2

mainFunction · 0.85

Calls 3

detectWindowsFragilityFunction · 0.85
getMethod · 0.45
pushMethod · 0.45

Tested by

no test coverage detected