kingwl
6fa2377e34
subagent: capture overrides at delegation; stamp ahead of prompt vetoes
...
Review fixes (ds-review-bot on #623 ):
- Capture-at-delegation: the driver now reads overrideOf(parent.session)
for both knobs synchronously before its first await, and the prompt-submit
listener stamps those captured values — a parent switch racing the child's
asynchronous creation belongs to the parent's future, not the child. The
inheritOverride(parent, child) service method is split into its two halves
(overrideOf / stampOverride) accordingly.
- Veto safety: the one-shot prompt-submit listener registers with
prepend: true, so a veto-capable listener (a denying UserPromptSubmit
hook) cannot close the child's first turn without the durable stamp.
Both regressions are pinned red-first in inheritance.spec.ts: the
delegation-vs-late-switch race (delegate tool flips the caller wider while
the creation transaction is pending) and a blocking prompt-submit listener
(stamp survives a promptless first turn). Service contract tests renamed to
the split API; READMEs and the bilingual Agent Note updated.
2026-07-25 10:51:25 +08:00
kingwl
669771097d
subagent: inherit parent sandbox/approval overrides in in-process children
...
Per-session policy overrides (sandbox/mode, approval/policy) never crossed
the delegation boundary: a spawn child of a read-only-switched parent ran
under the wider deployment default, and a fork child missed any switch made
after its seed boundary — delegation was a bypass channel for a user's
tightening.
The in-process driver now snapshots the delegating parent's override chain
and stamps it onto the child through the canonical write paths
(SandboxPolicyService.inheritOverride / ApprovalService.inheritOverride),
anchored inside the child's first turn via a one-shot agent/prompt-submit
listener: turn-enclosed (durable), ahead of the first request (an inherited
'never' reaches the child's first system prompt), and positioned after any
stale fork-seed switch so the ordinary last-event-wins fold resolves it.
Only overrides are copied — an unswitched parent stamps nothing and the
child follows the live deployment default; both services are consumed
opportunistically, so compositions without them delegate unchanged. Nesting
composes by construction (each stamp folds the already-stamped parent log).
Evidence: inheritance.spec.ts drives scripted-model children into the real
dsh-fs-sandbox fence through the real write tool (disk-state + denial-marker
assertions; spawn, stale-seed fork, grandchild, escalation fail-closed, and
no-stamp guards), inheritOverride contract tests in both service suites, and
the recorded subagent-sandbox-inheritance ACP snapshot (read-only preset →
delegate → child denied, replayed keylessly).
See .agents/notes/implemented/feature/2026-07-25-subagent-policy-inheritance.md.
2026-07-25 04:06:19 +08:00
Tianyi Cui
690c53dc03
Merge pull request #468 from deepseek-harness/worktree/session-reference
...
feat(session): add cross-session references
2026-07-22 23:22:07 +08:00
Tianyi Cui
d5d6960184
Merge remote-tracking branch 'origin/master' into worktree/pr468-retarget-latest-master
...
# Conflicts:
# docs/architecture.i18n.yaml
# docs/module-graph.md
2026-07-22 23:17:02 +08:00
Tianyi Cui
e3981109b3
Merge pull request #467 from deepseek-harness/feature/persistent-pty-sessions
...
feat: add persistent PTY sessions
2026-07-22 23:02:42 +08:00
Tianyi Cui
995362c7e1
Merge remote-tracking branch 'origin/master' into worktree/pr468-retarget-latest-master
2026-07-22 23:01:30 +08:00
Tianyi Cui
b65afd320a
Merge remote-tracking branch 'origin/master' into worktree/pr468-retarget-latest-master
...
# Conflicts:
# docs/cordis-catalog/events.md
# docs/cordis-catalog/services.md
# docs/event-producer-consumer.md
2026-07-22 23:00:05 +08:00
Tianyi Cui
c9566d18bf
Merge remote-tracking branch 'origin/master' into worktree/pr467-retarget-latest-master
2026-07-22 22:58:33 +08:00
Tianyi Cui
72e1640959
Merge pull request #433 from deepseek-harness/rfc/pty
...
docs(agent-note): propose persistent PTY sessions
2026-07-22 22:57:42 +08:00
Tianyi Cui
cf5dfe46e7
Merge remote-tracking branch 'origin/rfc/pty' into worktree/pr467-retarget-latest-master
2026-07-22 22:50:55 +08:00
Tianyi Cui
17988a88e0
Merge remote-tracking branch 'origin/master' into worktree/pr433-retarget-latest-master
2026-07-22 22:50:02 +08:00
Tianyi Cui
2edfe65987
test(tui): await catalog failure rendering
2026-07-22 22:45:46 +08:00
Tianyi Cui
d99094b1ac
Merge updated rfc/pty into feature/persistent-pty-sessions
...
# Conflicts:
# docs/architecture.i18n.yaml
# docs/core-data-structures/core.md
# pnpm-lock.yaml
# scripts/gen-cordis-catalog.ts
2026-07-22 22:43:20 +08:00
Wenlu Wang
210ccc4af8
Merge pull request #338 from deepseek-harness/jsonl-packed-chunk-rows
...
feat(session): opt-in packed chunk rows in the JSONL log
2026-07-22 22:41:08 +08:00
Tianyi Cui
58ba7cf15b
Merge latest master into rfc/pty
2026-07-22 22:38:40 +08:00
Tianyi Cui
e962642926
Merge remote-tracking branch 'origin/master' into worktree/pr468-retarget-latest-master
...
# Conflicts:
# docs/architecture.i18n.yaml
# docs/config-catalog.md
# docs/event-producer-consumer.md
# docs/module-graph.md
# packages/examples/acp-demo/README.md
# packages/examples/acp-demo/src/index.ts
# packages/examples/acp-demo/tests/built-bin.e2e.ts
# packages/examples/tui-demo/package.json
# packages/examples/tui-demo/src/index.ts
# packages/examples/tui-demo/tests/tui-agent.spec.ts
2026-07-22 22:38:17 +08:00
Tianyi Cui
b0f5d9e313
Merge commit 'refs/codex-unblock/20260722-pr338-master' into HEAD
...
# Conflicts:
# docs/event-producer-consumer.md
# examples/acp-agent/tests/acp.snapshot.ts
# packages/core/session/src/index.ts
# packages/examples/acp-demo/src/index.ts
# packages/session-persistence/session-persistence-jsonl/src/format.ts
# vitest.config.ts
2026-07-22 22:37:16 +08:00
Tianyi Cui
8f68ca93f5
Merge pull request #528 from deepseek-harness/worktree/pr338-packed-snapshot-all-kinds
...
test(snapshot): cover all packed chunk row kinds
2026-07-22 22:19:40 +08:00
Tianyi Cui
54aaab6807
Merge pull request #464 from deepseek-harness/worktree/semantic-session-checkpoints
...
fix(session): add semantic crash checkpoints
2026-07-22 22:18:37 +08:00
Tianyi Cui
53c3ab135d
test(snapshot): cover all packed chunk row kinds
2026-07-22 22:14:16 +08:00
Tianyi Cui
ecb77f5e0c
test(ci): stabilize cancellation and crash checkpoints
2026-07-22 22:14:14 +08:00
Tianyi Cui
7a8d5da3d3
Merge remote-tracking branch 'origin/master' into worktree/pr468-retarget-latest-master
2026-07-22 22:02:53 +08:00
Tianyi Cui
a3d17feb8c
Merge latest master into worktree/semantic-session-checkpoints
2026-07-22 22:01:38 +08:00
Tianyi Cui
ad4c37013a
test(snapshot): await cancelled turn durability
2026-07-22 22:00:48 +08:00
Tianyi Cui
277b65aa8c
Merge remote-tracking branch 'origin/master' into worktree/pr468-retarget-latest-master
...
# Conflicts:
# pnpm-lock.yaml
2026-07-22 22:00:00 +08:00
Tianyi Cui
fa43335624
Merge pull request #525 from deepseek-harness/worktree/web-bind-address
...
fix(web): default to loopback binding
2026-07-22 21:56:12 +08:00
Tianyi Cui
cd36467a19
Merge pull request #526 from deepseek-harness/worktree/pr338-preserve-chunk-envelope
...
fix(snapshot): preserve packed chunk timing on refresh
2026-07-22 21:52:47 +08:00
Tianyi Cui
f967537177
Merge remote-tracking branch 'origin/master' into worktree/web-bind-address
...
# Conflicts:
# apps/cli/src/bin.ts
2026-07-22 21:51:05 +08:00
Tianyi Cui
3679b4d829
Merge master into worktree/semantic-session-checkpoints
2026-07-22 21:49:24 +08:00
Tianyi Cui
2e9afef556
Merge pull request #449 from deepseek-harness/codex/session-scoped-sandbox-roots
...
fix(sandbox): resolve workspace roots per session
2026-07-22 21:46:27 +08:00
Tianyi Cui
db21dcfeae
Merge remote-tracking branch 'origin/master' into codex/session-scoped-sandbox-roots
2026-07-22 21:41:53 +08:00
Tianyi Cui
7e5d5795a5
test(sandbox): adapt scenarios to latest master
2026-07-22 21:41:25 +08:00
Tianyi Cui
10a55d7a27
Merge remote-tracking branch 'origin/master' into codex/session-scoped-sandbox-roots
...
# Conflicts:
# .agents/notes/implemented/feature/2026-07-14-cross-family-fs-sandbox.i18n.yaml
# .agents/notes/implemented/feature/2026-07-14-cross-family-fs-sandbox.md
# .agents/notes/implemented/feature/2026-07-14-cross-family-fs-sandbox.zh.md
# examples/acp-agent/README.md
# packages/examples/agent-spine-demo/package.json
# packages/fs/fs-sandbox/src/index.ts
# packages/fs/tool-fs-search/tests/tools.spec.ts
# packages/support/acp-snapshot/README.md
# packages/support/acp-snapshot/src/suite.ts
# pnpm-lock.yaml
# scripts/type-equiv.manifest.json
2026-07-22 21:37:30 +08:00
Tianyi Cui
6d756fd4c9
test(web): add race-free loopback smoke
2026-07-22 21:35:32 +08:00
Tianyi Cui
7b803be4ae
Merge branch 'master' into worktree/session-reference
2026-07-22 21:33:21 +08:00
Tianyi Cui
ce89c24476
Merge pull request #515 from deepseek-harness/worktree/run-all-gates
...
chore: restore an opt-in check-all command
2026-07-22 21:31:46 +08:00
Tianyi Cui
479e590029
fix(snapshot): align packed refresh by logical event
2026-07-22 21:28:38 +08:00
Tianyi Cui
3787bef665
Merge remote-tracking branch 'origin/master' into worktree/pr468-retarget-latest-master
...
# Conflicts:
# docs/config-catalog.md
# docs/event-producer-consumer.md
# docs/module-graph.md
# packages/examples/tui-demo/src/index.ts
# packages/examples/tui-demo/tests/tui-agent.spec.ts
# packages/ui/tui/README.md
# packages/ui/tui/package.json
# packages/ui/tui/src/index.ts
# packages/ui/tui/tests/tui.spec.ts
# packages/ui/tui/tsconfig.json
# pnpm-lock.yaml
# vitest.config.ts
2026-07-22 21:27:18 +08:00
Tianyi Cui
325cd61644
test(tui): make elapsed refresh deterministic
2026-07-22 21:27:17 +08:00
Tianyi Cui
1167ea71b7
Merge latest master through rfc/pty into feature/persistent-pty-sessions
...
# Conflicts:
# docs/module-graph.md
2026-07-22 21:21:58 +08:00
Tianyi Cui
c848c7b15e
Merge refreshed rfc/pty into feature/persistent-pty-sessions
...
# Conflicts:
# docs/architecture.md
# docs/capability-seams.md
# docs/config-catalog.md
# docs/cordis-catalog/services.md
# docs/module-graph.md
# docs/tool-catalog.md
# examples/acp-agent/tests/acp.snapshot.ts
# examples/headless-agent/tests/headless.snapshot.ts
# examples/package.json
# packages/README.md
# packages/cordis/tool-cordis/src/api-catalog.ts
# packages/core/tools/tests/gen-tool-catalog.spec.ts
# pnpm-lock.yaml
# pnpm-workspace.yaml
# scripts/gen-tool-catalog.ts
# scripts/type-equiv.manifest.json
# website/.vitepress/config/api-sidebar.json
2026-07-22 21:12:16 +08:00
Tianyi Cui
9c6099fbbd
Merge branch 'master' into worktree/run-all-gates
2026-07-22 21:10:45 +08:00
Tianyi Cui
c5f353b073
Merge latest master into rfc/pty
2026-07-22 21:08:55 +08:00
Tianyi Cui
402f8c5f5a
Merge pull request #504 from deepseek-harness/tui-staging-merge-1
...
feat: TUI front end, dsh CLI, and installer on current master
2026-07-22 21:08:07 +08:00
Tianyi Cui
6613f43178
Merge remote-tracking branch 'origin/master' into worktree/pr468-retarget-latest-master
...
# Conflicts:
# docs/architecture.i18n.yaml
# docs/capability-seams.md
# docs/config-catalog.md
# docs/event-producer-consumer.md
# docs/module-graph.md
# examples/acp-agent/tests/goal-snapshots/goal-session/stdout.expected.jsonl
# examples/acp-agent/tests/snapshots/advanced-toolchain/stdout.expected.jsonl
# examples/acp-agent/tests/snapshots/bash-spill/stdout.expected.jsonl
# examples/acp-agent/tests/snapshots/both-mode-turn/stdout.expected.jsonl
# examples/acp-agent/tests/snapshots/cancel-tool-calls/stdout.expected.jsonl
# examples/acp-agent/tests/snapshots/cancel/stdout.expected.jsonl
# examples/acp-agent/tests/snapshots/code-mode-turn/stdout.expected.jsonl
# examples/acp-agent/tests/snapshots/code-mode-workspace-context/stdout.expected.jsonl
# examples/acp-agent/tests/snapshots/config-options/stdout.expected.jsonl
# examples/acp-agent/tests/snapshots/cordis-inspect-jsdoc/stdout.expected.jsonl
# examples/acp-agent/tests/snapshots/error-finish/stdout.expected.jsonl
# examples/acp-agent/tests/snapshots/escalation-approved/stdout.expected.jsonl
# examples/acp-agent/tests/snapshots/escalation-rejected/stdout.expected.jsonl
# examples/acp-agent/tests/snapshots/fs-edit/stdout.expected.jsonl
# examples/acp-agent/tests/snapshots/fs-escalation-approved/stdout.expected.jsonl
# examples/acp-agent/tests/snapshots/fs-policy-reject/stdout.expected.jsonl
# examples/acp-agent/tests/snapshots/fs-read-window/stdout.expected.jsonl
# examples/acp-agent/tests/snapshots/fs-read/stdout.expected.jsonl
# examples/acp-agent/tests/snapshots/fs-terminal-card/stdout.expected.jsonl
# examples/acp-agent/tests/snapshots/fs-write-overwrite/stdout.expected.jsonl
# examples/acp-agent/tests/snapshots/fs-write/stdout.expected.jsonl
# examples/acp-agent/tests/snapshots/goal-command-status/stdout.expected.jsonl
# examples/acp-agent/tests/snapshots/handshake/stdout.expected.jsonl
# examples/acp-agent/tests/snapshots/hook-cc-posttool-block/stdout.expected.jsonl
# examples/acp-agent/tests/snapshots/hook-cc-posttool-context/stdout.expected.jsonl
# examples/acp-agent/tests/snapshots/hook-cc-pretool-ask/stdout.expected.jsonl
# examples/acp-agent/tests/snapshots/hook-cc-pretool-deny/stdout.expected.jsonl
# examples/acp-agent/tests/snapshots/hook-cc-promptsubmit-block/stdout.expected.jsonl
# examples/acp-agent/tests/snapshots/hook-cc-promptsubmit-context/stdout.expected.jsonl
# examples/acp-agent/tests/snapshots/hook-cc-stop-continue/stdout.expected.jsonl
# examples/acp-agent/tests/snapshots/hook-codex-posttool-block/stdout.expected.jsonl
# examples/acp-agent/tests/snapshots/hook-codex-posttool-context/stdout.expected.jsonl
# examples/acp-agent/tests/snapshots/hook-codex-pretool-block/stdout.expected.jsonl
# examples/acp-agent/tests/snapshots/hook-codex-promptsubmit-block/stdout.expected.jsonl
# examples/acp-agent/tests/snapshots/hook-codex-promptsubmit-context/stdout.expected.jsonl
# examples/acp-agent/tests/snapshots/hook-codex-stop-continue/stdout.expected.jsonl
# examples/acp-agent/tests/snapshots/lsp-definition/stdout.expected.jsonl
# examples/acp-agent/tests/snapshots/model-switching/stdout.expected.jsonl
# examples/acp-agent/tests/snapshots/multi-turn/stdout.expected.jsonl
# examples/acp-agent/tests/snapshots/parallel-tool-calls/stdout.expected.jsonl
# examples/acp-agent/tests/snapshots/permission-switching/stdout.expected.jsonl
# examples/acp-agent/tests/snapshots/repeat-tool-guard/stdout.expected.jsonl
# examples/acp-agent/tests/snapshots/skill-load/stdout.expected.jsonl
# examples/acp-agent/tests/snapshots/subagent-depth-two-rejection/stdout.expected.jsonl
# examples/acp-agent/tests/snapshots/subagent-fork/stdout.expected.jsonl
# examples/acp-agent/tests/snapshots/subagent-mixed/stdout.expected.jsonl
# examples/acp-agent/tests/snapshots/subagent-multi/stdout.expected.jsonl
# examples/acp-agent/tests/snapshots/subagent-spawn/stdout.expected.jsonl
# examples/acp-agent/tests/snapshots/text-turn/stdout.expected.jsonl
# examples/acp-agent/tests/snapshots/todo-plan/stdout.expected.jsonl
# examples/acp-agent/tests/snapshots/tool-call-turn/stdout.expected.jsonl
# examples/acp-agent/tests/snapshots/workflow-run/stdout.expected.jsonl
# examples/acp-agent/tests/snapshots/workspace-context/stdout.expected.jsonl
# examples/acp-agent/tests/snapshots/workspace-edit/stdout.expected.jsonl
# packages/ui/acp/acp-feature-support.md
# packages/ui/acp/src/index.ts
# packages/ui/acp/tests/harness.ts
# packages/ui/tui/README.md
# scripts/type-equiv.manifest.json
2026-07-22 21:06:50 +08:00
Tianyi Cui
822a0c4765
fix(build): exclude Vite app from package bundling
2026-07-22 21:03:37 +08:00
Tianyi Cui
568cdb6a39
Merge master through 8d12216f into worktree/semantic-session-checkpoints
2026-07-22 21:01:09 +08:00
Tianyi Cui
c1ced41cdd
test(snapshot): include plan mode in checkpoint recovery
2026-07-22 20:58:09 +08:00
Tianyi Cui
a9a47452de
Merge latest master into check-all recovery
2026-07-22 20:57:39 +08:00
Tianyi Cui
a37cc9d92b
Merge remote-tracking branch 'origin/master' into worktree/pr504-retarget-latest-master
2026-07-22 20:57:26 +08:00