feat(sec-core): enhance daemon logging including requests and jobs#871
Open
RemindD wants to merge 1 commit into
Open
feat(sec-core): enhance daemon logging including requests and jobs#871RemindD wants to merge 1 commit into
RemindD wants to merge 1 commit into
Conversation
632f723 to
ce6e566
Compare
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.
Description
Trace / Invocation Context
job。
CLI → Daemon Trace / Caller Propagation
prompt-scanner CLI 调 daemon 时复用 canonical trace_context_to_payload(),避免
手写 trace schema。
CLI 调 daemon 时显式标记 caller="cli"。
daemon request 协议支持可选 caller 字段,gateway 日志能把 caller 透传到
request started/completed log。
Daemon Prompt Scan Attribution
的问题。
Daemon Background Jobs
新增 daemon-owned job trace context,每次 job run 自动生成标准 UUID trace id。
新增 OneShotBackgroundJob,把 one-shot job 的 task/state/error/status
lifecycle 收到 base class。
periodic job 每个 tick 自动获得独立 trace id。
job lifecycle 统一写 daemon diagnostic events:
PromptModelPreloadJob 迁移到 base lifecycle,只保留 preload 业务逻辑和 prompt
runtime state 更新。
Diagnostic Logging Semantics
daemon background job logs、model load logs、job lifecycle logs 能共享同一个
job trace id。
daemon request logs、middleware logs、security events 能共享 request trace
id。
job trace 和 request trace 分离,不混用 CLI invocation id。
Related Issue
closes #
Type of Change
Scope
cosh(copilot-shell)sec-core(agent-sec-core)skill(os-skills)sight(agentsight)tokenless(tokenless)ckpt(ws-ckpt)memory(agent-memory)anolisa(anolisa-cli)Checklist
cosh: Lint passes, type check passes, and tests passsec-core(Rust):cargo clippy -- -D warningsandcargo fmt --checkpasssec-core(Python): Ruff format and pytest passskill: Skill directory structure is valid and shell scripts pass syntax checksight:cargo clippy -- -D warningsandcargo fmt --checkpasstokenless:cargo clippy -- -D warningsandcargo fmt --checkpassmemory(Linux only):cargo clippy --all-targets -- -D warnings,cargo fmt --check, andcargo testpassanolisa:cargo clippy --all-targets --locked -- -D warnings,cargo fmt --all --check, andcargo test --lockedpasspackage-lock.json/Cargo.lock)Testing
Additional Notes