Commit Graph

6097 Commits

Author SHA1 Message Date
Yichen Jiang
1010291fe6 fix(settings): close cross-namespace, dispatch, and lifecycle races from second review
Confirmed and fixed, each with a regression test that failed first:

- Concurrent writes to different namespaces lost whole sections on disk
  (each persist rendered the full document from a stale text): the local
  provider serializes render->write->rename->text-commit on one internal
  persist chain shared by every namespace queue.
- One throwing settings/updated listener starved the rest (cordis emit
  stops at the first throw): commit fans out per listener via
  events.dispatch, contains individual failures, and rethrows the first
  INVARIANT-coded error only after every listener ran.
- Write queues ignored fiber/service lifecycle: the base init now
  registers a teardown that refuses new writes and drains queued chains;
  queued tasks re-verify service liveness and namespace ownership before
  running and again before committing, so a registrant disposed
  mid-flight is never notified and a disposed service never commits.
- Async watcher invocations could interleave (a slow stale call applied
  last): each watcher carries a serialized invocation chain — one call
  at a time, in commit order; JSDoc/doc pages state the async timing.
- update/replace borrowed the caller's object until the queued task ran:
  inputs are structured-clone snapshotted at call time; non-cloneable
  plain objects reject with a typed error.
- Composition guard now proves the documented fallback: the consumer
  uses the optional scoped-inject shape and boots both with the settings
  entry (hot publish) and without it (entry-config resolution, no scope).
- core-data-structures index: settings.md row added to the sub-page
  table in core.md/core.zh.md.

Both packages hold per-file 100% coverage across repeated runs.
2026-07-29 10:19:33 +08:00
Yichen Jiang
f44b4db1f2 fix(settings): harden seam and provider per review findings
Confirmed and fixed, each with a regression test that failed first:

- Concurrent update() lost patches (merge over one stale snapshot):
  per-namespace serialized write queues; a failed write cannot poison
  the queue for later writers.
- Fixed-name .tmp write followed planted symlinks and kept stale modes:
  random-suffix sibling, exclusive-create (wx), 0600, cleanup on
  failure, then rename.
- A throwing settings/updated listener escaped commit and permanently
  wedged the provider reload chain (rejected refreshTask): commit now
  contains listener failures (INVARIANT-coded errors still propagate),
  async watcher rejections are adopted and contained
  (watch callbacks are officially void | Promise<void>), and the
  provider chains refreshes on a settled tail with an error log.
- No way to remove a user override: scope/service replace(section)
  sets the user section wholesale; replace({}) re-inherits base and
  schema defaults.
- The three-primitive provider contract did not hold (base never
  called load()): the base Service.init loads and publishes once;
  settings-local delegates via yield* super[Service.init]().
- Dispose did not quiesce: teardown flags closed, closes the watcher,
  then awaits queued/in-flight reloads; closed is re-checked across
  await points.
- Invariant now checks the authoritative relation with the seam's own
  deepEqualJson: emitted next must equal settings.get(ns), and
  next/prev must differ structurally (cosmokit dependency dropped).
- New docs/core-data-structures/settings.{md,zh.md} with type-equiv
  blocks + manifest entries; catalog types moved from exemptions to
  LINK_MAP; website page registered.

Both packages stay at per-file 100% coverage.
2026-07-29 10:19:32 +08:00
Yichen Jiang
ec0786e099 feat(settings): add user-settings seam (ctx.settings) + file provider
Two-package capability family mirroring session-persistence/:

- dsh-settings: abstract Settings service — namespace registry with
  caller-fiber effect registrations, layered resolution (schema defaults
  < composition base < user document), schemastery validation,
  per-namespace deep-equal commit detection, and the settings/updated
  event. Boot/registration validation fails loud; provider publishes
  keep last-good per namespace.
- dsh-settings-local: settings.yaml/.json provider — resolveSpec
  defaulting to $DSH_HOME/settings.yaml, chokidar hot reload,
  content-equality self-write suppression, atomic 0600 tmp+rename
  writes, comment-preserving YAML namespace patching.

Consumers register inside ctx.inject(['settings'], …), so every
composition works unchanged without a mounted provider. Real Loader +
Include composition test proves cordis.yml boot and external-edit hot
propagation; HMR disposal test proves registry cleanup. Both packages
hold per-file 100% coverage.

Doc budgets rise 1705→1710 (AGENTS.md) and 835→845 (packages/README.md):
one structural line per file for the new package group.

