Repository navigation
feat!: drop Knowledge and Chat from the DataSource contract, keep Skills (#2206) - #139
Conversation
…lls (#2206) gitmoot satisfies this module's DataSource with EMPTY STUBS for Knowledge, ChatThreads and ChatThread because the interface requires them and dropping a method breaks compilation (internal/cli/dashboard_web.go:202-226). This removes that requirement so those stubs can go. Skills DECISION: Skills STAYS on the interface and the Learning page stays. Knowledge and Chat were the only two surfaces whose gitmoot-side data is gone: #2202 removed the memory brain and #1754 retired chat, so both can only ever answer empty, and the Brain page additionally fetched /api/brain/events and /api/brain/fact - endpoints this module never registered. Skills is different: gitmoot serves it from a REAL implementation over the agent_templates / agent_template_versions tables (internal/cli/dashboard_web_skills.go), 17 templates on the live dashboard, and campaign phase 3 (#2204) keeps both tables and the dispatch read path while removing only template AUTHORING. A read-only overview of live template versions is not dead, so removing the page would delete a working view. Consequence: #2206's gitmoot-side work removes only the Knowledge and ChatThreads/ChatThread stubs; Skills keeps its implementation. Removed from the DataSource interface: Knowledge(ctx) (Knowledge, error) ChatThreads(ctx) ([]ChatThreadSummary, error) ChatThread(ctx, id) (*ChatThreadDetail, error) Removed payload types: Knowledge, KnowledgeAgent, KnowledgeCluster, KnowledgeFact, KnowledgeEdge, ChatThreadSummary, ChatThreadDetail, ChatMessage, ChatRef, the ErrChatThreadNotFound sentinel, and ConfigAgent.ChatAutorespond (gitmoot never populated it - projectDashboardConfigAgents does not set the field, so it was permanently false on the Config page). Routes removed: GET /api/learning/knowledge, /api/chat/threads, /api/chat/thread. Kept and verified untouched: Tasks on the optional TasksDataSource, which backs the "Needs a human" surface. web/dist/index.html (-4262 lines): removed the Chat nav entry, the Brain nav entry, their mobile tab-bar/more-sheet entries, the Chat three-pane page, the Knowledge force-graph and Brain changelog pages, their CSS, their fetch calls, the /chat, /chat/<id>, /brain and /learning/knowledge routes (now normalized to Overview), the learning sub-tab machinery (one surface left), and the Config page's dead "Auto-resp" agent column. Verified by serving the demo binary (go run ./cmd/gitmoot-dashboard-dev) and driving a real browser: the nav rail is exactly Overview/Tasks/Workflows/Jobs/Pipelines/Agents/Org/Galaxy/Charts/ Learning/Needs a human/Health/Config, every entry renders with a 200 on its API call, zero page/console errors, and Galaxy, Charts, Tasks and Learning/Skills all render. fakefeed.go: dropped fakeKnowledge, fakeKnowledgeWithSubclusters, fakeChatThreadDetails, fakeChatThreads, chatSnippet, the flatKnowledgeFixture constructor variant (and the dev harness's -knowledge-flat flag) and the retired [chat] config knob. Tests whose subject was a removed surface are deleted; every surviving test keeps its real assertions. Gate: go build ./... && go vet ./... && go test ./... all pass; gofmt clean.
…2206) Follow-up to 9083235, same defect class as ChatAutorespond, one step later. ConfigAgent.Memory is never populated by any real data source: #2202 deleted config.AgentType.Memory, so gitmoot's projectDashboardConfigAgents (internal/cli/dashboard_web_config.go:180-216) sets Name/Runtime/Model/ Capabilities/AutonomyPolicy/MaxBackground and nothing else. The Config page therefore rendered a permanently-false "Memory" column and a "N memory-enrolled" counter that only the fake feed could ever make non-zero. Removed the contract field, the table column, the card badge, the section-meta counter, the now-unused `bool()` cell helper and its four dead .cfg-bool CSS rules. Also removed the fake Config fixture's [memory] knob section (9 knobs): gitmoot's [memory] config section does not exist after #2202, so a demo advertising those knobs documents a feature that cannot be configured. The multi-section ordering assertion in TestHandleConfig is unweakened - [github], [orchestrate] and [skillopt] remain, three sections in strictly ascending name order, so no substitute section was needed. [skillopt] is left alone: it is #1752 territory, not this campaign's. Untouched for the same reason: the AGENTS surface's memory fields (AgentSummary.MemoryEnabled, AgentConfig.Memory, AgentDetail.MemoryFacts / MemoryObservations), which gitmoot also no longer populates - filed as a separate finding rather than folded in here. Gate: go build ./... && go vet ./... && go test ./... pass; gofmt clean. Config page re-verified in a real browser against the demo server: per-agent header row is Agent/Runtime/Capabilities/Policy/Max bg/Model (6 th, 6 cells in every row), section meta reads "4 agents", and the sections rail is Feature flags / Keychain / Github / Orchestrate / Skillopt / Per-agent / Unknown with no Memory entry. Zero page/console errors.
Third and last of the brain leftovers in this module's contract, folded in so Config and Agents tell the same truth: after 6225c5c the Config page no longer claims anything about memory, while the Agents contract still served memoryEnabled / memoryFacts / memoryObservations and config.memory that no real data source can populate. One page truthful and its neighbour not is worse than either state alone. Removed: AgentSummary.MemoryEnabled, AgentConfigInfo.Memory, AgentDetail.MemoryFacts, AgentDetail.MemoryObservations, and the fake feed's fakeAgent.memory / .memFacts / .memObs fields and values. gitmoot populates none of them - `grep -rn "MemoryEnabled|MemoryFacts|MemoryObservations|Memory:" internal/cli/dashboard_web*.go` returns nothing - because #2202 deleted config.AgentType.Memory and the memory tables the counts came from. web/dist/index.html needed NO change, and that is the finding: no UI ever read these three fields. All 36 "memor" hits at origin/main 68ef5a4 were Brain / Knowledge page code (gone in 9083235) and the Config page's a.memory column (gone in 6225c5c); `grep -c -i memor web/dist/index.html` is now 0. The AgentSummary.MemoryEnabled doc comment claiming "the Agents page renders a small 'memory' chip for it" was stale - the chip does not exist. Verified by rendering the pre-change tree and this one side by side: the Agents list rows and the detail CONFIG block (runtime / model / concurrency / timeout / avg duration) are identical, and neither shows a memory row, chip or count. Tests, per the reduction rule: - TestHandleAgentMemoryWithConfig: DELETED. Its subject was the removed pair (MemoryEnabled implies a non-nil Config, plus a non-empty pool); stripping the memory assertions would leave only a duplicate config-non-nil check, so it is class 1, not class 2. - TestHandleAgents: memory block stripped (and the byName map it existed for). Still asserts name/runtime non-empty, exactly one Ephemeral rollup row, and a non-zero registered count. - TestHandleAgent: memory assertions stripped. Still asserts the template, its id, the config section, the pool knobs, the multi-line prompt body and the three-version history with its Current/canary markers. - TestHandleAgentNoTemplate: memory assertions stripped, and the "no config section" assertion kept (it was inside the same block). Gate: go build ./... && go vet ./... && go test ./... pass; gofmt clean.
Decision: Findings
Tests Run
Raw runtime output was retained in local Gitmoot state and is not posted here. |
Prerequisite for gitmoot/gitmoot#2206, phase 5 of the gitmoot/gitmoot#2201 scope-narrowing campaign. Owner-authorized (workflow note 173279 on
gitmoot/scope-narrowing).gitmoot currently satisfies this module's
DataSourcewith empty stubs forKnowledgeandChatThreads/ChatThread, because the interface requires them and dropping a method breaks compilation. This removes that requirement, plus six contract fields no real data source can set.8 files, +124 / −5,572.
web/dist/index.htmlaccounts for 4,338.What goes, and why each
Knowledge+ 5 types,/api/learning/knowledgedashboard.Knowledge{}hard-empty since #2202 retired the brainChatThreads/ChatThread+ 4 types, 2 routes/api/brain/eventsand/api/brain/fact— routes this module never registered, so it was broken against any data source, not just gitmoot'sConfigAgent.ChatAutorespond,ConfigAgent.MemoryprojectDashboardConfigAgentsnever sets eitherAgentSummary.MemoryEnabled,AgentConfigInfo.Memory,AgentDetail.MemoryFacts,AgentDetail.MemoryObservationsgrep -rn "MemoryEnabled|MemoryFacts|MemoryObservations|Memory:" internal/cli/dashboard_web*.goin gitmoot returns nothingEach field removal is a visible lie on a KEPT page, which is why they belong here rather than in a follow-up. The Config table went
8 → 6columns and its meta line went4 agents · 3 memory-enrolled · 1 auto-respond→4 agents.SkillsSTAYS — the one judgement callgitmoot serves
Skillsfrom a real implementation overagent_templates/agent_template_versions, and 17 templates render on the live dashboard today. Campaign phase 3 (#2204) removes template authoring while explicitly keeping those tables and the dispatch read path, and the Learning page is read-only — version history, current version, a copyable promote command. Nothing on it authors anything.Consequence: #2206's gitmoot-side work removes only the Knowledge and Chat stubs.
dashboard_web_skills.gois untouched.Tasksis untouchedVerified it lives on the separate optional
TasksDataSource, type-asserted inapi.go, left byte-identical. It backs the "Needs a human" surface and still renders (26 tracked / 5 blocked in the demo).Verification — served and driven, not compiled and assumed
Module gate (its own documented
go build ./... && go vet ./... && go test ./...): all clean,ok github.com/gitmoot/gitmoot-dashboard,gofmt -l .empty.Then
go run ./cmd/gitmoot-dashboard-devwith real Chromium:/api/*responses all 200, zero pageerror / console error / requestfailed across the sweep./chat,/brain,/learning/knowledgeeach return the SPA shell and the client normalizes to/(verifiedlandedPath="/",title="gitmoot · overview").Dangling-reference greps:
knowledge|chatthread|/api/chat|/api/brain|showChat|showBrain|_chat|_know|_brainoverindex.html→ no matches; over the Go files → one hit, an explanatory comment onSkills.Re-pin risk, measured because it was worth knowing early
The pinned rev gitmoot uses (
510fdc8) versus this base (68ef5a4) is purely additive — identical nav sets, identical client views, identical requiredDataSourcemethods, nothing deleted fromdatasource.go. So the eventual re-pin drops no live page.One consequence to know:
68ef5a4addedWakeDataSourceand three/api/wakes*routes, which gitmoot does not implement. Both sides already handle it —api.gotype-asserts and 404s, and the client maps that 404 to anunsupportedwake panel. The Overview page degrades gracefully.Filed separately, not folded
[skillopt]knobs (auto_promote,pace_gate) in the fake Config fixture: #1752 removed the SkillOpt loop, so whether gitmoot still projects that section is #1752's question, not this campaign's.Reviewer, please attack
Skillsstaying — is keeping a required method for a page whose authoring half is being removed elsewhere the right call, or should the interface shed it and let gitmoot keep serving it optionally?index.htmllost 4,338 lines of a 12.8k hand-rolled file. The browser sweep covers the 13 nav entries; look for anything reachable another way — deep links, the mobile sheet, pull-to-refresh selector lists.Not verified: this module against real gitmoot data — the sweep used the demo fake feed, which is the only data source this repo can serve on its own.