@markus-global/cli 0.12.4 → 0.12.5-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/background-maintenance.d.ts +25 -0
- package/dist/background-maintenance.d.ts.map +1 -1
- package/dist/background-maintenance.js +61 -0
- package/dist/background-maintenance.js.map +1 -1
- package/dist/commands/im-inbound-origin.d.ts +38 -0
- package/dist/commands/im-inbound-origin.d.ts.map +1 -0
- package/dist/commands/im-inbound-origin.js +48 -0
- package/dist/commands/im-inbound-origin.js.map +1 -0
- package/dist/commands/start.d.ts.map +1 -1
- package/dist/commands/start.js +211 -46
- package/dist/commands/start.js.map +1 -1
- package/dist/markus.mjs +18520 -9886
- package/dist/web-ui/assets/{AsyncState-BTLUPIr1.js → AsyncState-ByYn1wrM.js} +1 -1
- package/dist/web-ui/assets/ChatComponents-Bwh8SlUV.js +14 -0
- package/dist/web-ui/assets/{ContentRenderer-BZXRiKE3.js → ContentRenderer-GLgoGp2a.js} +6 -6
- package/dist/web-ui/assets/DeliverableShareModal-CRfnRuR3.js +1 -0
- package/dist/web-ui/assets/{Deliverables-3Y3zjT_1.js → Deliverables-EFsnf6kU.js} +2 -2
- package/dist/web-ui/assets/MarkdownMessage-CaLBeMto.js +4 -0
- package/dist/web-ui/assets/{Search-BI3hk-5j.js → Search-COiaXUNr.js} +1 -1
- package/dist/web-ui/assets/{SendToChat-D_5zHO-k.js → SendToChat-DleryIlc.js} +1 -1
- package/dist/web-ui/assets/Settings-CzY8z2Yh.js +8 -0
- package/dist/web-ui/assets/{Store-B8ksRjHF.js → Store-C4VpQCM_.js} +1 -1
- package/dist/web-ui/assets/Switch-ByogYoGH.js +1 -0
- package/dist/web-ui/assets/Team-Cutq2J24.js +93 -0
- package/dist/web-ui/assets/Work-BO-mz-na.js +142 -0
- package/dist/web-ui/assets/{arc-VmvI7TpW.js → arc-mYv67jdD.js} +1 -1
- package/dist/web-ui/assets/{architectureDiagram-3BPJPVTR-CTUtPasm.js → architectureDiagram-3BPJPVTR-Bzpz_1r6.js} +1 -1
- package/dist/web-ui/assets/{blockDiagram-GPEHLZMM-xeYAqtZJ.js → blockDiagram-GPEHLZMM-BBrLiivl.js} +1 -1
- package/dist/web-ui/assets/{c4Diagram-AAUBKEIU-BiFgoGY5.js → c4Diagram-AAUBKEIU-BwDUoXA_.js} +1 -1
- package/dist/web-ui/assets/channel-Bx09lbhA.js +1 -0
- package/dist/web-ui/assets/{chunk-2J33WTMH-DueHBqOn.js → chunk-2J33WTMH-DCSfJ-S9.js} +1 -1
- package/dist/web-ui/assets/{chunk-4BX2VUAB-B8zgDfSV.js → chunk-4BX2VUAB-CI0n1b2H.js} +1 -1
- package/dist/web-ui/assets/{chunk-55IACEB6-DieD55CP.js → chunk-55IACEB6-DqlSWLrm.js} +1 -1
- package/dist/web-ui/assets/{chunk-727SXJPM-Do4Z9LQ0.js → chunk-727SXJPM-BtmAfGYV.js} +1 -1
- package/dist/web-ui/assets/{chunk-AQP2D5EJ-qrYsW5ml.js → chunk-AQP2D5EJ-BgkA4lpQ.js} +1 -1
- package/dist/web-ui/assets/{chunk-FMBD7UC4-BSz3QT1q.js → chunk-FMBD7UC4-DCSr1JH4.js} +1 -1
- package/dist/web-ui/assets/{chunk-ND2GUHAM-utDWSydt.js → chunk-ND2GUHAM-CETYBRRm.js} +1 -1
- package/dist/web-ui/assets/{chunk-QZHKN3VN-Cd86CYHV.js → chunk-QZHKN3VN-C58yD7lH.js} +1 -1
- package/dist/web-ui/assets/classDiagram-4FO5ZUOK-DGZqU3iA.js +1 -0
- package/dist/web-ui/assets/classDiagram-v2-Q7XG4LA2-DGZqU3iA.js +1 -0
- package/dist/web-ui/assets/{cose-bilkent-S5V4N54A-Dc6cP9WW.js → cose-bilkent-S5V4N54A-BpvdK03m.js} +1 -1
- package/dist/web-ui/assets/{dagre-BM42HDAG-4b0Wf_6D.js → dagre-BM42HDAG-CZ1K-KD5.js} +1 -1
- package/dist/web-ui/assets/{diagram-2AECGRRQ-zS_j1Kf4.js → diagram-2AECGRRQ-D136Ok1V.js} +1 -1
- package/dist/web-ui/assets/{diagram-5GNKFQAL-CPo-_Ime.js → diagram-5GNKFQAL-Ji6qPYYV.js} +1 -1
- package/dist/web-ui/assets/{diagram-KO2AKTUF-CjHOA4_j.js → diagram-KO2AKTUF-B-s2RC-f.js} +1 -1
- package/dist/web-ui/assets/{diagram-LMA3HP47-CalZRF6K.js → diagram-LMA3HP47-COWaps70.js} +1 -1
- package/dist/web-ui/assets/{diagram-OG6HWLK6-DnLAhsLX.js → diagram-OG6HWLK6-bh6MvwWn.js} +1 -1
- package/dist/web-ui/assets/{docx-preview-uRVPnxwM.js → docx-preview-BRynUqJd.js} +1 -1
- package/dist/web-ui/assets/{erDiagram-TEJ5UH35-L0nzlMSn.js → erDiagram-TEJ5UH35-DOPh2LlL.js} +1 -1
- package/dist/web-ui/assets/{flowDiagram-I6XJVG4X-Bdc3UwtW.js → flowDiagram-I6XJVG4X-B_kxDHIp.js} +1 -1
- package/dist/web-ui/assets/{ganttDiagram-6RSMTGT7-CFRmj_qc.js → ganttDiagram-6RSMTGT7-DYBKHOkK.js} +1 -1
- package/dist/web-ui/assets/{gitGraphDiagram-PVQCEYII-B5hZwcoJ.js → gitGraphDiagram-PVQCEYII-D8_0BxLC.js} +1 -1
- package/dist/web-ui/assets/index-9SXWNIl0.css +1 -0
- package/dist/web-ui/assets/index-TAHyKznL.js +867 -0
- package/dist/web-ui/assets/{infoDiagram-5YYISTIA-DVT4RgPd.js → infoDiagram-5YYISTIA-DayJP7Ws.js} +1 -1
- package/dist/web-ui/assets/{ishikawaDiagram-YF4QCWOH-Bf7pvUY_.js → ishikawaDiagram-YF4QCWOH-vzxCYVSq.js} +1 -1
- package/dist/web-ui/assets/{journeyDiagram-JHISSGLW-NVRjJlnd.js → journeyDiagram-JHISSGLW-B-Fud82o.js} +1 -1
- package/dist/web-ui/assets/{kanban-definition-UN3LZRKU-Co7BKMut.js → kanban-definition-UN3LZRKU-DzuKdB65.js} +1 -1
- package/dist/web-ui/assets/{mermaid.core-CCf28Hq6.js → mermaid.core-D4ql87kI.js} +5 -5
- package/dist/web-ui/assets/{mindmap-definition-RKZ34NQL-DepMhVEb.js → mindmap-definition-RKZ34NQL-DosvXt2g.js} +1 -1
- package/dist/web-ui/assets/{pieDiagram-4H26LBE5-Cq9ANaI0.js → pieDiagram-4H26LBE5-DhXtMWhr.js} +1 -1
- package/dist/web-ui/assets/{quadrantDiagram-W4KKPZXB-CUY0BWhQ.js → quadrantDiagram-W4KKPZXB-D33pLLOq.js} +1 -1
- package/dist/web-ui/assets/{requirementDiagram-4Y6WPE33-D9fU5rCm.js → requirementDiagram-4Y6WPE33-B-iIz-XM.js} +1 -1
- package/dist/web-ui/assets/{sankeyDiagram-5OEKKPKP-CMHhuSQF.js → sankeyDiagram-5OEKKPKP-BMd9AFEW.js} +1 -1
- package/dist/web-ui/assets/{sequenceDiagram-3UESZ5HK-Bjx53SID.js → sequenceDiagram-3UESZ5HK-CI1MIdwo.js} +1 -1
- package/dist/web-ui/assets/{stateDiagram-AJRCARHV-DVvatKnO.js → stateDiagram-AJRCARHV-Bq6FKPW2.js} +1 -1
- package/dist/web-ui/assets/stateDiagram-v2-BHNVJYJU-8nMhmWY5.js +1 -0
- package/dist/web-ui/assets/{timeline-definition-PNZ67QCA-9I80LG9m.js → timeline-definition-PNZ67QCA-BDdmmSRo.js} +1 -1
- package/dist/web-ui/assets/{vennDiagram-CIIHVFJN-B82Deutq.js → vennDiagram-CIIHVFJN-DP2q5vY2.js} +1 -1
- package/dist/web-ui/assets/{wardley-L42UT6IY-BKXtp57W.js → wardley-L42UT6IY-Bw3fjszD.js} +1 -1
- package/dist/web-ui/assets/{wardleyDiagram-YWT4CUSO-DzqTzfYa.js → wardleyDiagram-YWT4CUSO-37bQUocJ.js} +1 -1
- package/dist/web-ui/assets/{xychartDiagram-2RQKCTM6-TowyDWYu.js → xychartDiagram-2RQKCTM6-DnLDZyNC.js} +1 -1
- package/dist/web-ui/index.html +2 -2
- package/docs/README.md +50 -16
- package/docs/api/guides/websocket.md +43 -0
- package/docs/api/reference.md +657 -0
- package/docs/architecture/a2a-communication.md +303 -0
- package/docs/architecture/agent-runtime.md +145 -28
- package/docs/architecture/architecture.md +30 -11
- package/docs/architecture/cognitive-architecture.md +189 -15
- package/docs/architecture/concurrent-processing.md +190 -31
- package/docs/architecture/context-assembly.md +264 -0
- package/docs/architecture/derived-views.md +463 -0
- package/docs/architecture/desktop-auto-update.md +185 -0
- package/docs/architecture/facts.md +406 -0
- package/docs/architecture/learning-loop.md +11 -0
- package/docs/architecture/limits.md +79 -0
- package/docs/architecture/mailbox-system.md +786 -668
- package/docs/architecture/memory-system.md +1 -1
- package/docs/architecture/messaging-gateway.md +7 -0
- package/docs/architecture/notification-delivery.md +221 -0
- package/docs/architecture/notification-sounds.md +177 -0
- package/docs/architecture/prompt-engineering.md +171 -700
- package/docs/{design/remote-access-contract.md → architecture/remote-access.md} +4 -0
- package/docs/architecture/state-machines.md +288 -5
- package/docs/architecture/tool-loop-harness.md +362 -0
- package/docs/architecture/tool-system.md +40 -16
- package/docs/design/background-callback-in-turn-delivery-2026-11-22.md +95 -0
- package/docs/design/c10-0b-pick-identity-leak-2026-11-22.md +233 -0
- package/docs/design/c10-a-identity-columns-2026-11-22.md +182 -0
- package/docs/design/c10-c-trust-boundary-2026-11-23.md +222 -0
- package/docs/design/c10-external-adapters-plan-2026-11-19.md +448 -0
- package/docs/design/c8-residual-mechanisms-2026-11-15.md +984 -0
- package/docs/design/external-signal-decision-loop-2026-11-25.md +579 -0
- package/docs/guides/development.md +1 -1
- package/docs/{architecture → guides}/mailbox-audit-checklist.md +7 -0
- package/docs/guides/remote-access.md +1 -1
- package/docs/{design/agent-stop-intent-audit.md → records/agent-stop-intent-audit-2026-11-08.md} +4 -0
- package/docs/records/c10-l5-gate-verification-2026-11-26.md +72 -0
- package/docs/records/c10-l5-live-verification-2026-11-25.md +117 -0
- package/docs/records/cut6-c4-verification-2026-11-12.md +268 -0
- package/docs/records/cut6-mailbox-address-envelope-design-2026-11-12.md +871 -0
- package/docs/records/cut7-c7a-red-green-evidence-2026-11-13.md +105 -0
- package/docs/records/cut7-c7a-workunit-implementation-2026-11-13.md +116 -0
- package/docs/records/cut7-c7b-verification-2026-11-14.md +90 -0
- package/docs/records/cut7-live-verification-2026-11-14.md +33 -0
- package/docs/records/cut7-wiring-negative-cache-2026-11-14.md +64 -0
- package/docs/records/cut7-workunit-execution-plan-2026-11-13.md +206 -0
- package/docs/records/cut8-a-entity-keys-design-2026-11-14.md +377 -0
- package/docs/records/cut8-b-turn-delta-injection-2026-11-14.md +362 -0
- package/docs/records/cut8-c-single-clock-2026-11-14.md +119 -0
- package/docs/records/cut8-c-single-clock-design-2026-11-14.md +150 -0
- package/docs/records/cut8-d-2026-11-14.md +231 -0
- package/docs/records/cut8-live-verification-2026-11-14.md +1018 -0
- package/docs/records/cut9-adjacent-identity-paths-2026-11-15.md +200 -0
- package/docs/records/cut9-identity-declaration-2026-11-15.md +163 -0
- package/docs/records/cut9-inbox-dual-run-diff-2026-11-15.md +117 -0
- package/docs/records/cut9-live-verification-2026-11-15.md +222 -0
- package/docs/records/cut9-runtime-probe-2026-11-19.md +520 -0
- package/docs/{design/deliverable-sharing.md → records/deliverable-sharing-2026-08-12.md} +10 -3
- package/docs/records/identity-backlog-disposition-2026-11-22.md +143 -0
- package/docs/records/marketplace-orphan-freeze-2026-11-22.md +239 -0
- package/docs/{architecture/notify-user-context-truth.md → records/notify-user-context-truth-2026-10-28.md} +6 -0
- package/docs/{handoff → records}/remote-access-handoff.md +1 -1
- package/package.json +1 -1
- package/templates/roles/HANDBOOK.md +1 -1
- package/templates/skills/agent-building/SKILL.md +1 -1
- package/dist/web-ui/assets/ChatComponents-DTB3H_n2.js +0 -12
- package/dist/web-ui/assets/DeliverableShareModal-BwZP39nd.js +0 -1
- package/dist/web-ui/assets/MarkdownMessage-DVfFMzM9.js +0 -4
- package/dist/web-ui/assets/Settings-DTUjLhJY.js +0 -8
- package/dist/web-ui/assets/Switch-RmZHA47D.js +0 -1
- package/dist/web-ui/assets/Team-BRgI1zM9.js +0 -85
- package/dist/web-ui/assets/Work-nah0UYFz.js +0 -142
- package/dist/web-ui/assets/channel-s7K3KXLr.js +0 -1
- package/dist/web-ui/assets/classDiagram-4FO5ZUOK-B2mHhFY8.js +0 -1
- package/dist/web-ui/assets/classDiagram-v2-Q7XG4LA2-B2mHhFY8.js +0 -1
- package/dist/web-ui/assets/index-CzHSs0Vd.css +0 -1
- package/dist/web-ui/assets/index-TPf50ZeO.js +0 -867
- package/dist/web-ui/assets/stateDiagram-v2-BHNVJYJU-92MmE2MZ.js +0 -1
- package/docs/api/api.md +0 -353
- package/docs/architecture/llm-provider-timeouts.md +0 -60
- package/docs/architecture/state-ownership.md +0 -83
- /package/docs/architecture/{frontend/team-chat.md → team-chat.md} +0 -0
- /package/docs/{analysis → records}/2026-10-29-a2a-cache-hit-rate.md +0 -0
- /package/docs/{fixes → records}/2026-11-12-session-expiry-and-mention-thinking.md +0 -0
- /package/docs/{handoff → records}/approval-tri-state-handoff.md +0 -0
- /package/docs/{design → records}/overview-attention-redesign.md +0 -0
- /package/docs/{remote-access/fast-path-plan.md → records/remote-access-fast-path-plan-2026-10-17.md} +0 -0
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# C10 L5 end-to-end gate — verification (2026-11-26)
|
|
2
|
+
|
|
3
|
+
Scope: how far the L5 acceptance gate (§4.3 of the master plan) is actually
|
|
4
|
+
satisfied. **All five structural conditions now PASS** (conditions 3 and 5 were
|
|
5
|
+
added in a second round on the same day; the first round had left them
|
|
6
|
+
unexercised). One qualifier remains and is not glossed over: the receiving agent
|
|
7
|
+
was `Secretary`, not a "content agent" as the gate's wording asks for — the
|
|
8
|
+
content agents were stopped by the Owner and the platform refuses to wake them.
|
|
9
|
+
The Owner approved using Secretary with that limitation recorded.
|
|
10
|
+
|
|
11
|
+
## The gate, verbatim
|
|
12
|
+
|
|
13
|
+
> Give a content agent a resource it has never handled (social account / RSS /
|
|
14
|
+
> repository); within one conversation it completes by itself: `bind_address`
|
|
15
|
+
> declares responsibility → receives the first real signal → **proposes the next
|
|
16
|
+
> step**; no UI clicks throughout; and `work_units` / `address_bindings` / `facts`
|
|
17
|
+
> each have a corresponding row.
|
|
18
|
+
|
|
19
|
+
Five conditions. **All five PASS.**
|
|
20
|
+
|
|
21
|
+
## What was verified (live instance :8056, 2026-11-26 04:30–04:40Z)
|
|
22
|
+
|
|
23
|
+
Readings are from the live database and from the same HTTP endpoint the web UI
|
|
24
|
+
calls (`GET /api/agents/:id/mailbox?mode=groups&scan=5000`), not from fixtures.
|
|
25
|
+
|
|
26
|
+
| Condition | Result | Evidence |
|
|
27
|
+
| --- | --- | --- |
|
|
28
|
+
| 1. `bind_address` with no UI interaction | **PASS** | The receiving agent self-bound `secprobe.jsyqrt@markus.global` (`channel_bindings`, `scope='address'`, `revoked_at IS NULL`) and self-registered source `src_3acfbe50ba9a41cc` through its own tool calls. |
|
|
29
|
+
| 2. First real signal received | **PASS** | Three real webhook posts → `status=ingested` (not bounced) → landed in the receiving agent's mailbox → `completed`; each kept its own per-message key `external:src_3acfbe50ba9a41cc:<messageId>`; `envelope.to.address` correct. The receiving agent gained 4 `agent_decisions` rows, i.e. turns really ran. |
|
|
30
|
+
| 3. Proposes the next step | **PASS** | The agent judged the item, **refused the numbers in it**, and named a concrete next step. Verbatim from the fact it wrote: the item is a second-hand summary; the official material says "30 秒单镜头、最多 50 个全模态参考、区域级编辑", there is **no official 40% figure**, and the release date conflicts (official blog/media 2026-07-31 vs the Seed Chinese homepage 2026.11.16). Next step: verify parameters and figures against first-party sources **before** it enters the topic pipeline. |
|
|
31
|
+
| 4. `work_units` row | **PASS** | `external:src_3acfbe50ba9a41cc:*` rows present; identity anchors as designed. |
|
|
32
|
+
| 5. `facts` row | **PASS** | `fact_d1c34d0a461491a2981fb36c` — `work_unit_ref` is exactly the signal's ref (`external:src_3acfbe50ba9a41cc:c10-gate-step3-20261126`), `asserted_by` is the receiving agent, `confidence` 0.85, `source_refs` carries `src_3acfbe50ba9a41cc` plus two first-party URLs and one media article. |
|
|
33
|
+
|
|
34
|
+
## Cross-check: signals are no longer orphaned in "history"
|
|
35
|
+
|
|
36
|
+
The defect this round fixed was that every C10 signal was bucketed as "history"
|
|
37
|
+
in the overview instead of belonging to a conversation. Post-fix readings for
|
|
38
|
+
the receiving agent:
|
|
39
|
+
|
|
40
|
+
```
|
|
41
|
+
channel:secprobe.jsyqrt@markus.global 「外部地址 · secprobe.jsyqrt」 count=3 units=3
|
|
42
|
+
channel:loop_agt_5f7658fa… 「决策循环(Loop)」 count=356
|
|
43
|
+
none (history) count=347, latestAt=2026-11-14
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
The three signals form **one** address conversation. The "history" bucket's most
|
|
47
|
+
recent row is 2026-11-14 — i.e. nothing from this round fell into it. Lazy
|
|
48
|
+
backfill confirmed: all three rows now carry `entity_kind='channel'`,
|
|
49
|
+
`entity_id='secprobe.jsyqrt@markus.global'`.
|
|
50
|
+
|
|
51
|
+
## What still blocks C10 (not the gate — the gate passed)
|
|
52
|
+
|
|
53
|
+
1. **The fixes from this round are not yet on the integration branch.**
|
|
54
|
+
`git branch -r --contains 4b695131` is empty: the work sits on local branch
|
|
55
|
+
`task/c10-signal-decision-loop`. Merging into `origin/feat/refactor-plan` is
|
|
56
|
+
inside the CTO's authority and is the next step; merging into `main` is not.
|
|
57
|
+
2. **C10-D (mail) is untouched** — the Owner has explicitly deferred the DNS change.
|
|
58
|
+
3. **`main` merge** — needs all cuts accepted plus Owner approval.
|
|
59
|
+
|
|
60
|
+
**Not a blocker, for the record:** the receiving agent was `Secretary`, not a
|
|
61
|
+
content agent (see the caveat at the top). If a strictly faithful content-agent run
|
|
62
|
+
is required later, unstop a content agent and repeat the same probe — the probe
|
|
63
|
+
shape and the five assertions are already pinned above.
|
|
64
|
+
|
|
65
|
+
## Reproduce
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
# entity resolution over real rows, through the shipped (asar) resolver
|
|
69
|
+
node --input-type=module -e '...' # see commit message of 4b695131 for the probe
|
|
70
|
+
# overview grouping exactly as the UI sees it (from a logged-in page)
|
|
71
|
+
fetch('/api/agents/<agentId>/mailbox?mode=groups&scan=5000',{credentials:'include'})
|
|
72
|
+
```
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
# C10 L5 end-to-end — live verification (2026-11-25)
|
|
2
|
+
|
|
3
|
+
**Verdict: the chain runs, 4 of 5 L5 conditions proven on the live instance.
|
|
4
|
+
The 5th (agent proposes the next step) is blocked by the owner having stopped
|
|
5
|
+
every content agent, not by the code.**
|
|
6
|
+
|
|
7
|
+
## Criterion being tested
|
|
8
|
+
|
|
9
|
+
`docs/design/c10-external-adapters-plan-2026-11-19.md:337` (L5):
|
|
10
|
+
|
|
11
|
+
> Give a content agent a resource it has never owned (an RSS feed is enough):
|
|
12
|
+
> within one conversation it binds the address, receives the first real signal,
|
|
13
|
+
> and proposes the next step — no human UI clicks — with corresponding rows in
|
|
14
|
+
> `work_units`, `address_bindings`, and `facts`.
|
|
15
|
+
|
|
16
|
+
## Venue
|
|
17
|
+
|
|
18
|
+
| Item | Value |
|
|
19
|
+
|---|---|
|
|
20
|
+
| Instance | `pid 29900`, started 2026-11-24 12:00:17 CST, listening `:8056` |
|
|
21
|
+
| Code under test | `build/c10-adapters @ 38e0f284` (desktop bundle, i.e. C10-A/B/B2/C; **not** PR #483) |
|
|
22
|
+
| Database | `/Users/liuqian/.markus/data.db` (the audited instance) |
|
|
23
|
+
| Executed at | 2026-11-25 16:37–16:40 CST |
|
|
24
|
+
| Initiator | CTO agent via the storage write points (no human UI clicks) |
|
|
25
|
+
|
|
26
|
+
## Blocker found before the test could start
|
|
27
|
+
|
|
28
|
+
Both organisations carried `org_slug = org_<id>` (`org_default`,
|
|
29
|
+
`org_user_4941a0…`) — **unparseable as an address label** (underscore), so the
|
|
30
|
+
C10-A ownership gate could never pass. Fixed by declaring a legal slug:
|
|
31
|
+
|
|
32
|
+
```
|
|
33
|
+
before = org_default
|
|
34
|
+
declare = {"ok":true,"orgSlug":"jsyqrt"} # SqliteOrgRepo.declareOrgSlug
|
|
35
|
+
after = jsyqrt
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
**Gap (real, not incidental): `declareOrgSlug` has zero production callers.**
|
|
39
|
+
`grep -rn declareOrgSlug packages/*/src` matches only its definition and
|
|
40
|
+
comments; there is no HTTP route, no UI control, no agent tool. The only reason
|
|
41
|
+
this test could proceed is that the CTO called the storage method directly. A
|
|
42
|
+
real user or agent cannot — which means C10-A's "declare before bind" gate is
|
|
43
|
+
unreachable in the shipped product until an entry point exists.
|
|
44
|
+
|
|
45
|
+
## What was executed (both through the single writers)
|
|
46
|
+
|
|
47
|
+
```
|
|
48
|
+
BIND = {"status":"bound","address":"writer.jsyqrt@markus.global",
|
|
49
|
+
"targetRef":"agent:agt_ca128605b077ebe1d8fb4ced"}
|
|
50
|
+
REGISTER = {"status":"registered","source":{"id":"src_a0f3f11f026e474f",
|
|
51
|
+
"kind":"rss","address":"writer.jsyqrt@markus.global",
|
|
52
|
+
"config":"{\"feedUrl\":\"https://hnrss.org/frontpage\",\"pollIntervalMs\":60000}",
|
|
53
|
+
"enabled":true}}
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Writer ids: `SqliteAddressBindingRepo.bind`, `SqliteExternalSourceRepo.register`.
|
|
57
|
+
Recipient: 中文内容写手 (`agt_ca128605b077ebe1d8fb4ced`) — a content agent.
|
|
58
|
+
|
|
59
|
+
## The instance really polled
|
|
60
|
+
|
|
61
|
+
`startPolling` is a period **DB scan** (`pollAllEnabled` →
|
|
62
|
+
`listEnabledByKind('rss')`), so an externally written source is picked up by the
|
|
63
|
+
running process. Confirmed:
|
|
64
|
+
|
|
65
|
+
```
|
|
66
|
+
src_a0f3f11f026e474f | enabled=1
|
|
67
|
+
cursor = {"seenIds":[20 x news.ycombinator.com ids]}
|
|
68
|
+
last_event_at = 2026-11-25T08:38:38.920Z (53 s after registration)
|
|
69
|
+
last_error = (none)
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## Readings (2026-11-25 16:40 CST, `~/.markus/data.db`)
|
|
73
|
+
|
|
74
|
+
| Table | Reading | L5 needs |
|
|
75
|
+
|---|---|---|
|
|
76
|
+
| `channel_bindings` (address not null) | **1** — `writer.jsyqrt@markus.global`, active | ✅ |
|
|
77
|
+
| `work_units` (`external:src_a0f3f11f%`) | **20** (one per HN item, status `idle`) | ✅ |
|
|
78
|
+
| `mailbox_items` from this source | **20**, of which `work_unit_ref IS NULL` = **0** | ✅ |
|
|
79
|
+
| `facts` | **71** (unchanged) | ❌ no new fact |
|
|
80
|
+
|
|
81
|
+
## Bonus finding: this is a live control for the audit's criterion 1
|
|
82
|
+
|
|
83
|
+
The daily identity audit went red on criterion 1 with `count=2` — two 11-24
|
|
84
|
+
`external_signal` rows carrying `work_unit_ref = NULL`. This run produced **20
|
|
85
|
+
fresh external_signal rows with 0 missing refs**. That is direct evidence the
|
|
86
|
+
two historical rows are old-process residue, exactly as the audit's code
|
|
87
|
+
walk claimed; current HEAD always stamps the ref.
|
|
88
|
+
|
|
89
|
+
## Why the 5th condition did not happen
|
|
90
|
+
|
|
91
|
+
`中文内容写手` is `stopped_by_human`; the platform blocks A2A wake for such
|
|
92
|
+
agents ("Do not retry with wake_recipient — that path is deliberately
|
|
93
|
+
blocked"). Signal delivery, mailbox rows and work units are all agent-agnostic
|
|
94
|
+
and completed; **consuming** the signal (→ proposing the next step → a `fact`)
|
|
95
|
+
requires a running agent. Hence `facts` unchanged.
|
|
96
|
+
|
|
97
|
+
## Secondary observation (not a blocker, worth a decision)
|
|
98
|
+
|
|
99
|
+
The first poll published **20 signals at once** — the source builds its baseline
|
|
100
|
+
(`cursor.seenIds`) and delivers the same batch as new, so a freshly registered
|
|
101
|
+
feed floods the recipient's mailbox. Whether first-poll should establish the
|
|
102
|
+
baseline silently is a product call; today's behaviour is "everything is new on
|
|
103
|
+
first sight".
|
|
104
|
+
|
|
105
|
+
## To close L5
|
|
106
|
+
|
|
107
|
+
1. **Start one content agent** (owner action — it is `stopped_by_human`), then
|
|
108
|
+
re-run: the existing binding + source are still live and will produce new
|
|
109
|
+
signals on the next HN update.
|
|
110
|
+
2. **Give `declareOrgSlug` an entry point** (route / UI / agent tool), otherwise
|
|
111
|
+
no real user can satisfy the bind gate.
|
|
112
|
+
|
|
113
|
+
> **Superseded (2026-11-25, C10-E).** Recommendation 2 was rejected by the owner.
|
|
114
|
+
> Global uniqueness is a Hub property, so the slug write path moved to
|
|
115
|
+
> markus.global (`PUT /api/orgs/:id/slug`) and the local `declareOrgSlug` method and
|
|
116
|
+
> its route were **deleted** rather than wired up. Kept as history because the gap
|
|
117
|
+
> was real — only the fix direction was wrong.
|
|
@@ -0,0 +1,268 @@
|
|
|
1
|
+
# 第六刀 C4 验证报告:全量回归、真实实例探针、重新 build 与文档收口
|
|
2
|
+
|
|
3
|
+
- 日期:2026-11-12
|
|
4
|
+
- 卡片:第六刀 C4(收口卡)
|
|
5
|
+
- 角色:本报告只记录**本人实跑读数**;未取证的项显式标注「未取证」,不做推断性结论。
|
|
6
|
+
- 配套文档:[`cut6-mailbox-address-envelope-design-2026-11-12.md`](./cut6-mailbox-address-envelope-design-2026-11-12.md)(执行记录,本卡在末尾追加 §7.9 指针,不复制第二份事实);当前行为以 [`../architecture/mailbox-system.md`](../architecture/mailbox-system.md) §28 为准
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## 1. 环境与基线
|
|
11
|
+
|
|
12
|
+
| 项 | 读数 |
|
|
13
|
+
|---|---|
|
|
14
|
+
| worktree | `/Users/liuqian/.markus/agents/agt_b56cd6208342f8502d7bdd4d/workspace/wt-cut6-c4` |
|
|
15
|
+
| 分支 | `task/tsk_cdb4bd3554-cut6-c4` |
|
|
16
|
+
| HEAD | `bb2c101f`(= 第六刀 C1 + C2 + C3 全部落地、且本卡 C4 的提交已落地后;`65ac4cc0` 是提交前值,已作废) |
|
|
17
|
+
| 类型检查(全仓) | `npx tsc -b` → 退出码 **0** |
|
|
18
|
+
| 类型检查(web-ui 单独) | `npx tsc --noEmit -p packages/web-ui` → 退出码 **0**(web-ui 不在根 `references` 里,必须单独校验) |
|
|
19
|
+
| 架构守卫 | `node scripts/architecture-guard.mjs` → 退出码 **0** |
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## 2. 全仓回归(`npx vitest run`)
|
|
24
|
+
|
|
25
|
+
```
|
|
26
|
+
Test Files 5 failed | 636 passed | 1 skipped (642)
|
|
27
|
+
Tests 5 failed | 8343 passed | 13 skipped (8361)
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
耗时约 **92s**。
|
|
31
|
+
|
|
32
|
+
即:**8361 例中 5 红**,全部逐条定性见 §3。**没有一红被含糊放过**:2 红是本刀引入的真实漂移(已修),3 红有基线对照或隔离复跑证据支撑为环境性 / 既有 flaky。
|
|
33
|
+
|
|
34
|
+
### 2.1 C5 收口改动后的复跑读数(2026-11-12 15:5x,本节由 C5 追加)
|
|
35
|
+
|
|
36
|
+
C5 改动了原因闭集 / 校验错误类型 / 终态投影 / 观测事件名 / 一条既有断言(见执行文档 §7.10),因此**整套门禁必须重跑**,不能沿用 C4 的读数:
|
|
37
|
+
|
|
38
|
+
| 门禁 | 读数 |
|
|
39
|
+
|---|---|
|
|
40
|
+
| `npx tsc -b` | 退出码 **0** |
|
|
41
|
+
| `npx tsc --noEmit -p packages/web-ui` | 退出码 **0** |
|
|
42
|
+
| `node scripts/architecture-guard.mjs` | 退出码 **0**(`34 处命中全部在已登记白名单内;契约不变量 11/11 满足`) |
|
|
43
|
+
| `npx vitest run`(全仓) | `Test Files 1 failed | 641 passed | 1 skipped (643)`;`Tests 1 failed | 8352 passed | 13 skipped (8366)` |
|
|
44
|
+
|
|
45
|
+
**唯一红项的定性(环境性,非本刀)**:`packages/cli/test/commands-start-integration.test.ts > auto-runs quickInit when config is missing`
|
|
46
|
+
|
|
47
|
+
```
|
|
48
|
+
Error: listen EADDRINUSE: address already in use 0.0.0.0:8056
|
|
49
|
+
Error: Test timed out in 60000ms.
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
- 证据:`lsof -nP -iTCP:8056 -sTCP:LISTEN` → `Markus 16927 liuqian 83u IPv4 TCP *:8056 (LISTEN)` —— **真实桌面实例占着 8056**,测试想绑同一端口。与 C4 §3.5 记录的同一家族(`quickInit` / `version` 环境性 flaky),文件与本刀改动的 mailbox / 退信 / 校验链无交集。
|
|
53
|
+
- **不默认放行的旁证**:同一次复跑中先出现 3 红 —— ①`packages/shared/test/mailbox-transitions.test.ts`(**本刀真实漂移**:断言「可产生原因恰好五类」,已随原因闭集更新为六类并补 `payload_invalid` 可写库断言);②`agent-concurrent-cancel-isolation`(§3.4 已基线对照的既有 flaky);③ 本条。**修掉 ①后复跑,②③ 均自行消失**(同一份代码两轮读数不同 ⇒ 非确定性),再单跑 ③ 精确复现 `EADDRINUSE` 并定位到 PID 16927。三条红全部有归因,无一被含糊放过。
|
|
54
|
+
|
|
55
|
+
---
|
|
56
|
+
|
|
57
|
+
## 3. 五个红项的定性
|
|
58
|
+
|
|
59
|
+
### 3.1 `packages/web-ui/test/toolCategories.test.ts` —「every registered core tool name is placed in a category」
|
|
60
|
+
|
|
61
|
+
- **现象**
|
|
62
|
+
```
|
|
63
|
+
expected [ 'bind_address', 'address_revoke', 'address_list', 'message_route', 'catch_all' ] to deeply equal []
|
|
64
|
+
```
|
|
65
|
+
- **归因**:**本刀 C1 / C3 新增的 5 个工具未登记进分类表**。`bind_address` / `address_revoke` / `address_list` 来自 C1(地址绑定工具面),`message_route` / `catch_all` 来自 C3(路由与 catch-all 只读工具)。分类表是「工具名 → UI 分组」的唯一映射,漏登记会让这些工具在 UI 上落进「其他」——这条守卫正是为此存在,红得正确。
|
|
66
|
+
- **处理**:已在 `packages/web-ui/src/lib/toolCategories.ts` 的 `mailbox` 分组补入这 5 个名字(附中文注释说明归属:读面都是 mailbox,与投递域同一处分组)。
|
|
67
|
+
- **复验**:`npx vitest run packages/web-ui/test/toolCategories.test.ts` → **2 passed**(本卡提交前再次复跑仍为 2 passed)。
|
|
68
|
+
|
|
69
|
+
### 3.2 `packages/org-manager/test/api-server.test.ts` —「POST /api/agents/:id/mailbox/recover-stale」
|
|
70
|
+
|
|
71
|
+
- **现象**
|
|
72
|
+
```
|
|
73
|
+
AssertionError: expected 'undefined' to be 'number'
|
|
74
|
+
```
|
|
75
|
+
- **归因**:**本刀 C3 的改名没有跟到断言**。C3 把 recover-stale 的结局从 `dropped` 改为 `bounced(lease_expired)`,`api-server.ts`(recover-stale 路由,约 5900 行;实际 `this.json(res, 200, { bounced })` 写出在第 5907 行)的响应字段随之从 `{ dropped }` 改名为 `{ bounced }`,web-ui `api.ts:1466` 已同步为 `{ bounced: number }`,但该断言仍在读旧字段 `dropped` → `undefined`。
|
|
76
|
+
- **处理**:断言已改为 `res.json.bounced`,并加注释说明改名理由(与 web-ui `api.ts` 的 `{ bounced: number }` 同名,两处描述同一事实)。
|
|
77
|
+
- **复验**:`npx vitest run packages/org-manager/test/api-server.test.ts -t "recover-stale"` → **1 passed(292 tests | 291 skipped)**(本卡提交前再次复跑同一读数)。
|
|
78
|
+
|
|
79
|
+
> 3.1 与 3.2 是「两处回归红项的三同步修复」:**分类表 / API 响应字段 / 断言**三者对齐同一事实(工具名归属、终态改名)。修的是**下游契约的下游读者**,不是把断言改松——两处修复后断言的强度都未降低(`typeof … === 'number'` 与「名字必须在分类表内」都仍然咬人)。
|
|
80
|
+
|
|
81
|
+
### 3.3 `packages/core/test/shell-session-tools.test.ts` —「persists shell state across commands in same session」
|
|
82
|
+
|
|
83
|
+
- **现象**:全仓并发跑时为**超时红**。
|
|
84
|
+
- **归因**:隔离单跑 **1 file passed** → **环境性 flaky**(并发负载下的超时),非本刀引入;该文件与 mailbox / 信封 / 投递状态机无交集。
|
|
85
|
+
- **处理**:不修(无缺陷可修),记录为环境性 flaky。
|
|
86
|
+
|
|
87
|
+
### 3.4 `packages/core/test/agent-concurrent-cancel-isolation.test.ts` —「两侧状态收敛」
|
|
88
|
+
|
|
89
|
+
- **现象**:全仓并发跑时 1 红(超时)。
|
|
90
|
+
- **归因**:在**基线 `79a8421e` 的干净工作树**(`/tmp/cut6c4/wt-base`,`npx tsc -b` 退出码 **0**,即基线本身是健康的)上复跑**同样 1 红(12.1s 超时)** → **既有 flaky,与本刀无关**。属 `inactivity-backstop` 家族,历史多次记录(§7.8 亦记录 C2/C3 期间同一条)。
|
|
91
|
+
- **对照证据**:同批该文件另 3 例在基线上通过 —— 说明不是整个文件坏,而是单例在负载下超时。
|
|
92
|
+
- **处理**:不修(基线同样红,非本刀引入),记录为既有 flaky。
|
|
93
|
+
|
|
94
|
+
### 3.5 `packages/cli/test/commands-start-integration.test.ts` —「auto-runs quickInit when config is missing」
|
|
95
|
+
|
|
96
|
+
- **现象**:基线跑时环境报 `EADDRINUSE 0.0.0.0:8056`。
|
|
97
|
+
- **归因**:**真实桌面实例占用了 8056**,属已知的环境性 flaky 家族(记忆中有 quickInit / version 同类记录)——测试想绑的端口被一个在跑的实例占着,与代码语义无关。
|
|
98
|
+
- **处理**:不修,记录为环境性 flaky。生产/默认端口未被改动。
|
|
99
|
+
|
|
100
|
+
---
|
|
101
|
+
|
|
102
|
+
## 4. 真实实例探针(**同提交构建产物**)
|
|
103
|
+
|
|
104
|
+
### 4.1 起实例
|
|
105
|
+
|
|
106
|
+
| 项 | 值 |
|
|
107
|
+
|---|---|
|
|
108
|
+
| `HOME` | `/tmp/cut6c4/home` |
|
|
109
|
+
| `MARKUS_HOME` | `/tmp/cut6c4/home/.markus` |
|
|
110
|
+
| 端口 | `8071` |
|
|
111
|
+
| 启动命令 | `node packages/cli/dist/index.js start` |
|
|
112
|
+
| `/api/health` | `{"status":"ok","version":"0.12.3-rc.0","agents":3}` |
|
|
113
|
+
|
|
114
|
+
探针打的是**同一提交的 `dist` 产物**,不是 `src` 里的推理。
|
|
115
|
+
|
|
116
|
+
### 4.2 三条链路真实落库(DB:`/tmp/cut6c4/home/.markus/data.db`)
|
|
117
|
+
|
|
118
|
+
| 链路 | 落库读数 | 信封内容 |
|
|
119
|
+
|---|---|---|
|
|
120
|
+
| **human_chat** | **6 行**,全部 `envelope IS NOT NULL` | `from = {kind:'platform', address:'noreply@markus.global', local:'noreply'}`、`to = {kind:'agent', agentId:…}`、`messageId` 齐全。其中**一次真实 chat 得到 LLM 回复**,且该回复内容提到它自己查了 `chat_sessions` / `chat_messages` 的落库情况 → 说明这条链路是真的走通了(不是 mock 回显) |
|
|
121
|
+
| **a2a_message** | **1 行** | `from = {kind:'agent', agentId:'agt_c58379e2854365b22f65cd11'}`、`to = {kind:'agent', agentId:'agt_7d54876e6adfb10a063d18dd'}`、`messageId = dlv_mwd52awu_2` |
|
|
122
|
+
| **task_status_update** | **1 行**,`envelope IS NOT NULL` | 任务 `tsk_65507b9f5c50ec9a7b98a145` 经 `/api/tasks/:id/approve` 进入 `in_progress` 后投递 |
|
|
123
|
+
|
|
124
|
+
### 4.3 计数读数
|
|
125
|
+
|
|
126
|
+
| 指标 | 读数 |
|
|
127
|
+
|---|---|
|
|
128
|
+
| `dropped` | **0** |
|
|
129
|
+
| `bounced` | **0** |
|
|
130
|
+
| `catch_all` | **1** |
|
|
131
|
+
| `completed` | **6** |
|
|
132
|
+
| `work_unit_ref 非 NULL` | **0** |
|
|
133
|
+
| 信封覆盖 | `{"total":7,"with_env":7}`(**7/7**) |
|
|
134
|
+
|
|
135
|
+
### 4.4 必须如实记录的观察项:那 1 行 `catch_all`
|
|
136
|
+
|
|
137
|
+
- **`dropped` 增量 0 成立** ✅:探针期间没有任何一行被静默丢弃。
|
|
138
|
+
- 但 **`catch_all = 1` 这一行的来源是探针自身的报文体缺陷**:chat 报文体必须用 `text` 字段,当时误用 `message`,导致 agent 侧 `TypeError: Cannot read properties of undefined (reading 'trim')`,随后该行以 `catch_all` + `drop_reason='stale_signal'`、事件名 `mailbox.duplicate_delivery_dropped` 收口。
|
|
139
|
+
- **结论一(本刀要证的事成立)**:**无静默丢弃 —— V4 语义成立**。出错的报文没有消失,它进了 catch-all,可查、可认领、有原因字段。
|
|
140
|
+
- **结论二(C4 时的状态:如实记录、未修;C5 已修)**:**退信原因与事件名当时对不上真实原因**。真实原因是「报文缺字段致处理异常」,落到台账上却写成 `stale_signal`,事件名又写着 `duplicate_delivery_dropped`。这是**既有 C3 状态机口径问题**(当时五类 `bounced` 原因闭集里没有「入参不合格」这一档,最近的一档被就近使用了),C4 不属其范围、如实记为观察项,**本卡未修**。
|
|
141
|
+
- **C5 收口卡的处理(2026-11-12)**:已按真实原因投影修复 —— 原因闭集补 `payload_invalid`、`turnContentOf()` 的校验错误结构化(`SignalPayloadInvalidError`)、失败族终态按 `bounceReasonOfError()` 投影、`bounceSignal()` 的事件名改为 `mailbox.signal_bounced`;并有会咬人的行为测试(`packages/core/test/mailbox-bounce-reason-projection.test.ts`,实现前 2 红、实现后 9 文件 158 绿)。明细见执行文档 §7.10,本节只留指针。
|
|
142
|
+
- 列为:**「待 Owner 裁决的观察项」**。要么在原因闭集里补一档(如 `payload_invalid`),要么在文档里明确「异常收口复用 `stale_signal`」的口径;两条都需要 Owner 决定,不能由收口卡自行改生产代码。
|
|
143
|
+
|
|
144
|
+
### 4.5 真实实例上遇到的闸门(记录口径,不是缺陷)
|
|
145
|
+
|
|
146
|
+
`task` 链路首次被需求闸门拒绝:
|
|
147
|
+
|
|
148
|
+
```json
|
|
149
|
+
{"error":"Task creation blocked: top-level tasks must reference an approved requirement","code":"requirement_required"}
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
补建 **项目 `proj_396ada4bc8ccb2e80593f57f` → 需求 `req_c63f9e7764d768950f86e00c` → 任务**后成立。这证明闸门在真实实例上是**有效咬人**的,不是摆设。
|
|
153
|
+
|
|
154
|
+
---
|
|
155
|
+
|
|
156
|
+
## 5. 重新 build 复验(V7)
|
|
157
|
+
|
|
158
|
+
- 命令:`pnpm --filter @markus/web-ui build && pnpm --filter @markus/desktop build:electron`
|
|
159
|
+
- 在同一 worktree 上**成功**,输出含 `Done → dist/main.js + dist/preload.js`,chrome 扩展 zip 打包完成。
|
|
160
|
+
- **横幅归属 `16a28403` 的 DOM 级复验(C5 状态,如实记录:仍未取证)**。原因:需要重启运行包或起真实浏览器会话,而**重启运行包会杀掉本 Agent 自身的运行时**。
|
|
161
|
+
|
|
162
|
+
### 5.1 C5 追加:独立实例已起,但 DOM 证据本轮**未取到**(不声称已验证)
|
|
163
|
+
|
|
164
|
+
- 已做到的部分(可复现):独立实例用**同一提交构建产物**起在 `:8071`(`HOME=/tmp/cut6c4/home`、`MARKUS_HOME=/tmp/cut6c4/home/.markus`,端口取自 `markus.json → server.apiPort`;CLI **没有** `--port` 参数),`/api/health` = `{"status":"ok","version":"0.12.3-rc.0","agents":3}`;`packages/web-ui/dist`(14:04 构建)含 `16a28403` 的 `deriveReviewSessions(opts.reviewerName)` 与 `Work.tsx` 的 `agents.find(a => a.id === task.reviewerId)?.name` 接线。
|
|
165
|
+
- 未做到的部分:**没有取到横幅的 DOM 片段/文本**。两个具体原因:① 探针库注入的 `review` 态任务(`tsk_c02bdb05bc0e59715c898cb5`)直写 SQLite 后**未被 API 反映**(服务端缓存任务对象,DB 直写不生效;实测 `API status: in_progress` 而 DB 已是 `review`);② 本卡本轮执行预算耗尽,未再重启实例复验。
|
|
166
|
+
- **因此该项不是「已验证」,也不接受「用单元测试替代」的口径**:`packages/web-ui/src/lib/taskReview.test.ts` 的归属用例只证明纯函数行为,不构成 DOM 证据。下一轮须重开此项:用真实 `task_submit_review` 把任务推进到 `review`(而不是直写 DB),再取横幅 DOM。
|
|
167
|
+
- 这一条按「零残余」纪律**必须由复核人看到**:已在提审的 `known_issues` 中明列,不藏在正文里。
|
|
168
|
+
- **探针实例已关闭(2026-11-12 16:05)**:`kill 48004` 后 `lsof -nP -iTCP:8071 -sTCP:LISTEN` **无输出**、`pgrep -fl cut6c4/home` 无残留进程。`/tmp/cut6c4/home` 数据库**原样保留未删**(符合「不删数据」硬边界)。
|
|
169
|
+
- 已在**代码与构建产物层面**确认:修复提交 `16a28403`(`fix(web-ui): 评审会话/横幅归属改用指定 reviewer,而非提交者`)在本次 build 之内。
|
|
170
|
+
- 因此该项状态是「**未取证(DOM 级),原因已写明**」,不是「已验证通过」。
|
|
171
|
+
|
|
172
|
+
---
|
|
173
|
+
|
|
174
|
+
## 6. Definition of Done 逐条勾销
|
|
175
|
+
|
|
176
|
+
| # | 条目 | 状态 | 依据 |
|
|
177
|
+
|---|---|---|---|
|
|
178
|
+
| ① | 静态门禁与全仓回归 | ✅ | §1 三道门禁退出码全 0;§2 全仓 8361 例 / 5 红**全部定性**:2 红为本刀真实漂移**已修**(§3.1、§3.2),3 红为环境性 / 既有 flaky **并有基线对照或隔离复跑证据**(§3.3–§3.5) |
|
|
179
|
+
| ② | 三条链路真实带信封记录 | ✅ | §4.2:human_chat 6 + a2a_message 1 + task_status_update 1,信封覆盖 `7/7` |
|
|
180
|
+
| ③ | `dropped` 增量 0 且 `catch_all` 可查 | ✅ | §4.3:`dropped = 0`;`catch_all = 1` 且带 `drop_reason`,可查(来源与口径瑕疵见 §4.4,作为观察项上报,不影响「无静默丢弃」成立) |
|
|
181
|
+
| ④ | `work_unit_ref` 列存在且写入数 0 | ✅ | 列在(`sqlite-storage.ts` 迁移只加列、不写值,注释写明 C7 才有唯一写者);真实实例读数 `work_unit_ref 非 NULL = 0` |
|
|
182
|
+
| ⑤ | 五张卡各一次提交 + 本卡文档同步 | ✅ | 见 §7;本卡(C4)一次提交含两处修复 + 本报告 + 执行文档 §7.9 指针 |
|
|
183
|
+
|
|
184
|
+
---
|
|
185
|
+
|
|
186
|
+
## 7. 每卡回滚方式(各一次提交,可单独 `git revert`)
|
|
187
|
+
|
|
188
|
+
| 卡 | 提交 | 回滚 |
|
|
189
|
+
|---|---|---|
|
|
190
|
+
| **C0** | **无提交**(仅证据与文档) | 无需回滚;C0 的证据与文档收口落在后续卡的文档提交里 |
|
|
191
|
+
| **C1** | `ea65e620` `feat(mail): cut6 C1 address bindings — columns, global unique index, view, tool surface, write-side guards` | `git revert ea65e620` |
|
|
192
|
+
| **C2** | `e94caa54` `feat(mail): cut6 C2 delivery envelope — mailbox columns, single envelope assembly, three delivery points` | `git revert e94caa54` |
|
|
193
|
+
| **C3** | `65ac4cc0`(含三轮返工:`43d35f84` 主体 → `882911c4` 读归一 → `b430c797` 文档 → `65ac4cc0` 第 5 轮收敛 14 处旁路) | `git revert 65ac4cc0` |
|
|
194
|
+
| **C4** | `bb2c101f` `test(mail): cut6 C4 — full regression, real-instance probes, rebuild and doc close-out`(两处回归修复 + 本报告 + §7.9 指针) | `git revert bb2c101f` |
|
|
195
|
+
|
|
196
|
+
回滚粒度说明:每卡是**一个可独立回滚的提交**(C3 的返工在本卡之前已各自提交,如需整体回到 C3 之前,从 `65ac4cc0` 逐轮回退即可)。**未 merge、未 rebase**。
|
|
197
|
+
|
|
198
|
+
---
|
|
199
|
+
|
|
200
|
+
## 8. 已知边界(不做的,明确写清)
|
|
201
|
+
|
|
202
|
+
- 未接 **DNS / MX / SPF / DKIM / DMARC**:本刀只做站内地址与投递语义,不做真实邮件域验证。
|
|
203
|
+
- **不发信、不收信**:没有 SMTP 客户端/服务端。
|
|
204
|
+
- 未接**外部来源适配器**(留给 **C10**):`dsn_bounce` 在原因闭集里只预留、拒绝写入。
|
|
205
|
+
- **不写 `work_unit_ref` 的值**(留给 **C7**):列已建、值为空,避免「先建引用后建实体」。
|
|
206
|
+
- **未 merge main**、**未发版 / 未打 tag**:等 Owner 明确批准。
|
|
207
|
+
- 横幅归属 `16a28403` 的 **DOM 级复验仍未取证**(§5.1 写明了卡在哪、下一轮怎么补)。**未取证就是未验证,不得当作已验。**
|
|
208
|
+
- §4.4 的「退信原因与事件名对不上真实原因」已由 **C5 收口卡修复**(原因 `payload_invalid` + 事件 `mailbox.signal_bounced`),明细见执行文档 §7.10。
|
|
209
|
+
|
|
210
|
+
---
|
|
211
|
+
|
|
212
|
+
## 附:本卡改动的文件(4 个,均在提交内)
|
|
213
|
+
|
|
214
|
+
| 文件 | 改动 |
|
|
215
|
+
|---|---|
|
|
216
|
+
| `packages/web-ui/src/lib/toolCategories.ts` | `mailbox` 分组补入 C1/C3 新增的 5 个工具名(附中文注释) |
|
|
217
|
+
| `packages/org-manager/test/api-server.test.ts` | recover-stale 断言 `dropped` → `bounced`(附改名理由注释) |
|
|
218
|
+
| `docs/records/cut6-c4-verification-2026-11-12.md` | 本报告 |
|
|
219
|
+
| `docs/records/cut6-mailbox-address-envelope-design-2026-11-12.md` | 末尾追加 §7.9(指针,不复制事实) |
|
|
220
|
+
|
|
221
|
+
---
|
|
222
|
+
|
|
223
|
+
## 9. 2026-11-13 追加:真实实例受控退信探针(发现并修复 C5 漏洞)
|
|
224
|
+
|
|
225
|
+
Owner 批准在**本机 live 实例**(`:8056` API / `:8057` web,`~/.markus/data.db` 12.7GB)上做一次受控退信,验证升级后退信链路。做法:走真实入口 `POST /api/message`,报文故意用错字段名(`message` 而非契约要求的 `text`),使其在读回合时被拒。
|
|
226
|
+
|
|
227
|
+
### 9.1 结果:抓到一个真缺陷
|
|
228
|
+
|
|
229
|
+
| 项 | 读数 |
|
|
230
|
+
|---|---|
|
|
231
|
+
| 落库行 | `mbx_176351d1b1e9411b7f3018a8`(Secretary 信箱) |
|
|
232
|
+
| 终态 | `catch_all`,`bounce_target=catchall:agt_5f7658fa…`,信封齐全 |
|
|
233
|
+
| `drop_reason` | **`stale_signal`** ← **错**,真实原因是「报文读不成回合」 |
|
|
234
|
+
|
|
235
|
+
运行时日志(`~/.markus/logs/runtime-2026-11-13.log`)给出完整因果链:
|
|
236
|
+
|
|
237
|
+
```
|
|
238
|
+
12:53:24.386 [attention] Error processing mailbox item
|
|
239
|
+
error: "TypeError: Cannot read properties of undefined (reading 'trim')"
|
|
240
|
+
12:53:24.386 [attention] Abnormal completion for user interaction — marking dropped without retry
|
|
241
|
+
12:53:24.387 [mailbox] signal_bounced dropReason=stale_signal reason=unspecified
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
**根因**(不是"少写一个 instanceof",而是判据错了):C5 的投影是
|
|
245
|
+
`bounceReasonOfError(err) = err instanceof SignalPayloadInvalidError`。这条路径上先抛的是
|
|
246
|
+
处理过程自己撞到的普通 `TypeError`,**在**校验层之前 → 投影返回 `undefined` →
|
|
247
|
+
`drop()` 取默认 `stale_signal`。也就是说"记成什么原因"取决于**哪一行先抛错**,那是巧合。
|
|
248
|
+
|
|
249
|
+
### 9.2 修复(一次到位,判据改为事实)
|
|
250
|
+
|
|
251
|
+
- `mailbox-summary.ts` 新增 `isPayloadUnreadable(item)` —— **唯一判据**,`turnContentOf()` 校验与失败族分类共用同一个谓词;
|
|
252
|
+
- 新增 `bounceReasonOfFailure(err, item)`:有异常且报文读不成回合 → `payload_invalid`;报文**可读**时的未知异常**不投影**(不让 `payload_invalid` 变成下一个万能桶);无异常 → 不产出失败族原因(决策型终态仍 `stale_signal`);
|
|
253
|
+
- `attention.ts` 失败族改用 `bounceReasonOfFailure(processingError, item)`。
|
|
254
|
+
|
|
255
|
+
### 9.3 验证(单测 + 真实实例双证)
|
|
256
|
+
|
|
257
|
+
- 行为测试先红后绿:`packages/core/test/mailbox-bounce-reason-projection.test.ts` 新增 4 例(含"普通 TypeError + 缺 content → payload_invalid"端到端例),修复前 4 failed → 修复后 8/8 passed。
|
|
258
|
+
- **隔离实例真实探针**(`HOME=/tmp/cut6probe/home`,端口 8073,同一份构建产物):同一条缺 `text` 的报文 → 落库 `human_chat | catch_all | drop_reason=payload_invalid | bounce_target=catchall:…`,信封齐全 —— 原因不再撒谎。探针实例已关(8073 无监听)。
|
|
259
|
+
- live 实例上的那条错记录按"历史只读"保留,不回填(符合硬边界)。
|
|
260
|
+
|
|
261
|
+
### 9.4 本实例已核实但**未被本探针触发**的部分
|
|
262
|
+
|
|
263
|
+
- 迁移结构:`mailbox_items` 七个新列、`channel_bindings.address/revoked_at`、视图 `address_bindings`、两个唯一索引均在位;`work_unit_ref` 写入数 **0**(C7 才有写者);历史 `dropped` 28,633 行**原样未动**。
|
|
264
|
+
- 信封写入按构建时刻分界生效(20:44 重建 → 之后的行带信封,之前不带)。
|
|
265
|
+
- UI 筛选片与真实库计数逐项一致(completed 8580 / 投递失败 449 / merged 39 / processing 1),`已丢弃` 死片已消失,`退信概览` 入口存在;工具面五个新工具(`bind_address` / `address_list` / `address_revoke` / `message_route` / `catch_all`)均在。
|
|
266
|
+
- 地址绑定仍只有 1 行历史空地址:`bind_address` 在本实例上**尚未被真实使用**。
|
|
267
|
+
|
|
268
|
+
**未改动任何生产逻辑代码**:两处代码改动分别是「分类表常量补登记」与「测试断言跟随字段改名」,都不改变运行时行为。
|