Skip to content

feat(控制台): Console v2 P2 家族频道与人类模块 - #47

Merged
Dandre126 merged 6 commits into
mainfrom
cursor/console-v2-p2-eeed
Aug 20, 2026
Merged

feat(控制台): Console v2 P2 家族频道与人类模块#47
Dandre126 merged 6 commits into
mainfrom
cursor/console-v2-p2-eeed

Conversation

@Dandre126

@Dandre126 Dandre126 commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Summary

Console v2 P2 on top of P1 (6a19554 / #45). Overlay family channel + human module. Version stays 0.7.7. P3 artifact bytes are not implemented. This PR is left open for review and should not be merged by the agent.

Store

  • .dyro/families/<parent>/channel.jsonl and acks.json
  • Same overlay lock as .dyro/events.jsonl
  • Each channel write also appends a signal event with facts.channel_id
  • One side only is fail-closed (CHANNEL_LOG_INCONSISTENT); no fake broadcast
  • Pairing asserts after write stay inside overlay_lock
  • Pairing is family-scoped: _signal_channel_ids only counts signal rows whose family matches the channel parent. msg_N is per-family, not a workspace-global key.

Visibility

  • F(P) = {P} ∪ direct children ∪ {operator}
  • Broadcast (to empty) is visible to the whole family
  • Directed --to must be in F(P) (FAMILY_TO_INVALID otherwise)
  • Directed posts are visible to sender, receiver, parent, and operator
  • Cousins do not see others’ DMs
  • Grandchild posts live in the child’s family, not the grandparent’s
  • Inferred --to operator uses the same default family as a broadcast (parent or sender). operator membership is not a reason to pick F(sender).

CLI (dyro line only)

  • line post LINE --kind KIND [--to] [--body] [--family]
  • line inbox [--family P] [--unacked]
  • line ack ID [--family P]
  • Bare line ack msg_N fail-closes with CHANNEL_MESSAGE_AMBIGUOUS when that id exists in more than one family
  • --dry-run and --format json on all three
  • Real writes require --yes (overlay confirm, not Git worktree)
  • Human identity is reserved id operator; operator may only post decision or contract
  • line post --format json uses envelope kind=line_post and channel_kind for the signal kind
  • /dyro-line-family does not gain post/inbox/ack

next / control plane

  • JSON adds read-only family_unacked (count, highest-priority kind, family, one safe summary)
  • Unread is not repair_required and does not block spawn
  • next.commands never contains line post or line ack --yes
  • Control plane may read line inbox --unacked --format json only

Console

  • Channel pane: full history (paginated), list / timeline / filter, from always operator
  • Browser POST only decision | contract | ack on POST /api/v1/workspaces/{alias}/families/{parent}/channel
  • HTTP kind=ack is bound to URL {parent} and refuses a row that is not in that family
  • Other kinds → 403 FAMILY_POST_FORBIDDEN
  • Non-channel workspace POST still 405
  • Artifact rows still show “产物尚未开放” + safe id
  • No merge / push / --yes / task-status from the page
  • meta surfaces adds families
  • Overview 5s poll does not pull channel lists
  • Channel POST writes in the listener; inspection worker stays read-only

How to try

dyro --workspace W line post core --kind ask_sync --body "请同步" --yes
dyro --workspace W line post core_pay --kind blocked --to core --body "只要父线看见" --yes
dyro --workspace W line inbox --family core --unacked --format json
dyro --workspace W line ack msg_1 --family core --yes
dyro --workspace W next --format json
dyro --workspace W console

In the channel pane, post a decision as operator and confirm a signal event appears.

Spec deviations

  • Optional --family on line post so an operator broadcast can name F(P) when --to is omitted
  • Optional --family on line ack when the same msg_N exists in more than one family
  • Retract copy on the page is dry-run line post <line> --kind retract (original sender, or the family parent). Operator cannot post retract (only decision / contract)
  • JSON envelope keeps kind=line_post; the channel kind is channel_kind

Review follow-up

  • infer_post_family no longer treats operator as a member-of-sender reason
  • Channel pairing assert after write is inside the overlay lock
  • msg_N pairing/ack/HTTP are family-scoped; colliding msg_1 in F(core) and F(core_pay) is pinned
  • Unpaired F(core_shop) msg_1 is CHANNEL_LOG_INCONSISTENT even when F(core) already has a paired msg_1
  • P2 notes from the adversarial review are left unless they were one line in a file already being edited
  • Still do not merge

Testing

Local: tests.test_families and tests.test_cli.FamilyChannelCliTests plus ruff. Ignore Vercel.

Open in Web Open in Cursor 

Add overlay family channel.jsonl/acks with a paired signal event, line
post/inbox/ack, next family_unacked, and the Console channel pane POST
for operator decision/contract/ack. Keep P1 honesty and leave P3 closed.

Co-authored-by: Dandre Yang <Dandre126@users.noreply.github.com>
@vercel

vercel Bot commented Aug 20, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
dyro Error Error Aug 20, 2026 6:14pm
dyro-engineering-flow Error Error Aug 20, 2026 6:14pm

line post JSON now reports channel_kind so it does not collide with the
control-plane envelope kind. Workspace POST still returns 405 unless the
path is the family channel.

Co-authored-by: Dandre Yang <Dandre126@users.noreply.github.com>
Stop treating reserved operator membership as a reason to pick F(sender).
Keep channel pairing asserts inside the overlay lock.

Co-authored-by: Dandre Yang <Dandre126@users.noreply.github.com>
Channel ids restart per family file, so msg_1 is not a cross-family key.

Co-authored-by: Dandre Yang <Dandre126@users.noreply.github.com>
Pairing counts signal.family, HTTP ack binds URL parent, and CLI
line ack fail-closes when the same msg_N exists in more than one family.

Co-authored-by: Dandre Yang <Dandre126@users.noreply.github.com>
@Dandre126
Dandre126 marked this pull request as ready for review August 20, 2026 18:15
@Dandre126
Dandre126 merged commit 09cdc4f into main Aug 20, 2026
9 of 11 checks passed
@Dandre126
Dandre126 deleted the cursor/console-v2-p2-eeed branch August 20, 2026 18:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants