From 69780f4eea0cb63c0a5e5981c1a378911fb2bf6a Mon Sep 17 00:00:00 2001 From: "Lisa (Cedar Assistant)" Date: Sat, 16 May 2026 12:42:29 +0200 Subject: [PATCH 1/4] fix(ci): log yarn.lock state after tarsync to debug intermittent Windows failures After tarsync runs yarn install in the test project, check whether yarn.lock was created and whether it contains the root-workspace- entry. This surfaces the failure that tarsync currently swallows silently before yarn cedar g secret fails with the lockfile error. Co-Authored-By: Claude Sonnet 4.6 --- .../set-up-test-project/setUpTestProject.mts | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/.github/actions/set-up-test-project/setUpTestProject.mts b/.github/actions/set-up-test-project/setUpTestProject.mts index 4ba3ee31f6..f5a6cf270c 100644 --- a/.github/actions/set-up-test-project/setUpTestProject.mts +++ b/.github/actions/set-up-test-project/setUpTestProject.mts @@ -64,6 +64,23 @@ export async function setUpTestProject({ env: { CEDAR_CWD: testProjectPath }, }) + const yarnLockPath = path.join(testProjectPath, 'yarn.lock') + if (fs.existsSync(yarnLockPath)) { + const lockfileContent = fs.readFileSync(yarnLockPath, 'utf-8') + const lines = lockfileContent.split('\n') + console.log(`yarn.lock created (${lines.length} lines)`) + const rootWorkspaceLine = lines.find((l) => l.startsWith('root-workspace-')) + if (rootWorkspaceLine) { + console.log(`Root workspace entry found: ${rootWorkspaceLine}`) + } else { + console.error( + 'WARNING: yarn.lock exists but has no root-workspace- entry!', + ) + } + } else { + console.error('WARNING: yarn.lock was not created by tarsync!') + } + console.log('Generating dbAuth secret') const secretResult = await execInProject('yarn cedar g secret --raw', { silent: true, From 990b12212fd4d084f1ce7e31a58e07085ba94c63 Mon Sep 17 00:00:00 2001 From: "Lisa (Cedar Assistant)" Date: Sat, 16 May 2026 14:27:46 +0200 Subject: [PATCH 2/4] fix off-by-one in yarn.lock line count log --- .github/actions/set-up-test-project/setUpTestProject.mts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/actions/set-up-test-project/setUpTestProject.mts b/.github/actions/set-up-test-project/setUpTestProject.mts index f5a6cf270c..04fd4d291e 100644 --- a/.github/actions/set-up-test-project/setUpTestProject.mts +++ b/.github/actions/set-up-test-project/setUpTestProject.mts @@ -68,7 +68,9 @@ export async function setUpTestProject({ if (fs.existsSync(yarnLockPath)) { const lockfileContent = fs.readFileSync(yarnLockPath, 'utf-8') const lines = lockfileContent.split('\n') - console.log(`yarn.lock created (${lines.length} lines)`) + const lineCount = + lines[lines.length - 1] === '' ? lines.length - 1 : lines.length + console.log(`yarn.lock created (${lineCount} lines)`) const rootWorkspaceLine = lines.find((l) => l.startsWith('root-workspace-')) if (rootWorkspaceLine) { console.log(`Root workspace entry found: ${rootWorkspaceLine}`) From 0b16995839e1f7628fc4131aaec1e8d47ee02d61 Mon Sep 17 00:00:00 2001 From: "Lisa (Cedar Assistant)" Date: Sat, 16 May 2026 16:44:24 +0200 Subject: [PATCH 3/4] fix root-workspace- prefix check for yarn berry lockfile format --- .github/actions/set-up-test-project/setUpTestProject.mts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/set-up-test-project/setUpTestProject.mts b/.github/actions/set-up-test-project/setUpTestProject.mts index 04fd4d291e..3999dbede0 100644 --- a/.github/actions/set-up-test-project/setUpTestProject.mts +++ b/.github/actions/set-up-test-project/setUpTestProject.mts @@ -71,7 +71,7 @@ export async function setUpTestProject({ const lineCount = lines[lines.length - 1] === '' ? lines.length - 1 : lines.length console.log(`yarn.lock created (${lineCount} lines)`) - const rootWorkspaceLine = lines.find((l) => l.startsWith('root-workspace-')) + const rootWorkspaceLine = lines.find((l) => l.startsWith('"root-workspace-')) if (rootWorkspaceLine) { console.log(`Root workspace entry found: ${rootWorkspaceLine}`) } else { From ab27dc6acf9ad8b47cd390e71e5d850e9e0d6e1c Mon Sep 17 00:00:00 2001 From: "Lisa (Cedar Assistant)" Date: Sat, 16 May 2026 18:32:28 +0200 Subject: [PATCH 4/4] chore: prettier --- .github/actions/set-up-test-project/setUpTestProject.mts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/actions/set-up-test-project/setUpTestProject.mts b/.github/actions/set-up-test-project/setUpTestProject.mts index 3999dbede0..164a45675e 100644 --- a/.github/actions/set-up-test-project/setUpTestProject.mts +++ b/.github/actions/set-up-test-project/setUpTestProject.mts @@ -71,7 +71,9 @@ export async function setUpTestProject({ const lineCount = lines[lines.length - 1] === '' ? lines.length - 1 : lines.length console.log(`yarn.lock created (${lineCount} lines)`) - const rootWorkspaceLine = lines.find((l) => l.startsWith('"root-workspace-')) + const rootWorkspaceLine = lines.find((l) => + l.startsWith('"root-workspace-'), + ) if (rootWorkspaceLine) { console.log(`Root workspace entry found: ${rootWorkspaceLine}`) } else {