sync: update from private repo (e5e841e5)
Some checks failed
CI / build-and-test (push) Failing after 6m15s

This commit is contained in:
oss-sync 2026-07-09 01:50:08 +00:00
parent d41ff0f658
commit fb1477c9d5
2 changed files with 22 additions and 8 deletions

View File

@ -28,16 +28,29 @@ interface Layer {
regexp?: RegExp; regexp?: RegExp;
} }
// UI static hosting (mountUiStatic in ui-static.ts) is registered only when
// ui/dist exists on disk (existsSync check), so its presence in the
// fingerprint flips between a built checkout (CI, dev) and a fresh/unbuilt
// worktree. It is excluded below — the ordering of these entries relative to
// each other is not pinned by this test, only the surrounding API routes are.
const UI_STATIC_ENTRY_PATTERNS = [
/^USE name=serveStatic path=\^\\\/ui\\\/\?/,
/^ROUTE get \/ui\/\*$/,
/^ROUTE get \/app-harness$/,
];
/** Ordered fingerprint of the app's top-level middleware/route layers. */ /** Ordered fingerprint of the app's top-level middleware/route layers. */
function fingerprint(app: Application): string[] { function fingerprint(app: Application): string[] {
const stack: Layer[] = (app as unknown as { _router?: { stack: Layer[] } })._router?.stack ?? []; const stack: Layer[] = (app as unknown as { _router?: { stack: Layer[] } })._router?.stack ?? [];
return stack.map((layer) => { return stack
.map((layer) => {
if (layer.route) { if (layer.route) {
const methods = Object.keys(layer.route.methods).sort().join(','); const methods = Object.keys(layer.route.methods).sort().join(',');
return `ROUTE ${methods} ${layer.route.path}`; return `ROUTE ${methods} ${layer.route.path}`;
} }
return `USE name=${layer.name ?? ''} path=${layer.regexp?.source ?? ''}`; return `USE name=${layer.name ?? ''} path=${layer.regexp?.source ?? ''}`;
}); })
.filter((entry) => !UI_STATIC_ENTRY_PATTERNS.some((pattern) => pattern.test(entry)));
} }
function mkAuthConfig(): AuthConfig { function mkAuthConfig(): AuthConfig {

View File

@ -148,7 +148,8 @@ describe('FileEventLogger', () => {
expect(parsed.iteration).toBe(5); expect(parsed.iteration).toBe(5);
}); });
it('does NOT throw when the workspace directory is not writable (failure isolation)', () => { // root ignores chmod-based write denial, so this only holds as non-root (e.g. CI running as root).
it.skipIf(process.getuid?.() === 0)('does NOT throw when the workspace directory is not writable (failure isolation)', () => {
// Make the workspace read-only so appendFileSync fails. // Make the workspace read-only so appendFileSync fails.
chmodSync(workspace, 0o555); chmodSync(workspace, 0o555);
try { try {