Repository navigation
工具实际资源限制、耗尽与终止验证 #82
Description
当前范围 · 2026-10-03
收缩为工具真实资源限制与失败终止验收,保留开放。当前RLIMIT_CPU/AS/FSIZE/NOFILE并不证明RSS或进程数硬上限,现有真实bwrap用例主要验证网络/输出;需要补实际耗尽/终止证据,或明确收缩到已实现的限制。目标sshd/PAM/systemd/隔离配置仍归#84。
已完成项不重做:#197已实现裸--json字段发现、字段下推及本地--jq/--template,main 105c2cf7 的CI含25个字段/真实CLIcase、12个formattercase和14个cursorcase;TUI当前只读,写走显式签名CLI。真实sshd、RSS只读、最小client与bwrap网络边界均有已有证据;不把旧TUI写需求或无限跨厂商/跨OS矩阵继续当永久门槛。
剩余完成条件
- 将工具资源契约明确为当前实际CPU/地址空间/文件/FD限制并补真实耗尽/终止证据;若继续承诺RSS与进程数硬上限,须有相应实现与独立回归。
- 目标sshd/PAM/systemd/bwrap路径配置验证归生产容量与适用快照、独立授权检查点及隔离恢复记录 #84;Windows/macOS/第二台实体机器/跨厂商Agent支持只按实际支持与启用范围验收,不能保留无限全客户端matrix。
本轮依据当前主线 105c2cf716c1179d49bc79224f10f44a3b031163、已完成 CI 和只读部署盘点更新范围。没有执行新的生产迁移、删除、Root/CA 变更或资金操作。旧的全章/全客户端人工矩阵不再作为本项永久门槛。
历史需求与旧验收记录(保留供查阅;当前待办以上述范围为准)
2026-10-01 delivery update
Source commit 1393040 adds the registration page AI-copy button with a clipboard failure fallback, shared project logo and compact display settings. HTML remains browser-only and raw registration remains plain Markdown. Related browser/HTTP/OAuth tests: 72 passed; Ruff check and format pass.
msgctl 0.2.4 was published using uv; both PyPI artifact hashes match the built artifacts. Native msgd 0.2.4-20261001.12 is deployed with a pre-upgrade backup and previous package retained. Both services are active. Live registration HTML/button/CSP/logo/raw checks passed. This update does not grant new CA authority or complete the remaining full client acceptance matrix.
2026-10-01 首页按身份显示私有频道、权限位说明
修复已提交并推送 main:38b7b370c550871b2dda753bb6ad358adb5e3e90,部署 native msgd 0.2.3-20261001.9。包 SHA-256:c6693f3c505640bd666e1360a3b7a1477a76e1e3555c9d281dfefdbd5d7bcecd;更新前备份和 .8 回滚包已保留,service/worker active。
- 首页公开统计保留匿名范围;频道表通过当前身份的
discovery.get根资源 channels 投影查询,逐条执行当前 ACL/凭据检查,帖子数仅计可读帖子/回复。实际/admins频道存在,不能用空的/&admins用户组列表判断频道不存在。 - 登录的 @LIghtJUNction 浏览器现已在频道表看到
/admins和2770;原生 WebMCP msg_home 返回同样频道。未登录首页不枚举/admins;私聊会话与内部目录不混入频道表。 - 新增
/help/permissions,频道表旁有链接。提供四位八进制拆解、读/写/进入、所有者/有效组成员/其他人的选择规则、写入证书门槛/组继承/移除保护,以及 2770/1777/5777/0555/0700/0660 示例。支持浏览器 HTML、CLI Markdown、raw 及 HEAD。 - 本地相关 31 项测试通过,包括管理员组加入/撤销后当前可见性、私有帖子计数、匿名隔离、DM 排除和说明页格式。Ruff 与 diff 检查通过;真实已登录浏览器、原生 WebMCP、在线匿名 HTTP 和签名 CLI 均已验证。
当前 head 的 Python quality 已通过,其余远程 CI 尚在运行;完整客户端矩阵等下方未验收项继续开放。
2026-10-01 管理员组入口与浏览器退出跟进
源码已提交并推送 main:fb5118a3311fcf6e197ee0e8cc0864f9858130c0。线上已更新至 native msgd 0.2.3-20261001.8,service/worker active,包 SHA-256:eb5eaf38b1da1b10d13eeb3a70e7bd6fad35303d6d875e0cded19b9ce284f0c4;更新前数据、配置和旧包备份已保留。
- @LIghtJUNction 已通过签名操作加入实际管理员组
&admins,成员状态 active。该组目前没有话题。当前身份首页新增可读组入口,其他用户公开个人页不暴露私有组。 - 真实登录浏览器已验证首页出现
/&admins链接、原生 WebMCP msg_read 能读取该组。 - OAuth 表单页面使用 strict-origin;MSG Nginx 仅透传此策略,其他值仍使用 no-referrer。已在线验证实际表单退出和退出后的匿名首页。
- 本地组隐私/页面相关 24 项测试、Nginx 日志安全 6 项测试通过。源码与部署文件摘要一致,工作区干净。
最新 head 的 Python quality 已通过,其余远程 CI 尚在运行。下方未完成的完整客户端验收继续保留开放。
2026-10-01 浏览器工作区与 WebMCP 切片
源码已提交并推送 main:26e57e530ddafccc75c4e4c12fbcf58cf7a5eaca。线上 native msgd 0.2.3-20261001.7 已部署,服务与 worker 均 active;包 SHA-256:974638c3fbdd04cb628697d0957d3465a87fde5b6646e389b88a51888b567d51。部署前已备份数据、配置和旧包,源码文件摘要与提交内容一致。PyPI 版本未另行发布。
- 浏览器 Accept:text/html 显示渲染网页;CLI/agent 保持 Markdown。频道显示帖子数、正文标题、作者、时间和摘要;用户页显示账号及其可读帖子。
-
/login显示 CLI 确认码;签名批准后 HttpOnly/Secure/SameSite Cookie 用于普通 GET/HEAD,首页及帖子页显示当前身份、收件箱和私聊。Cookie 不授权写操作,来源撤权和退出检查仍走同一执行器。 - 私聊列表按联系人显示;会话展示发送者、台北时间及正文,收件箱/发件箱展示来自谁/发给谁。每条消息先执行 ACL 检查,最多展示最近 50 条会话消息,长消息给出继续阅读入口。
- 帖子元数据独立信息栏,ID/版本折叠;
raw入口显示纯文本,/register提供 CLI 注册步骤。 - 极简界面提供语言、强调色、亮/暗/系统主题,偏好仅存于本机 localStorage。
- WebMCP 使用 document.modelContext(旧 navigator 兼容),提供只读 msg_home/msg_read。脚本通过 CSP SHA-256 固定,文章 HTML 不执行;工具拒绝跨域与认证/执行端点。
本地相关测试 205 项、最终 raw/URL 边界 149 项、补充 profile/迁移/effect 检查 35 项通过;Ruff 与 diff 检查通过。真实 Chrome 154 开启 WebMCP 测试功能后已验证原生工具发现、调用私密收件箱、CLI 批准、登录后跨页面身份及显示偏好保存。公开 HTML/raw 已在线 HTTP 核验。普通 Chrome 尚需开启 WebMCP 测试功能;不能据此宣称所有浏览器均支持原生 API。
本次提交的 GitHub CI 已触发,完整远程结果尚在运行。本切片不关闭下方 SSH/tools/TUI/完整客户端矩阵等剩余验收。
2026-09-28 核验:只读 TUI/SSH 入口已有加固,完整客户端矩阵仍开放
基线 main 13c562ea05d273e618b1ea06b9e452da79d4439f、完整 CI 36384948145 证据见 #83。
已完成切片,不能回退
- fix(tui): add safe read views, narrow-terminal layout and explicit recovery #96:TUI 新增 Topics/Outbox/Notes/Todos/Files/Groups/证书 ID 只读视图、中文/宽字符/组合字/1与3列终端、保留段落、危险终端序列无害化;显式 retry 重新授权,失败/匿名清空旧选择,身份 URL 凭据裁剪。
- fix(ssh): reject forged sshd process names in the OS entry guard #94:SSH OS-entry guard 拒绝只伪造 sshd/sshd-session/sshd-auth 进程名或依赖 root-owned 可执行文件的绕过。
- fix(effects): fence tool, Git and maintenance completions (#82, #84, #85) #113:工具、Git、维护结果的 current-attempt/deadline 完成栅栏,过期/缺失租约 uncertain;这不是终止已发出的外部动作或真实 sshd/bwrap 全验收。
剩余验收
- CLI 优先所有正式交互、自动签名、获取规则/最短模板、稳定错误与 md/json/raw/table 输出;客户端私钥/nonce/journal/recovery 沿用 A,日志/UI 不泄露。
- TUI 的 Following、字段/分页/断线/撤权/错误恢复与设计规定的显式写入流程;只浏览不自动 ACK、发帖、续租或后台轮询,交互写必须明确确认并走同一个签名客户端。
- 真实 sshd/AuthorizedKeysCommand/ForcedCommand 会话、当前主体/SSH key/证书撤销、限定 Git push/fetch 与反例;环境变量/进程名/argv 不能伪造 OS 认证,无 shell/port-forward/root 后门。
- 真实 tools sandbox/bwrap、CPU/RSS/时间/输出/进程限制;DNS rebinding、逐跳 redirect、私网/元数据/loopback/地址混淆拒绝;授权只能收紧,默认零外网能力。
- tools/SSH/MCP/RSS 的所有实际适配器组合与错误/重试/恢复,RSS/公开读取无 write/ACK,MCP stdio 在客户端签名,不变服务器代签或 root 入口。
- CLI/TUI 文件/Notes/Todos/交易/协作正确消费业务接口;default/config/doctor/selftest、完整 Python 3.15/PostgreSQL/Valkey/git-lfs CI 与真实客户端证据,不用 mock 成功代替现场验收。
任务 C
主责 CLI/TUI、SSH/tools sandbox、RSS 与协议接线。Git/Transfer/市场/协作业务实现归 B,身份恢复/Root归 A;共用 workers/effects.py 由 B 主责,工具隔离放在 tools/sandbox 模块,必要接线共同审查。共享文件、逐 head CI 和串行合并见 #83。
不为验收启用生产任意网络工具,不改管理员 SSH、上线能力或扩大现有 CA grants。缺真实环境的项保留未验,不关闭总体验收。
Activity
fix(ssh): reject unprivileged process-name impersonation (#94)
Merge reviewed and verified #81–85 partial fixes (#106)
LIghtJUNction commentedon Sep 27, 2026
#96 已随集成 PR #106 合并到 main(10cd82cebcc76db430ffd0129058a5a38a168cdb),不再是待合并状态。完整 CI 36349643025 的四个分片、contracts、conformance 和 build 均通过。
本轮已落地:Topics/Outbox/Notes/Todos/Files/Groups/本地证书 ID 只读视图,中文/组合字符窄终端换行,显式 retry 重新授权读取,失败/匿名访问后清除旧页面选择,连接 URL 凭据脱敏。真实客户端回归检查另一主体内容不可见且数据库全表未写入。
另外重新核对了权威设计第13章:
--json <fields>要下推 ReadQuery,裸--json要列字段,--jq/--template只能本地处理已授权结果;不能用拿全量结果后截取来冒充字段下推。当前 CLI 尚未实现这些完整语义,本轮没有用不兼容的格式开关覆盖它们。完整 CLI 格式/分页、TUI 写流程、应用 AuthorizedKeysCommand/工具真实网络与进程矩阵仍保留为未验收。现有只读 TUI 不自动 ACK、不后台轮询、不增加权限;没有生产部署。
fix(effects): unify fenced tool, Git and maintenance completions (#113)
LIghtJUNction commentedon Sep 27, 2026
补充已落地修复:#113 已合并,main 提交 4c46671。工具结果发布和原生 bundle-push 更新 Git refs 现在都在提交前核对实际执行时限;未被巡检扫描的过期/缺失租约任务也只能保留 uncertain,不发布文件、不推进 refs/资源 generation、不自动重跑。
三个工具边界用例及三个真实 Git 导入/引用用例已在 PostgreSQL CI 中通过;完整组合 CI 36353193024 为 success,1,109 项测试 + 8 项 conformance 全过,零失败/错误/跳过,安装包构建成功。合并后 tree 与测试 tree 完全一致(d36cab213c5a997a6b52fdcc78f92e860f9982e6)。
此处验证的是签名工具任务和原生 bundle-push,不冒充完整 SSH/HTTP receive-pack、真实工具网络故障矩阵或 TUI 写流程验收;本 issue 原未完成项保留,未部署。
fix: revalidate exact compact cache projections across real read clients
fix: revalidate compact cache projections across six real read clients (
LIghtJUNction commentedon Sep 28, 2026
进展说明:#143 将市场 CLI 快捷方式绑定到当前契约。此评论不是关闭依据,总验收(含生产证据)仍未完成。
Merge pull request #149 from TokenNotIncluded/fix/tui-slice-20260928
test(architecture): expose runner port drift with cloud regressions
refactor(tools): make the actual runner port and local result backend…
test(client): verify a dependency-clean wheel and four signed transports
ci(client): apply the reviewed dependency-boundary patch on its fixed…
refactor(client): isolate shared protocol helpers and client-only dep…
fix: reject invalid client chunk sizes before resumable I/O
fix(collaboration): bound Resource work-list scans and preserve the l…
Restore market compatibility exports and rehearse installed deployment
Merge PR #185: Python 3.15 quality and verified deployment artifacts
LIghtJUNction commentedon Sep 29, 2026
2026-09-29 当前接续(#185 已合并)
main
5cdaeba2b7b191a27684093cce7b5a153c99c88d/ tree3ad68f2012896310abfa9bcaf800c9ab05f6c886已实际读回,等于最终PR通过的树。18个PR工作流全部success;8份ZIP摘要/JUnit node-ID独立核验 2531 core + 8 conformance,零失败/错误/跳过。精确来源和产物摘要见 #185证据,更新索引见#83。合并后main push是独立运行,正在核验,不预记成功。同一wheel的locked client-only安装在checkout外通过CLI help与签名四传输MockTransport边界,未安装/导入server runtime;这是最小包边界,不冒称远程实连。另一server安装通过真实daemon/四HTTP传输和真实sshd/Git;正式selftest42项通过。TUI按权威设计只读导航、写入走显式签名CLI;目标机systemd/PAM/路径/隔离与物理Root仍需现场证据。
各条款源码入口与独立现场材料见
docs/RELEASE_ACCEPTANCE.md。本评论更新证据归属,不降低原验收范围或扩大现场权限。LIghtJUNction commentedon Sep 30, 2026
按 main
9f4806d48e8c324e7fc480c5a57eafb2bdaa0766核对了仍可自动推进的缺口。已在源码:Following、Notes/Todos 分页、断线/身份变化清空旧选择、#190 的邮箱 resource.id 选择。对应
test_tui_recovery.py、test_tui_transport_boundaries.py、test_tui_mailbox_selection.py,不重复开发。仍有明确代码缺口:
src/msg/cli.py只有 read--field、search--fields和默认 JSON envelope,尚无通用--json <fields>、裸--json字段发现、--jq/--template本地已授权结果处理。下一独立切片应先补解析/字段发现/服务端字段下推/cursor 不匹配拒绝测试,再实现输出层;不能拿全量后截取冒充下推,也不能改变签名或权限。共享 CLI 正在整合 OAuth,需串行接入以免覆盖。这是源码核验,未新增或执行测试,不声称当前组合 CI 已通过。目标机 PAM/systemd/工具隔离及完整客户端矩阵仍独立验收,无生产操作。
LIghtJUNction commentedon Oct 1, 2026
2026-10-01 CI 补充核验:main 仍为 38b7b37,Rewrite contracts 第 1 次运行已于 12:47 UTC 结束为 failure。
两个失败都发生在 communication.inbox 返回后直接读取 data['items'];data 为 None。源码显示共同原因:Todo 到期提醒和 Bounty 通知均合法使用 sender=None,但 mailbox 新增联系人投影无条件调用 contact(item['sender'])。contact随后进入 visible(None) → resource(None) → not_found;该错误继续交给 executor,形成 data=None 的错误结果。这个投影由 26e57e5 引入。
建议仅在 contact 的空 sender 路径返回明确的系统通知标签,不查询主体资源;真实主体仍保留原有可见性检查。两个测试读取 data 前先断言 status == 'ok' 并输出 wire(result),保留现有投递、幂等、隔离断言,修复后复验这两个用例及邮箱/DM 回归。
边界:Todo 测试在失败前已通过消息持久化数量=1、审计和重复维护不重复投递断言;Bounty 测试已通过 claim 和余额断言。本次是 CI 日志与源码诊断,日志未打印原始 inbox.error,未另行执行复现或验证生产影响;没有消息丢失、资金损失或权限泄露证据。
LIghtJUNction commentedon Oct 1, 2026
0.2.5 delivery and subagent acceptance update (2026-10-01)
Published
msgctl 0.2.5to PyPI and installed the local client. Deployed nativemsgd 0.2.5-20261001.13to the public service from sourcedba81fe; msgd and worker are active. Synchronized PR #230's post-universe improvements before the build. The installer still pins client 0.2.1.Implemented private same-account labels, offline local queues, explicit online private queues using existing operations, and blocking
msg listenwith JSONL output and durable cursors. Root/child Codex exchanged actual msg messages; a listener stayed blocked until delivery. Desktop and cloud server exchanged and read messages in both directions. Temporary cloud test credentials were revoked afterward. ASCII homepage, raw response and synchronized/@root/web/returned successful live responses.Acceptance remains bounded: OpenCode returned 429, Claude Code timed out, and Gemini CLI did not complete a successful reply. Cross-vendor agent software interoperability is not verified; this does not close the broader client matrix issue. Local and remote queues do not automatically synchronize.
Usage: https://github.com/TokenNotIncluded/msg/blob/main/docs/SUBAGENTS.md
Acceptance and package/source evidence: https://github.com/TokenNotIncluded/msg/blob/main/docs/SUBAGENT_ACCEPTANCE_20261001.md
Docs update:
8ffbacb.LIghtJUNction commentedon Oct 1, 2026
0.2.6 交付记录(2026-10-02):
7887d9014e2dbe0a876bebf6b86a8b488e2bacd2;PyPI msgctl 0.2.6 和 GitHub Release 已发布,wheel/sdist/Arch 安装包 digest 已核对。msgd 0.2.6-20261002.18,源码与 wheel 哈希匹配;部署前已备份,主服务/worker active。公网 healthz、HTML/Markdown 首页、root/web、feed 和 login 均为 200,首页 12 色设置及 token 云检查通过。LIghtJUNction commentedon Oct 1, 2026
YubiKey client slice delivered (2026-10-02):
Acceptance limits: fresh configuration on the same Linux computer, not a physical second-computer or Windows/macOS acceptance test. Local age decryption key is separate. Issue remains open for its broader client matrix.
Full Rewrite contracts CI on 6dc67e5 is not green: failures in test_remote_private_delivery_tail_restart_and_archive, test_due_todo_is_only_in_owner_inbox_and_repeated_maintenance_is_noop, and test_prefunded_bounty_pays_offline_publisher_and_stops_at_budget. Quality, deployment rehearsal, recovery safety, integration closure, transfer and real sandbox jobs passed; another recovery run was still in progress at review. Deployment and focused tests are separate evidence, not a claim that the complete suite passed.
LIghtJUNction commentedon Oct 1, 2026
Follow-up delivery verified on 2026-10-02:
msg/services/<domain>/accounts/<account>in the respective XDG directories.--account,account list/use/importare available. Real local lightjunction/light signing material and age keys survived migration unchanged; lightjunction remains the default. No separate msg-hardware namespace remains. This does not replace physical second-computer acceptance.npx skills add TokenNotIncluded/msg --skill msg-entry;skills add --listdiscovered msg-entry in the remote repository. Registration commands now use --account.Published: msgctl 0.2.11 on PyPI and https://github.com/TokenNotIncluded/msg/releases/tag/v0.2.11. Deployed: native msgd 0.2.11-20261002.23, source 0076635, artifact SHA-256 80c88e26ecaf528ecc809096c56f52eed8f26c0c752a5cd93738293eb4769823. Rollback package and protected pre-upgrade backup retained; main and worker healthy.
Verification: 31 distinct focused profile/follow/discovery/browser tests passed across the changes, plus lint and formatting. Chrome extension verified the real signed-in profile, old-session social-list fallback, and responsive dark-theme filter without horizontal overflow. Server gates verified HTML/raw/API routes. Earlier account/connection/hardware-focused regression run passed 142 tests on 0.2.9, including the previously failing mailbox cases. Full CI and broader cross-client/physical-device acceptance remain separate; this comment does not close the issue.
fix: require explicit account selection after incomplete recovery (#232)
LIghtJUNction commentedon Oct 1, 2026
Delivered in 0.2.13, source
ec8f74d:/feedinterest/recommendation form; recommendation APIs remain available./search?q=...: minimal ASCII UI, real phrase/exclusion/AND/OR/group/site/filetype/date handling, authorized results, clean raw output, OpenSearch discovery and a copyable Chrome search template.Validation: search/browser/read-effect coverage passed (40 cases), account recovery/wallet coverage passed (31 cases), existing market CLI bindings passed (14 cases), and lexical/CLI/subject privacy regressions passed. A fresh minimal wheel install did not import server implementation. Public HTTPS and Chrome Enter-to-search returned four readable results for
python; the signed-in browser wallet rendered successfully.Published: PyPI + GitHub
msgctl 0.2.13; installed local uv tool 0.2.13. Deployed:msgd 0.2.13-20261002.25; main and worker active. Native SHA-256ac0dadb3645371567f02d90905a7562cd68e06fa76fcbff2d08a05d1f65c385d. Pre-upgrade backup SHA-25678f9911562b37a9b1a1122080b523a5bd8e1d51d5dc466f58e9520dabcf4af44.0.2.13 corrects the initial 0.2.12 search-page form policy; same-origin browser form submission was verified after the fix. Broader issue acceptance items remain open.
LIghtJUNction commentedon Oct 3, 2026
收缩为工具真实资源限制与失败终止验收,保留开放。当前
RLIMIT_CPU/AS/FSIZE/NOFILE并不证明RSS或进程数硬上限,现有真实bwrap用例主要验证网络/输出;需要补实际耗尽/终止证据,或明确收缩到已实现的限制。目标sshd/PAM/systemd/隔离配置仍归#84。已完成项不重做:#197已实现裸
--json字段发现、字段下推及本地--jq/--template,main105c2cf7的CI含25个字段/真实CLIcase、12个formattercase和14个cursorcase;TUI当前只读,写走显式签名CLI。真实sshd、RSS只读、最小client与bwrap网络边界均有已有证据;不把旧TUI写需求或无限跨厂商/跨OS矩阵继续当永久门槛。[-][P2] CLI/TUI、工具隔离、SSH/RSS 与真实客户端矩阵[/-][+]工具实际资源限制、耗尽与终止验证[/+]