Releases: jkrandom-sudo/dsh-ci-doctor
Releases · jkrandom-sudo/dsh-ci-doctor
Release list
v0.1.2
变更 / Changes
本次为三 agent 代码审查(核心逻辑 / 宿主集成与安全 / 测试质量,共 20 项发现)的修复版本。无 P0;含 1 个 P1 产品 bug、全部值得修的 P2 与关键 P3。
Fixes
- watcher:基线误报(P1) — 基线轮询失败不再把历史红色运行误报为 NEW CI FAILURE;基线只由成功轮询建立,建立前抑制检测
- watcher:超时与取消时机 — sleep 以剩余存活时长为上限、醒后复查 deadline;poll 在途时的 cancel 优先于检测结果
- runtime:jobs 服务懒解析(与 shell/storageDomain 同一挂载时序理由);单个 job 日志拉取失败不再中止整个诊断(以
logError呈现);maxLines硬上限 2000 - 安全:日志摘录围栏加固 — 四反引号围栏 + 折叠内容中 4+ 反引号连写,关闭 prompt-injection 破栏通道;
ghBin统一 shell 引号 - config:
resolveConfig拒绝 NaN/Infinity/越界值(schemastery number 校验放行它们,NaN 间隔会把 watch 退化成 1ms 热轮询) - signatures:保留并解包
##[error]规范失败行(此前被噪声过滤丢弃);sha256 长度 hex 纳入掩码,跨运行签名 id 稳定 - ledger:
record()串行化 — 并发诊断不再丢seenCount增量
Tests
- 85 → 102:
createShellRunner直接单测(宿主形状适配层,此前零覆盖);经真实apply()接线的 ci_diagnose 端到端测试(钉住 4MB 捕获预算与 ghBin 引号);watcher 三条回归(基线失败/deadline cap/poll 在途取消);账本并发测试;ci_watch 测试清理空转轮询循环 verify-web-profile.mjs账本持久化检查新增 mtime 断言,杜绝陈旧文件虚空通过
验证结论 / Verification
pnpm format:check/typecheck/build✅;单元测试 102/102 ✅- 真实环境:本机 web profile 进程内
boot()19/19 ✅(含新增 mtime 防空洞检查;cli/cli run #31782742089 实时诊断、真实 watch job 基线与 kill、账本本运行重写落盘)
Full Changelog: v0.1.1...v0.1.2
v0.1.1
Documentation
- README 重写(中英双语):新增 Usage/使用方法 章节 —— 以自然语言提问示例("watch CI on this repo"、"nightly 为什么挂了")说明每个工具何时被触发,并展示对话中实际呈现的 markdown 诊断卡;移除本机真实环境验证细节与过程性说明,账本存储位置改为通用 DSH 存储目录表述 (#2)
Verification
pnpm format:check/typecheck/build✅,单元测试 85/85 ✅(docs-only,无运行时代码变更)
Full Changelog: v0.1.0...v0.1.1
v0.1.0 — CI failure auto-diagnosis for DeepSeek Harness
First release of dsh-ci-doctor: watch GitHub Actions for new failures, diagnose raw job logs into structured findings, and remember every failure signature across diagnoses — all through two agent tools and your authenticated gh CLI.
Features
- ci_watch — background watch job on the host jobs registry: baseline-aware polling for new failed runs (historical red never fires the alarm), exponential backoff on transient errors, kill any time via
job_kill, detection summary with a ready-madeci_diagnosenext step. - ci_diagnose — fetches failed-run jobs/logs through the host shell +
ghCLI, extracts normalized error signatures, classifies failures (test/build/lint/typecheck/dependency/network/permission/timeout/infra), mines suspect files, renders a markdown diagnosis card with honestly trimmed log excerpts. - Failure-signature ledger — durable via the host storage domain (
ci_doctorunit, lazy open with memory fallback); repeat failures surface asseen N×. - Read-only contract — every canonical result carries
repositoryWrites: false; optional invariant companion (dsh-ci-doctor/invariant) fails loudly if a result ever loses the marker. - Robust gh transport —
--jqprojections keep API payloads under the host shell's 64 KiB capture cap; raw job logs get a raisedstdoutMaxBytesbudget; failures classified (auth/not-found/rate-limit/timeout/api).
Tests
- 85/85 unit tests green — signature extraction/normalization, log trimming, gh client, watcher state machine, ledger (memory + domain), plugin wiring, invariant companion.
Docs
Verification conclusions
- Local gate:
pnpm typecheck✅ ·pnpm test(85/85) ✅ ·pnpm build✅ ·pnpm format:check✅ - Real environment: in-process
boot()of the actual localwebprofile composition (dsh-app-boot exports, webserver overlaid to port 0) — 18/18 checks passed: tools registered on the real ToolRuntime, both waterfalls accepted the real host exec shape{ name, arguments }, live read-only diagnosis ofcli/clirun #31782742089 extracted 8 signatures, a real watch job streamed its baseline and settled on kill, and the ledger persisted to~/.dsh/storages/ci_doctor.jsonacross process exit. - The real-environment check caught and fixed two genuine bugs before release: a service mount-order race (shell/storageDomain now resolved lazily) and shell capture truncation of large
gh apipayloads (now--jq-projected).
Full Changelog: https://github.com/jkrandom-sudo/dsh-ci-doctor/commits/v0.1.0