Agent Note: .agents/notes/implemented/architecture/2026-07-28-user-settings-seam.md
2026-07-29 10:19:32 +08:00
Tianyi Cui
f63d2deecf Merge pull request #818 from deepseek-harness/fix/wine-workspace-snapshot-flake
fix(ci): retry the Wine lane's pnpm install on the hoisted-linker rename race
2026-07-28 16:36:42 +08:00
Tianyi Cui
6227b55e4a fix(ci): retry the Wine lane's pnpm install on the hoisted-linker rename race
The wine blocking job flaked with ERR_PNPM_ENOENT rename '_tmp_*' ->
'<pkg>/node_modules/esbuild' during workspace snapshot + pnpm install
(runs 30334004123 and 30340039598), and a plain rerun passed. Root
cause is upstream pnpm/pnpm#12880: the hoisted linker's parallel
linkers race to rename their _tmp_* staging directory onto the same
nested package path, and the loser exits although an identical
re-install succeeds. Only this lane uses nodeLinker: hoisted, so only
this lane hits it.

snapshot_and_install now retries exactly that log signature up to two
times, wiping the scratch tree's node_modules first (the snapshot
itself contains none, so the wipe restores the pre-install state) and
logging each retry with the upstream issue. Any other install failure
still fails on the first attempt, and a race that survives the final
attempt still fails loud with the install log tail.
2026-07-28 16:16:10 +08:00
Tianyi Cui
15ed8e5d55 Merge pull request #761 from deepseek-harness/worktree/replayable-gate-plans-20260727
feat(dev-infra): validate gate graphs and order artifact consumers
2026-07-28 15:51:14 +08:00
Tianyi Cui
d70cb63833 Merge remote-tracking branch 'origin/master' into worktree/replayable-gate-plans-20260727 2026-07-28 15:41:26 +08:00
imccyu
453c475c72 Merge pull request #809 from deepseek-harness/xtr/remove-append-out-of-band
refactor(session): remove synthetic log-only turns
2026-07-28 15:40:23 +08:00
Tianyi Cui
108374772f Merge branch 'master' into xtr/remove-append-out-of-band 2026-07-28 15:36:20 +08:00
Tianyi Cui
463ab62a6a Merge pull request #816 from deepseek-harness/worktree/sandbox-master-only-20260728
ci: run sandbox matrix on master only
2026-07-28 15:36:12 +08:00
Tianyi Cui
2a5137f0e9 Merge branch 'master' into worktree/sandbox-master-only-20260728 2026-07-28 15:35:36 +08:00
Tianyi Cui
09a65125ba Merge remote-tracking branch 'origin/master' into worktree/replayable-gate-plans-20260727 2026-07-28 15:34:30 +08:00
_Kerman
102ebb8772 Merge branch 'master' into xtr/remove-append-out-of-band 2026-07-28 15:33:34 +08:00
imccyu
d42f6e9e1d Merge pull request #801 from deepseek-harness/fix/web-ui-optimization
fix(web-ui): conversation UI polish sweep
2026-07-28 15:33:22 +08:00
Tianyi Cui
cbbd888cab simplify gate graph validation 2026-07-28 15:33:20 +08:00
_Kerman
0cd28959e8 Merge branch 'master' into xtr/remove-append-out-of-band 2026-07-28 15:32:42 +08:00
Tianyi Cui
0a09924c00 Merge remote-tracking branch 'origin/master' into worktree/sandbox-master-only-20260728 2026-07-28 15:28:53 +08:00
imccyu
0bc9fa9546 Merge branch 'master' into fix/web-ui-optimization 2026-07-28 15:26:38 +08:00
Tianyi Cui
032aa16018 Merge pull request #811 from deepseek-harness/worktree/ci-flake-followup-20260728
fix(ci): stabilize readiness timing boundaries
2026-07-28 15:26:20 +08:00
Tianyi Cui
f85736e814 ci: run sandbox matrix on master only 2026-07-28 15:26:00 +08:00
imccyu
0b1a8b3fee fix: ci 2026-07-28 15:25:38 +08:00
_Kerman
833a58784f docs(session): refresh invariant metadata 2026-07-28 15:22:16 +08:00
Tianyi Cui
16958cdbe7 fix(pty): observe readiness before exact probe threshold 2026-07-28 15:22:05 +08:00
_Kerman
f074444cf0 Merge remote-tracking branch 'origin/master' into xtr/remove-append-out-of-band 2026-07-28 15:19:00 +08:00
_Kerman
a39ffb095a fix(session): preserve plugin turn invariants 2026-07-28 15:18:48 +08:00
imccyu
ee9627f232 Merge remote-tracking branch 'origin/master' into fix/web-ui-optimization 2026-07-28 15:06:17 +08:00
Tianyi Cui
6a763e4b3c Merge branch 'master' into worktree/ci-flake-followup-20260728 2026-07-28 14:58:47 +08:00
imccyu
dad7d0b6d4 Merge pull request #793 from deepseek-harness/worktree-newchat
fix(client): close the three reactive-subscription gaps in the React layer
2026-07-28 14:56:32 +08:00
_Kerman
80ce377c82 test(session-title): cover direct fallback races 2026-07-28 14:56:17 +08:00
imccyu
095e3944ae docs(client): state the reactive-read rules positively 2026-07-28 14:52:04 +08:00
Tianyi Cui
eeaf4c7220 fix(ci): stabilize readiness timing boundaries 2026-07-28 14:49:59 +08:00
imccyu
968f2a22a6 Merge remote-tracking branch 'origin/worktree-newchat' into worktree-newchat 2026-07-28 14:49:56 +08:00
imccyu
059ba4e0d1 docs(client): add the reactive-read and contract-currency discipline 2026-07-28 14:48:46 +08:00
_Kerman
cee0666a4d refactor(session): remove synthetic log-only turns 2026-07-28 14:41:51 +08:00
imccyu
9f7a1f749d Merge branch 'master' into worktree-newchat 2026-07-28 14:37:46 +08:00
imccyu
2665e55e5d docs(runtime): align the zh README resolution sentence with the privatized resolvers 2026-07-28 14:36:16 +08:00
imccyu
d833be412a fix(client): contain notification-callback failures and document the source lifecycle
Review follow-ups: the three new notify loops (currentProvideInfo
subscribers, ui-skill lexicon listeners, late-registration controller
setup) now contain per-callback failures so one faulty consumer cannot
starve the rest, abort the list projection pass, or poison the source
roster with no disposer; controller lexicon polling drops a throwing
source with a console record like the candidate path. The ui-slash
README (both languages) now states the late-registration warm and the
subscribeLexicon contract, and the scenario suite drives a typed /name
token gaining its decoration when the roll settles with no further
input.
2026-07-28 14:33:37 +08:00
imccyu
f331f248d8 fix: static 2026-07-28 14:16:14 +08:00
imccyu
2b74db670e refactor(client): rename the provide reprojection to updateCurrentProvideInfo and privatize the id resolvers
provideInfo(id)/maybeProvideInfo(id) lost their last external caller
when the renderer host switched to the currentProvideInfo observable;
both become private (tests assert through the public projection). The
reprojection method's name now says what it does — re-derive and
publish on change — and matches the field family it maintains.
2026-07-28 14:06:08 +08:00
Tianyi Cui
4c6fb8b957 Merge pull request #794 from deepseek-harness/dependabot/github_actions/actions/upload-artifact-7
chore(deps): bump actions/upload-artifact from 6 to 7
2026-07-28 12:40:15 +08:00
Yif
3134f2d430 doc: agent note for the web conversation polish sweep 2026-07-28 12:36:29 +08:00
Tianyi Cui
f89fe5c259 Merge branch 'master' into dependabot/github_actions/actions/upload-artifact-7 2026-07-28 12:35:34 +08:00
Tianyi Cui
4ea537210b Merge pull request #777 from deepseek-harness/dependabot/npm_and_yarn/native/landlock-run/types/node-26.0.1
chore(deps-dev): bump @types/node from 24.13.2 to 26.0.1 in /native/landlock-run
2026-07-28 12:27:39 +08:00
Yif
8eb1a6f66b fix(web-ui): narrow flow item before reading group results in chat-view spec 2026-07-28 12:25:32 +08:00
Tianyi Cui
18653c029d Merge branch 'master' into dependabot/npm_and_yarn/native/landlock-run/types/node-26.0.1 2026-07-28 12:23:28 +08:00
Yif
0a625b1144 fix(web-ui): header title 14/20, drop turns counter, global grayscale antialiasing 2026-07-28 12:18:18 +08:00
Tianyi Cui
589e421220 Merge pull request #776 from deepseek-harness/dependabot/npm_and_yarn/native/landlock-run/typescript-6.0.3
chore(deps-dev): bump typescript from 5.9.3 to 6.0.3 in /native/landlock-run
2026-07-28 12:15:39 +08:00
dependabot[bot]
305f185ede chore(deps): bump actions/upload-artifact from 6 to 7
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 6 to 7.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v6...v7)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-07-28 04:13:32 +00:00
Tianyi Cui
5f6ba69e2b Merge branch 'master' into dependabot/npm_and_yarn/native/landlock-run/typescript-6.0.3 2026-07-28 12:11:50 +08:00
Tianyi Cui
10d8fc1dce Merge pull request #775 from deepseek-harness/dependabot/github_actions/actions/deploy-pages-5
chore(deps): bump actions/deploy-pages from 4 to 5
2026-07-28 12:11:27 +08:00