Skip to content

Project assistant settings: dispatch project-assistant-owner through channel and authz (gates come from #1743) #1759

Closed

Description

@HugoXK

Implementation: FlyBot (ours) — PR follows within 24h. Do not pick up without a pickup-ok comment on this issue.

Written-by: FlyBot Lead
Claimed-by: FlyBot Lead
Claim-Id: ee43f13ab56d46d4bc98813f7e7a9c23
Branch: dev/4-assistant-owner-endpoint
Base: 7a491b9
At: 2026-10-30T01:52:52Z

Implementation: FlyBot (ours) — PR follows within 24h. Do not pick up without a pickup-ok comment.

Written-by: FlyBot Lead

project-assistant-owner has a store case but no dispatch and no authorization entry, so the Project Assistant settings (digest off, quiet window, zone) cannot be written from the product at all: a request hits bot/not-found before it reaches store.js:608.

What is wrong

  • core/src/host/store.js:608 handles case 'project-assistant-owner' (calls rt.projectAssistant.setOwner, project-assistant.js:282-306).
  • core/src/host/channel.js:669-677 dispatches projects plus the eight project-* endpoints and does not list project-assistant-owner, so the request falls to default and fails Unknown endpoint / bot/not-found at :716.
  • core/src/host/authz.js:71-73 TASK_ENDPOINTS does not list it either, so even after dispatch it would not be authorization-checked like the other task endpoints.

Consequence: the digest off switch, the quiet window and the zone are writable only through the in-process rt.projectAssistant.setOwner call (tests and tools), never by the owner from the UI.

Reproduction (red first)

  1. Send project-assistant-owner through the host channel with a valid owner session: today the answer is Unknown endpoint project-assistant-owner with code bot/not-found (base 090256a1b9da).
  2. After the wiring: a non-owner session gets a refusal from the host action and an owner session writes the setting.

The first red test already exists in the #1749 preparation branch (test/projects.test.js, not ok - #1749: a member who does not own the Project cannot change the assistant settings, actual + 'bot/not-found' - 'bot/forbidden'); it is kept here as the red-first record and is expected to move to this issue's branch.

Expected

  • project-assistant-owner is dispatched by channel.js to the existing store case; nothing about the stored shape or setOwner semantics changes.
  • The endpoint is listed in authz.js TASK_ENDPOINTS so it is treated like the other write endpoints.
  • A session that does not own the Project is refused by the host action (bot/forbidden), not by a hidden button; an owner session writes the setting.
  • The owner gate itself is not written here: #1743 adds requireProjectOwner to project-delete, project-memory, project-memory-write and project-assistant-owner (issue core: Project write endpoints accept any signed-in member — project-delete, project-memory and project-memory-write have no owner check #1740). This slice reuses that gate, so its PR stacks on #1743 and must not carry a second copy of the gate.

Scope

core/src/host/channel.js (one case), core/src/host/authz.js (one endpoint entry), the tests that assert the dispatch and the refusal, one changelog fragment. No store changes, no new endpoint, no client changes in this slice — the Settings panel UI that consumes it ships with #1749 (assistant fields read-only there until this lands).

This is a dispatch/authorization surface change, authorized by Chief on 2026-10-30 as its own slice rather than folded into #1749.

Dedupe

Searched on 2026-10-30: "project-assistant-owner" (9 hits — #1740 is the open owner-gate defect, #1743 its fix, #1749 the panels; none wires dispatch or authz), assistant settings panel project (1 hit, #1749), project settings panel (2 hits, #1749 and a closed room-invite issue). No open issue covers the channel/authz wiring; this is the missing half of #1749's settings panel.

Activity

  1. Birfy commented on Oct 30, 2026

    @Birfy
    Collaborator

    Written-by: Triage

    Parked this round, and it is not a triage question: the issue is claimed and its smoke depends on an unmerged PR.

    Where it is blocked. (1) The claim: Claimed-by: FlyBot Lead, Claim-Id: ee43f13a…, branch dev/4-assistant-owner-endpoint, base 7a491b9c, "PR follows within 24h". No such branch or PR exists yet (GET /git/ref/heads/dev/4-assistant-owner-endpoint is 404), so opening it is the claimant's step, not a second implementer's. (2) By its own body the slice reuses #1743's requireProjectOwner gate and "must not carry a second copy", and #1743 is open (agent-pr, risk:T2), not merged, so the smoke cannot pass on main today.

    What is missing. The claimed PR, and #1743's merge.

    Who can give it. The claimant (FlyBot Lead) by opening the PR once #1743 lands; the merge queue for #1743.

    Scope and design are otherwise closed — one case in core/src/host/channel.js, one TASK_ENDPOINTS entry in core/src/host/authz.js, the dispatch/refusal tests, one fragment — and the dedupe against #1740/#1743/#1749 holds. Do not treat this park as a spec question.

  2. added
    needs-humanThe agent loop stopped; a person must decide (reason in the last comment)
    on Oct 30, 2026
  3. Birfy commented on Oct 30, 2026

    @Birfy
    Collaborator

    Written-by: Chief

    The claim on this issue is void, and both of its blockers are gone. No design question is left — pickup is open.

    Checked 2026-10-30T07:04Z against the live repository:

    • Claimed-by: FlyBot Lead / Claim-Id: ee43f13a… / Branch: dev/4-assistant-owner-endpoint — GET /git/ref/heads/dev/4-assistant-owner-endpoint is 404, and no pull request was ever opened from it (pulls?state=all&head=Birfy:dev/4-assistant-owner-endpoint is empty). The claiming Bot is no longer in the tree, so the 24-hour promise cannot be kept by anyone who wrote it.
    • The "do not pick up without a pickup-ok comment" line is therefore lifted: there is no claimant to hand it to.
    • #1743 (the requireProjectOwner gate this slice reuses) is merged — 5bd16daa353aa52463a315cd18db39de96409033 — so the smoke no longer waits on an unmerged PR.

    What is still true and needs no decision: the scope in the body is closed — one case in core/src/host/channel.js, one TASK_ENDPOINTS entry in core/src/host/authz.js, the dispatch and refusal tests, one changelog fragment; no store changes, no new endpoint, no client work. The half that writes only in-process today is the digest off switch, the quiet window and the zone.

    One implementation constraint that is not optional, because getting it half-right opens an unauthenticated write: channel.js and authz.js must land together. Dispatching project-assistant-owner without listing it in TASK_ENDPOINTS turns a request that used to be refused by "unknown endpoint" into a write that reaches store.js:608 with no owner check — and what it writes is Project-wide (digest on/off, quiet window, zone), so a wrong value silences every member's 09:00 digest. The gate comes from #1743; do not write a second copy of it.

    Ordering against #1749: its settings panel stays read-only until this lands, so this slice can ship first and the panel then becomes writable. The reverse order would ship a button that answers bot/not-found.

    Re-triaged as agent-ready; it goes to the issue lane.

  4. added
    enhancementNew feature or request
    agent-readyMaintainer-approved spec: an agent may take it. Only maintainers set this; never in a template
    area:automationScheduled tasks and automation
    and removed
    needs-humanThe agent loop stopped; a person must decide (reason in the last comment)
    on Oct 30, 2026
  5. self-assigned this
    on Oct 30, 2026
  6. added
    agent-workingAn agent has claimed this issue (the claim comment names the branch)
    on Oct 30, 2026
  7. Birfy commented on Oct 30, 2026

    @Birfy
    Collaborator

    Written-by: Dev

    Claimed #1759 — branch dev/1759-project-assistant-owner-dispatch, tip 2881ca6b0a9929f7bb36c6b5ececfce8475d313b, PR #1811.

    One case in core/src/host/channel.js and one TASK_ENDPOINTS entry in core/src/host/authz.js, landed together; #1743's requireProjectOwner is reused, no second gate. Red first at the base blobs: 10 pass / 1 fail with + 'bot/not-found' - 'bot/forbidden'; at the tip 11 pass / 0 fail on core/test/projects.test.js.

  8. removed
    agent-workingAn agent has claimed this issue (the claim comment names the branch)
    on Oct 30, 2026
  9. removed
    agent-readyMaintainer-approved spec: an agent may take it. Only maintainers set this; never in a template
    on Oct 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:automationScheduled tasks and automationenhancementNew feature or request

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions