Commit Graph

5138 Commits

Author SHA1 Message Date
Tianyi Cui
f1b7d52a77 fix review findings: hostile code accessor + swallowed teardown
Both ds-review-bot findings were real:

- markLlmAdapterFailure's carried-facts cross-check read error.code
  directly; a foreign Error with a valid own failure payload but a
  throwing code accessor would replace the original adapter error with
  the accessor exception, breaking the error-identity guarantee. The
  read now goes through foreignErrorCode(), which contains the trap and
  falls back to the normalized snapshot (test: hostile code accessor
  beside a valid failure payload -> original identity kept, UNKNOWN
  facts).
- live-interactions' afterEach caught scaffold.close() into undefined,
  silently disabling ReplayHandle.assertConsumed() — the fixture-drift
  tripwire — and hiding cleanup defects. Teardown now runs every step,
  collects failures, and rethrows (AggregateError when several).
2026-07-26 14:12:52 +08:00
Tianyi Cui
4b06e9df99 Merge remote-tracking branch 'origin/master' into web-e2e-interactions 2026-07-26 13:08:39 +08:00
Tianyi Cui
847131e4fd Merge pull request #643 from deepseek-harness/worktree-ws-more 2026-07-26 13:06:55 +08:00
Tianyi Cui
8d078d7f64 Merge branch 'master' into worktree-ws-more 2026-07-26 13:01:36 +08:00
Tianyi Cui
ea1d8d06b3 test(web): pin every scenario end-state with an aria golden
Every spec now commits at least one golden and the interactive ones one
per distinct end-state (nine new .expected.md):

- live-interactions: cancel.expected.md (frozen partial + 已停止 marker),
  error-auth.expected.md (the prompt bubble alone — the committed artifact
  of the web-error-surface gap, the diff that flips when error rendering
  lands), retry.expected.md (indistinguishable from a clean completion —
  retries are deliberately invisible in the transcript).
- question-composer: answered.expected.md (the question resolved into its
  tool round trip plus the final reply, takeover gone) beside the existing
  waiting-state golden.
- steering: mid-steer.expected.md pins the accepted-but-INVISIBLE state
  (the loop drains steering only at the step boundary, so no interjection
  bubble exists while the question still blocks — if the client ever
  renders pending steers eagerly, this golden flips first) and
  settled.expected.md the badged bubble plus obeying reply.
- navigation-panes: waterfall.expected.md and details-open.expected.md
  (tool-name header, Input args, Output result) beside the trajectory one.
- lifecycle-chrome: reloaded.expected.md — rendering the same settled
  transcript from persistence alone IS the recovery claim.

Fixture inventories extended to the new closed sets; the Agent Note's
expected-outputs policy updated in both languages (per-end-state goldens
for interactive scenarios), pairing re-recorded.
2026-07-26 12:45:44 +08:00
Tianyi Cui
113f818084 Merge remote-tracking branch 'origin/master' into web-e2e-interactions 2026-07-26 12:03:02 +08:00
Tianyi Cui
06d0cf0daf Merge pull request #656 from deepseek-harness/web-e2e-navigation
test(web): navigation & panes e2e — tabs, details column, sidebar search
2026-07-26 11:54:30 +08:00
Tianyi Cui
774cdb8104 Merge pull request #659 from deepseek-harness/web-e2e-lifecycle
test(web): lifecycle & chrome e2e — workspace flow, reload recovery, dark mode
2026-07-26 11:54:14 +08:00
Tianyi Cui
4c3e4d172f Merge pull request #635 from deepseek-harness/codex/require-pr-labels
docs: require appropriate PR labels
2026-07-26 11:50:53 +08:00
imccyu
08251eb180 Merge branch 'master' into worktree-ws-more 2026-07-26 11:20:05 +08:00
Tianyi Cui
cbb5fc7a51 test(web): lifecycle & chrome scenarios — workspace flow, reload recovery, dark mode
One tiny recorded text turn drives three whole-page concerns:

- workspace flow over the real wire: the empty-state hero's first send
  materializes a real Workspace + Session (the jsdom workspace-flow suite
  pins this state machine over the fixture client; this scenario pins it
  through HTTP RPC + SSE + the gateway). Durable proof: the session
  header's cwd is the create-by-name target <workspaceRoot>/workspace.
  Adds the hero waiting-state aria golden.
- reload recovery: collapse the sidebar (persisted dsh.layout.panels),
  page.reload, and the surface comes back whole from persistence alone —
  layout collapsed, selection restored (dsh.sessions.current), the
  recorded turn re-rendered from session.history with zero model calls
  (the drained replay cursor makes any stray request fail loud at close).
