feat(tasks): add owner-private Nostr task events - #5757
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d5eebf5440
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review Please re-review commit |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: fa1a8fc8d4
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
1 similar comment
|
@codex review |
3945203 to
6236f92
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6236f9275f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 150f8d9f69
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review Please re-review commit
PR 2 remains out of scope. |
|
Codex Review: Didn't find any major issues. Keep it up! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Co-authored-by: Admin Furnit <admin@furnit.ai> Signed-off-by: Admin Furnit <admin@furnit.ai>
Co-authored-by: Admin Furnit <admin@furnit.ai> Signed-off-by: Admin Furnit <admin@furnit.ai>
Co-authored-by: Admin Furnit <admin@furnit.ai> Signed-off-by: Admin Furnit <admin@furnit.ai>
Co-authored-by: Admin Furnit <admin@furnit.ai> Signed-off-by: Admin Furnit <admin@furnit.ai>
A second kind-44300 event for an existing task identity always competes at sourceVersion 1. The projection previously returned Stale and committed the differing signed event into the public stream, leaving clients with two equal-version requests they cannot deterministically fold. Only a payload identical to the stored v1 projection row remains Stale; any other equal-version request now fails and rolls back the event insert, matching the equal-version conflict rule update and resolve transitions already enforce. Co-authored-by: Admin Furnit <admin@furnit.ai> Signed-off-by: Admin Furnit <admin@furnit.ai>
Buzz Tasks previously shipped relay-side handling for kinds 44300-44302 with no agent-facing client, violating the agent-first rule in AGENTS.md (new agent-facing features get a buzz-cli subcommand first). buzz-sdk gains TaskRef plus build_task_requested/updated/resolved builders that serialize the buzz-core contract payloads and attach the signed identity tags; a round-trip test locks the builders to TaskEventV1::parse. buzz-cli gains the tasks group: request, update, resolve, and list. Writes sign, re-validate through the exact task contract, and submit; the owner p tag defaults from the NIP-OA auth tag. Task reads are owner-gated on the relay, so update and resolve take the original request's identity explicitly and list is the owner-side view over the #p filter. Co-authored-by: Admin Furnit <admin@furnit.ai> Signed-off-by: Admin Furnit <admin@furnit.ai>
30caaa9 to
7b8325f
Compare
Summary
/queryand NIP-42 Nostr surfaces; thebuzz_taskstable is internal derived state only(created_at DESC, id ASC)bridge keyset cursor and cover create/update/resolve mutations between pagescommunity_id,channel_id, and source Nostr event identity; constructbuzz://message?channel=<uuid>&id=<event-id>after authorizationbuzz-sdktask builders and thebuzz tasksCLI group (request/update/resolve/list)Review findings resolved
GET /api/buzz-tasksroutes and DTO/list implementation. Clients use signed Nostr filters through/query; no new permanent HTTP task contract remains.(created_at, id)order.buzz-clicommand surface.buzz-sdkgainsTaskRef+build_task_requested/updated/resolved(round-trip locked toTaskEventV1::parse), andbuzz tasks request|update|resolve|listsigns, re-validates through the exact task contract, and submits. The ownerptag defaults from the NIP-OA auth tag. Because task reads are owner-gated,update/resolvetake the original request's signed identity explicitly andlistis the owner-side#pview.Stale. Only a payload identical to the stored v1 projection remainsStale, mirroring the equal-version conflict rule inrequire_open_newer.Migration gate
Migration 0031 creates only the empty
buzz_tasksprojection and its constraints/index/write fence in one SQLx transaction with a 5-secondlock_timeout. It does not alterevents.search_tsv, rewriteevents, or rebuild the GIN index. Lock behavior, interruption recovery, rollback, production-volume implications, and the separate staged FTS hardening plan are documented indocs/buzz-tasks-migration-plan.md.Verification
./bin/just ci./bin/just testcargo test -p buzz-core --test task_contract— 6 passedcargo test -p buzz-db --test task_projection -- --include-ignored --test-threads=1— 8 passed against PostgreSQL (includes the new conflicting-duplicate rollback test)cargo test -p buzz-sdk— 258 passed (includes the task builder contract round-trip)cargo test -p buzz-cli— 344 passed (includes the tasks command registry and parser tests)-D warnings— passedScope boundary
PR 1 adds no task UI, reply/approval/choice/resolve API, preferences, EventKit/Reminders integration, or HTTPS/universal-link support. The HTTPS/universal-link security review remains a separate delivery before PR 2. Do not merge until the renewed review is complete.