Runtime: bound bash logs and skip runtime mirrors#66
Open
gaofeng21cn wants to merge 1 commit intoResearAI:mainfrom
Open
Runtime: bound bash logs and skip runtime mirrors#66gaofeng21cn wants to merge 1 commit intoResearAI:mainfrom
gaofeng21cn wants to merge 1 commit intoResearAI:mainfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Long-running bash sessions can produce oversized terminal output that bloats rendered logs and ordinary file search. Stale session reconciliation also left an empty
finished_atvalue when the metadata key existed withnull.Solution
log.jsonl.terminal.logfiles into a byte-window view, preserving the original log as a quest-local backup path and recording compaction metadata on the session.finished_atduring stale-session reconciliation..ds/bash_exec,.ds/runs,.ds/codex_history, runner homes, evidence packets, slim backups, and cold archives from default explorer search.MDS provenance
Adapted the generic runtime-log and search-hygiene parts of MedDeepScientist commits
60b8f07,530ebb7, andb868449. MedDeepScientist, MAS, medical-fork, manuscript-readiness, and publication-authority semantics were intentionally excluded.Tests
python -m py_compile src/deepscientist/bash_exec/monitor.py src/deepscientist/bash_exec/service.py src/deepscientist/quest/service.pygit diff --checkuv run --with pytest pytest -q tests/test_bash_exec_monitor.py tests/test_memory_and_artifact.py::test_explorer_search_skips_heavy_runtime_mirrors_by_default tests/test_mcp_servers.py::test_bash_exec_mcp_server_default_read_truncates_long_logs_with_hint tests/test_mcp_servers.py::test_bash_exec_mcp_server_read_supports_start_and_tail_windows tests/test_mcp_servers.py::test_bash_exec_mcp_server_seq_tail_reports_remaining_seq_ranges tests/test_daemon_api.py::test_bash_exec_handlers_expose_sessions_logs_and_stop