- dark mode: no product control flips the theme yet, so the scenario
  drives the ThemeService's entire DOM contract — body[data-ds-dark-theme]
  — and pins the shipped cascade: the alias token flips, a painted surface
  repaints, and removing the attribute restores the light sample exactly.
  TODO(web-theme-gesture) upgrades to a real settings control; no theme
  golden per the lane's scope ruling (aria is color-blind).

Agent Note scenario list extended in both languages; pairing re-recorded.
2026-07-26 06:08:08 +08:00
Tianyi Cui
4964e9c729 test(web): navigation & panes scenarios over one rich seeded session
One two-turn seed (turn 1: bash + two parallel reads in a single assistant
message; turn 2: a markdown-heavy reply) rendered cold through the
seeded-history pattern — zero model calls — serving four surfaces:

- sidebar search: client-side title filter; asserted only after the durable
  title lands with the attach baseline (a cold SessionSummary carries no
  title — search matches the displayTitle the user sees). Negative query
  empties the tree, positive narrows to the match + its force-expanded
  group, clear restores.
- Trajectory tab: turn sections, the step group's tool mix ('bash read×2'),
  and a view-area aria golden.
- Waterfall tab: span stats header + one lane per span. The P-I fold counts
  a turn-0 prologue span (only assistant/steering nodes carry a turn
  number) — pinned as-is; real spans are P-III per the view's ledger.
- details column: the bash toolview row routes click to openDetails;
  open/closed is asserted on the frame's data-details-collapsed attribute
  because close collapses the grid column to width 0 without unmounting
  the subtree (hidden, not absent, is the contract).

Agent Note scenario list extended in both languages; pairing re-recorded.
2026-07-26 05:15:47 +08:00
Tianyi Cui
586ccb677e docs: refine semantic PR label taxonomy 2026-07-26 04:18:03 +08:00
Tianyi Cui
07770f90f9 Merge remote-tracking branch 'origin/master' into web-e2e-interactions
# Conflicts:
#	.agents/notes/implemented/testing/2026-07-24-web-gui-browser-e2e-lane.i18n.yaml
#	.agents/notes/implemented/testing/2026-07-24-web-gui-browser-e2e-lane.md
#	.agents/notes/implemented/testing/2026-07-24-web-gui-browser-e2e-lane.zh.md
#	apps/web/tests/scaffold.ts
2026-07-26 04:10:37 +08:00
Tianyi Cui
96c67df835 docs(notes): extend the web e2e lane note with the live-interaction scenarios
Both languages: the three new scenarios (live-interactions overrides,
question-composer takeover, wire-level steering), the product-delta list
({ patches } override form, the carried-failure fix, the llm-retry row),
two new Deferred items (web error surface, composer steering gesture),
and de-hardcoded scenario counts; pairing re-recorded.
2026-07-26 04:07:49 +08:00
Tianyi Cui
04b7f517ae test(web): live-turn interaction scenarios — cancel, error, retry, question composer, steering
Five browser e2e scenarios over the existing keyless lane, one recorded
base fixture per spec family:

- live-interactions: one tool-free recorded turn + per-run override
  sidecars authored in the spec (content single-sourced from the fixture
  via deriveReplayScript, minted into a spec-owned temp dir). Cancel uses
  a hang patch with a readyFile marker — the marker proves the stream is
  parked mid-turn before the Stop click, so mid-stream cancellation is
  deterministic by construction (turn/end 'aborted', composer re-enabled).
  AUTH pins the non-retryable path: turn/end 'error', zero llm/retry
  events, composer recovers; FIXME(web-error-surface) marks the found
  product gap (no error copy renders — the client consumes no agent/error
  frames and a pre-chunk failure freezes no partial). SERVER retry appends
  the fixture's own success after an injected throw and proves llm-retry
  end-to-end in the browser via the durable llm/retry record.
- question-composer: the shipped ask_user_question takeover blocks the
  turn mid-step on the real userInteraction seam; the test answers through
  the composer (the one sanctioned model-content-reactive drive step: the
  turn cannot complete without it) and the tool result carries the answer.
  Adds the composer waiting-state aria golden.
- steering: steers mid-turn while the composer blocks the step (the
  deterministic mid-turn window). The steer rides the real wire
  (session.prompt mode:'steer' POSTed from the page; the locked composer
  has no steering gesture yet — TODO(web-steer-composer)); downstream is
  all product: gateway -> Agent.steer -> step-boundary drain -> durable
  steering/message -> SSE -> badged interjection bubble. Record mode
  rejects a fixture whose live reply ignored the steer.

