Commit Graph
3199 Commits
Author SHA1 Message Date
Tianyi Cui e2b3800a7e fix(python): challenge fresh file state in live SDK smoke 2026-09-07 15:40:51 +08:00
Tianyi Cui 19d167cec2 Merge latest master request-freeze and frontend performance work
Preserve the V3 system-prompt projection while adopting master’s per-agent frozen-message provenance and frontend performance gates. Keep benchmark workload admission and diagnostics fixes intact, and retain both migration and first-open/reopen lifecycle guarantees.
2026-09-07 14:53:00 +08:00
Tianyi Cui 95400aa52c Merge V3 preset-reference migration into system-prompt representation
Compose the root’s exact legacy code-to-ptc preset conversion with the existing structural system-head migration. Keep dense source events, audited payload admission, local reference mapping, and native V3 extension behavior unchanged. Preserve the historical preset migration fixture byte-for-byte and test unsupported sparse/opaque sources explicitly.
2026-09-07 14:51:05 +08:00
Tianyi Cui 2eccae5631 Merge branch 'release/session-log-v3' into worktree/session-v3-preset-rename 2026-09-07 14:00:22 +08:00
Yichen Jiang ff33f79eb1 fix(session): migrate legacy code preset references to ptc 2026-09-07 13:52:22 +08:00
Tianyi Cui d3ed6d6f88 Merge remote-tracking branch 'origin/master' into feat/system-prompt-surface-node 2026-09-07 13:35:06 +08:00
Tianyi Cui 0ac1d4d865 test(perf): align browser provisioning with hosted benchmark runner 2026-09-07 13:29:38 +08:00
Tianyi Cui c51c16cdac test(perf): respect browser failover provisioning policy 2026-09-07 13:29:38 +08:00
Tianyi Cui 2927034ffe test(perf): retain successful CI measurement output 2026-09-07 13:29:38 +08:00
Tianyi Cui 76cf592234 Merge commit 'd1e5b724d71e9a6f675232caa760395710826b81' into feat/system-prompt-surface-node 2026-09-07 13:12:46 +08:00
Tianyi Cui f68c4239e4 Merge remote-tracking branch 'origin/master' into release/session-log-v3 2026-09-07 13:09:36 +08:00
Tianyi Cui 3d54bd6d58 Merge branch 'master' into fix/ci-node-compile-cache-data-disk 2026-09-07 13:06:30 +08:00
Tianyi Cui ac4fa3d6f5 docs: clarify compatibility runner scope and verification 2026-09-07 12:42:02 +08:00
Tianyi Cui a137256f80 ci: set compatibility toolcache after runner environment export 2026-09-07 12:41:23 +08:00
Tianyi Cui f7a18f49ff ci: isolate compatibility Node jobs on self-hosted Linux 2026-09-07 12:41:23 +08:00
Tianyi Cui c379894af8 fix(ci): isolate routing test setup and correct scheduling docs 2026-09-07 12:40:40 +08:00
Tianyi Cui ab1ee99685 ci: defer macOS ARM runtime and Wine checks to master 2026-09-07 12:40:40 +08:00
Tianyi Cui 71b0d83822 Merge current V3 PTC vocabulary into system-prompt representation
Compose the shared release branch PTC rename with the structural system-head migration in the existing V2-to-V3 stage. Audit source payloads and remap local coordinates before renaming dispatch vocabulary and owned plugin attribution; retain original message identities and generation-qualified references. Native V3 validation combines the same system and PTC lifecycle semantics through a private released-validation view.

Reuse the V3 row-admission owner in current JSONL scanning before recoverable-tail suppression, so malformed rows cannot hide retired required PTC tags or header.system. The new corruption-prefix regressions and all173 existing JSONL scanner tests pass. Combined migration/catalog/persistence suite:300 tests; executable V3 migration source has100% coverage. No released generation, prior migration implementation, shared release branch, benchmark or CI workflow is modified by this integration.
2026-09-06 21:33:35 +08:00
Tianyi Cui 5c8e1b53de Merge latest master into fix/ci-node-compile-cache-data-disk 2026-09-06 21:26:37 +08:00
Tianyi Cui a4dcff874e fix(scripts): validate historical fixture layout with source codecs 2026-09-06 21:18:49 +08:00
Tianyi Cui e9957a2671 test(python): record native V3 delivery provenance
Regenerate advanced and restart expectations through the shipped macOS arm64 SEA runtime built from 0521815d45. Real delivery-accepted events now record sessionFormatVersion 3 in the five V3 logs and advanced SDK notifications. Restart result.json and requests.json regenerate identically. Preserve all five V2 predecessors byte-for-byte from b2b300f9; no production, migration, launcher, or test changes.

