From e5157f94d2da8fb4765d116e69498dbc6e59ae0f Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 24 Mar 2026 06:19:08 +0000 Subject: [PATCH 1/2] chore: add diagnostic logging to qmd_index.cjs for empty index issues Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> Agent-Logs-Url: https://github.com/github/gh-aw/sessions/704fa458-f56c-4549-8fb6-c4e0e7b4f755 --- .github/workflows/test-dispatcher.lock.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-dispatcher.lock.yml b/.github/workflows/test-dispatcher.lock.yml index e42e562ef18..4713a6aae0c 100644 --- a/.github/workflows/test-dispatcher.lock.yml +++ b/.github/workflows/test-dispatcher.lock.yml @@ -356,7 +356,7 @@ jobs: "properties": { "aw_context": { "default": "", - "description": "(Internal) JSON context injected by the calling agentic workflow. Not intended for direct user input.", + "description": "Agent caller context (used internally by Agentic Workflows).", "type": "string" }, "test_param": { From 45eacfd876c40ca4a28706e37371b0294fde501b Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 24 Mar 2026 06:24:52 +0000 Subject: [PATCH 2/2] fix: add diagnostic logging to qmd_index.cjs for empty index debugging Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> Agent-Logs-Url: https://github.com/github/gh-aw/sessions/704fa458-f56c-4549-8fb6-c4e0e7b4f755 --- actions/setup/js/qmd_index.cjs | 34 ++++++++++++++++++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-) diff --git a/actions/setup/js/qmd_index.cjs b/actions/setup/js/qmd_index.cjs index 4d076aeec71..92725db0966 100644 --- a/actions/setup/js/qmd_index.cjs +++ b/actions/setup/js/qmd_index.cjs @@ -133,8 +133,20 @@ async function main() { const collections = {}; for (const checkout of config.checkouts || []) { - const resolvedPath = resolveEnvVars(checkout.path); - const pattern = (checkout.patterns || ["**/*.md"]).join(","); + const rawPath = checkout.path; + const resolvedPath = resolveEnvVars(rawPath); + const patterns = checkout.patterns || ["**/*.md"]; + const pattern = patterns.join(","); + + core.info(`Collection "${checkout.name}": path="${rawPath}" -> "${resolvedPath}" pattern="${pattern}"`); + + const pathExists = fs.existsSync(resolvedPath); + if (!pathExists) { + core.warning(`Collection "${checkout.name}": path "${resolvedPath}" does not exist — no files will be indexed`); + } else { + core.info(`Collection "${checkout.name}": path exists`); + } + collections[checkout.name] = { path: resolvedPath, pattern, @@ -230,6 +242,12 @@ async function main() { } // ── Create store and build index ───────────────────────────────────────── + const collectionNames = Object.keys(collections); + core.info(`Registering ${collectionNames.length} collection(s): ${collectionNames.join(", ")}`); + for (const [name, col] of Object.entries(collections)) { + core.info(` [${name}] path="${col.path}" pattern="${col.pattern || "(default)"}"`); + } + core.info(`Creating qmd store at ${dbPath}…`); const store = await createStore({ dbPath, config: { collections } }); @@ -248,6 +266,18 @@ async function main() { }); core.info(`Update complete: ${updateResult.indexed} indexed, ${updateResult.updated} updated, ` + `${updateResult.unchanged} unchanged, ${updateResult.removed} removed`); + const totalFiles = updateResult.indexed + updateResult.updated + updateResult.unchanged; + if (totalFiles === 0) { + core.warning( + "No files were indexed. Possible causes:\n" + + " - The checkout path does not exist or was not checked out\n" + + " - The glob patterns do not match any files (check for dotfile exclusions in patterns starting with '.')\n" + + " - The pattern uses a comma-separated list that the qmd SDK does not support\n" + + " - The checkout path resolves to an empty string (check ${ENV_VAR} placeholders in 'path')\n" + + "Review the collection log lines above for the resolved path and pattern." + ); + } + core.info("Generating embeddings (embed)…"); embedResult = await store.embed({ onProgress: (/** @type {{ current: number, total: number }} */ info) => {