Scaffold gains the replayOverride passthrough; specs register in both
tsconfig planes (client exclude, host include).
2026-07-26 03:36:55 +08:00
Tianyi Cui
90d91c3cf9 docs(llm-replay): cover the patches form in the overrideFile contract
The ReplayConfig.overrideFile JSDoc still described only whole-script
replacement; it now names both sidecar forms and links ReplayOverrideDoc
(config catalog regenerated: source line shifted).
2026-07-26 03:31:21 +08:00
Tianyi Cui
2828e0462d feat(web): mount llm-retry in the shipped web composition
The web tree had no transient-failure recovery around the loop's model
calls; the TUI agent-spine composition already mounts llm-retry. Same
defaults (2 retries, 500ms->10s backoff). The browser e2e retry scenario
drives it end-to-end: an injected SERVER throw at call 0 recovers through
the durable llm/retry record and completes in the transcript.
2026-07-26 03:31:20 +08:00
Tianyi Cui
78e57ab53e docs: record PR label taxonomy 2026-07-26 03:28:39 +08:00
Tianyi Cui
bb0bcf6250 fix(llm): honor a carried failure snapshot on any Error
markLlmAdapterFailure gated the own-`failure` data property on instanceof
HarnessError, which drops the validated facts exactly when class identity is
lost — two copies of this package in one process (e.g. a source-plane replay
harness throwing into a lib-plane boot) make the replay-thrown LlmError's
SERVER/AUTH code arrive as UNKNOWN and defeat llm-retry's retryable-code
match. The snapshot is already validated field-by-field and cross-checked
against the error's own code, so honor it on any Error.
2026-07-26 03:28:13 +08:00
Tianyi Cui
2e52c0670c feat(llm-replay): indexed override patches for error injection
The override sidecar now accepts { patches: [{ at, entry }] } alongside the
legacy whole-script ReplayEntry[] replacement: the JSONL-derived script is
kept and only the named call indexes are swapped (at == length appends, for
a retry attempt following an injected transient throw). Out-of-range or
non-integer indexes fail loud with the derived length in the diagnostic.
This is the mock-LLM error capability the web e2e scenarios drive: 'call N
throws AUTH/SERVER, everything else replays as recorded'.
2026-07-26 03:26:41 +08:00
Tianyi Cui
6ce5628bb1 docs: tighten PR guidance 2026-07-26 02:51:48 +08:00
Tianyi Cui
436fd9c34c Merge origin/master into codex/require-pr-labels 2026-07-26 02:49:17 +08:00
Tianyi Cui
5fad2fc934 docs: define extensible PR labels 2026-07-26 02:45:56 +08:00
Tianyi Cui
3ccdf4ac46 Merge pull request #640 from deepseek-harness/fix-update-builderror
fix(build): clean stale workspace residue
2026-07-26 02:45:21 +08:00
Tianyi Cui
a439ed4e43 Merge branch 'master' into fix-update-builderror 2026-07-26 02:39:35 +08:00
Tianyi Cui
d74e062055 Merge pull request #647 from deepseek-harness/worktree/delete-missions
docs: remove missions folder
2026-07-26 02:37:56 +08:00
Tianyi Cui
7953759aa2 docs: remove missions folder 2026-07-26 02:33:58 +08:00
imccyu
b2d8815a34 test(llm-mock-server): poll for the client-closed outcome
The fixed 5ms sleep raced slow CI runners (the server observes the socket
close asynchronously); vi.waitFor polls until the outcome lands.
2026-07-26 02:29:13 +08:00
imccyu
6cc68baddf Merge remote-tracking branch 'origin/master' into worktree-ws-more 2026-07-26 02:26:27 +08:00
Tianyi Cui
b5bba5adee Merge pull request #639 from deepseek-harness/codex/consolidate-agent-notes
docs(agent-notes): consolidate superseded decisions
2026-07-26 02:22:25 +08:00
Tianyi Cui
a07d727cba Merge latest master into codex/consolidate-agent-notes 2026-07-26 02:11:13 +08:00
imccyu
ad419065a0 test(web): stop pre-clicking the fixture group in the title snapshot
The Intent's current-group effect already expands the target workspace;
with intent no longer forcing expansion, the header click collapsed it.
2026-07-26 02:10:59 +08:00
Tianyi Cui
2cfc38fb70 docs(agent-notes): clarify superseded ACP rendering 2026-07-26 02:10:24 +08:00
imccyu
4ae86001a5 style(web): wrap a long tree.ts doc line 2026-07-26 02:03:05 +08:00
imccyu
d147673dfd refactor(apiproxy): share the workspace-not-found response
The rename/insertSessionBefore lookups tripped the cross-file clone gate;
one helper owns the error row now.
2026-07-26 01:58:53 +08:00
imccyu
9fc8a616a9 test(web): close the per-file coverage gate for the session-list surfaces
New and touched sources reach the CI per-file 100% thresholds: HoverCard
(timers, placement clamp, disabled guard), Menu label/danger/pointer-leave
branches, WorkspaceBrowser (mode switch, search, rail icons, rename dialog,
drag), rows and tree derivations, the workspace fixture stubs, the rename/
insertSessionBefore wire rows, and the entity move semantics. HoverCard's
position state narrows to {left, top} (equivalent refactor, no behavior
change).
2026-07-26 01:48:36 +08:00
imccyu
ba5c136871 docs(notes): record the session-list browsing and manual-order decisions 2026-07-26 01:30:14 +08:00
imccyu
f1b877e3c6 fix(web): review-bot round one + regenerate doc catalogs
- rename same-title no-op moves inside the serialized creation chain
- insertSessionBefore maps only the typed WorkspaceMoveInvalidError to
  workspace-move-invalid; storage failures stay internal
