Commit Graph
244 Commits
Author SHA1 Message Date
Tianyi Cui f75aabcb16 test(ci): run required benchmarks on standard hosted Linux 2026-09-06 17:10:30 +08:00
Tianyi Cui 2395f112d8 test(perf): gate opening large Sessions with synthetic CI benchmarks
Add a benchmark lane (`vitest.bench.config.ts`, `pnpm run test:bench`,
gate mode `ci-bench`) and a required `node 24 / benchmarks` CI job that
runs it alone. Benchmarks synthesize their input in-process from fixed
parameters and fail on documented budgets:

- `open-generation.bench.ts`: a 200-turn released-v0 log with 500 text
  and 125 reasoning deltas per reply (127,400 events, ~2.8 MB) encoded
  through the frozen v0 codec; the migrating first `open()` must finish
  within 2,000 ms in a child process capped at 128 MB of old space, and a
  fresh process must open the published current generation within 500 ms.
- `conversation-fold.bench.client.ts`: 200 replies whose compact streams
  hold 2,000 text + 500 reasoning deltas each, folded through every Chat
  Definition by the real assembler; the fold must finish within 150 ms
  and stay within 3x the fold of the same window with 100 deltas per
  reply.

On this commit both gates fail: the migration exhausts the 128 MB heap
(4.8 s and 696 MB peak RSS without the cap; the pre-stack decode of the
same bytes took 34 ms and 168 MB) and the fold scales 11x with the delta
count. The stacked fixes bring both paths to O(records).
2026-09-06 01:01:03 +08:00
fz 7dcdcc2965 feat(python): support macOS x64 runtime wheels 2026-09-03 11:16:34 +08:00
Chinesezjc faeb4e2218 Merge remote-tracking branch 'origin/master' into fix/windows-coverage-align-linux 2026-08-31 14:23:32 +08:00
Chinesezjc 456dcdd8fb Merge pull request #3211 from deepseek-harness/ci/gate-fail-fast
ci: fail fast at the first blocking gate failure
2026-08-31 14:14:22 +08:00
Chinesezjc 43cfe6a26e Merge origin/master into fix/windows-coverage-align-linux
Resolve the 08-08 note conflict (keep the zero-build rewrite, drop the
SQLite busy-journal sentence removed with the SQLite backend) and drop the
now-removed session-persistence-sqlite built-package suite from the
lib-consuming self-skip inventory in the ci.yml comment, the
ci-workflow.spec.ts comment, and the partitioned-coverage note; the
inventory is now image-loadable, transform-corpus, and client-bundle.
2026-08-31 14:13:51 +08:00
Tianyi Cui 4553c9d957 refactor(session)!: remove SQLite persistence backend 2026-08-31 13:23:07 +08:00
Chinesezjc a9bc7b7056 fix(ci): add client-bundle to the zero-build self-skip inventory
client-bundle.client.spec.ts reads packages/client/ui-trajectory/lib/client.js
and skips all three cases when the bundle is absent, so it is a fourth
lib-consuming suite in the instrumented corpus. List it beside built-package
in the ci.yml comment, the ci-workflow.spec.ts comment, and the
partitioned-coverage note (both languages).
2026-08-31 12:13:43 +08:00
Chinesezjc 2dd8b3eac3 fix(ci): harden the zero-build coverage assertion and list all skip suites
Strengthen the ci-workflow.spec.ts guard to match any 'pnpm run build'
spelling (corepack prefix, multi-line run blocks) instead of one exact
string, and complete the lib-consuming self-skip inventory with the
webworker-runtime transform-corpus import sweep alongside the packer
image assertions and the built-package check. Update the ci.yml comment
and the partitioned-coverage note (both languages) to match, and drop the
stale 'post-build' phase wording and the native-Windows build-wait
rationale from the coverage-exempt comment.
2026-08-31 12:00:05 +08:00
Chinesezjc ec6a98452d Merge branch 'master' into ci/gate-fail-fast 2026-08-31 11:56:44 +08:00
Chinesezjc e2ef25b06e fix(ci): windows coverage runs zero-build like the linux lane
The windows-coverage job built the workspace before running the same
ci-coverage gates as Linux, but the instrumented corpus resolves
workspace imports to src through the tsconfig paths map and never
consumes lib/; the two lib-consuming suites (webworker-packer
image-loadable, session-persistence-sqlite built-package) self-skip on
unbuilt checkouts, exactly how the Linux lane already runs them. Remove
the build step so both lanes behave identically, and pin the zero-build
invariant in ci-workflow.spec.ts (red before this change, green after).

