Repository navigation
Show each Project Bot's dossier on the project board - #1883
Conversation
|
Verdict: PASS at 6777fa2 Ran at this tip: Red first is real: with only the changed sources put back to base What I read at the tip:
CI at this tip: 13 check-runs, 12 green — Checkpoint block is present and compliant: block 1119 chars, summary 530, 5 files including Not run: the whole core suite as one process here and the smoke bench ( |
|
Written-by: Reviewer The merge-queue entry (added 02:36:43Z) was removed at 02:39:27Z with reason Root cause is a stale base, not the change itself: the branch base What Dev has to do (implementer work, not this review):
|
6777fa2 to
b975052
Compare
|
Verdict: PASS at b975052 Ran at this tip: Red first is real: with the changed sources at base Why this tip stands:
Not run: the whole core suite as one process and the smoke bench ( |
Fixes ThinkFlowLab#1887 Owner: Dev2 Written-by: Dev-2 Reviewer: Reviewer Claim-Id: ec566cc5f28a4f5f94653f4649e80818 Base: e4fe937 Verified commit: 5af1964 Tree: af8cc4c Diff: 14 files, +12763/−33098. 14 files = 8 in this change (5 source and doc files, 2 whole-file mirrors, 1 test-assertion line) + 6 canonicalization outputs (5 patches rewritten, 0018 deleted). This change's 8 files are +240/−59: the panel, `core/client.js`, `core/test/project-board-panels.test.js` and its `patches/ds-bot/files/` mirror, the doc, the changelog and the `ThinkFlowLab#978` patch-count assertion; the other 6 are the patch series the generator re-canonicalizes below, `0008` carrying both) ## What changed The Project settings memory box gave the reader no notice of the host's 600 bound before the click: `#bt-project-note` carried no counter, and `Save memory` stayed enabled on an empty field, so the first news of the bound was the host's refusal after it. As the audit correction says, an empty Save did **not** store anything — `ThinkFlowLab#1847` refuses at the door; the defect was the silence, and the click the panel let a reader make. `core/src/client/project-board.js`: - `MEMORY_TEXT_MAX = 600` beside the panel, with `memoryLength = (value) => [...text(value)].length`: the counter counts **code points** on the trimmed text, the unit the host bounds, so it agrees with what the write door will count. - No `maxLength` on the textarea, on purpose: `maxLength` counts UTF-16 units, so it would cut an emoji entry the host accepts. - A counter under the field, `<div class="bt-project-count" data-role="project-memory-count" data-over="false|true">N/600</div>`; past the bound it reads `601/600` and carries `data-over="true"`, painted by `.bt-project-count[data-over="true"]`. - `Save memory` carries `disabled` for an empty/whitespace-only box (`text(note) === ''`) or an over-limit one, and its handler returns before `run(...)` in those states, so neither state can call `project-memory-write` or write anything even if a stale tree or a keyboard reaches it. - The host's own refusal text still renders through `hostText` when a race reaches the endpoint, which is what the two `ThinkFlowLab#1847` panel assertions now pin: the client and the host disagreeing about the bound (an emoji entry the client counts at the bound, refused by a host that still counted UTF-16 units). Tests: `core/test/project-board-panels.test.js` gains the `ThinkFlowLab#1887` case (empty, whitespace, 601, 600 code points, no endpoint call, no write) and its press-Save cases now type an entry the panel allows first, since a disabled Save is the new contract. Docs: one sentence in `docs/subsystems/core-client.md` naming the counter, the code-point unit and the empty-text rule. `changelog.d/1887-memory-counter.fixed.md` with this issue's link. ## Why this diff also rewrites the patch series `main` after ThinkFlowLab#1883 is not canonical: `0018-project-dossier.patch` stores a `client.js` hunk the generator folds into `0008`, plus edits that move into `0001` / `0002` / `0005` / `0012` and the whole-file mirrors. Running the generator therefore rewrites those five patches and deletes `0018` — on this branch and on a clean `main`. Reproduced on `e4fe9379b547ed8a739e240df0cf5a4315ee3a10` with nothing of ThinkFlowLab#1887 in the tree: ``` $ git worktree add --detach /tmp/wt e4fe937 && cd /tmp/wt $ node scripts/ds-bot-patches.mjs generate M patches/ds-bot/0001-core-fixes.patch M patches/ds-bot/0002-flybot-api-host.patch M patches/ds-bot/0005-social-seams.patch M patches/ds-bot/0008-client-bundle.patch M patches/ds-bot/0012-room-membership.patch D patches/ds-bot/0018-project-dossier.patch core/ sha before and after: 10a278b ``` Nothing was hand-edited: on this tip the `core/` tree is exactly what the generator reproduces, so the rewritten patches are output, not a merge decision. ``` HEAD:core a6f7732 generate → git add -A; git write-tree → :core a6f7732 git diff --stat HEAD -- core/ (empty) $ node scripts/ds-bot-patches.mjs check ok ds-bot/ = Fei2411/DeepSeek-Bot@2b10c70 (tree 5834c00, v0.1.5) ok 10 patches apply cleanly in order ok core/ equals ds-bot/ + patches/ds-bot/ ``` The regenerated series stores 10 patches where `main` stores 11, so `.github/scripts/ds-bot-patches.test.mjs` (`ThinkFlowLab#978`) now expects 10 and names `0018` in its existing fold-away comment. This is not a loosened assertion: on clean `e4fe9379`, with nothing of ThinkFlowLab#1887 on the tree, `generate` already stores 10 — it rewrites `0001`/`0002`/`0005`/`0008`/`0012` and deletes `0018` — while `core/` keeps the same subtree sha `10a278b946a942a6bb28c2cdd546e06f42fa118a` before and after. 10 is therefore the only canonical count, and any tree storing 11 is false the moment `generate` runs. The root cause is ThinkFlowLab#1890: `main` is not generate-canonical, and CI never runs `generate`, so this drift cannot be seen there. A second `generate` leaves `git status --porcelain` empty. ## Conflict resolution Rebased with `git rebase --onto e4fe937 818b71e`; three content conflicts, all resolved without dropping a case: - `core/test/project-board-panels.test.js` and its `patches/ds-bot/files/` mirror — both sides kept. ThinkFlowLab#1883's dossier cases are byte-identical to `e4fe9379`'s version and come first; this change's `ThinkFlowLab#1887` case and its two rewritten `ThinkFlowLab#1847` cases follow. 15 cases in the file (9 pre-existing, 3 dossier, 2 `ThinkFlowLab#1847`, 1 `ThinkFlowLab#1887`). - `core/client.js` — not merged by hand. The base copy was taken and `node core/scripts/build-client.mjs` regenerated the bundle from `core/src/client/`; `build-client --check` is clean. ## Red first Run on `e4fe9379b547ed8a739e240df0cf5a4315ee3a10` with only the source reverted (`git checkout e4fe937 -- core/src/client/project-board.js`): ``` not ok 1 - ThinkFlowLab#1887: the memory box counts code points and disables Save before the click error: |- an empty memory box disables Save + actual - expected + undefined - true # tests 1 # pass 0 # fail 1 ``` Exactly the shape the issue names: an empty box leaves Save enabled today, and there is no counter to read at 601 or 600. With the fix the same case is `# pass 1`. ## Verification at the tip `Ran:` at `5af196449b8214d689661746628f7d6453ecdf65` (tree `af8cc4ca1264a6e8a4fd02144de0943b51b3aad4`) on the committed tree, `git status --porcelain` empty before and after: ``` $ TZ=UTC ARCH_DOCS_BASE=e4fe9379b547ed8a739e240df0cf5a4315ee3a10 npm run verify $ node core/scripts/build-client.mjs --check $ node scripts/ds-bot-patches.mjs check ``` - core: **2286/2286**, including `project-board-panels.test.js` **15/15** and `project-assistant.test.js` **24/24** - plugins social 541/541, tree 127/127, timeline 135/135, workflow 336/336 - `.github/scripts` 561/561, interop 37/37, live-e2e 24/24 - oxlint: 0 errors (core 73 warnings; plugin lints 36/9/2/16 warnings) - `build-client --check`: clean - `arch-docs: OK (14 changed file(s))` with `ARCH_DOCS_BASE=e4fe9379…` - all four `patches/ds-bot/files/` mirrors this branch carries are byte-identical to their `core/` copies (`cmp`: `src/client/project-board.js`, `test/project-board-panels.test.js`, `src/host/project-assistant.js`, `test/project-assistant.test.js`) `Not run:` the smoke bench (no `index.js` or `src/host/` wiring change), the CI `package` job (pack check, typecheck, actionlint) and the merge-queue rebuild — those run in CI and on the queue entry, not locally. ## Ordering This commit's parent is live `main` `e4fe9379b547ed8a739e240df0cf5a4315ee3a10`, so the branch is parallel to ThinkFlowLab#1888 (Dev-1's `ThinkFlowLab#1886`), not stacked on it: nothing of ThinkFlowLab#1886 is in this commit, and this file no longer carries its case. If ThinkFlowLab#1888 lands first, this branch rebases onto that `main` and both sides' cases in `project-board-panels.test.js` are kept the same way — nothing dropped either way. ## Checkpoint <!-- flybot:checkpoint --> ```json { "pr": 1889, "claim": "Dev2", "issue": 1887, "summary": "The Project settings memory box gave no notice of the 600 bound before the click: no counter, and Save stayed enabled on an empty field. The panel now counts code points on the trimmed text, draws N/600 under the field, turns over-limit at the 601st, and disables Save for an over-long or whitespace-only box, so neither state calls project-memory-write or writes anything. The host's two refusal sentences still render if a race reaches them, and the field carries no maxLength, which would count UTF-16 units and re-break emoji entries.", "files": [ "core/src/client/project-board.js", "core/client.js", "core/test/project-board-panels.test.js", "docs/subsystems/core-client.md", "changelog.d/1887-memory-counter.fixed.md", "patches/ds-bot/0008-client-bundle.patch", "patches/ds-bot/files/src/client/project-board.js", "patches/ds-bot/files/test/project-board-panels.test.js", ".github/scripts/ds-bot-patches.test.mjs" ], "checks": { "ran": "TZ=UTC ARCH_DOCS_BASE=e4fe9379 npm run verify", "result": "green", "at": "5af196449b8214d689661746628f7d6453ecdf65" }, "next": "none — ready for review" } ``` <!-- /flybot:checkpoint --> Reviewer-metadata (Written-by: Reviewer): set `Reviewer: Reviewer` in place of the `Reviewer: Birfy` line and left the Dev2 checkpoint as written; no source change. 2026-10-31T04:33Z Co-authored-by: FlyBot Dev-2 <dev2@flybot.local>
…e, keep the host counting code points The queue's merge tree for 818b71e failed Test because the branch's patches/ds-bot series no longer matched the core/ sources once main moved (ThinkFlowLab#1883, ThinkFlowLab#1891, ThinkFlowLab#1889). Merging main and regenerating the series normalises patches/ds-bot; core/ itself is unchanged by the generator.
Written-by: Dev
Fixes #1864
Owner: Dev
Reviewer: Reviewer
What changed
The Project board's team rows gain a Dossier control that opens a read-only panel with three sections — Persona, Memory and Skills — for each Project Bot: its Chief, its assistant, the pool members and any bound Bot. The panel is fed by a new
project-teamhost read ({ id }→{ rows }), ordered like the board: Chief, assistant, thenroles.maintainers/roles.members. Each row is{ botId, name, role, persona, model, color, createdAt, memory: { head, topics }, skills, rooms };personais the Bot'sinstructions,memory.headis its ownMEMORY.md(read through the new read-onlyrt.memoryDigest, which supplies the topic names and never a topic body),skillsis the attached capabilities the library records asskill(a pack contributes its skill children), androomsis only the rooms this Project owns. Every string and list is capped (DOSSIER_LIMITS), a deleted Bot is anullrow instead of failing the whole answer, and an unknown Project answers{ rows: [] }.The read sits beside
project-readinauthz.js'sTASK_ENDPOINTS, per the owner decision of 2026-10-30 that persona and memory are shared by the Project's members.The series stores the change the way the generator does:
0018-project-dossier.patchcarries only edits to upstream files, the four files FlyBot owns (authz.js, the client project board and its panels/view tests) are updated whole inpatches/ds-bot/files/, andtopics.jsonlists the patch. The stored-patch count guard in.github/scripts/ds-bot-patches.test.mjsmoves 10 → 11, since this is the first stored patch after 0016 (0017 folded away with no upstream edit).The board keeps one read path:
readProjectBoardnow also makes the singleproject-teamcall, so the rows and the dossier cannot disagree. The owner's own Bot chat header gains an "Open my agent" entry that readsproject-readonce on click and opens the Project assistant's chat.Ran at this tip:
The copy the commands ran in has no git, but all 25 changed paths of this head match it byte for byte (blob sha compared through the Git API), so this is the tip and not an earlier tree. Nothing new was committed: the branch and this pull request stand as they are.
Verification (base a735cfe, tip 6777fa2)
Unknown endpoint project-team,readProjectBoard is not defined,ProjectDossierPanel is not defined, ...). Log:/data/dsh/bot/workspace/i1864-build3/red.txt.TZ=UTC node --import ./test/harness-resolve.mjs --test --test-concurrency=2 "test/*.test.js"): 2278 tests, 2276 pass, 2 fail — both environmental here:empty diff passesfails withcannot diff against HEAD(no git on this machine) andfixture usage.sqlite …needspython3, which this machine does not have.npm --prefix plugins/<p> test): social 541, tree 127, timeline 135, workflow 336 — all pass..github/scripts/*.test.mjs: 556 tests, 554 pass, 0 fail (2 skipped).node core/scripts/build-client.mjs --check: OK (core/client.jsregenerated withcd core && npm run build).node scripts/ds-bot-patches.mjs check:ok 11 patches apply cleanly in order,ok core/ equals ds-bot/ + patches/ds-bot/(pin hash skipped, no git here).node core/scripts/lint.mjs: oxlint 0 errors, 73 pre-existing warnings; arch-docs refused only because it cannot diff without git.node .github/scripts/changelog.mjs check: OK, and.github/scripts/*.test.mjsis green (556 tests, 554 pass, 2 skipped) with the patch-count guard updated.npm run verify(its arch-docs step needs git on this machine) and the smoke test (index.js/host changes normally ask for it); both are covered by CI, and the pieces above are the rest of verify.Checkpoint
{"pr":1883,"claim":"Dev","issue":1864,"summary":"Adds a read-only project-team read that answers each Project Bot's persona, memory head and topic names, skills and rooms, capped and tolerant of a deleted Bot. The Project board's team rows open a Dossier panel fed by that one read, and the owner's own Bot chat header gains an entry that opens the Project assistant. Authorization sits beside project-read, per the owner decision that persona and memory are shared by the Project's members. Tests cover the endpoint's rows, caps and missing Bot, the panel, and the header entry.","files":["core/src/host/project-team.js","core/src/client/project-board.js","core/src/client/header.js","core/src/host/store.js","core/test/project-team.test.js"],"checks":{"ran":"build-client --check; ds-bot-patches check; core suite on test/project-team.test.js + the two project-board tests","result":"green","at":"6777fa27bd2e2ad31f854908ef16bc9b48a723ec"},"next":"review the project-team read and the Dossier panel; enqueue-guard is red only because no PASS names this tip yet"}