- workspace upsert rejects snapshots older than the installed projection
- flat-mode empty state shows when the query hides the intent row
- intent row no longer forces group expansion; header twist stays live
- group-by menu rides a portal; menu clicks stop propagating to the row
- intent row uses the same single-slot indent in both list modes
- regenerate cordis api/catalog + doc graphs
2026-07-26 01:11:17 +08:00
Tianyi Cui
cd15711079 Merge latest master into codex/consolidate-agent-notes
# Conflicts:
#	.agents/notes/implemented/feature/2026-07-21-tui-no-banner.i18n.yaml
#	.agents/notes/implemented/feature/2026-07-21-tui-no-banner.md
#	.agents/notes/implemented/feature/2026-07-21-tui-no-banner.zh.md
#	.agents/notes/implemented/simplification/2026-07-20-retire-readline-front-door.i18n.yaml
#	.agents/notes/implemented/simplification/2026-07-20-retire-readline-front-door.md
#	.agents/notes/implemented/simplification/2026-07-20-retire-readline-front-door.zh.md
2026-07-26 00:57:51 +08:00
imccyu
ea8b1178cd feat(web): session list one-list, hover card, row menus, rename, manual ordering
Sidebar session list grows the figma 239-10458 feature set and the
workspace/session browsing region moves wholesale into ui-workspace:

- Group-by menu (WorkSpace / In one list): flat mode lists every session
  top-level, strictly newest-first; the choice persists across reloads.
- Session rows get a 500ms hover detail card (title / relative time /
  status line) and a ... menu (Rename / Fork session / Delete session,
  visual-only for now); workspace headers get ... with Rename (wired) and
  Delete workspace (visual-only).
- workspace.rename RPC: trims, rejects duplicate titles on the create
  chain (workspace-name-conflict), no-op on same title; modal dialog with
  client-side duplicate pre-check.
- workspace.insertSessionBefore RPC (DOM-insertBefore semantics, omitted
  anchor appends): HTML5 drag reorder of root sessions inside a workspace
  group; order truth stays host-side, the view refreshes from the
  response/changed frame.
- Activity pinning removed: the session/event touchSession chain is gone;
  workspace accounts are manually owned (new sessions prepend, explicit
  reordering only). Contracts and tests updated, api catalog regenerated.
- ui-sidebar reduced to the column shell (brand, fold state machine, New
  Session, Settings) exposing one sidebar.workspaces hole with a two-fact
  owner share {wide, expandSidebar}; ui-workspace owns the whole region
  (header, search, grouped/flat lists, dialogs, drag) plus the picker via
  a shared WorkspaceCreateFlow. The old sidebar.workspace picker slot and
  its deferral indirection are gone.
- ui-primitives: Menu gains label entries, danger rows, and
  closeOnPointerLeave; new HoverCard (portaled, open-delay, disabled
  guard). Hover card and row menu never coexist.
2026-07-26 00:55:17 +08:00
Tianyi Cui
6f50208ea3 Merge pull request #625 from deepseek-harness/worktree/llm-mock-fault-server
feat(llm): add scriptable mock fault server
2026-07-26 00:54:15 +08:00
imccyu
7bcb005f29 Merge branch 'master' into fix-update-builderror 2026-07-26 00:54:08 +08:00
Tianyi Cui
674d916ef8 Merge branch 'master' into worktree/llm-mock-fault-server 2026-07-26 00:45:44 +08:00
Tianyi Cui
5f04c92f15 Merge pull request #612 from deepseek-harness/web-e2e-lane
test(web): keyless browser e2e lane — replayed round trip + seeded cold resume
2026-07-26 00:40:13 +08:00
Tianyi Cui
f1577d620e test(web): harden replay scaffold lifecycle 2026-07-26 00:33:46 +08:00
Tianyi Cui
1317e4809f fix(pty): recheck prompt handoff at idle boundary 2026-07-26 00:30:38 +08:00
Tianyi Cui
204a09b70f fix(build): reuse TypeScript config host 2026-07-26 00:30:20 +08:00
Tianyi Cui
882bd4a591 Merge origin/master into web-e2e-lane
# Conflicts:
#	tsconfig.host.json
2026-07-26 00:16:12 +08:00
Tianyi Cui
0fdaca601a Merge branch 'master' into fix-update-builderror 2026-07-26 00:08:39 +08:00