Evidence (macOS arm64): pnpm exec tsx scripts/build-exe-for-python-sdk.ts --targets node24-macos-arm64 passed, including the full pnpm build. file dist-exe/deepseek-harness-sdk-runtime-macos-arm64 reports Mach-O 64-bit executable arm64.

For each SCENARIO=sdk-snapshot,sdk-restart: PYTHONDONTWRITEBYTECODE=1 PYTHONPATH=python/sdk/src:python/sdk-runtime/src /Users/cty/dsh-deploy/.agents/worktrees/sp-kv-sdk-evidence/tmp/py-sdk-venv/bin/python scripts/smoke-python-runtime.py --exe dist-exe/deepseek-harness-sdk-runtime-macos-arm64 --scenario SCENARIO --update-snapshots passed; the same two commands without --update-snapshots passed.

PYTHONDONTWRITEBYTECODE=1 PYTHONPATH=python/sdk/src:python/sdk-runtime/src uv run --no-project --python /Users/cty/.local/share/uv/python/cpython-3.14.5-macos-aarch64-none/bin/python3 --with pytest --with pydantic>=2.12,<3 python -m pytest python/sdk/tests/test_smoke_model.py -q: 28 passed. Earlier helper invocations lacked pytest or SDK imports; corrected environment passed without source changes. git diff --quiet b2b300f9 -- scripts/snapshots/python-sdk-single-exe/**/*.v2.jsonl and git diff --cached --check passed.
2026-09-06 20:58:57 +08:00
Tianyi Cui 1a9bef60c2 test: separate native V3 writer expectations from historical replay 2026-09-06 20:45:00 +08:00
Tianyi Cui 8cdc6eba02 test(session): preserve released fixtures with corrected V3 successors
Restore all 147 historical canonical fixtures changed by the lower branch to exact shared base 220ff708e3628a9be46d9747d09af6d8cd742f0d bytes (145 V2 and two V0). All 180 committed V0/V1/V2 canonical files now have zero diff against that base, including unchanged Python, test-support and preview sources.

Preserve corrected lower writer bodies in 146 V3 successors across 119 owner directories: replace 135 unreleased V3 counterparts and add 11 siblings. Change only each copied Session header version; preserve all body bytes, raw model streams, inline images, IDs, references and historical delivery generation markers. Remove two unshipped V2 additions after creating their V3 sibling: record-suite/rec-pin and empty-response-retry-current.

Keep six explicitly historical snapshot owners pinned with no V3 sibling. Restore the two pre-step V0 record child sources without synthesizing current output. Fix seven embedded Session header versions in exactly five test-support behavior owners whose output filenames already select V3. Leave protocol expectations, shared references, sidecars, consumer scripts and production migration/normalization code untouched.

Validation: purpose-built temporary Python inventory and verifier checked 337 canonical headers, 3714 successor JSON rows, message roles, contiguous child roles, exact successor bodies, all 180 historical base bytes and zero git diff, noncanonical JSONL immutability, six retained owners and six unchanged preview fixtures. git diff --cached --check passed. Temporary generators removed. Strict migration, native refresh and replay remain pending parent integration; unsupported pre-step sources are reported separately.
2026-09-06 20:45:00 +08:00
Tianyi Cui c29b97ad94 test(python): refresh system-node and packed restart expectations
The representation PR left child and restart recordings in the old header-system representation while the packaged writer emits system/message before entered user messages. Restart result expectations also retained standalone assistant/chunk notifications after the writer moved stream records into assistant/message. These are stale expected artifacts, not fields to erase in normalization.

Regenerate the owning advanced and restart scenarios through the native macOS ARM64 packaged dsh runtime. Retain messages, tool effects, typed feedback and packed streams; update only the missing system nodes and their sequence references, and remove obsolete standalone chunk notifications. The advanced parent result and parent session already match the writer after the rebase, so this commit changes only two child logs and the restart result/logs.

