| M1-60/0 |
2026-10-15 |
Base int/m1-wave19 at b380a4e, branch feat/M1-60-messaging-mentions-templates in its own worktree; the branch is not merged locally, the integration lane ports it. The migration takes the next free number of the base, 00036. The brief, spec and contract were read from origin/main; the base holds every rule the ticket needs (03 message_templates, 05 mention.list, template.read, template.manage, 06 K15), so no contract commit was brought in. make check runs with SONAR_SKIP=1 as the launcher sets it, not against a local SonarQube. The ports take the caller from the context as the brief writes; messaging.Mentions and messaging.Templates both have a ListMine, so the use cases expose them as Service.Mentions() and Service.Templates() over the same service. |
Instructions of the launcher, which override the brief's merge and SonarQube steps; one Go type cannot have two methods of one name. |
| M1-60/1 |
2026-10-15 |
listMyMentions, listMyTemplates and createPersonalTemplate by an agent are 403 forbidden with reason: subject_kind_not_allowed, decided by messaging after authorize allowed the action; apps get the same answer from authorize (the actions are not in the app scope table). |
The requirement self holds for an agent naming itself as the resource user, but own mentions and personal templates belong to people (users, the foreign key of message_templates.owner_user_id); precedent M1-31/6. The rule table of authz is outside this ticket. |
| M1-60/2 |
2026-10-15 |
threads.unread_floor_seq is not used for unread mentions: CountUnread counts above LastReadSeq (0 for a thread not in the map). |
Imports write no mentions (22 section 6.4), so the floor never hides a mention; brief note 6. |
| M1-60/3 |
2026-10-15 |
The test case "a DM participant creating a channel template gets 403" is not built: the base has no dm membership (DMChannelsOf of the structure source knows no dm channel until V3-01), so a dm channel is invisible and gives 404. The 403 path of a reader without manage is the same rule and is tested. |
The world of the base cannot express a dm participant; the decision comes from the one requirement self or manage. |
| M1-60/4 |
2026-10-15 |
Templates append no durable event; clients reload them by REST. |
05 section 6 has no template event type; brief note 12. |
| M1-60/5 |
2026-10-15 |
The visible channels of the template load are Authorizer.Scope(channel.read); listTemplates passes the channel it has just authorized with template.read as the visible set. The count bound takes pg_advisory_xact_lock on the first eight bytes of SHA-256 over a domain label and personal:<id> or channel:<id>. A template content with U+0000 is 400 on /content_md with code invalid, as M1-56/5 does for messages. The two keys stay in 03 section 9, where 03 defines them; configdoc allows one chapter per key, so the acceptance line "in chapter 06" is read as the configuration reference. |
06 "Pagination" item 6 and brief note 9; a shared lock key of two scopes only serializes; PostgreSQL text cannot hold U+0000. |
| M1-60/6 |
2026-10-16 |
Port onto main: code and tests are taken byte for byte from the integration squash, apart from the points named here; of the integration fixes of wave 21 only the union of INT-W21/1 concerns this ticket (section "Integration int/m1-wave21"). The integration base also holds M2-24 (apps), M2-39 and M2-40 (terminal) and M6-10, which are not on main, so nothing of them is ported: the host and app route rows stay out of api/routes/real_test.go, the terminal.* keys stay out of the expected output of cmd/bothy/config_test.go, the host and terminal tables stay out of migrations/privileges_test.go, and the sqlc models of apps and terminal are not added. The migration is renumbered to follow 00033_threads_parent_fk_validate.sql without a gap: 00036_message_templates.sql becomes 00034_message_templates.sql, with the number in the changelog and the module README, which also names the main numbers 00032 and 00033 of the M1-56 migrations. The header of the migration, queries/templates.sql, the package comment of the messaging repository and the new keys of wire/config_test.go name the English chapter file 03-data-model.md and 03 principle 12, so the checksum of the migration differs from the integration file and is recorded anew. The multi-byte cases of TestTemplateValidation use the Greek letter alpha instead of a German umlaut, because the language gate (D-W-94) rejects umlauts in tracked files; it is still one code point of two bytes. The changelog entry, the module README (status line, code list and the new section on mentions and templates), the two key rows of docs/operations/configuration.md (now int and active) and these rulings are written into the English text at the same places, the README naming the agent answer 403 forbidden (reason subject_kind_not_allowed) as the problem code check requires; the rule template. of tools/configdoc/planned.yaml goes, and the seven operations of the ticket are sorted into the enabled list of api/operations.yaml with their later entries removed. Generated files are regenerated with the generators of the ported tree, not merged. |
main is English and holds M1-56 but not M2-24, M2-39, M2-40 or M6-10; the migration numbers of main must follow without a gap. |