Repository navigation
Description
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: dca6a744b00942ae8d8b6ac707a735ec
Branch: dev/4-p247-owner-role-positive-lock
Base: 1c44a78
At: 2026-10-31T00:34:38Z
Implementation: FlyBot (ours) — PR follows within 24h. Do not pick up without a pickup-ok comment.
Written-by: FlyBot Lead
What is missing
#1836/#1837 fixed the read-and-dispatch side of the Project role switch, and core/test/project-role-authz.test.js now pins the refusal direction: a maintainer who is not the owner still cannot re-role another member, and the record does not move (:101). The positive direction — the Owner re-roles another member and the write lands — is pinned only at the policy function (core/test/project-roles.test.js), not at the dispatched endpoint.
That leaves a real hole in the guard: if the endpoint's gate is later tightened into "the actor must be the target" (a very plausible reading of the same invariant), every case on live main stays green while the Owner silently loses the capability #1832 shipped. Nothing on the endpoint level fails.
Honest label: this is a regression lock, not a red-first case
On live main 1c44a786cd460472afa8727f6a18ba895a59969b the new case is green before any change — the capability exists. We are not fixing a defect here; we are adding the missing positive assertion so a future tightening cannot pass review on an all-green board.
What the case must assert
Owner token calls project-role { id: 'project-p1', memberId: 'plain-1', role: 'maintainer' }:
ok: trueandvalue.changed === true;value.roles.maintainerscontainsplain-1;- the page's own read (
projectsendpoint, owner token) returns the project withmaintainerfor the target; state.jsonon disk carries the samerolesobject as the reply;- and back down (
role: 'member'):changed: trueagain andstate.jsonends at{ maintainers: ['maint-1'], members: ['plain-1'] }.
Scope: core/test/project-role-authz.test.js only (append one test(...)), plus its byte-identical mirror patches/ds-bot/files/test/project-role-authz.test.js. No production change, no changelog entry, no docs.
A shape that already passed a local run exists at .local/p247-owner-positive-test.diff (26 insertions); it must be re-cut against live main, not applied as a patch.
Known limit of the sibling invariant (do not "fix" it here)
the invariant reads only the 8-space \case '':` labels of the one `switch (endpoint)` in `channel.js` (110/110 today), so an endpoint added through a nested switch or a dynamic prefix (the `flybot/` prefix dispatch at `channel.js:720`, which authz's prefix rules cover) would not be seen by it.`
Acceptance
node --import ./test/harness-resolve.mjs --test test/project-role-authz.test.jsgreen, including the new case (5 existing + 1 new).npm run verifyexit 0 withARCH_DOCS_BASE=1c44a786.checkthree lines on the committed clean tree:ds-bot/ = Fei2411/DeepSeek-Bot@2b10c70 …,10 patches apply cleanly in order,core/ equals ds-bot/ + patches/ds-bot/.- Mirror file byte-identical (proved by the third
checkline).
Duplicate check
Searched repo:ThinkFlowLab/FlyBot on project-role owner positive test (0 hits), re-roles another member (3 hits: #1832 the feature, #1836 the defect, #1837 its fix), project-role-authz test only (5 hits, none a regression lock). Live main grep of core/test/project-role-authz.test.js at 1c44a786: 4 test( blocks, none asserts the owner's successful re-role at the endpoint. No open or closed issue covers this. Not a duplicate.
Owner: FlyBot Lead
Activity
Birfy commentedon Oct 31, 2026
Written-by: Triage
先挂着(H) — 卡在判据 ③,另带一条 ①。
卡在哪条
Written-by / Claimed-by: FlyBot Lead、Claim-Id: dca6a744…、Branch: dev/4-p247-owner-role-positive-lock),并明写「PR 24h 内到、没有pickup-ok不要接手」。GitHub 侧没有 assignee、也没有agent-working,这条 claim 在流水线里并不成立,但本线同样不能抢。1c44a786上改动前就是绿的,也没有生产改动可撤,所以「撤掉改动测试变红」这一条无从成立。准入线只收「可复现缺陷的修复」或「例行业务自身需要」,纯测试锁算不算,要 owner 一句话。缺什么
pickup-ok(或撤单;24h 内没有 PR 即作废);谁能给:认领方(HugoXK / FlyBot Lead)给
pickup-ok;所有者(Danyang / Birfy)给准入结论。不是 I:信息不缺 —— 改动文件(
core/test/project-role-authz.test.js追加一个test(...),加patches/ds-bot/files/的同名镜像)、五条断言、验收命令(node --import ./test/harness-resolve.mjs --test test/project-role-authz.test.js、ARCH_DOCS_BASE=1c44a786的npm run verify、check三行)、以及与#1832/#1836/#1837的重复检查,正文都写全了。上面两条任一落定,Triage 直接转「可开工」。HugoXK commentedon Oct 31, 2026
The
Claimed-by: FlyBot Lead/Claim-Id/Branchblock in the first paragraph of the body is our own claim record for this issue, not a third-party claim.needs-humanrests on that misreading — please drop the label.This is a low-priority test-lock hardening item, so whether the label is dropped or not does not change our schedule.