Validation: pnpm run build; pnpm exec tsx scripts/build-exe-for-python-sdk.ts --skip-build --targets=node24-macos-arm64; uv run --project python/sdk python scripts/smoke-python-runtime.py --scenario sdk-snapshot --exe dist-exe/deepseek-harness-sdk-runtime-macos-arm64 and the equivalent sdk-restart command each reproduced the mismatch, then passed with --update-snapshots and again without it. Both read-only reruns pass. Other native targets remain covered by exact-head CI.
2026-09-06 20:42:43 +08:00
Tianyi Cui ee956c720d refactor(session): represent the system prompt as surface node zero
Consolidate the representation-change PR and its rebase reconciliations into one baseline. Preserve the exact tree and keep the in-history feature in the dependent PR. Follow-up fixes remain separate.
2026-09-06 20:42:43 +08:00
Tianyi Cui 320354a8e0 Merge commit 'adb605ba17936187320cac20bb145d4ee1edb387' into session-v3/ptc-durable-vocabulary 2026-09-06 20:22:48 +08:00
Tianyi Cui 6d11955852 Merge remote-tracking branch 'origin/master' into release/session-log-v3 2026-09-06 20:20:16 +08:00
Tianyi Cui 88e4c3c235 Merge master and preserve hosted benchmark documentation 2026-09-06 19:58:19 +08:00
Tianyi Cui 6f21b112da fix: wait for the Python console runtime on Windows 2026-09-06 19:53:23 +08:00
Tianyi Cui faa33c0ffa revert(ci): run Windows Python runtime CI on GitHub-hosted Windows
Windows x64 runtime builds resolve their hosted matrix.runner unconditionally
again (windows-2025 for pull-request CI). Remove the DSH_CI_FAILOVER_WINDOWS
selector, job-private Python toolchain, self-hosted dependency install and
post-step cleanup, the private setup script, and the routing spec introduced
in #3629. The Windows failover switch again covers only the native Windows
jobs in ci.yml.
2026-09-06 19:17:27 +08:00
Tianyi Cui 368ec64489 Merge corrected Session V3 base into PTC vocabulary 2026-09-06 18:29:14 +08:00
Tianyi Cui e53df8b64a fix(session): guard V3 delivery activation and smoke writer generation 2026-09-06 17:39:15 +08:00
Tianyi Cui f75aabcb16 test(ci): run required benchmarks on standard hosted Linux 2026-09-06 17:10:30 +08:00
Tianyi Cui 000cd7e762 Merge master and reconcile platform failover documentation 2026-09-06 15:35:49 +08:00
Tianyi Cui d15aaee271 Merge pull request #3627 from deepseek-harness/optimize/release-rehearsal-selfhosted
ci: route trusted release rehearsals to self-hosted Linux
2026-09-06 15:22:44 +08:00
Tianyi Cui 37d3ec1681 ci: address Windows runtime routing and isolation review 2026-09-06 15:07:17 +08:00
Tianyi Cui a1188bbf3f ci: contain release temporary installs and document shared routing 2026-09-06 14:57:11 +08:00
Tianyi Cui ceb3136bef ci: size PR previews on measured standard hosted runners (#3628)
* ci: measure hosted preview runner sizes [preview-sizing-benchmark]

* ci: type benchmark job keys explicitly [preview-sizing-benchmark]

* ci: size PR previews on measured standard hosted runners
2026-09-06 14:56:30 +08:00
Tianyi Cui bad4254d71 Rename durable PTC vocabulary with identity-preserving v2 migration 2026-09-06 14:53:16 +08:00
Tianyi Cui 705f84f952 docs(session): document format upgrades and advance current V3 fixtures 2026-09-06 14:01:01 +08:00
Tianyi Cui 3a79abedec ci: use UTF-8 Python text on self-hosted Windows 2026-09-06 13:49:19 +08:00
Tianyi Cui 69b1e315b4 ci: use isolated self-hosted Windows Python runtime builds 2026-09-06 13:21:26 +08:00
Tianyi Cui f66dd78ff7 ci: route trusted release rehearsals to self-hosted Linux 2026-09-06 13:01:55 +08:00
imccyu 9b78f99dec perf(session): transfer frozen persistence reads into restore 2026-09-06 02:10:23 +08:00
imccyu ec2f63dbdb perf(session-persistence): stream migration publication and verification 2026-09-06 02:05:40 +08:00
imccyu 46196d6f95 perf(session-format): stream released v0-to-v2 migrations 2026-09-06 02:05:27 +08:00
imccyu a548150f86 test(perf): isolate benchmark dependencies 2026-09-06 01:01:04 +08:00
Tianyi Cui 74e27c97d0 test(perf): list the bench config among proxy-setup Vitest inventories
scripts/test-proxy-environment.spec.ts pins the Vitest configs that declare
setupFiles so the proxy isolation setup is never dropped; the benchmark
lane declares it too.
2026-09-06 01:01:03 +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
Tianyi Cui b25d4faaaa fix(spill): share persisted notice formatting with client recognition 2026-09-05 23:52:59 +08:00