Skip to content

chore(runtime): adopt ZCode 3.16.2 / runtime 0.17.0 - #225

Merged
kingsword09 merged 2 commits into
mainfrom
chore/zcode-3.16.2
Oct 20, 2026
Merged

kingsword09 merged 2 commits into
mainfrom
chore/zcode-3.16.2

Conversation

@kingsword09

Copy link
Copy Markdown
Owner

Summary

Adopts the ZCode Desktop 3.16.2 stable artifact (runtime CLI 0.17.0) and aligns the compatibility patches with the new runtime. This targets 3.16.2 only; the previous dual-path/legacy anchors were removed.

Release info: Release v3.16.2 (2026-10-19). Lock artifact: ZCode-3.16.2-linux-x64.deb; bun run sync verified its SHA-512 against the stable manifest.

Runtime changes handled

  • runtime 0.17.0 adds --toolsearch-mode (auto|native|local|off, default off).
  • SqliteSessionStore now exposes a single static open() path; the synchronous constructor and the separate migration path are gone. Migrations are checksum-validated and create a backup.
  • Model selection moved to CliDefaultSelection for cli-default prompt/TUI admission. setModel/setThoughtLevel route non-transient changes there.
  • New softDeleteSession store method.
  • restorePersistedModelSelection now mirrors the saved selection into the CLI default.

Patch updates (no legacy fallback)

  • session-model-recovery: re-anchored the restore tail; the prompt boundary now reads cliDefaultSelection first, so a replacement model chosen in the TUI clears a broken saved selection.
  • login-model-defaults: re-anchored the cliDefaultSelection switch ternary.
  • prompt-model: --model now calls setModel(model, {transient:true, cliDefault:true}) and the session facade routes it to CliDefaultSelection, so the override applies without persisting a session model change.
  • sqlite-busy-timeout / sqlite-write-recovery: single open() anchors; 10 s steady-state timeout after migration; write recovery installed on the constructed store.
  • softDeleteSession added to the SQLite replayable-write allowlist.
  • http-no-content, bigmodel-oauth and cli-help-contract remain required verification points and report already_present on 3.16.2.

Version

  • package.json: 3.16.2-37
  • zcode-runtime.lock.json: 3.16.2 linux-x64 deb
  • vendor/extraction.json (gitignored, rebuilt by sync): app 3.16.2 / runtime 0.17.0, 29 applied + 3 already-present patches

Validation

  • bun run sync -> zcode-app-cli@3.16.2-37 with runtime 0.17.0
  • bun run typecheck -> pass
  • bun run check -> pass
  • bun run test:unit -> 876 pass, 2 skip
  • bun run test:runtime -> 74 pass
  • bun run test:tui -> 35 pass
  • bun run test:node -> 20 pass (Node 26.4.0, busy_timeout=10000)
  • bun run test:all -> pass
  • bun run check:tui -> all PTY smoke checks pass

pkg-pr-new

CI runs on this PR. After it succeeds, the preview workflow can publish the package; you can also comment /pkg-pr-new on this PR to publish the preview explicitly.

- sync zcode-runtime.lock.json to the 3.16.2 linux-x64 deb
- re-anchor session model recovery, login defaults, prompt model and SQLite recovery to 0.17.0
- route --model overrides through CliDefaultSelection without persisting a session change
- install SQLite write recovery on the single async open path and include softDeleteSession
- update tests and docs for the 3.16.2 runtime
@github-actions

Copy link
Copy Markdown
Contributor

pkg-pr-new preview for commit 2b0be57dbd69e179e43542aee3ceb9a7c3546ee6.

npx --yes https://pkg.pr.new/zcode-app-cli@2b0be57

Full repository URL

This preview uses the selected commit. PR updates publish automatically after CI succeeds; kingsword09 can also request a preview with /pkg-pr-new.

Workflow logs

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔵 Needs a closer look

Cold-resume model selection needs correction, and the newly pinned binary’s patch integration remains unverified in this review.

1 open issue
What changed in this PR

Updates the CLI to ZCode Desktop 3.16.2 / runtime 0.17.0 and adapts its compatibility patches.

Changes:

  • Updates the runtime artifact pin and package version.
  • Adapts model selection and SQLite patches to the new runtime.
  • Refreshes regression tests and runtime documentation.
File Description
zcode-runtime.lock.json Pins the new artifact and checksum.
test/​sync-runtime.test.ts Updates model and SQLite patch coverage.
test/​runtime-sqlite-patches.test.ts Tests the single store-open path.
test/​prompt-model.test.ts Tests transient CLI-default overrides.
test/​node/​sqlite-session-store.test.cjs Updates initial store-open coverage.
src/​runtime-sqlite-recovery.ts Adds soft-delete write recovery.
scripts/​sync-runtime.ts Updates model-selection patch anchors.
scripts/​runtime-sqlite-patches.ts Adapts timeout and recovery installation.
scripts/​runtime-shared-oauth-patches.ts Updates a version comment only.
README.md Documents tool-search modes.
package.json Bumps the package version.
LICENSES/​README.md Updates artifact attribution context.
docs/​THIRD_PARTY_CONTENT.md Updates artifact references.
docs/​SQLITE_CONCURRENCY.md Documents revised SQLite initialization.
docs/​DEVELOPMENT.md Updates verification and version guidance.
docs/​CONFIGURATION.zh-CN.md Refreshes runtime and audit references.
docs/​CONFIGURATION.md Refreshes runtime and audit references.

Review effort: Balanced

Comment thread scripts/sync-runtime.ts
// persisting a session model change.
const switchAnchor = /([A-Za-z_$][\w$]*)\.cliDefaultSelection&&!([A-Za-z_$][\w$]*)\?\.transient\?/u.exec(runtime);
if (!switchAnchor) throw new Error("ZCode runtime is incompatible with the prompt model patch (cli-default selection anchor missing).");
const insertion = `let ${marker}=process.env.ZCODE_CLI_PROMPT_MODEL;if(${marker})await ${anchor[1]}.setModel(${marker},{transient:true,cliDefault:true});`;
@github-actions

Copy link
Copy Markdown
Contributor

pkg-pr-new preview for commit 1053f222af1ea451fca16e5bb23052627d0f4e7b.

npx --yes https://pkg.pr.new/zcode-app-cli@1053f22

Full repository URL

This preview uses the selected commit. PR updates publish automatically after CI succeeds; kingsword09 can also request a preview with /pkg-pr-new.

Workflow logs

@kingsword09
kingsword09 merged commit 94c0241 into main Oct 20, 2026
5 checks passed
@kingsword09
kingsword09 deleted the chore/zcode-3.16.2 branch October 20, 2026 09:21
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