Skip to content

Fix/audit review#87

Merged
deepagent-ai merged 2 commits into
devfrom
fix/audit-review
Jul 23, 2026
Merged

Fix/audit review#87
deepagent-ai merged 2 commits into
devfrom
fix/audit-review

Conversation

@deepagent-ai

Copy link
Copy Markdown
Contributor

Issue for this PR

Closes #

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Please provide a description of the issue, the changes you made to fix it, and why they work. It is expected that you understand why your changes work and if you do not understand why at least say as much so a maintainer knows how much to value the PR.

If you paste a large clearly AI generated description here your PR may be IGNORED or CLOSED!

How did you verify your code works?

Screenshots / recordings

If this is a UI change, please include a screenshot or recording.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

If you do not follow this template your PR will be automatically rejected.

deepagent-ai and others added 2 commits July 23, 2026 20:03
…atus code, provider detail, url and request id
F1: Activity-level tool-call loop detection (cross-message)
- Add ToolSequenceTracker: period 1-4 detection, canonical JSON fingerprint
- Share one tracker per runLoop (activity), detect ABABAB across messages
- 21 new tests covering all acceptance criteria

F3: Tool parameter JSON parsing safety (AI SDK v6)
- Fix repair callback to use failed.toolCall.input (not .args)
- Classify errors: unknown_tool / invalid_json / schema_mismatch
- Never repair write/edit content; explicit fail with bounded error message
- 19 new tests

F4: Right-click copy session ID (verify existing impl)
- Confirmed: clipboard?.writeText(props.session.id), en/zh i18n complete

F5: Subagent hard depth limit + unified child admission
- MAX_SUBAGENT_DEPTH=3 process-level constant, cannot be widened by config
- resolveSessionDepth: metadata + parentID chain, cycle detection, fail closed
- admitChildOrFail: unified boundary for normal/takeover/background/resume
- Fix canTask/canTodo: evaluate() replaces rule-presence check
- 29 new tests

F6: Session-scoped terminal cache + LRU eviction
- Replace directoryTerminalCache with ScopedKey{scope+dir+session} map
- Per-tab draft UUID key, atomic draft→session migration
- LRU max 5 non-current entries per workspace, eviction calls pty.remove
- invalidateScopeSnapshots on runtimeId change
- clearWorkspaceTerminals covers mounted + cached entries
- 12 new tests

F2: Startup telemetry baseline + health poll fix
- 7 structured telemetry events (sidecar_spawn, layer_build, health_wait,
  renderer.initialization, provider.state_init, pty_create, websocket_ready)
- Remove fixed 100ms pre-sleep before first health poll; try immediately

Startup UX overhaul:
- Splash overlay stays until deepagent-code:app-ready fires (5s failsafe)
- app-ready gate: server.ready() + layoutReady() + pageReady() +
  autoselecting resolved + firstSessionLoadDone
- App renders in background behind overlay (no circular dependency)
- sidebar.opened defaults to false; transition suppressed until layoutReady()
- terminal panel transition suppressed until layoutReady()
- SidebarPanel shows SessionSkeleton instead of blank during loading
- Bottom + side terminal: gate pty.create on runtimeId set (prevents
  immediate 503 on cold start with persisted opened=true state)
- pty.create: 10s overall deadline prevents permanent 'starting...' hang

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

Hey! Your PR title Fix/audit review doesn't follow conventional commit format.

Please update it to start with one of:

  • feat: or feat(scope): new feature
  • fix: or fix(scope): bug fix
  • docs: or docs(scope): documentation changes
  • chore: or chore(scope): maintenance tasks
  • refactor: or refactor(scope): code refactoring
  • test: or test(scope): adding or updating tests

Where scope is the package name (e.g., app, desktop, deepagent-code).

See CONTRIBUTING.md for details.

@github-actions

Copy link
Copy Markdown

This PR doesn't fully meet our contributing guidelines and PR template.

What needs to be fixed:

  • No "Type of change" checkbox is checked. Please select at least one.
  • No issue referenced. Please add Closes #<number> linking to the relevant issue.
  • "How did you verify your code works?" section is empty. Please explain how you tested.
  • Not all checklist items are checked. Please confirm you have tested locally and have not included unrelated changes.

Please edit this PR description to address the above within 2 hours, or it will be automatically closed.

If you believe this was flagged incorrectly, please let a maintainer know.

@deepagent-ai
deepagent-ai merged commit c2a8f17 into dev Jul 23, 2026
4 of 10 checks passed
@deepagent-ai
deepagent-ai deleted the fix/audit-review branch July 23, 2026 13:01
deepagent-ai added a commit that referenced this pull request Jul 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant