Commit 19dd154
authored
feat(dna): Group DNA per-group coordination DHT with Sweettest suite (#107)
* feat(dna/group): Group DNA integrity and coordinator zomes
Introduces the Group DNA as the per-group coordination layer of the
Lobby → Group → NDO hierarchy. Each group runs in its own cloned cell
(separate DHT, same DNA template) provisioned via clone_cell.
Entry types (integrity zome):
- GroupProfile — name, description; identity from action header
- GroupMembership — group_hash, optional role; member from action header
- WorkLog — group_hash, description, hours (> 0); author from action header
- SoftLink — group_hash, target_ndo_hash, description; planning-only (ADR-GROUP-04)
Coordinator externs (16):
- create_group, get_group, get_my_group, update_group (NotAuthor guard)
- join_group (AlreadyMember guard), leave_group, get_group_members, is_member
- log_work, get_work_logs, get_my_work_logs, delete_work_log (NotAuthor guard)
- create_soft_link, get_soft_links, delete_soft_link (NotAuthor guard), init
happ.yaml: group role added with deferred: true and clone_limit: 64
Shared crate: GroupError domain error enum added
* feat(dna/lobby): replace NdoAnnouncement with GroupAnnouncement
The Lobby DHT is now the registry for group cells, not NDOs directly.
NDOs are discovered through group cells (Lobby → Groups → NDOs).
- NdoAnnouncement entry type and announce_ndo, get_all_ndo_announcements,
get_ndo_announcement, update_ndo_announcement replaced by GroupAnnouncement
and announce_group, get_all_group_announcements, get_group_announcement_by_dna_hash
- get_my_groups now returns real GroupDescriptorStub from DHT instead of
stub solo workspace
- AnnounceGroupInput replaces AnnounceNdoInput and UpdateNdoAnnouncementInput
in shared crate
* test(group): Sweettest suite — 13 tests for Group DNA and Lobby update
Group DNA Sweettest (dnas/group/tests/):
- create_group_returns_profile, get_group_by_hash
- join_group_creates_membership, leave_group_removes_membership
- is_member_reflects_membership_state, duplicate_join_returns_already_member_error
- log_work_and_get_work_logs, get_my_work_logs_returns_own_logs
- create_soft_link_and_get_soft_links, get_my_group_returns_created_group
- update_group_changes_name
- empty_group_name_rejected, work_log_zero_hours_rejected
Thread limit: 13 tests × 2 conductors; --test-threads 6 required.
Lobby Sweettest updated for GroupAnnouncement API (announce_group,
get_my_group_announcements, get_group_announcement_by_dna_hash).
* feat(ui): TypeScript service layer for Group DNA
GroupService stub replaced with real callZome implementation. Interface
takes groupCellId: CellId (DnaHash + AgentPubKey) — CellId is the correct
addressing for cloned group cells (ADR-GROUP-03).
- group.types.ts: GroupProfile, GroupMembership, WorkLog, SoftLink types
and input types; GroupGovernanceRule removed
- group.service.ts: getMembers, getWorkLogs, getSoftLinks implemented via
callGroupZome helper; GroupServiceLive built as Effect-TS Layer
- cell.manager.ts: getGroupCellHandle added to resolve DnaHash to group CellId
- lobby.service.ts: GroupAnnouncement API wired; get_my_groups updated
- lobby.types.ts: NdoAnnouncement → GroupAnnouncement; shared-types updated
* docs(group): API reference, architecture overview, test commands
- group_zome.md: full API reference for Group DNA (entry types, link types,
16 coordinator functions including delete_work_log and delete_soft_link,
validation rules, error types, ADRs, test commands)
- architecture_overview.md: updated to multi-DNA hApp structure with
Nondominium DNA / Lobby DNA / Group DNA sections
- lobby_zome.md: updated for GroupAnnouncement API
- API_REFERENCE.md, IMPLEMENTATION_STATUS.md, TEST_COMMANDS.md,
DOCUMENTATION_INDEX.md updated for Group DNA1 parent 1b4dfc9 commit 19dd154
42 files changed
Lines changed: 2252 additions & 463 deletions
File tree
- dnas
- group
- tests
- src
- common
- group
- workdir
- zomes
- coordinator/zome_group
- src
- integrity/zome_group_integrity
- src
- lobby
- tests/src/lobby
- zomes
- coordinator/zome_lobby_coordinator/src
- integrity/zome_lobby_integrity/src
- nondominium/zomes/coordinator/zome_gouvernance/src
- documentation
- zomes
- ui/src/lib
- errors
- services
- zomes
- workdir
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
| 18 | + | |
17 | 19 | | |
18 | 20 | | |
| 21 | + | |
19 | 22 | | |
20 | 23 | | |
21 | 24 | | |
| |||
32 | 35 | | |
33 | 36 | | |
34 | 37 | | |
| 38 | + | |
| 39 | + | |
35 | 40 | | |
36 | 41 | | |
37 | 42 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
165 | 165 | | |
166 | 166 | | |
167 | 167 | | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | 1 | | |
3 | 2 | | |
4 | 3 | | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | 4 | | |
19 | 5 | | |
20 | 6 | | |
| |||
23 | 9 | | |
24 | 10 | | |
25 | 11 | | |
26 | | - | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
27 | 16 | | |
28 | | - | |
29 | | - | |
30 | | - | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
31 | 22 | | |
32 | 23 | | |
33 | | - | |
34 | | - | |
| 24 | + | |
35 | 25 | | |
36 | 26 | | |
37 | 27 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
| 17 | + | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| |||
139 | 139 | | |
140 | 140 | | |
141 | 141 | | |
| 142 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
0 commit comments