Agent Notes updated in place: corrected the build-wait rationale and the
wrong attribution of the packer assertions to the instrumented suite.
2026-08-31 11:40:33 +08:00
Chinesezjc 4032a0a428 ci(windows): use ReFS block-clone installs on the self-hosted VM (#3342)
pnpm hardlinks node_modules files to the store on the same volume, and
TypeScript's native realpath resolves those links back to store paths
(F:/.pnpm-store/v11/files/...), producing TS6231 during tsc -b and vite
resolution. ReFS block cloning (package-import-method=clone) gives each
file an independent path while sharing physical blocks, avoiding the
leak without the copy cost. Clone mode needs the @reflink/reflink native
module, which the system corepack pnpm carries but pnpm/action-setup's
dest build omits, so installs run through corepack pnpm.

The install steps branch on the workspace filesystem: clone only on
ReFS, plain install on hosted NTFS (which rejects copy-on-write). The
serial-windows store points at F:\.pnpm-store to share the ReFS volume.
Agent Note 2026-08-30-windows-refs-store-block-clone-install records the
rationale; ci-workflow.spec asserts the branch.
2026-08-31 04:13:15 +08:00
Chinesezjc 161c6591be ci: fail fast at the first blocking gate failure 2026-08-31 01:54:14 +08:00
imccyu 675efe73f2 fix: node 24.9 internal issue 2026-08-29 17:37:50 +08:00
Chinesezjc ab0f942dd7 Merge remote-tracking branch 'origin/master' into feat/weighted-coverage-shard 2026-08-28 12:18:14 +08:00
Chinesezjc 10b31043ab feat(ci): assign coverage partitions by recorded file duration
Replace Vitest's hash-based --shard with a coordinator-side
longest-processing-time assignment. The coordinator collects the
instrumented inventory from a vitest list run (dropping the exempt
heavy suites that list does not exclude), reads per-file durations from
the Vitest results cache, and seeds heavy subprocess-bound suites into
different partitions. A weight-aware test fails when assignment ignores
recorded weights, verified by injecting a file-count-only rule.

Windows coverage measured partition spread of 442s (275-717s) under
hash sharding; a simulation with the same file durations and the new
assignment balances partitions to within 21s, cutting the critical
partition to roughly half.
2026-08-27 21:04:15 +08:00
Chinesezjc 2413eab847 ci: isolate non-Windows pnpm setup per run attempt
Stacked on #3115: keep its windows-* setup-pnpm-js-<run_id>-<run_attempt>-<job>
destination, and extend the same isolation to non-Windows jobs in ci.yml
and ci-master.yml with setup-pnpm-<run_id>-<run_attempt>. This prevents
sequential self-hosted Windows jobs from tripping over a stale locked
pnpm.exe/reflink native module.
2026-08-27 11:33:27 +08:00
Chinesezjc 84692044af test: raise the contended Windows spawn budgets to 90s
The per-case 15-30s budgets on the Windows native and coverage lanes fire
before oxlint, workflow-worker-thread, and other subprocess-spawning cases
finish under the loaded self-hosted pool; the failures rotate across cases
as load shifts, so per-case widening only moved the flake. Raise the lane
defaults (DSH_COVERAGE_TEST_TIMEOUT_MS and the native --testTimeout) to 90s,
align the oxlint and workflow-worker-thread case budgets, and keep the
built-bin SPAWN_TIMEOUT_MS at 60s under a 90s outer budget.
2026-08-26 17:17:47 +08:00
Chinesezjc 43b5b473bf ci: drop the stale pnpm setup cleanup steps
The windows-* jobs now install pnpm under a run/attempt/job-suffixed
destination, so the pre-install step that cleared the old fixed
setup-pnpm-js path no longer touches the actual destination and its
comment claims stale state. The suffix already gives every job a fresh
directory, so remove the four cleanup steps.
2026-08-26 16:39:30 +08:00
Chinesezjc e87a47692d ci: isolate the Windows pnpm setup destination per job
The windows-* jobs keep a separate standalone pnpm executable under
runner.temp/setup-pnpm-js. A previous job on the same self-hosted runner
can leave a locked @reflink native module there, so the next job's
pnpm/action-setup fails with EPERM during unlink before any test runs.
Suffix the destination with run_id, run_attempt, and job so every job
gets a fresh directory even when sequential jobs land on the same
runner; apply the same to the python SDK exe build. Update the pnpm
setup isolation note to record the Windows-specific destination.
2026-08-26 16:39:30 +08:00
Yichen Jiang 4e1c87b1a2 fix(ci): bound Windows process contention 2026-08-26 14:24:24 +08:00
imccyu e1c49dab59 ci(windows): clear stale pnpm setup state before install 2026-08-26 12:35:05 +08:00
imccyu 75428c7f47 perf(ci) 2026-08-26 12:35:04 +08:00
Dudu-0223 560729be76 ci(windows): serialize native test files 2026-08-25 18:12:03 +08:00
Chinesezjc ac2f00070e ci(windows): make windows-coverage temporarily non-blocking
Other PRs are blocked by Windows ACP half-close tests timing out. Keep the
coverage job running for signal, but remove it from all-checks-passed.needs
until the Windows skip fix is validated.
2026-08-25 17:02:16 +08:00
Chinesezjc 5e7c567dc8 test(subagent-acp): double the per-test timeout relative to default
These tests spawn real ACP child subprocesses. On contended self-hosted
Windows runners the default 30s budget times out. Instead of raising the
global coverage timeout, give this file 2x the configured default
(DSH_COVERAGE_TEST_TIMEOUT_MS) so it follows future default changes.
2026-08-25 16:07:38 +08:00
Chinesezjc 3073107ec4 ci(windows): raise coverage test timeout to 60s
After the 4-partition split, other PRs' windows coverage now fails on
process-bound subagent-acp tests timing out at 30s under self-hosted
concurrency. Give the coverage lane the same 60s per-test budget that the
earlier failover profile used.
2026-08-25 15:56:32 +08:00
Chinesezjc 58cc29b4f1 test(windows): split native job into build/coverage/native-tests/observational
Keep the 4-partition coverage profile, split the monolithic windows-native
job into smaller required jobs (build, coverage, native-tests) plus a
non-blocking observational job. Update ci-workflow.spec for the new topology.
2026-08-25 12:45:47 +08:00
Chinesezjc 55ef5aad06 test(windows): try 4 coverage partitions instead of 8
Under high self-hosted concurrency, 8 partitions per Windows native job
triggered vitest fork worker startup timeouts. This branch lowers Windows
coverage to the same 4 partitions Linux uses, trading some single-job
coverage wall time for lower process-creation pressure.
2026-08-25 12:02:21 +08:00
Tianyi Cui 026a37fc07 ci(python): gate the Windows x64 installed wheel
Add node24-win-x64 to the required pull-request and public-release matrices on a native windows-2025 runner, and publish the same win_amd64 artifact from the GitLab tag pipeline. GitHub uses Git Bash for the shared release script while selecting the Windows venv's Scripts/python.exe explicitly; the Linux and macOS legs retain their existing commands and native checks.

Run the complete installed-wheel keyless suite and the trusted two-turn DeepSeek smoke on Windows exactly as on the existing targets. Make the minimal blackbox choose persistent PowerShell on Windows, keep advanced and restart snapshots platform-stable by disabling both one-shot shell variants, locate the generated dsh.exe console command, and validate text lines without assuming POSIX newlines.

Workflow tests pin the four-target matrix, Windows runner and wheel tag, cross-platform venv selection, GitLab publication dependency, and full blackbox invocation. The existing POSIX minimal snapshot changes only its platform-neutral prompt wording; Windows owns a separate model-visible snapshot.
2026-08-24 19:09:40 +08:00
Chinesezjc cd6941d5d7 Revert "perf(ci): shorten native Windows coverage critical path" 2026-08-24 14:39:56 +08:00
Tianyi Cui 3c1c6a89b1 test(python): gate installed runtime wheels across release targets (#2953)
* test(python): exercise installed wheels as black boxes

Add an installed-wheel mode that refuses source/editable imports, repository working directories, mismatched SDK/runtime versions, unpinned runtime dependencies, and executables outside the installed runtime distribution. The mode resolves the wheel-owned executable itself, so callers cannot accidentally prove an explicit checkout artifact.

Add a real-API scenario that drives two tool-using turns through the public synchronous SDK, verifies the file bytes outside the agent, checks completed turn/tool events and persistence, and projects provider failures without retaining credential-bearing error text. The existing deterministic scenario set remains the keyless behavior oracle.

Refs #2952.

* ci(python): require installed-wheel checks on every release target

Move the complete deterministic runtime scenarios behind construction and clean installation of the SDK and matching runtime wheels. Each native leg runs outside the checkout with source-resolution environment variables removed; Linux manylinux smokes assert the same installed provenance.

Expand the required pull-request call from Linux x64 to Linux x64, Linux arm64, and macOS arm64. Trusted heads receive only DEEPSEEK_API_KEY_EXTERNAL for a fail-loud live two-turn smoke on each carrier, while fork and Dependabot heads retain the full keyless path without exposing secrets.

Pin the reusable secret declaration, matrix call, aggregate dependency, untrusted-head condition, and live/keyless commands in the workflow contract test.

Refs #2952.

* docs(testing): make installed wheels the Python CI authority

Record the clean-wheel provenance boundary, complete keyless scenario set, trusted real-API contract, secret handling, and three-target required topology in a new implemented testing decision. Update the SEA distribution and portable-CI authorities plus the Python contributor reference to describe the same current state.

Archive the fully superseded Linux-x64-only decision after consolidating its rationale and alternatives into the new owner. Preserve its bilingual triplet as a sealed historical snapshot and redirect every active current-state reference.

Refs #2952.
2026-08-23 16:53:55 +08:00
Tianyi Cui c92c86492d ci: require native Windows aggregate verdict 2026-08-22 20:10:55 +08:00
Tianyi Cui c8cecd6079 perf(ci): raise isolated Windows coverage fan-out 2026-08-22 20:10:55 +08:00
Tianyi Cui 12ad38b234 perf(ci): phase native Windows coverage work 2026-08-22 20:10:55 +08:00
imccyu 60e44b2d78 fix: ci
fix: ci

fix: ci
2026-08-21 14:11:06 +08:00
imccyu 4f2868409d test(ci): exercise standalone pnpm on Windows 2026-08-21 11:24:03 +08:00
Chinesezjc 297fff6e9c Merge pull request #2768 from deepseek-harness/ci/split-master-workflows
ci: split master-only jobs into ci-master.yml
2026-08-20 12:19:10 +08:00
imccyu 66a7081c15 feat(build): bind client artifacts to build profiles 2026-08-19 18:21:27 +08:00
imccyu 93cbb3799d feat(client): inject public build environment 2026-08-19 18:21:26 +08:00
Chinesezjc 7247de9d3d fix(cic): restore serial-linux drill comment, sync pnpm-isolation note, polish runbook
Address the second review pass on PR #2768:

- Restore the serial-linux-selfhosted drill comment in ci-master.yml (it was
  lost in the split boundary, leaving serial-linux-selfhosted as the only
  comment-less job); adapted to the current-state fact that this workflow never
  listens to pull_request while keeping the no-cache-steps reason, the
  DSH_CI_FAILOVER_LINUX switch guidance, and push-triggered semantics.
- Update 2026-07-29-pnpm-setup-runner-isolation (en/zh + i18n): the regression
  test and setup steps now span ci.yml and ci-master.yml.
- failover-runbook line 19: the push-reachable classification now names
  ci-master.yml for the drills/wine cache and ci.yml for the pull-request jobs,
  dropping the stale pull-request-gated phrasing.
- all-checks-passed comment in ci.yml notes that needs cannot reach across
  workflow files (ci-master job are deliberately outside this PR verdict).

Verification: ci-workflow.spec.ts 13/13, both workflows YAML-parse with correct
concurrency, 3 translation pairs consistent, note-format 575.
2026-08-19 17:44:40 +08:00
Chinesezjc 1d5e4199c8 fix(cic): address CI-split review - restore PR concurrency, fix comment migration, restore deleted spec block
Per review on PR #2768:

- Restore a concurrency block in ci.yml (cancel-in-progress: true) so a fresh
  PR push cancels the superseded run; GitHub has no default PR auto-cancel,
  so removing it would stack a second full 9-job run on every push.
  Update the ci-workflow.spec assertion accordingly.
- Fix comment misplacements from the split boundary: ci.yml's all-checks-passed
  now carries its own branch-protection comment (the drill comment that was
  orphaned above it is gone), and ci-master.yml no longer ends with an orphaned
  all-checks-passed comment.
- Restore the DeepSeek e2e workflow describe-block in ci-workflow.spec.ts that
  the rewrite had silently deleted (e2e.yml is unchanged).
- serial-windows comment no longer claims non-blocking-for-PR/absent-from-needs
  since ci-master never listens to pull_request.
- DSH_TELEMETRY_DISABLED safe-use comment restored in ci-master.yml env; split
  rationale (mi gray segments in PR check) documented in .github/AGENTS.md.

Verification: ci-workflow.spec.ts 13/13, both workflows YAML-parse with correct
concurrency, git diff --check clean.
2026-08-19 17:24:58 +08:00
_Kerman 917ef58f79 Merge remote-tracking branch 'origin/master' into dshw/pr-deepseek-harness-deepseek-harness-2300 2026-08-19 17:09:18 +08:00
Chinesezjc 61f910d1c6 ci: split master-only jobs into ci-master.yml
Split the single ci.yml into two workflows so the PR check panel stops listing
master-only obs jobs that skip (gray) and block the aggregate green-check:

- ci.yml is now pull_request-only, holding only the 9 PR jobs (node-24,
  node-24-coverage, node-24-consumers, node-compat, python-sdk, python-runtime,
  windows, windows-native, all-checks-passed). It drops the workflow-level
  concurrency block since master carve-outs no longer apply.
- ci-master.yml (new) carries the six master/dispatch jobs (wine-apt-cache,
  serial-linux-selfhosted, serial-macos, serial-windows, and both runner
  benchmarks) with the push-exempt cancel-in-progress block and suite input.
  It does not listen to pull_request, so its jobs never appear in PR checks.

ci.yml keeps the wine apt cache seed/restore (repo-scoped by key), so moving the
producer to ci-master.yml does not break the PR windows job's restore.

Update ci-workflow.spec.ts to assert the two-workflow split: ci-master owns the
drills/benchmarks and the push-exemption concurrency, ci.yml is PR-only without
concurrency. Update the serial-reference, portable-required, failover-runbook,
and pnpm-caching notes (en/zh + i18n) and .github/AGENTS.md to reflect ci-master.

Verification: scripts/ci-workflow.spec.ts 12/12, both workflows YAML-parse,
verify-translation-pairing consistent, verify-agent-note-format passes.
2026-08-19 17:09:18 +08:00
Chinesezjc 2824ef7ab4 docs, ci: apply second serial-linux review pass
Address the review findings from the fresh pass on PR #2744:

- 2026-07-21 note L31: the enabled serial references run on the self-hosted
  vm-backup/dsh-win-ci pools and the only remaining disabled hosted serial is
  serial-macos (macos-latest); removed the stale hosted ubuntu-latest/windows-2025
  serial framing and the outdated 'when enabled, serial / windows' clause.
- Drop remaining change-narrative from both notes: L19 (serial / linux, macos)
  and the 2026-07-26 caching note L16/L34 now state only current facts without
  deletion dates/PR numbers; the no-producer fact has one home (L16). zh.ms'
  '直至其过期为逐出' corrected to '直至其被逐出'. Bilingual hashes re-recorded.
- ci.yml TODO notes that re-enabling serial-macos does not restore a Linux
  hosted-cache producer and records the seeder-vs-remove decision direction.
- The Playwright restore's failover-skip comment is now self-contained (the
  VM's persistent browser cache is warm) instead of pointing at the coveragelane
  rationale, which is pnpm-store-specific.

Verification: scripts/ci-workflow.spec.ts passes (12/12), YAML re-parses,
both translation pairs consistent, git diff --check clean.
2026-08-19 15:01:37 +08:00
Chinesezjc 0593293b0a ci, docs: address serial-linux removal review
Apply review feedback on the serial-linux removal (PR #2744):

ci.yml:
- Rewrite the new comments as current-state statements, not change
  narrative (dsh-prose-standard): the TODO names serial-macos as the one
  remaining disabled hosted serial job; serial-macos's intro and the
  self-hosted standby's frozen-archive note no longer narrate the deletion.
- The self-hosted standby's frozen-archive comment states its own reason
  (full history to resolve DSH_ARCHIVE_BASE_REF against github.event.before)
  instead of referenceing a now-nonexistent hosted serial reference.
- Move the hosted-cache comment above the pnpm restore so it covers both
  restore-keys fallback steps, and describe the real consequence (matches the
  archived entry until evict, then cold) instead of the false
  'cold on a lockfile change'. Restore the per-step failover-skip note.

Agent Note 2026-07-26-pnpm-action-setup-for-symmetric-ci-caching:
- Update the restore-only bullet and the consequences closing line (it
  described serial-linux as the active master-push producer of the pnpm store
  cache) to state that no master job produces these hosted keys since the
  producer was removed; the Problem and Alternatives sections are historical
  context and are left unchanged. Re-record the bilingual pair hashes.

Verification: scripts/ci-workflow.spec.ts passes (12/12), YAML re-parses,
both translation pairs consistent, git diff --check clean.
2026-08-19 14:39:03 +08:00
Chinesezjc e6b494ed17 ci: remove dead hosted serial-linux job
serial-linux (hosted ubuntu-latest) has been `if: false` since 2026-07-30 and
never runs. Remove the dead job block and retire the dangling references:

- TODO(hosted-serial-ci) narrowed to the single remaining disabled hosted
  serial job (serial-macos); the hosted linux definition is gone.
- The cache producer comment no longer claims serial-linux refreshes the
  hosted pnpm/Playwright caches; there is currently no active master producer
  for them, so restores are cold on a lockfile change.
- The self-hosted standby's frozen-archive comment no longer cross-references
  the deleted job.
- serial-macos gains its own intro comment since the shared 'hosted reference
  jobs below are disabled' lede was removed.

No runner allocation, required gate, or all-checks-passed.needs reference this
job; the aggregate is unchanged.
2026-08-19 14:00:33 +08:00
_Kerman f97ea54ca9 fix(ci): install Wine offline from the restored apt archive
The windows wine-blocking job installs Wine with apt-get over the local
.deb archive, but apt re-downloads the full 100+ MB closure from the
Ubuntu mirror anyway. A degraded runner network stalled that transfer
past the job's 15-minute budget and cancelled the check. Install the
restored archive directly with dpkg (no repository access) and keep the
apt network install as the fallback when the archive cannot satisfy the
closure.
2026-08-19 11:06:57 +08:00
imccyu 45a73e3ed5 fix(ci): preserve Windows gate ordering 2026-08-18 22:03:20 +08:00
imccyu ef75b6ff2f perf(ci): parallelize coverage and web snapshots in-job 2026-08-18 21:15:20 +08:00