Repository navigation
Tree: model-based clustering for roles the rules cannot place - #520
Conversation
|
Review (Birfy, 2026-10-20 16:05 Asia/Shanghai) at Design: Matches #450 item 2 and owner tree rules — opt-in twice ( Stack: Needs #518 ( Nits: first opt-in run classifies every non-root tree Bot (host 30/min cap bounds it). No design conflict found. Not self-PASS (HugoXK PR; owner has not confirmed accepting #520). See confirmation on #519. |
|
Thanks — the nits are noted and left as-is by design: the first opt-in run classifies each non-root tree Bot once, bounded by the host's 30/min cap, and |
|
This PR conflicts with Please merge |
…lowLab#450) With modelClassify: true AND the host allow-listing the plugin, a tree Bot whose role the deterministic vocabulary cannot map is sent once to the sanctioned plugin model call (ThinkFlowLab#518) for a single category, stored on the Bot as modelDomain and read by roles.js only where the vocabulary found none. Off by default, one call per role change, rules stay primary.
38ec202 to
7a7844d
Compare
Birfy
left a comment
There was a problem hiding this comment.
Verdict: PASS at 7a7844d
Tip SHA: 7a7844d9fc7a65693911c4ef11db1d7c06541d47
The author rebased it onto current main, so it merges cleanly now; this is the first PASS at this tip (the earlier note at 38ec2029 no longer applies).
Read the whole 10-file diff: classify-model.js (61 lines — opt-in twice: config.modelClassify AND the host allow-list flybot.modelPlugins; one ask per role-text fingerprint; stored in the Bot field modelDomain { domain, fp, at }; a refused or unparsable answer stores nothing and never clears a good label; rules still win because roles.js applies the model domain only when the vocabulary found none), the adapter seam askModel (absent seam answers no-api instead of reaching into the host), index.js scheduling (3 s / 20 s then every 30 min, unref'd, disposed with the plugin; host caps 30/min bound it), the docs (tree.md section + roles/classify-model rows), README config comment, changelog fragment and the mock-flybot model seam plus 6 new tests.
Checked the host contract it relies on: core/src/host/plugin-model.js exposes model.ask(plugin, input) as { ok, text } / { ok, code } with an allow-list, a read-only refusal and per-minute caps, and hooks.js binds the plugin id — the call in adapter.js matches that shape, and the plugin sends only the role text (never message content).
Ran at the tip: CI tests-ok green (test, plugins tree/social/timeline, package all success at this SHA). In a copy of current main with this diff applied: plugins/tree 89/89 tests, scripts/lint-plugins.mjs tree finished with 0 errors, changelog.mjs check OK.
Not run: one-shot npm run verify (2 GiB OOM), core suite, arch-docs on this copy, smoke, Desktop, real-model call (no provider in this container).
Tier: T2 (plugins/tree/src/**). Awaiting the owner's click in the GitHub UI plus this PASS at the tip. Any new commit voids this PASS. It stays opt-in and off by default.
Tree: model-based clustering for roles the rules cannot place
Part of #450 (item 2)
The tree's self-organization (
src/roles.js) places a Bot by the words in its name, role label and description. A role the small vocabulary does not hold finds no group and the Bot stays outside the tree. WithmodelClassify: truein the tree config — and the host allow-listingflybot-treeinflybot.modelPlugins— a Bot the rules cannot place is sent once to the sanctioned plugin model call (#518) for a single category, stored on the Bot asmodelDomain, and read byroles.jsonly where the vocabulary found none, so the deterministic grouping stays primary.Off by default, one call per role change (fingerprinted), a refused or unparsable answer stores nothing and never clears a good label, and the host's caps bound every call. Plugin only: without the model seam (
flybot.model.ask) the plugin falls back to the current rules and asks nothing.Ran at the tip:
npm run verify(green,TZ=UTC),node scripts/lint-plugins.mjs tree(0 errors). Not run: smoke, Desktop, real-model steward.