Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
8473084
fix(wework): share device onboarding across remote projects and setti…
FicoHu Nov 9, 2026
38b9e2e
fix(wework): 修复 Electron 单测误启动应用及子进程残留 (#4482)
Micro66 Nov 9, 2026
846e806
fix(wework): prepare credential-compatible rollback bridge
Nov 9, 2026
8fea05d
fix(wework): clear protected credentials without keychain access
Nov 9, 2026
27fd64d
feat(collaboration): add offline device cleanup and last online time …
FicoHu Nov 9, 2026
c1f7cc5
fix(collaboration): complete English UI and scoped attachment access …
qdaxb Nov 9, 2026
a5f72c3
test(wework): load shipped credential modules through native loader
Nov 9, 2026
2ba26d1
chore(wework): sync bridge with current main
Nov 9, 2026
f6cbcd5
fix(wework): avoid blocking startup on native credential access
Nov 9, 2026
c4776f8
fix(wework): reject native fixed-key encryption fallback
Nov 9, 2026
204a212
test(wework): exercise the native credential APIs in historical packages
Nov 9, 2026
eb63e74
test(wework): preserve upgrade probes across release handoffs
Nov 9, 2026
6115222
test(wework): confirm rollback retries before preparation
Nov 9, 2026
b345734
test(wework): verify credentials by migration format
Nov 10, 2026
0ea8f95
test(wework): retain delivered rollback identities and inspector endp…
Nov 10, 2026
999f77c
test(wework): bind package verification to native process and window …
Nov 10, 2026
0e592f2
ci(wework): include native status window contract tests
Nov 10, 2026
c25fdfe
test(wework): register delayed native recovery handoffs
Nov 10, 2026
6bff0fc
test(wework): retain native credential and exit diagnostics
Nov 10, 2026
b297cbc
fix(wework): serialize release bootstrap transactions
Nov 10, 2026
d9409f1
test(wework): preserve native startup coverage on all platforms
Nov 10, 2026
7e80ab4
test(wework): diagnose native startup lifecycle by phase
Nov 10, 2026
5b6a6c1
test(wework): control native fixtures without GUI stdin
Nov 10, 2026
c5a6c12
test(wework): observe native fixture command state
Nov 10, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .github/actions/prepare-electron-installer-cache/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,10 @@ runs:

- name: Install locked Electron package dependencies
shell: bash
env:
ELECTRON_SKIP_BINARY_DOWNLOAD: "1"
run: pnpm --dir wework/electron install --frozen-lockfile

- name: Prime the official Electron installer cache
shell: bash
run: |
node --input-type=module -e 'import {primeElectronInstallerCache} from "./wework/scripts/lib/electron-installer-cache.mjs"; await primeElectronInstallerCache({electronPackageRoot:"wework/electron/node_modules/electron"})'
run: node .github/scripts/prime-ci-electron-installer-cache.mjs
5 changes: 4 additions & 1 deletion .github/runtime-images/backend-rs-builder.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@ ARG DEPS_IMAGE=dependencies
FROM ubuntu:24.04 AS toolchain
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
COPY .github/ci/rust-toolchain /tmp/rust-toolchain
RUN apt-get update && apt-get install -y --no-install-recommends \
RUN sed -i 's#http://archive\.ubuntu\.com/ubuntu#http://security.ubuntu.com/ubuntu#g' \
/etc/apt/sources.list.d/ubuntu.sources \
&& apt-get -o APT::Update::Error-Mode=any update \
&& apt-get install -y --no-install-recommends \
build-essential ca-certificates cmake curl nasm pkg-config libssl-dev zlib1g-dev \
&& curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs \
| sh -s -- -y --profile minimal --default-toolchain "$(cat /tmp/rust-toolchain)" \
Expand Down
12 changes: 12 additions & 0 deletions .github/scripts/ci-classification-tests/20-repository-paths.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,22 @@

assert_case "docs only" "$all_false" "docs/zh/index.md"

electron_cache_expected="${all_false/wework=false/wework=true}"
for path in .github/scripts/prime-ci-electron-installer-cache.mjs \
.github/actions/prepare-electron-installer-cache/action.yml; do
assert_case "Electron installer cache changes run both consumer workflows: $path" \
"${electron_cache_expected/wework_e2e=false/wework_e2e=true}" "$path"
done

assert_case "DingTalk HTTPS fixture changes run platform E2E" \
"${all_false/platform_e2e=false/platform_e2e=true}" \
".github/scripts/setup-dingtalk-oauth-e2e.sh"

e2e_apt_expected="${all_false/platform_e2e=false/platform_e2e=true}"
assert_case "E2E dependency installer changes run both consumer workflows" \
"${e2e_apt_expected/wework_e2e=false/wework_e2e=true}" \
".github/scripts/install-e2e-apt-packages.sh"

permission_contract_expected="${all_false/backend=false/backend=true}"
assert_case "Chinese permission contract runs backend guards" "$permission_contract_expected" \
"docs/zh/wegent/developer-guide/collaboration-permissions.md"
Expand Down
21 changes: 21 additions & 0 deletions .github/scripts/ci-classification-tests/80-desktop-regressions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,27 @@ for parent_board_path in \
fi
done

for path in .github/scripts/prime-ci-electron-installer-cache.mjs \
.github/actions/prepare-electron-installer-cache/action.yml \
wework/scripts/lib/electron-installer-cache.mjs; do
assert_desktop_case "Electron installer cache selects its native Core consumers: $path" \
'wework_desktop_e2e=true
wework_desktop_core_e2e=true
wework_desktop_core_e2e_matrix={"include":[{"id":"core-5","name":"Core / shard 5","segments":"workbench-mode,native-window-startup"}]}
wework_desktop_other_e2e=false
wework_desktop_other_e2e_matrix={"include":[]}' "$path"
done

assert_desktop_case "E2E dependency installer selects only its desktop consumers" \
'wework_desktop_e2e=true
wework_desktop_core_e2e=true
wework_desktop_core_e2e_matrix={"include":[{"id":"core-3","name":"Core / shard 3","segments":"stand-in-email"},{"id":"core-5","name":"Core / shard 5","segments":"native-window-startup"},{"id":"core-10","name":"Core / shard 10","segments":"plugin-development"}]}
wework_desktop_cloud_e2e=true
wework_desktop_cloud_e2e_matrix={"include":[{"id":"cloud-3","name":"Cloud / shard 3","segments":"plugin-account-auth-coordination"},{"id":"cloud-6","name":"Cloud / shard 6","segments":"plugin-account-auth-password,plugin-account-auth-transfer,plugin-account-auth-oauth"},{"id":"cloud-8","name":"Cloud / shard 8","segments":"plugin-account-auth-dws,plugin-account-auth-conversation,plugin-account-auth-github"}]}
wework_desktop_other_e2e=false
wework_desktop_other_e2e_matrix={"include":[]}' \
".github/scripts/install-e2e-apt-packages.sh"

for email_path in \
"wework/e2e/desktop/scenarios/stand-in-email.scenario.mjs" \
"wework/e2e/desktop/modules/real-mail-server.mjs" \
Expand Down
10 changes: 10 additions & 0 deletions .github/scripts/classify-ci-changes.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@ classify_path() {
changed[wework]=true
return
;;
.github/actions/prepare-electron-installer-cache/* | \
.github/scripts/prime-ci-electron-installer-cache.mjs)
changed[wework]=true
changed[wework_e2e]=true
return
;;
.github/actions/build-frontend-e2e/* | .github/scripts/frontend-e2e-build*.mjs | \
.github/scripts/restore-frontend-ci-build.mjs)
changed[platform_e2e]=true
Expand Down Expand Up @@ -105,6 +111,10 @@ classify_path() {
mark_all
return
;;
.github/scripts/install-e2e-apt-packages.sh)
changed[platform_e2e]=true
changed[wework_e2e]=true
;;
.github/workflows/e2e-tests.yml | \
.github/scripts/run-attachment-replica-e2e.sh | \
.github/scripts/run-knowledge-provider-e2e.sh | \
Expand Down
9 changes: 9 additions & 0 deletions .github/scripts/desktop-ci/wework-paths.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,16 @@ classify_wework_path() {
select_target "core:split-workbench"
return
;;
wework/e2e/desktop/modules/github-release-asset.mjs)
select_target "core:harness-app-development"
select_target "core:harness-app-lifecycle"
select_target "core:harness-app-models"
select_target "cloud:plugin-legacy-upgrade"
return
;;
wework/e2e/desktop/scenarios/harness-apps.scenario.mjs | \
wework/e2e/desktop/modules/dsh-runtime-cache.mjs | \
wework/electron/src/host/e2e-dsh-release-redirect.ts | \
wework/e2e/desktop/modules/harness-app-*)
select_target "core:harness-app-development"
select_target "core:harness-app-lifecycle"
Expand Down
56 changes: 56 additions & 0 deletions .github/scripts/prime-ci-electron-installer-cache.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
import { execFile } from "node:child_process";
import { mkdtemp, rm } from "node:fs/promises";
import { tmpdir } from "node:os";
import { join } from "node:path";
import { promisify } from "node:util";
import { primeElectronInstallerCache } from "../../wework/scripts/lib/electron-installer-cache.mjs";

const run = promisify(execFile);
const temporary = await mkdtemp(join(tmpdir(), "ci-electron-"));
const api = "https://api.github.com/repos/electron/electron/releases";

try {
await primeElectronInstallerCache({
electronPackageRoot: "wework/electron/node_modules/electron",
downloadSourceArtifact: async ({ version, platform, arch }) => {
const filename = `electron-v${version}-${platform}-${arch}.zip`;
const { stdout } = await run("curl", [
"--fail",
"--silent",
"--show-error",
"--connect-timeout",
"10",
"--max-time",
"30",
`${api}/tags/v${version}`,
]);
const asset = JSON.parse(stdout).assets.find(
(item) => item.name === filename,
);
if (!Number.isSafeInteger(asset?.id) || asset.id <= 0) {
throw new Error(
`Official Electron release does not contain ${filename}`,
);
}
const download = join(temporary, filename);
await run("curl", [
"--fail",
"--silent",
"--show-error",
"--location",
"--connect-timeout",
"10",
"--max-time",
"240",
"--header",
"Accept: application/octet-stream",
"--output",
download,
`${api}/assets/${asset.id}?download=1`,
]);
return download;
},
});
} finally {
await rm(temporary, { recursive: true, force: true });
}
51 changes: 50 additions & 1 deletion .github/scripts/test-e2e-resource-reuse.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,45 @@ import test from "node:test";
import { runInNewContext } from "node:vm";
import { runtimeArtifact } from "./runtime-artifact.mjs";
import { containerIPv4, runnerLoopbackHosts } from "./e2e-runner-network.mjs";
import { fetchGithubReleaseAsset } from "../../wework/e2e/desktop/modules/github-release-asset.mjs";

test("historical fixtures use the exact GitHub release asset by ID", async () => {
const requests = [];
const response = await fetchGithubReleaseAsset({
repository: "wecode-ai/Wegent",
tag: "wework-updater",
name: "pinned.tar.gz",
redirect: "manual",
token: "fixture-token",
fetchImpl: async (url, options) => {
requests.push({ url, ...options });
if (requests.length === 1) {
return Response.json({
assets: [
{ name: "other-pinned.tar.gz", id: 1 },
{ name: "pinned.tar.gz", id: 2 },
],
});
}
return new Response(null, { status: 302 });
},
});
assert.equal(response.status, 302);
assert.equal(
requests[0].url,
"https://api.github.com/repos/wecode-ai/Wegent/releases/tags/wework-updater",
);
assert.equal(
requests[1].url,
"https://api.github.com/repos/wecode-ai/Wegent/releases/assets/2?download=1",
);
assert.deepEqual(requests[1].headers, {
authorization: "Bearer fixture-token",
accept: "application/octet-stream",
});
assert.equal(requests[1].redirect, "manual");
assert.equal(requests[1].signal, requests[0].signal);
});

test("isolated browsers route localhost to real runner services without retaining a loopback alias", () => {
const hosts = [
Expand Down Expand Up @@ -587,7 +626,17 @@ test("Linux native probes restore verified Electron downloads before the officia
commands.includes("pnpm --dir wework/electron install --frozen-lockfile"),
);
assert(
commands.includes("primeElectronInstallerCache({electronPackageRoot:"),
commands.includes(
"node .github/scripts/prime-ci-electron-installer-cache.mjs",
),
);
const moduleInstall = action.find((step) =>
step.run?.includes("pnpm --dir wework/electron install --frozen-lockfile"),
);
assert.equal(moduleInstall.env.ELECTRON_SKIP_BINARY_DOWNLOAD, "1");
assert.equal(
steps[installIndex].env.WEWORK_ELECTRON_DEPENDENCIES_READY,
"true",
);
assert(
steps[installIndex].run.includes("pnpm --dir wework prepare:electron"),
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -730,6 +730,8 @@ jobs:

- name: Prepare Wework Electron dependencies
if: matrix.shard == 1
env:
WEWORK_ELECTRON_DEPENDENCIES_READY: "true"
run: pnpm --filter wework prepare:electron

- name: Install Wework host modules for renderer fixtures
Expand Down Expand Up @@ -757,7 +759,7 @@ jobs:

- name: Verify immutable upgrade artifact consumption
if: matrix.shard == 1
run: node --test wework/scripts/published-desktop-release.test.mjs wework/scripts/portable-desktop-release.test.mjs wework/e2e/desktop/modules/inspect-before-start.test.mjs wework/e2e/desktop/modules/desktop-build-flows.test.mjs wework/e2e/desktop/modules/failure-followup.test.mjs wework/e2e/desktop/modules/voice-toolbar-flow.test.mjs wework/e2e/desktop/modules/electron-launch-arguments.test.mjs
run: node --test wework/scripts/published-desktop-release.test.mjs wework/scripts/portable-desktop-release.test.mjs wework/e2e/desktop/modules/inspect-before-start.test.mjs wework/e2e/desktop/modules/macos-status-item.test.mjs wework/e2e/desktop/modules/desktop-build-flows.test.mjs wework/e2e/desktop/modules/failure-followup.test.mjs wework/e2e/desktop/modules/voice-toolbar-flow.test.mjs wework/e2e/desktop/modules/electron-launch-arguments.test.mjs

- name: Verify startup theme evidence
if: matrix.shard == 1
Expand Down
11 changes: 9 additions & 2 deletions .github/workflows/wework-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -334,10 +334,17 @@ jobs:
- name: Synchronize desktop build version
run: node wework/scripts/sync-desktop-release-version.mjs "${{ needs.prepare-release.outputs.version }}"

- name: Verify native launcher before packaging
- name: Verify native contracts before packaging
shell: bash
run: |
node --test wework/scripts/build-launcher.test.mjs
tests=(wework/scripts/build-launcher.test.mjs wework/e2e/desktop/modules/macos-status-item.test.mjs wework/e2e/desktop/modules/release-startup-owner.test.mjs)
if [[ "$RUNNER_OS" == Linux ]]; then
sudo install -m 644 .github/ci/wework-electron.apparmor /etc/apparmor.d/wework-electron-ci
sudo apparmor_parser --replace /etc/apparmor.d/wework-electron-ci
dbus-run-session -- xvfb-run -a node --test "${tests[@]}"
else
node --test "${tests[@]}"
fi
rustc --edition 2021 --test wework/launcher/src/main.rs -o "$RUNNER_TEMP/wework-launcher-tests.exe"
"$RUNNER_TEMP/wework-launcher-tests.exe"

Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/wework-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -397,8 +397,7 @@ jobs:
- name: Prepare real mailbox server runtime
if: contains(matrix.segments, 'stand-in-email')
run: |
apt-get update
apt-get install -y --no-install-recommends openjdk-21-jre-headless
bash .github/scripts/install-e2e-apt-packages.sh openjdk-21-jre-headless
java -version
keytool -help >/dev/null

Expand Down Expand Up @@ -436,8 +435,7 @@ jobs:
- name: Install the native log-folder opener
if: contains(matrix.segments, 'native-window-startup')
run: |
apt-get update
apt-get install -y --no-install-recommends file xdg-utils pcmanfm
bash .github/scripts/install-e2e-apt-packages.sh file xdg-utils pcmanfm
XDG_CONFIG_HOME=/etc/xdg xdg-mime default pcmanfm.desktop inode/directory
test "$(XDG_CONFIG_HOME=/tmp/wework-e2e-unconfigured xdg-mime query default inode/directory)" = pcmanfm.desktop
test "$(xdg-mime query filetype /tmp)" = inode/directory
Expand All @@ -448,6 +446,8 @@ jobs:

- name: Install Electron for native startup and schema verification
if: contains(matrix.segments, 'workbench-mode') || contains(matrix.segments, 'native-window-startup')
env:
WEWORK_ELECTRON_DEPENDENCIES_READY: "true"
run: |
pnpm --dir wework prepare:electron
pnpm --dir wework/electron exec node -e "require('node:fs').statSync(require('electron'))"
Expand All @@ -469,6 +469,7 @@ jobs:
WEWORK_E2E_ISOLATED_XVFB: "true"
WEWORK_E2E_PARALLEL_CHECKPOINTS: "4"
WEWORK_E2E_PARALLEL_SCOPE: core
WEWORK_E2E_RELEASE_ASSET_TOKEN: ${{ contains(matrix.segments, 'harness-app-') && github.token || '' }}
WEWORK_E2E_BACKEND_RS_BIN: ${{ github.workspace }}/.ci-artifacts/wework-core-e2e-build/backend-rs/wegent-backend-rs
WEWORK_E2E_SCREENSHOTS: ${{ contains(matrix.segments, 'harness-apps') && 'harness-milestones' || 'all' }}
WEWORK_E2E_SEGMENTS: ${{ matrix.segments }}
Expand All @@ -479,8 +480,7 @@ jobs:
test -x "$WEWORK_E2E_BACKEND_RS_BIN"
test -x "$WEWORK_E2E_CODEX_BIN"
if [[ ",$WEWORK_E2E_SEGMENTS," == *",plugin-development,"* ]]; then
apt-get update
apt-get install -y --no-install-recommends gdb
bash .github/scripts/install-e2e-apt-packages.sh gdb
WEWORK_E2E_EXECUTOR_REAL_BIN=/usr/bin/test \
WEGENT_APP_IPC_ENDPOINT=diagnostic-fd-check \
.github/scripts/run-wework-executor-with-gdb.sh \
Expand Down Expand Up @@ -951,8 +951,7 @@ jobs:
source .github/scripts/lib/apt-packages.sh
mapfile -t missing < <(find_missing_apt_packages gh)
if ((${#missing[@]} > 0)); then
apt-get update
apt-get install -y --no-install-recommends "${missing[@]}"
bash .github/scripts/install-e2e-apt-packages.sh "${missing[@]}"
fi
gh --version

Expand All @@ -976,6 +975,7 @@ jobs:
WEWORK_E2E_ISOLATED_XVFB: "true"
WEWORK_E2E_PARALLEL_CHECKPOINTS: "4"
WEWORK_E2E_PARALLEL_SCOPE: cloud
WEWORK_E2E_RELEASE_ASSET_TOKEN: ${{ contains(matrix.segments, 'plugin-legacy-upgrade') && github.token || '' }}
WEWORK_E2E_SEGMENTS: ${{ matrix.segments }}
WEWORK_E2E_DWS_FIXTURE_DIR: ${{ github.workspace }}/.ci-artifacts/dws-account-auth
run: |
Expand Down
Loading