Skip to content

Glassworm style attacks added to repo policy check#2038

Draft
robgruen wants to merge 64 commits intomainfrom
dev/robgruen/glassworm
Draft

Glassworm style attacks added to repo policy check#2038
robgruen wants to merge 64 commits intomainfrom
dev/robgruen/glassworm

Conversation

@robgruen
Copy link
Collaborator

No description provided.

…test (#2039)

Thanks for asking me to work on this. I will get started on it and keep
this PR's description up to date as I form a plan and make progress.


<!-- START COPILOT ORIGINAL PROMPT -->



<details>

<summary>Original prompt</summary>

> Fix the failing GitHub Actions workflow shell_and_cli (windows-latest,
22)
> Analyze the workflow logs, identify the root cause of the failure, and
implement a fix.
> Job ID: 68096192040
> Job URL:
https://github.com/microsoft/TypeAgent/actions/runs/23410295385/job/68096192040


</details>



<!-- START COPILOT CODING AGENT TIPS -->
---

📱 Kick off Copilot coding agent tasks wherever you are with [GitHub
Mobile](https://gh.io/cca-mobile-docs), available on iOS and Android.

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
… runner (#2040)

The `partialCompletion/*.spec.ts` jest unit tests landed inside
`testDir: "./test"`, causing Playwright to pick them up on Windows
(`shell:test` runs the full suite) and fail immediately:

```
SyntaxError: The requested module '@jest/globals' does not provide an export named 'jest'
```

Linux was unaffected because its CI step runs `shell:smoke`
(`simple.spec.ts` only).

## Changes

- **`playwright.config.ts`** — add `testIgnore:
["**/partialCompletion/**"]` to exclude the jest-based unit tests from
Playwright's test discovery.
- **`package.json`** — update `shell:test` to `pnpm run jest-esm && npx
playwright test` so the `partialCompletion` tests still run in CI via
jest (compiled to `dist/test/partialCompletion/` by `tsc:model` as part
of the build step).

<!-- START COPILOT CODING AGENT SUFFIX -->



<!-- START COPILOT ORIGINAL PROMPT -->



<details>

<summary>Original prompt</summary>

> Fix the failing GitHub Actions workflow shell_and_cli (windows-latest,
22)
> Analyze the workflow logs, identify the root cause of the failure, and
implement a fix.
> Job ID: 68096986347
> Job URL:
https://github.com/microsoft/TypeAgent/actions/runs/23410586826/job/68096986347


</details>



<!-- START COPILOT CODING AGENT TIPS -->
---

🔒 GitHub Advanced Security automatically protects Copilot coding agent
pull requests. You can protect all pull requests by enabling Advanced
Security for your repositories. [Learn more about Advanced
Security.](https://gh.io/cca-advanced-security)

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: robgruen <25374553+robgruen@users.noreply.github.com>
- [x] Investigate failing GitHub Actions workflow (job 68103915750)
- [x] Identify root causes:
1. CSS selector bug in `chatView.ts`: backstack includes old history
entries (Expected `@history`, Received `@exit`)
2. Dispatcher initialization too slow on Windows CI (contenteditable
wait timeout is too short at 30s)
3. `dialog.showErrorBox` blocks Electron main thread when dispatcher
fails in test mode
4. Stale lock file contention when Electron is forcibly killed and
immediately restarted
- [x] Fix CSS selector in `chatView.ts` for command backstack
(`.chat-message-container-user:not(.history)` instead of `:not(.history)
> .chat-message-container-user`)
- [x] Increase `contenteditable` timeout in `testHelper.ts` from 30s to
120s
- [x] Fix blocking dialog in `instance.ts` for test mode (use
`console.error` instead of `dialog.showErrorBox`)
- [x] Add lock retry in `fsUtils.ts` for stale lock handling (15 retries
× 1s = up to 15s wait)

<!-- START COPILOT CODING AGENT SUFFIX -->



<!-- START COPILOT ORIGINAL PROMPT -->



<details>

<summary>Original prompt</summary>

> Fix the failing GitHub Actions workflow shell_and_cli (windows-latest,
22)
> Analyze the workflow logs, identify the root cause of the failure, and
implement a fix.
> Job ID: 68103915750
> Job URL:
https://github.com/microsoft/TypeAgent/actions/runs/23411009411/job/68103915750


</details>



<!-- START COPILOT CODING AGENT TIPS -->
---

💬 Send tasks to Copilot coding agent from
[Slack](https://gh.io/cca-slack-docs) and
[Teams](https://gh.io/cca-teams-docs) to turn conversations into code.
Copilot posts an update in your thread when it's finished.

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: robgruen <25374553+robgruen@users.noreply.github.com>
Shell integration tests were timing out on CI due to dispatcher
initialization loading all 20+ agents at startup.

## Changes

- **`defaultAgentProvider/data/config.test.json`** — New minimal config
with only the 4 agents exercised by the test suite, all configured to
run in-process (`execMode: "dispatcher"`) to avoid child process spawn
overhead:
  - `chat`, `greeting` — general Q&A and startup greeting
  - `calendar` — `@config schema calendar` test
  - `list` — shopping list CRUD test

- **`shell/src/main/instance.ts`** — When launched with `--test`, passes
`"test"` as `configName` to both `getDefaultAppAgentProviders` and
`getIndexingServiceRegistry`:

```ts
const configName = isTest ? "test" : undefined;
const indexingServiceRegistry =
    await getIndexingServiceRegistry(instanceDir, configName);
// ...
...getDefaultAppAgentProviders(instanceDir, configName),
```

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: robgruen <25374553+robgruen@users.noreply.github.com>
@robgruen robgruen deployed to development-fork March 23, 2026 00:31 — with GitHub Actions Active
…timeout (#2046)

Two independent test failures in the `shell_and_cli (windows-latest)` CI
job: the `command backstack` test picks up stale `@exit` history
entries, and the `create_update_clear_list` test times out waiting for
LLM-routed agent responses.

## CSS selector bug — `command backstack` test

`initializeChatHistory` adds `.history` to the **parent wrapper**
elements (direct children of the scroll container), not to
`.chat-message-container-user` elements themselves. The backstack query
was filtering on the wrong element:

```ts
// Before — checks the user message element itself (never has .history)
".chat-message-container-user:not(.history):not(.chat-message-hidden) .chat-message-content"

// After — checks the parent wrapper via child combinator
":not(.history) > .chat-message-container-user:not(.chat-message-hidden) .chat-message-content"
```

Without this fix, `@exit` messages saved from previous test sessions are
not excluded from the backstack, causing "Expected `@history`, Received
`@exit`".

## Timeout — `create_update_clear_list` test

`sendUserRequestAndWaitForCompletion` had a hardcoded 30 s timeout. The
listAgent test sends 8 natural-language requests that each require
multi-agent LLM routing by the dispatcher — considerably heavier than
the direct shell commands used by other tests. On Windows CI this
routing consistently exceeded 30 s.

- Added an optional `timeout` parameter to
`sendUserRequestAndWaitForCompletion` (default 90 s,
backward-compatible).
- Increased the Playwright per-test timeout from 300 s → 600 s to ensure
the full 8-request listAgent suite can complete within a single test
budget.

<!-- START COPILOT CODING AGENT SUFFIX -->



<!-- START COPILOT ORIGINAL PROMPT -->



<details>

<summary>Original prompt</summary>

> Fix the failing GitHub Actions workflow shell_and_cli (windows-latest,
22)
> Analyze the workflow logs, identify the root cause of the failure, and
implement a fix.
> Job ID: 68112362987
> Job URL:
https://github.com/microsoft/TypeAgent/actions/runs/23416309554/job/68112362987


</details>



<!-- START COPILOT CODING AGENT TIPS -->
---

💬 Send tasks to Copilot coding agent from
[Slack](https://gh.io/cca-slack-docs) and
[Teams](https://gh.io/cca-teams-docs) to turn conversations into code.
Copilot posts an update in your thread when it's finished.

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: robgruen <25374553+robgruen@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants