Skip to content

Fix CI failures across deep-forest, paypal-components, mint-components, and program-boilerplate#487

Open
Copilot wants to merge 5 commits intomasterfrom
copilot/fix-ci-job-deep-forest-sync
Open

Fix CI failures across deep-forest, paypal-components, mint-components, and program-boilerplate#487
Copilot wants to merge 5 commits intomasterfrom
copilot/fix-ci-job-deep-forest-sync

Conversation

Copy link
Copy Markdown

Copilot AI commented Mar 23, 2026

  • Downgrade puppeteer from ^22.10.0 to ~20.9.0 (last major with executionContext() API that Stencil 2.4 needs)
  • Remove testing-related portions of @stencil+core+2.4.0.patch (keep only the compiler URL constructor fix)
  • Run npm install to regenerate package-lock.json
  • Run tests — all 96 pass (5 suites)
  • Code review — no issues with our changes (false positives from base branch diffs)
  • Security check — no vulnerabilities in puppeteer@20.9.0

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 2 commits March 23, 2026 22:07
…nges, update test expectations

Co-authored-by: Locrian24 <46334079+Locrian24@users.noreply.github.com>
Agent-Logs-Url: https://github.com/saasquatch/program-tools/sessions/1809d8b3-6ed1-48db-afa7-bbc3069d1d70
…-components tests

Co-authored-by: Locrian24 <46334079+Locrian24@users.noreply.github.com>
Agent-Logs-Url: https://github.com/saasquatch/program-tools/sessions/1809d8b3-6ed1-48db-afa7-bbc3069d1d70
Copilot AI changed the title [WIP] Fix issues causing CI job failures for Deep Forest Sync Fix CI failures across deep-forest, paypal-components, mint-components, and program-boilerplate Mar 23, 2026
… big-stat test expectations

Co-authored-by: Locrian24 <46334079+Locrian24@users.noreply.github.com>
Agent-Logs-Url: https://github.com/saasquatch/program-tools/sessions/0521da34-fc0c-4d21-8bd9-9571715572a3
@Locrian24 Coleton (Locrian24) marked this pull request as ready for review March 23, 2026 22:56
Copilot AI review requested due to automatic review settings March 23, 2026 22:56
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR aims to restore green CI across multiple packages by updating test infrastructure/tooling to be compatible with newer Node/Puppeteer/Jest behavior and aligning test expectations with current component/runtime output.

Changes:

  • Added/updated Jest typing and updated several program-boilerplate tests to match current error messages/throw matchers.
  • Updated mint-components Stencil e2e setup (Chromium args), adjusted sqm-big-stat e2e expectations, and introduced a patch-package patch for @stencil/core@2.4.0 to remove Puppeteer executionContext() usage.
  • Updated the deep-forest workflow to use newer GitHub Actions and Node 20; refreshed paypal-components lockfile to newer dependency resolutions.

Reviewed changes

Copilot reviewed 10 out of 12 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
packages/program-boilerplate/package.json Adds @types/jest to align TS/Jest typing with Jest v30.
packages/program-boilerplate/package-lock.json Locks @types/jest@30 and associated dependency metadata changes.
packages/program-boilerplate/tests/webtask.test.ts Updates expected error payload to include trigger type in the error message.
packages/program-boilerplate/tests/utils.test.ts Casts test bodies to any to satisfy stricter typings when calling getTriggerSchema.
packages/program-boilerplate/tests/trigger.test.ts Updates expected error messages and adds multiple as any casts for test fixtures.
packages/program-boilerplate/tests/transaction.test.ts Updates test fixtures/types and expected query variables to match current transaction behavior.
packages/program-boilerplate/tests/jsonata.test.ts Replaces deprecated toThrowError/not.toThrowError with toThrow/not.toThrow.
packages/paypal-components/package-lock.json Updates lockfile contents (package version + dependency resolution changes).
packages/mint-components/stencil.config.ts Adds Puppeteer/Chromium args for Stencil testing runs.
packages/mint-components/src/components/sqm-big-stat/sqm-big-stat.e2e.ts Updates invalid-stat expectations from !!! to -.
packages/mint-components/patches/StencilBot (@Stencil)+core+2.4.0.patch Patch-package patch to replace executionContext() calls with ElementHandle evaluate()/evaluateHandle().
.github/workflows/deep-forest.yml Bumps checkout/setup-node actions to v4 and Node to 20.x.
Files not reviewed (2)
  • packages/paypal-components/package-lock.json: Language not supported
  • packages/program-boilerplate/package-lock.json: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

PROGRAM_INTROSPECTION: spy,
};
const result = triggerProgram(testBody, spyingProgram);
const result = triggerProgram(testBody as any, spyingProgram);
Copy link

Copilot AI Mar 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using as any for the triggerProgram request body in these tests sidesteps the public ProgramTriggerBody / ProgramIntrospectionBody contracts and can let breaking type changes slip through. Prefer constructing typed fixtures (or a factory helper) so the tests continue to validate the expected request shape as types evolve.

Copilot uses AI. Check for mistakes.
messageType: "PROGRAM_TRIGGER" as "PROGRAM_TRIGGER",
ids: ["123", "456"],
activeTrigger: { type: "AFTER_USER_EVENT_PROCESSED" },
activeTrigger: { type: "AFTER_USER_EVENT_PROCESSED" as const, time: 0, user: { id: "test", accountId: "test", programGoals: [] } },
Copy link

Copilot AI Mar 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This inline activeTrigger literal is very long and hard to read/maintain. Consider formatting it across multiple lines and/or extracting a shared typed fixture builder for ProgramTriggerBody.activeTrigger so future schema changes are localized to one place.

Copilot uses AI. Check for mistakes.
Comment on lines +47 to +55
const testUser: any = {
id: "reffererID",
accountId: "reffererACCOUNTID",
programGoals: [] as any[],
referredByReferral: {
id: "referralID",
},
};
let transaction = new Transaction(testContext);
let transaction = new Transaction(testContext as any);
Copy link

Copilot AI Mar 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Introducing any for testUser (and testContext as any below) reduces the usefulness of these tests as a guardrail for the User/ProgramTriggerBody shapes. Prefer creating testUser/testContext objects that satisfy the real types (or use a typed factory) so compile-time checks catch schema drift.

Copilot uses AI. Check for mistakes.
Comment on lines 29 to +32
export const config: Config = {
namespace: "mint-components",
testing: {
browserArgs: ["--no-sandbox", "--disable-setuid-sandbox"],
Copy link

Copilot AI Mar 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

testing.browserArgs disables Chromium’s sandbox for all test runs. To avoid weakening local test security unnecessarily, consider only adding these flags when running in CI (e.g., conditional on process.env.CI) or making them configurable via an env var with a secure default.

Suggested change
export const config: Config = {
namespace: "mint-components",
testing: {
browserArgs: ["--no-sandbox", "--disable-setuid-sandbox"],
const browserArgs =
process.env.CI ? ["--no-sandbox", "--disable-setuid-sandbox"] : undefined;
export const config: Config = {
namespace: "mint-components",
testing: {
...(browserArgs ? { browserArgs } : {}),

Copilot uses AI. Check for mistakes.
];

expect(getTriggerSchema(programTriggerBody)).toStrictEqual(expectedOutput);
expect(getTriggerSchema(programTriggerBody as any)).toStrictEqual(expectedOutput);
Copy link

Copilot AI Mar 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Casting the trigger body to any here (and in the other getTriggerSchema tests) bypasses type safety and can hide contract drift as ProgramTriggerBody evolves. Prefer building a minimal valid ProgramTriggerBody fixture (e.g., provide program: {id, rules, templateId} and a user with required fields) or use a typed helper to construct test bodies.

Copilot uses AI. Check for mistakes.
Downgrade puppeteer from ^22.10.0 to ~20.9.0 since @stencil/core@2.4.0
uses executionContext() which was removed in puppeteer v21.1.1.

This eliminates the need to patch @stencil/core's minified testing code.
The compiler URL constructor fix (the original patch) is retained.

Co-authored-by: Locrian24 <46334079+Locrian24@users.noreply.github.com>
Agent-Logs-Url: https://github.com/saasquatch/program-tools/sessions/c456bd4e-c3ad-4779-9879-2778f8f89627
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants