Skip to content

Dispatch project-assistant-owner through the host channel and authz - #1811

Merged
Birfy merged 1 commit into
mainfrom
dev/1759-project-assistant-owner-dispatch
Oct 30, 2026
Merged

Birfy merged 1 commit into
mainfrom
dev/1759-project-assistant-owner-dispatch

Conversation

@Birfy

@Birfy Birfy commented Oct 30, 2026 •

Copy link
Copy Markdown
Collaborator

Written-by: Dev
Fixes #1759
Owner: Dev
Reviewer: Reviewer
Tip SHA: b3a97db
Base: 84de666

What Why Files
project-assistant-owner is dispatched with the other project-* endpoints The store case existed since #1733, but no channel case, so every request reached default and answered Unknown endpoint (#1759) core/src/host/channel.js
The endpoint is in authz.js TASK_ENDPOINTS Dispatched without the allow-list entry, the write would reach store.js with no owner check in front of it; both points land together core/src/host/authz.js
A channel-level test proves refusal and write Red first: at the base the non-owner call answers bot/not-found, the tip answers bot/forbidden; the owner writes the digest opt-out, the quiet window and the zone core/test/projects.test.js
The patch mirror carries the new core/ bytes core/ is generated into patches/ds-bot/, and the package check compares it; the files/ copies and the 0005 hunk were updated without git and check passes patches/ds-bot/0005-social-seams.patch, patches/ds-bot/files/src/host/authz.js, patches/ds-bot/files/test/projects.test.js
The subsystem doc names the new wiring core-host.md said the endpoint was not wired yet; it now says how it is reached and that #1743's requireProjectOwner still refuses a non-owner docs/subsystems/core-host.md

No store change, no new endpoint, no client change. The owner gate is #1743's requireProjectOwner: this slice adds no second copy. Ordering: #1749's settings panel can now write through this endpoint instead of receiving bot/not-found.

Verification at the tip

Tip SHA: b3a97db
Ran: node --test test/projects.test.js test/project-owner-gate.test.js test/authz.test.js test/project-assistant.test.js (60 tests, 60 pass); node scripts/ds-bot-patches.mjs check (ok core/ equals ds-bot/ + patches/ds-bot/, 10 patches apply cleanly); npm run lint (oxlint 0 errors, 71 pre-existing warnings; arch-docs cannot diff against origin/main in a tarball workspace and says so); node .github/scripts/changelog.mjs check (26 fragments well formed).
Red first: with core/src/host/channel.js and core/src/host/authz.js restored to the base blobs, the new case fails 10 pass / 1 fail with + 'bot/not-found' - 'bot/forbidden'; at the tip 11 pass / 0 fail.
Not run: full npm run verify, smoke test.

Checkpoint

{
"pr": 1811, "claim": "Dev", "issue": 1759,
"summary": "The Project Assistant settings had a store case and the #1743 owner gate but no channel dispatch and no authorization entry, so the digest opt-out, the quiet window and the zone could not be written from the product. This adds the channel case and the TASK_ENDPOINTS entry together, because a dispatch without the allow-list entry would bypass the owner check. A channel-level test drives a non-owner to bot/forbidden and the owner to a stored record.",
"files": ["core/src/host/channel.js", "core/src/host/authz.js", "core/test/projects.test.js", "docs/subsystems/core-host.md", "changelog.d/1759-project-assistant-owner.fixed.md"],
"checks": { "ran": "node --test test/projects.test.js test/project-owner-gate.test.js test/authz.test.js test/project-assistant.test.js; npm run lint; node .github/scripts/changelog.mjs check", "result": "green", "at": "b3a97dbd4eedfacdb6cf6c49174f06eabb54d249" },
"next": "none — ready for review"
}

The Project Assistant settings (digest opt-out, quiet window, zone) had a store
case and #1743's owner gate but no channel case and no TASK_ENDPOINTS entry, so
every request answered Unknown endpoint and the controls were writable only
in-process. Wire both points in one change: dispatched without the allow-list
entry, the endpoint would reach store.js with no owner check.

Regenerated the ds-bot patch mirror for the new core/ files (no git here, so the
files/ mirrors and the 0005 hunk were updated by hand and check passes).

Written-by: Dev
@Birfy
Birfy force-pushed the dev/1759-project-assistant-owner-dispatch branch from 2881ca6 to b3a97db Compare October 30, 2026 07:16
@Birfy

Birfy commented Oct 30, 2026

Copy link
Copy Markdown
Collaborator Author

Verdict: PASS at b3a97db
Written-by: Reviewer
Attestation: b3a97db role=Reviewer

Ran at this tip:

$ node --test test/projects.test.js
# tests 11  # pass 11  # fail 0
$ node --test test/authz.test.js
# tests 20  # pass 20  # fail 0
$ node .github/scripts/changelog.mjs check
# 26 fragment(s) in changelog.d/ are well formed
$ node .github/scripts/risk-gate.mjs --pr 1811   (judge() over the live file list; no gh on this box, so the exported judge is called directly)
risk-tier: T3; basis: core/src/host/authz.js=T3, core/src/host/channel.js=T3, changelog.d/…=T1, core/test/projects.test.js=T1, patches/…=T1/T1, docs/subsystems/core-host.md=T0

Red first, on a clean copy at the tip with only the two changed sources swapped back to their base blobs:

$ node --test test/projects.test.js   (core/src/host/authz.js and core/src/host/channel.js = base blobs)
not ok 11 - the Project owner writes the assistant settings through the host channel (#1759)
# tests 11  # pass 10  # fail 1
$ node --test test/projects.test.js   (tip blobs restored)
# tests 11  # pass 11  # fail 0

What I checked:

  • The pair is the point. channel.js gains the project-assistant-owner case and authz.js gains the same name in TASK_ENDPOINTS, in one commit. Dispatched alone, the write would reach store.js with no owner check in front of it; the allow-list entry alone answers Unknown endpoint. The test drives a non-owner to bot/forbidden and the owner to a stored record, so the ordering is proven rather than asserted.
  • Scope. 8 files, all of them this change: two sources, the channel test, the changelog fragment, docs/subsystems/core-host.md, and the three patches/ds-bot/ mirrors the package check compares. No unrelated core/ or patches/ds-bot/ edits.
  • Generated mirrors. patches/ds-bot/files/src/host/authz.js and files/test/projects.test.js carry the new bytes and 0005-social-seams.patch carries the hunk; the package check is the CI job that proves it, green at this tip.
  • Checks at this tip. All terminal; tests-ok (with Node 24 · DSH 0.2.0-rc.2, plugins (tree), plugins (social), plugins (timeline), plugins (workflow), package) and merge-gate green. enqueue-guard is red, which is expected at a tip with no conclusion yet — and it also named one body defect, checkpoint field "pr": says 0. I fixed that field in the body ("pr": 1811); nothing else in the block changed. The guard also has to re-run to see it.
  • Environment. No git and no gh on this box, so the tip was read from the tarball API and the tier from risk-gate.mjs's exported judge() over the live file list; both are the same code the workflow runs.

Not run: full npm run verify, the smoke test. Neither is asked for by a core/src/host/channel.js + authz.js dispatch line, and the CI tests-ok job at this tip covers the rest.

@github-actions github-actions Bot added the pass label Oct 30, 2026
@Birfy
Birfy added this pull request to the merge queue Oct 30, 2026
Merged via the queue into main with commit 3f8cbb2 Oct 30, 2026
14 of 15 checks passed
@Birfy
Birfy deleted the dev/1759-project-assistant-owner-dispatch branch October 30, 2026 07:29
@github-actions github-actions Bot removed the agent-pr Pull request opened by an agent label Oct 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

1 participant