Commit Graph

6331 Commits

Author SHA1 Message Date
creatixchu
da970ea269 fix(host,client): stream bounded listings, declare schemastery, guard Choose again
The browse level now streams through opendir into a name-sorted window of
maxEntries + 1 candidates (boundedInsert), so memory stays O(maxEntries)
no matter how many children a directory holds and enterability probing
touches only windowed candidates; a windowed broken symlink is not
backfilled since the eviction already marks the level truncated.
schemastery joins the package's runtime dependencies (the source launcher
and isolated installs failed to resolve the value import). The
folder-error dialog's Choose again goes inert while the flow hole is
empty, and the withdrawal effect also keys on the open transition, so a
flow can never open over a hole nobody serves.
2026-07-29 04:11:41 +08:00
creatixchu
5245182db2 fix(host): bound listDirectory levels at a configurable maxEntries
One list call now materializes at most maxEntries child rows (config,
default 1000 - GitHub's web-UI directory-listing bound). Candidates sort
before probing so a cut level keeps the name-sorted head and symlink
probing stops with the bound, and DirectoryListing carries a required
truncated flag on the seam and the wire so clients can state
incompleteness instead of silently missing tail entries.
2026-07-29 03:45:26 +08:00
creatixchu
f56b9149e6 refactor(client): deferGroupRegistration owns the multi-hole flow semantics
The construction-rollback + late-conflict-rollback + loud-rethrow block was
about to be a verbatim clone across the two flow packages; ui-slots now owns
it as deferGroupRegistration (one occupant, several holes, as a unit), with
direct specs for all three arms, and the native flow consumes it.
2026-07-29 03:17:01 +08:00
creatixchu
62db16f81a test(host): cover the non-Error late-conflict wrap 2026-07-29 03:08:40 +08:00
creatixchu
9f37ca2709 fix(client,host): late duplicate-provider conflicts roll back wholesale and fail loud
Holes declared after two flow providers activated left the loser throwing
out of the slot flush with partial occupancy. deferRegistration gains an
onFailure channel (late failures unsubscribe, then hand over instead of
throwing through the flush); the native flow's pair rolls back wholesale
and re-raises on the global channel the boot's fail-loud handler owns.
Duplicate rows of the SAME package stay silently idempotent (the component
identity guard skips an occupied hole).
2026-07-29 03:06:34 +08:00
creatixchu
a9b8fa2585 fix(client,host): review round — hooks-compartment occupancy, StrictMode re-arm, internal flow module, honest swap comment
- Directory-flow occupancy moves onto the inject face's reserved hooks
  compartment: apply publishes a stable observable per surface and the
  renderer binds useDirectoryFlow — no hand-rolled component subscriptions
  (the client contract's channel for registrant-private reactive facts).
- The native flow's alive guard re-arms in effect setup: StrictMode's
  development replay ran the cleanup once and every later outcome was
  discarded.
- NativeDirectoryFlow moves to a package-internal module; ./client exports
  only the Loader surface, tests import the internal module directly.
- The composition swap comment no longer advertises -browse as a complete
  swap before its dialog lands (stacked follow-up).
2026-07-29 02:50:45 +08:00
creatixchu
7114cc7475 fix(client): flow occupancy is a subscribed source; an unloading occupant withdraws the open flow
hasDirectoryFlow was a plain per-render read: a flow plugin unloading (HMR)
while its dialog was open left flowOpen stuck with nobody to cancel,
permanently disabling the workspace actions. Occupancy now rides
useSyncExternalStore over the hole's registration subscription, and an
empty hole withdraws an active flow; the menu entry also reacts to
activation without a reopen (ds-review-bot).
2026-07-29 02:36:08 +08:00
creatixchu
3f23347d10 fix(host): the native flow discards chooser settlements after unmount
An HMR replacement left the old instance's pick promise able to adopt a
second path through the shared owner callbacks; settlements now check a
component-lifetime ref (an injected-face identity change alone keeps the
pending settlement — the host-side dialog is unchanged, and the wire has no
per-request abort). Both settlement arms covered (ds-review-bot).
2026-07-29 02:24:27 +08:00
creatixchu
e7c9877ac5 fix(build,doc): native paths aliases; the note states browse's client half is stacked
- tsconfig.base.json still aliased the removed directory-picker-dialog and
  offered no mapping for -native: on a clean tree, package-name imports and
  source launches fell through to a missing lib/ until a build ran.
- The seam note (and the generated seam prose) no longer describe the
  browse browser half as shipped here: it lands in the stacked follow-up,
  and a -browse composition meanwhile shows the documented empty-hole
  default (ds-review-bot).
2026-07-29 02:11:31 +08:00
creatixchu
663ac4b50b fix(client): deferRegistration rolls its subscription back when construction throws
The immediate registration attempt runs after the subscription is
installed; a synchronous failure (declared slot already occupied) escaped
the constructor without returning a handle, leaving a subscription owned by
nothing — later ledger flushes would fire it against a failed fiber.
Construction failure now unsubscribes before rethrowing, with a dedicated
deferred.spec covering both arms (ds-review-bot on the flow registrations;
the effect-level rollback in the flow packages keeps covering earlier
successfully-constructed deferrals).
2026-07-29 01:49:58 +08:00
creatixchu
b6762d20a2 fix(host): roll back the surviving deferral when flow-registration setup fails halfway
A declared-but-occupied second hole registers synchronously, so the pair
construction can throw after the first deferral installed its subscription;
that orphan then fires against the failed fiber's inactive context. The
effect now disposes already-created deferrals before rethrowing
(ds-review-bot on the browse twin; same shape here).
2026-07-29 01:29:08 +08:00
creatixchu
6a78bf4dd0 Merge remote-tracking branch 'origin/doc/host-client-group-readmes' into feat/directory-picker 2026-07-29 01:09:33 +08:00
creatixchu
40807f7573 Merge remote-tracking branch 'origin/master' into doc/host-client-group-readmes 2026-07-29 01:08:37 +08:00
creatixchu
51b70f5864 Merge remote-tracking branch 'origin/master' into doc/host-client-group-readmes
# Conflicts:
#	apps/cli/README.i18n.yaml
2026-07-29 01:08:17 +08:00
Wenlu Wang
b6b13441ac Merge pull request #623 from deepseek-harness/feature/subagent-policy-inheritance
subagent: inherit parent sandbox/approval overrides in in-process children
2026-07-29 01:01:24 +08:00
Tianyi Cui
4a9278e205 Merge branch 'master' into feature/subagent-policy-inheritance 2026-07-29 00:55:32 +08:00
Tianyi Cui
a03989aa36 Merge pull request #860 from deepseek-harness/worktree/pnpm-setup-runner-isolation-20260729
fix(ci): isolate pnpm setup per runner
2026-07-29 00:54:06 +08:00
Tianyi Cui
8f867cc709 Merge branch 'master' into feature/subagent-policy-inheritance 2026-07-29 00:49:35 +08:00
Tianyi Cui
f75ee1ddad Merge branch 'master' into worktree/pnpm-setup-runner-isolation-20260729 2026-07-29 00:46:34 +08:00
Tianyi Cui
c13d1a4285 fix(ci): isolate pnpm setup per runner 2026-07-29 00:45:52 +08:00
Tianyi Cui
342dff2581 Merge pull request #843 from deepseek-harness/worktree/normalize-snapshot-tmpdir
test(snapshot): normalize temporary workspace paths
2026-07-29 00:41:59 +08:00
Tianyi Cui
be23e5b2ac Merge latest master into subagent policy inheritance 2026-07-29 00:40:25 +08:00
Tianyi Cui
739647afc0 fix(subagent): publish inherited policy facts to telemetry
Inherited sandbox and approval events were part of the constructor seed. Session.firstLiveSeq classifies every constructor event as replayed history, so telemetry adoption skipped these child-only creation facts even though no parent or prior process had exported them.

Capture the parent overrides at the same synchronous delegation boundary, but append the events during the child factory setup while the session is still unpublished. They remain ordered after fork history, persist with the first child batch, and retain last-event-wins behavior while landing on the live side of the telemetry boundary. This uses the existing setup and session append contracts instead of adding another seed category or telemetry special case.

Add regression coverage for exporting an unpublished suffix without re-exporting constructor history, assert the spawn and fork firstLiveSeq boundaries, and restore the public seed documentation to replay/fork history only.
2026-07-29 00:39:56 +08:00
Tianyi Cui
ea62a61307 Merge branch 'master' into worktree/normalize-snapshot-tmpdir 2026-07-29 00:35:42 +08:00
Tianyi Cui
2a6e6edac4 Merge pull request #859 from deepseek-harness/worktree/fix-snapshot-cwd-boundaries
fix(snapshot): preserve cwd normalization boundaries
2026-07-29 00:35:26 +08:00
Tianyi Cui
d533e225ad Merge pull request #852 from deepseek-harness/worktree-fe-docs
Client test runtime: outward service interfaces + single-slot DOM snapshots
2026-07-29 00:29:50 +08:00
Tianyi Cui
9365650371 fix(snapshot): preserve cwd boundary normalization 2026-07-29 00:24:02 +08:00
imccyu
9d9cdd640e style(test-runtime): drop a trailing space 2026-07-29 00:09:40 +08:00
Tianyi Cui
7f11b721e9 Merge branch 'master' into worktree/normalize-snapshot-tmpdir 2026-07-29 00:03:17 +08:00
Tianyi Cui
63c9db1759 test(snapshot): preserve cwd punctuation 2026-07-29 00:02:38 +08:00
Tianyi Cui
48518ea850 Merge branch 'master' into worktree-fe-docs 2026-07-29 00:00:38 +08:00
Tianyi Cui
ce63309515 Merge pull request #854 from deepseek-harness/worktree-devfast
feat(cli): launch source with native TypeScript
2026-07-29 00:00:30 +08:00
imccyu
3e6a7fea43 test(ui-sidebar): pin the shell chrome with local DOM snapshots
First consumer of the runtime's single-slot mounting: the real apply mounts
on its own fiber, renderSlot('sidebar', ...) captures exactly the sidebar
slot's output, and update() re-renders the collapsed rail in place. The
.snap files carry semantic class names and svg fingerprints only.
2026-07-28 23:54:14 +08:00
imccyu
a3f9a4d3ee test(client): migrate the ui-conversation and web benches onto SlotTestRuntime
The five ui-conversation machinery specs (apply-inject, chat-apply,
chat-toolview-slot, service-orchestration, selection-survival — now .tsx)
and the web app/app-shell specs assemble through the runtime instead of
hand-built Context + SlotsService + fake-session scaffolding per suite.
Session behavior mocks are typed against ISession, so incomplete fakes
fail at compile time.
2026-07-28 23:54:14 +08:00
imccyu
3f7a8c6f8e feat(client): add the dsh-client-test-runtime package
A jsdom slot test runtime for feature specs: a real Cordis Context, the
production SlotsService and web-react renderer, and typed session/workspace
doubles (TestSessions implements ISessions with FixtureSession sessions;
TestWorkspaces implements IWorkspaces), so the compiler flags fixture drift
when a production face changes. Fixtures feed plain data: list rows,
conversation snapshots, and ISession-typed behavior stubs; provide-bundle
materialization runs the shared SessionProvideChannel.

DOM snapshot support: declare()/renderSlot() mount a single slot inside a
data-slot wrapper for local .snap capture, and a snapshot serializer folds
CSS-module class hashes to their semantic locals and collapses svg internals
to a content fingerprint. The typed provide() constrains declared-service
fakes to Partial of the service's outward face.
2026-07-28 23:54:13 +08:00
Tianyi Cui
a65e13cd25 Merge branch 'master' into worktree/normalize-snapshot-tmpdir 2026-07-28 23:47:22 +08:00
Tianyi Cui
c3d9f132e8 test(snapshot): canonicalize generated cwd tokens 2026-07-28 23:46:01 +08:00
Tianyi Cui
064205b54d Merge pull request #845 from deepseek-harness/worktree/pr623-policy-inheritance-simplify-20260728
subagent: simplify policy inheritance to seeded events
2026-07-28 23:44:01 +08:00
imccyu
0efc7f045e refactor(client): carve outward interfaces for the session, workspace, layout, slash, and conversation services
Feature packages now reach these domains through interface types only:
ISession/SessionFace (identity + prompt/cancel/loadOlder + the useSession
snapshot source), ISessions, IWorkspaces, ILayout, IConversation, and the
existing SlashServiceContract now actually mounted on Context.slash. The
concrete services implement their face; wire-pump and assembly entry
points stay on the classes. The provide-channel materialization and
current-projection logic moves into SessionProvideChannel so the
production service and the client test runtime share one implementation.
The workspaces service consumes sessions through the narrow SessionsPort.
2026-07-28 23:43:32 +08:00
imccyu
431c2180c1 fix(cli): harden native source resolution 2026-07-28 23:42:54 +08:00
imccyu
b6b4a66da0 pkg: add build:lib script 2026-07-28 23:31:28 +08:00
imccyu
e5218217c3 chore: raise lint heap limit 2026-07-28 23:20:18 +08:00
imccyu
c804dfde3e docs: document native TypeScript source launch 2026-07-28 23:13:28 +08:00
imccyu
db3b12a0f7 feat: launch dsh source with native TypeScript 2026-07-28 23:06:27 +08:00
imccyu
5ea161fa68 vendor: support native TypeScript source loading 2026-07-28 23:06:10 +08:00
Tianyi Cui
eb38a365dc Merge pull request #791 from deepseek-harness/worktree-projcache
feat: persisted projection cache — durable checkpoints, tail reads, and cold listing columns
2026-07-28 22:55:30 +08:00
imccyu
b4bc4f382e refactor(session-projection): compact checkpoint row fields to ver/seq/val
The persisted row (sessionId, key, stateVersion, observedSeq, state)
becomes (sessionId, key, ver, seq, val) — the cache medium repeats these
three names for every unit of every session, so the long forms dominated
the JSON payload. ProjectionCheckpointRow and the checkpointRow zod spec
rename together; the domain spec bumps to v3 (cache semantics: the old
medium is discarded, not migrated). The unit-facing declaration keeps
stateVersion — only the persisted/checkpoint row shape changes.
2026-07-28 22:45:35 +08:00
creatixchu
7c9d688a82 test(host): cover the native flow's re-arm guard
A fresh injected face while the same request is open re-fires the effect;
the armed guard must not relaunch the chooser (the uncovered branch CI's
per-file gate flagged).
2026-07-28 22:37:19 +08:00
creatixchu
95a8e3f949 fix(client,doc): address review — flow-open busy gating, seam on the architecture map, browse gap documented
- While a picking flow is open (native chooser pending, browse dialog up) or
  its pick is being adopted, every other menu action disables: a late outcome
  must not race a concurrent selection or creation (ds-review-bot warning).
- ctx.directoryPicker joins the architecture Capability Services map (both
  languages); neighboring rows condensed to keep the doc inside its ceiling.
- directory-picker-browse documents that its client half lands in the next
  stacked PR: a -browse composition today hides the picking affordance (the
  documented empty-hole default) rather than misbehaving (ds-review-bot
  critical; the dialog itself ships in #821).
2026-07-28 22:29:34 +08:00
imccyu
931dd934e3 style: clear the lint lane — drop redundant assertions and non-thenable awaits
eslint --fix removed the no-unnecessary-type-assertion hits the review
knives introduced; the two await-thenable errors were vi.runAllTicks()
awaits in the cache spec, replaced with advanceTimersByTimeAsync(0) (the
fake-timer-safe microtask drain). Repo-wide eslint, dual-aggregate tsc,
and the focused 100% coverage set all green.
2026-07-28 22:26:12 +08:00