82 Commits
Author SHA1 Message Date
玉澜 f37bb1cee6 fix(release): validate every universal slice in the Darwin SG_READ_ONLY gate
Review on #1446 flagged that the publication gate parsed only the first
__DATA_CONST flags word of an otool -l capture, so a universal library
with a healthy first slice and a broken later slice would still ship.
Replace the inline one-shot awk with scripts/release/extract-data-const-
flags.awk, a state machine that emits one flags word per __DATA_CONST
segment in every slice (segname is only honored directly after cmdsize,
so section entries can never contribute), and fail closed if any entry
lacks SG_READ_ONLY.

Add a regression test driven by real otool captures: broken/healthy
v1.0.62 thin binaries, the vendored universal runtime dylib, and a
universal sample whose last slice is broken — the exact case the old
parser wrongly passed. Also remove MACOSX_DEPLOYMENT_TARGET from the
--exec ambient pass-through so the container always receives the single
unconditional 11.0 pin from compiler_env.
2026-09-23 16:49:05 +08:00
玉澜 16f3bee4e8 fix(release): pin Darwin deployment target and gate assets on dyld acceptance
The v1.0.62 darwin/amd64 asset was rejected by dyld before main() with
'__DATA_CONST segment missing SG_READ_ONLY flag' (#1441). The osxcross
x86_64 wrapper in the pinned cross image defaults the deployment target
to macOS 10.13, where ld64-711 emits __DATA_CONST without SG_READ_ONLY;
the arm64 toolchain floor is 11.0 and is unaffected. CGO=0 builds used
Go's internal linker and were also unaffected.

Pin MACOSX_DEPLOYMENT_TARGET=11.0 for the CGO release builds, matching
the arm64 floor and the vendored SafeChat library, and add a release
gate that statically checks SG_READ_ONLY on the binary and its runtime
library and launches every Darwin asset the macOS runner can execute
(amd64 via Rosetta) before publication.

Verified against the pinned cross image: the real dws darwin/amd64
binary builds with __DATA_CONST flags 0x10 (was 0x0), CGO_ENABLED=1 and
the SafeChat backend linked.
2026-09-23 12:30:13 +08:00
john ce9787c694 fix(install): lock shared cache parent ancestry before mutation
Schema runtime cache shared-root installer hardening: validate and lock every parent directory before creation or chmod, and re-verify before the first permission change. Adds symlink-swap regression tests for non-sticky writable parents and sticky-parent acceptance.
2026-09-17 11:44:57 +08:00
zearlin 73620c8125 Update runtime SDK to 20260909 without auxiliary data files 2026-09-10 09:42:55 +08:00
赤川 ebdcdb9a27 Merge pull request #1334 from DingTalk-Real-AI/codex/runtime-context-refresh
feat: refresh runtime context and login URLs
2026-09-09 12:51:51 +08:00
zearlin 56b14f543c feat: refresh runtime context and login URLs 2026-09-08 21:31:42 +08:00
玉澜 f04c1b3860 fix(release): supply cross compilers through the container environment
The per-target CC/CXX templates resolve through .Env. .goreleaser.yaml also
declares the twelve CC_/CXX_ entries earlier in the same builds.env list, and
GoReleaser happens to surface those to later entries because TemplateEnv
re-binds the template after each evaluation. That is an undocumented internal,
so a GoReleaser upgrade could silently leave every target with an empty CC and
fall back to the host toolchain under CGO_ENABLED=1.

Export the same twelve values from the cross-toolchain wrapper as explicit
--env NAME=VALUE entries, so the container process environment supplies them
regardless of how the config list is evaluated. The config entries stay, which
keeps a direct goreleaser invocation self-contained.

TestReleaseCrossCompilerEnvMatchesWrapper compares the two sources for every
goos/goarch in the release matrix and asserts the wrapper actually forwards
them to docker run, so a value can only be added, changed or dropped in one
place if the other disagrees. Verified non-vacuous by perturbing
CC_darwin_amd64 and observing the mismatch report.
2026-09-08 19:29:10 +08:00
玉澜 d5e8994ffe fix: close SafeChat cipher race and harden release install paths
Review follow-ups on the default-CGO SafeChat release change:

- Hold the trackedCipher mutex across the whole backend call so Close
  waits for in-flight operations. The vendor client reads Client.inited
  before taking its own mutex, so a Close overlapping an encrypt or
  decrypt was a reproducible data race now that the backend ships in
  every default CGO build.
- Refuse musl-based Linux in install.sh, install-event.sh, and
  install-devapp.sh before resolving or downloading the asset. The
  release binaries link glibc and cannot start on musl, which previously
  surfaced only as an opaque loader error after a successful install.
- Record the breaking removal of dws safechat selftest/decrypt with the
  chat crypto decrypt migration path, and document the glibc baseline.
- Stage, verify, and atomically publish the cached GoReleaser and Zig
  tools behind a mkdir lock, and re-verify both the pinned archive digest
  and the executable digest on a cache hit. An interrupted download or
  extraction can no longer leave a half-installed tool that a later run
  would accept.
- Pin that every goos/goarch target in the release matrix declares its
  CC_/CXX_ entries, so the per-target compiler template cannot silently
  resolve to an empty compiler.
2026-09-07 15:36:31 +08:00
玉澜 369065f728 fix: preserve CGO overrides and Linux release ABI 2026-09-06 15:00:31 +08:00
玉澜 43cb4278a8 fix: use cross image with Windows arm64 toolchain 2026-09-04 20:47:12 +08:00
玉澜 843585a9fb fix: include SafeChat in default release builds 2026-09-04 18:54:03 +08:00
chichuan 233b170a9d fix(release): keep npm retirement notices out of the pack integrity run
The npm registry started answering legacy audit calls with a deprecation
notice ("This endpoint is being retired. Use the bulk advisory endpoint
instead"). On hosted runners the notice rode along the pinned-npm pack
invocation on stderr and the call latency behind it stretched the pack to
312s, failing TestReleaseNpmPackingIgnoresLifecycleScripts — which
asserted on CombinedOutput even though the script's real contract (the
one release.yml consumes via command substitution) is integrity-only
stdout. Disable audit/fund banners for the deterministic pack and assert
stdout separately from stderr diagnostics.
2026-09-04 12:36:02 +08:00
chichuan 8de3b43740 fix(release): preserve uploaded draft identity 2026-09-02 10:02:36 +08:00
zearlin 73d29d6507 fix: preserve release job identity 2026-09-01 20:52:02 +08:00
zearlin 64f11b143b fix: align runtime delivery checks 2026-09-01 20:52:02 +08:00
zearlin cb6cecbbd1 feat: bundle runtime payload 2026-09-01 20:52:02 +08:00
zearlin 8beb312c0f fix: preserve portable release checks 2026-08-31 23:13:32 +08:00
zearlin 25d3561ccd feat: add runtime context payload 2026-08-31 23:13:31 +08:00
chichuan 74859b966b fix(release): consume active fragments in stable seals 2026-08-20 17:07:53 +08:00
chichuan 3922970bfc fix(policy): preserve schema migration lineage 2026-08-20 11:52:00 +08:00
玉澜 7581955892 fix(skills): make obsolete-copy retirement non-fatal and harden install
A universal Agent whose obsolete private copy cannot be retired installs
nothing there, yet every entry point counted that retirement failure as an
install failure — aborting `npm install`, `dws skill setup`, and the shell
installers even when the canonical store and all links published correctly,
and skipping the skills-state write. Route retirement failures to a separate
warning path across all surfaces (Go upgrade + skill setup, npm, PowerShell,
install.sh, install-skills.sh, install-event.sh, install-devapp.sh).

Also:
- Add a checked-rename fallback for filesystems that reject the atomic
  no-replace flag (NFS, FUSE, overlayfs); the no-clobber contract is kept and
  the previously unsupported platforms build and work.
- PowerShell multi-mode links only bundle skills, never the shared canonical
  store, so third-party/user skills are no longer fanned into every Agent root.
- Prune ~/.dws/skill-backups to the newest 5 on every surface; encode
  HOME-relative backup names on PowerShell to preserve origin.
- Add simulated-win32 junction coverage and rewrite the tautological
  no-replace test; remove dead code whose tests gave false coverage.
- Soften the overstated Windows ownership-proof comment (NTFS tunneling).
2026-08-15 14:26:11 +08:00
玉澜 de8df0fa6f fix(skills): harden canonical agent installation 2026-08-13 21:22:57 +08:00
玉澜 fde37f7896 fix(skills): complete canonical agent compatibility 2026-08-13 20:21:56 +08:00
玉澜 31902a987e fix(skills): use canonical global installation 2026-08-13 18:50:27 +08:00
玉澜 e0c9b4910d fix: align package verifier with Agent skill roots 2026-08-13 14:57:51 +08:00
玉澜 6e4ea0980f feat(skill): support ZCode skill root 2026-08-12 15:34:38 +08:00
chichuan 1d8182bcfb Merge remote-tracking branch 'origin/main' into pr888-nested-gate 2026-08-12 12:01:38 +08:00
chichuan 39d6caa24d fix: validate every top-level .changes entry in the fragment gate
The fragment gate only ran validation when the changed path matched the
legal fragment name pattern, so `.changes/Foo.md`, `.changes/notes.txt`
and a symlinked fragment slipped through untouched and then broke the
next PR that added a legal fragment. The trigger now fires on any
top-level `.changes/` change other than README.md and rejects every
entry that is not README.md, released/, or a 100644 blob named
^[a-z0-9][a-z0-9._-]*\.md$.

The renderer had the same hole from the other side: `find -type f`
is false for symlinks, so a symlinked fragment was silently dropped
from the rendered notes, and the `[a-z0-9]*.md` glob only constrained
the first character so `chat reply.md` passed. It now walks every
top-level entry and fails on symlinks, unexpected directories,
non-regular files and illegal names. Both scripts pin LC_ALL=C so the
ASCII ranges cannot match uppercase under a different collation.

Adds regression coverage for illegal names, non-markdown entries,
symlinks and executable modes on both the gate and the renderer.
2026-08-11 21:07:12 +08:00
玉澜 f4e39a219b fix(skill): preserve state on partial setup 2026-08-11 17:01:32 +08:00
chichuan 1f127881c9 Merge branch 'main' into codex/release-fragments 2026-08-07 10:24:51 +08:00
chichuan a1712337a8 fix(release): accept successful sealed run reruns 2026-08-06 16:48:29 +08:00
chichuan c52f2b6e05 release: use isolated changelog fragments 2026-08-06 10:49:46 +08:00
修雨 0cc049eaa1 fix(release): handle Gitee API 200 null response for missing releases
Gitee API returns HTTP 200 with null body when a release tag doesn't
exist, unlike GitHub which returns 404. Treat empty release_id as
"no release exists" instead of erroring out.
2026-07-24 18:58:30 +08:00
修雨 b34bbc9aa0 ci: enforce beta and stable release roles (#791) 2026-07-24 18:15:55 +08:00
修雨 02f66df599 fix(release): make publication retries seamless 2026-07-24 11:05:14 +08:00
修雨 2a0bf1ebea fix: retry transient Gitee read outages safely 2026-07-22 17:46:03 +08:00
修雨 0e5731166b fix: extend Gitee upload window 2026-07-22 16:39:55 +08:00
修雨 931d75beaf fix: allow slow Gitee binary uploads 2026-07-22 15:57:21 +08:00
修雨 015daae064 fix: disable Expect for Gitee uploads 2026-07-22 15:02:13 +08:00
修雨 582b73cb40 fix: harden Gitee release repair 2026-07-22 14:27:47 +08:00
修雨 068d9ff2f5 fix(release): verify packaged artifact versions from raw binary bytes 2026-07-21 19:25:14 +08:00
修雨 70e4e75c66 Merge branch 'main' into codex/fix-stable-version-verification 2026-07-21 18:55:31 +08:00
zhengyubai c14e24569c fix(release): verify package versions from raw binaries 2026-07-21 19:49:18 +09:00
SCzheng b78a0dee47 Revert "fix(release): validate packaged version at runtime" 2026-07-21 19:46:32 +09:00
修雨 cce9b798d5 Merge remote-tracking branch 'origin/main' into codex/fix-release-version-verifier 2026-07-21 17:51:46 +08:00
修雨 e154b4ecde fix(release): validate packaged version at runtime 2026-07-21 17:47:02 +08:00
zhengyubai f83c305749 feat(release): allow stable promotion with commits after the beta baseline
Stable releases previously required a byte-identical tree with the
promoted beta (only CHANGELOG.md could differ) and local releases had
to run exactly at the origin/main tip with an atomic main+tag push.
Together these froze main for the whole beta-to-stable window.

Relax both gates while keeping the beta soak mandatory:
- stable still requires an explicit delivered, non-withdrawn beta whose
  commit is an ancestor of the sealed release commit; the tree-identity
  drift check is removed
- local releases accept any clean sealed commit contained in
  origin/main history (any branch or detached HEAD) and push only the
  release tag; command-compatibility checks compare the sealed HEAD,
  matching CI
2026-07-21 18:35:59 +09:00
修雨 0dcc796f4c fix(release): defer unprovisioned OSS mirror 2026-07-21 14:23:35 +08:00
修雨 76d301268d ci: add cloud release and withdrawal workflows 2026-07-21 10:03:25 +08:00
修雨 41088bb965 fix(release): derive OSS_REGION for ossutil v2 V4 signing (#692)
ossutil 2.x signs requests with V4 and refuses to run without an
explicit region, so the OSS mirror sync would fail in CI even with
valid credentials. Derive OSS_REGION from the endpoint host
(including -internal variants) and fail fast when it cannot be
derived.
2026-07-20 14:51:41 +08:00