chengyongru
8f6a5594fb
refactor(session): centralize state ownership in SQLite ( #5943 )
...
* fix(session): move persistence off event loop
* refactor(session): isolate async persistence boundary
* refactor(session): keep a single session manager
* refactor(session): use stateless async adapters
* fix(session): serialize local persistence without file-lock contention
* refactor(session): own async persistence and snapshot commits
* refactor(session): narrow persistence changes to async adapters
* refactor(session): remove redundant async forwarding helpers
* fix(command): offload compact session persistence
* fix(session): adapt idle compaction to current main
* fix(webui): offload session metadata persistence
* refactor(session): centralize state ownership in SQLite
* fix(session): skip storage for non-recoverable followups
* test(webui): honor the full gateway event deadline
* perf(session): persist incremental changes and reuse owner snapshots
* test(agent): allow durable worker shutdown in burst test
* fix(gateway): drain session storage on Windows console shutdown
* fix(session): enforce bounded ownership and lifecycle-safe persistence
* fix: reject unresolved home paths and stabilize platform tests
* fix(session): preserve request context compatibility and owner-backed tests
* docs: focus configuration guide on user-facing behavior
* fix(session): adapt goal admission to async ownership after rebase
* fix(session): integrate current gateway and subagent contracts
* fix(session): align rebased workspace admission and async tests
* fix(session): support compatible SQLite schema evolution
* test(agent): use session owner in workspace context regressions
* test: stabilize Windows lifecycle and browser checks
* refactor(session): remove premature JSONL file export
* ci: bound Windows full-suite worker concurrency
* chore: remove session state refactor notes
* fix(session): queue writes and retain worker connections
* perf(webui): read detached metadata for session and task lists
* perf(agent): bound prompt preparation and local token counting
* docs: remove internal session storage guide
* perf(session): skip archived transcripts during idle scans
* fix(session): coordinate turns and isolate legacy session data
Bind WebUI input generations to the execution session and serialize idle
and SDK compaction with turns. Keep turn drafts through preparation so the
latest channel route persists.
Move imported workspace JSONL and checkpoints to durable private backups
before gateway admission, resuming cleanup after interruptions. Remove
committed child sessions when task creation is cancelled.
Validation: focused Python and frontend regressions, Ruff, BasedPyright,
import boundaries, WebUI build, and isolated gateway/browser flows.
* fix(agent): keep cancellation hooks independent of prompt preparation
* fix(session): preserve admission, delivery, and migration contracts
* fix(agent): preserve cancellation settlement after rebase
* fix(session): preserve request attribution through async ownership
2026-10-16 17:28:47 +08:00
chengyongru
328e933d36
refactor: isolate runtime contracts and enforce import boundaries ( #6166 )
...
* test: enforce Python import ownership boundaries
* test: protect client import boundaries and rehome shared UI contracts
* refactor: remove gateway and client dependency inversions
* fix: detect dynamic imports in conditional expressions
* refactor(tools): keep configuration contracts with their owners
* docs: keep design guidance focused on ownership and checks
* fix: preserve default threaded turn delivery
2026-10-13 13:56:28 +08:00
chengyongru
29f27dcf5d
ci: reduce test runtime while preserving coverage ( #6101 )
...
* ci: reduce test runtime while preserving coverage
* test: close cached usage stores before temporary directory cleanup
2026-10-08 13:03:56 +08:00
chengyongru
42f06ab1dc
test: isolate Star invitation state and stabilize late-result waits ( #6076 )
...
* test: isolate Star invitation state and relax late-result deadline
* test: keep invitation fixtures outside test workspaces
2026-10-06 02:49:50 +08:00
chengyongru
4a7ad00e4f
fix(tokens): warm fallback tokenizer in background ( #5861 )
...
* fix(tokens): keep fallback token estimation offline
* fix(tokens): warm fallback tokenizer in background
* test(tokens): isolate agent fixtures from tokenizer readiness
* test(tokens): keep Codex pressure fixtures within byte budget
* docs: remove manual wrapping from troubleshooting prose
2026-09-28 13:50:55 +08:00
Xubin Ren
b66e61c16f
fix(pairing): avoid duplicate pending requests
2026-09-05 00:32:27 +08:00
Xubin Ren and lmzopq
cd7480945b
fix(session): preserve history across storage relocation
...
Co-authored-by: lmzopq <1646888+lmzopq@users.noreply.github.com >
2026-08-13 01:41:10 +09:00
李明振
b34f1bd0e8
fix(session): store session history outside the agent workspace
...
Session files lived under <workspace>/sessions/ (since #713 ), which is the
on-disk scope of the agent's filesystem tools. With restrict_to_workspace
enabled, an agent could read_file / list_dir every session transcript —
including other users' or channels' conversations — bypassing the scoped
sessions.py access layer entirely.
Move session storage to ~/.nanobot/sessions/<sha256-of-resolved-workspace>[:16]/,
outside the workspace. Per-workspace isolation (the goal of #713 ) is preserved
via a hash of the resolved workspace path, so different workspaces keep
independent session stores. A one-shot, idempotent migration moves legacy
in-workspace *.jsonl files into the new location at store init.
Scope note: this protects sessions whenever restrict_to_workspace=true. The
default restrict_to_workspace=false leaves read_file unrestricted in general
(not only sessions) and is a separate concern.
Refs #5278
2026-08-13 01:41:10 +09:00
chengyongru
393d429e0a
fix(ci): stabilize and speed up CI ( #5145 )
2026-07-28 22:55:59 +08:00
chengyongru
462a0dfb0f
refactor(channels): make built-in channels self-contained ( #4908 )
...
* refactor(channels): own setup and instance contracts
* refactor(channels): isolate management contracts
* refactor(channels): normalize activation contracts
* fix(channels): enforce management contracts
* refactor(channels): finish setup ownership migration
* fix(channels): harden management contracts
* fix(channels): enforce lazy loading and runtime ownership
* fix(feishu): make multi-instance startup idempotent
* fix(webui): render channel setup contracts cleanly
* fix(feishu): stop websocket clients cleanly
* fix(channels): enforce persistence and activation gates
* fix(channels): preserve global feature action scope
* fix(channels): apply defaults for single plugins
* fix(channels): enforce management contract boundaries
* refactor(feishu): remove identity helper indirection
* fix(channels): preserve management setup contracts
* refactor(channels): generalize instance settings UI
* refactor(channels): package channel plugins with web UI metadata
* refactor(channels): make built-ins self-contained packages
* test(channels): colocate tests with channel packages
* fix(dingtalk): use official brand icon
* feat(channels): colocate webui translations
* docs(channels): clarify plugin ownership
* test(exec): remove output wait race
* refactor(channels): unify plugin descriptors
* fix(channels): enforce descriptor-owned contracts
* refactor(channels): finish package-owned plugin setup
* refactor(channels): use repository-owned packages only
* fix(channels): self-describe dependencies and runtime state
* fix(channels): warn about legacy entry points
2026-07-19 23:30:49 +08:00