From f6a341ddb78c445d07952cc8dcaaa2a3defb0e61 Mon Sep 17 00:00:00 2001 From: Sam Catlow Date: Thu, 3 Sep 2026 06:25:31 +1000 Subject: [PATCH] chore(beads): close archie-core-mlro --- .beads/interactions.jsonl | 1 + .beads/issues.jsonl | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.beads/interactions.jsonl b/.beads/interactions.jsonl index e31e12cb9..c3268c2ea 100644 --- a/.beads/interactions.jsonl +++ b/.beads/interactions.jsonl @@ -200,3 +200,4 @@ {"id":"int-ad28db17a92a281b51deb682190489b8","kind":"field_change","created_at":"2026-09-02T20:18:20.468900706Z","actor":"Sam Catlow","issue_id":"archie-core-zv2t","extra":{"field":"status","new_value":"closed","old_value":"open","reason":"Fixed, tested (Playwright against a real isolated server), and pushed as commit 85761c4."}} {"id":"int-5dd30e1f77dff564088caa908bd53330","kind":"field_change","created_at":"2026-09-02T20:18:20.908890222Z","actor":"Sam Catlow","issue_id":"archie-core-t2db.8","extra":{"field":"status","new_value":"closed","old_value":"open","reason":"Backend Owner/Repo fix (ac42f64) + full dashboard UI (85761c4, mirroring ui/src/mappings/) both landed. Full state machine (draft->edit->pending_approval->approve->armed->delete) verified end-to-end in a real browser. Also fixed a related bug found in the process (empty-secret-on-edit rejected, commit 51ca509)."}} {"id":"int-5f9484b3ee198a74559bebb85c7227da","kind":"field_change","created_at":"2026-09-02T20:20:15.450996359Z","actor":"Sam Catlow","issue_id":"archie-core-t2db.6","extra":{"field":"status","new_value":"closed","old_value":"open","reason":"All four items done: binding model + threat model (bindings.md, 41dffe3), ARCHITECTURE.md task-lifecycle addendum (edb90e1), operator walkthrough (this commit). Unblocked once t2db.8's UI landed."}} +{"id":"int-833f71f832182c4e497cb3695d7b0943","kind":"field_change","created_at":"2026-09-02T20:25:30.487991213Z","actor":"Sam Catlow","issue_id":"archie-core-mlro","extra":{"field":"status","new_value":"closed","old_value":"open","reason":"Extracted to ui/src/base/pill.jsx, all 12 call sites updated (11 pre-existing + bindings). Verified via task test:ui (120/120) and real browser re-check across all pages given this touches the same rendering path as the earlier Preact regression fix. Commit 2abccf3."}} diff --git a/.beads/issues.jsonl b/.beads/issues.jsonl index 627b99311..0b77ea040 100644 --- a/.beads/issues.jsonl +++ b/.beads/issues.jsonl @@ -642,7 +642,7 @@ {"_type":"issue","id":"archie-core-1786637489857-3-24abe68c","title":"fix(gateway): make /compress failure-safe","description":"applyCompress swallows MessageCount and DeleteRecentMessages errors (allCount, _ := and _, _ =) then deletes all messages BEFORE saving the compressed replacement. A crash or error between the two loses the session's entire history unrecoverably. Add a store-level ReplaceMessages that saves first and deletes the previously-listed IDs after, so the failure mode is recoverable duplicates rather than total loss.","status":"closed","priority":2,"issue_type":"task","created_at":"2026-08-08T14:26:24Z","updated_at":"2026-08-08T15:33:31Z","closed_at":"2026-08-08T15:33:32Z","external_ref":"https://github.com/samcharles93/archie-core/issues/24","source_system":"github:https://github.com/samcharles93/archie-core/issues/24:24","metadata":null,"labels":["task"],"dependency_count":0,"dependent_count":0,"comment_count":0} {"_type":"issue","id":"archie-core-1786637489834-2-109e7cab","title":"[BUG] /model \u003cname\u003e asked the router for a doubled model name","description":"The nestif extraction in 651de0a pulled --provider parsing out of parseModelRest into extractProviderFlag, which took the modelParts slice by pointer and appended every non-provider field to it. The caller's own loop then appended the same fields again, so every field of the model name was duplicated: '/model gpt-5.6' resolved to 'gpt-5.6 gpt-5.6' and SetActiveModel rejected it as an unknown model. '/model gpt-5.6 --provider openai' was worse -- the space-separated provider value was no longer consumed with its flag, giving 'gpt-5.6 gpt-5.6 openai'. Direct model switching over Telegram was broken for anything but a bare --refresh or a provider-only switch. Found while auditing 6d4e0be for archie-core-ifi: the naked return in the same function could not be regression-tested until the function produced correct values.\n\n### Design\n\nTwo ways to fix the double append were available. Rejected: keep the helper\nsignature and delete the caller's default-branch append. That restores correct\noutput but leaves the shape intact -- a helper holding a pointer to the\ncaller's accumulator, with two loops over the same fields -- so the next person\nwho adds a field type has the same trap waiting. It also does not fix the\nspace-separated provider value, because the helper returns early on the first\n--provider and never sees the fields after it.\n\nChosen: splitProviderFlag returns (provider, remaining) and is the sole\naccumulator. One loop owns the fields, and there is no shared slice to append\nto twice. The index loop is kept deliberately -- i++ after reading a\nspace-separated value is what removes it with its flag, and converting that to\na range loop is precisely what 651de0a did wrong.\n\nLast --provider wins if repeated, matching the pre-651de0a behaviour rather\nthan the buggy helper's first-wins. Not worth a flag: /model does not document\nrepeating it.\n\n### Acceptance Criteria\n\nparseModelRest returns the model name exactly once for bare names, scope flags, and both --provider spellings, with a regression test asserting field count rather than string equality.","status":"closed","priority":2,"issue_type":"bug","created_at":"2026-08-08T14:26:19Z","updated_at":"2026-08-08T15:34:07Z","closed_at":"2026-08-08T15:34:08Z","external_ref":"https://github.com/samcharles93/archie-core/issues/23","source_system":"github:https://github.com/samcharles93/archie-core/issues/23:23","metadata":null,"labels":["bug"],"dependency_count":0,"dependent_count":0,"comment_count":0} {"_type":"issue","id":"archie-core-1786637489768-1-2fd8288f","title":"Trigger accounting: curator output must not feed its own trigger","description":"Establish the invariant that work a curator produces does not count toward the condition that schedules the next curator run. The scheduler must explicitly exclude derived curator output from the observation threshold: counting it would inflate the threshold and create a feedback loop, so a curator that writes memories must not thereby schedule itself again.\n\n### Acceptance Criteria\n\nDerived curator output is distinguishable from primary input at the point the trigger is evaluated. A curator that writes memories does not thereby schedule itself again. There is a regression test that would fail if derived output were counted, with the feedback-loop rationale recorded in the test so the guard is not removed as redundant.","status":"closed","priority":2,"issue_type":"task","created_at":"2026-08-08T14:26:17Z","updated_at":"2026-08-15T12:55:20Z","closed_at":"2026-08-15T12:55:20Z","close_reason":"Complete: internal/domain/curator/wake.go WakeOnPrimaryInput forwards only explicitly-passed inputKinds; curator-produced kinds (curator_run, curator_action, curator_error) are structurally excluded, per its own doc comment naming this exact invariant. internal/domain/curator/wake_test.go:11-21 TestWakeOnPrimaryInputForwardsOnlyPrimaryKinds carries the required feedback-loop rationale verbatim ('if derived curator output counted... a curator that writes memories would schedule itself again... This test fails if a derived kind is added to the forwarded set or the filter is removed as redundant') and asserts passCalls/checkCalls stay at 1 after publishing derived-kind events. All three acceptance-criteria clauses satisfied exactly.","external_ref":"https://github.com/samcharles93/archie-core/issues/22","source_system":"github:https://github.com/samcharles93/archie-core/issues/22:22","metadata":null,"labels":["task"],"dependencies":[{"issue_id":"archie-core-1786637489768-1-2fd8288f","depends_on_id":"archie-core-1786637500725-414-9d66a52b","type":"parent-child","created_at":"2026-09-01T15:50:29Z","created_by":"Sam Catlow","metadata":"{}"}],"dependency_count":0,"dependent_count":0,"comment_count":0} -{"_type":"issue","id":"archie-core-mlro","title":"ui: extract duplicated Pill component to ui/src/base/","description":"organisation.md's frontend rule says extract to ui/src/base/ on the second distinct consumer. Pill (a 3-line status-badge component) is already independently duplicated verbatim across 11 files: tasks.jsx, logs.jsx, mapping-editor.jsx, capture-row.jsx, settings.jsx, update-status.jsx, skills.jsx, dashboard.jsx, memory.jsx, channels.jsx, curators.jsx. Pre-existing debt, not introduced by any single feature -- found while building the bindings UI (archie-core-t2db.8), which would have been a 12th copy.","design":"Extract to ui/src/base/pill.jsx, export Pill, update all 11+ call sites to import from there instead of defining locally. Mechanical refactor -- no behavior change, verify with task test:ui.","acceptance_criteria":"ui/src/base/pill.jsx exists and exports Pill; all prior local definitions removed, all call sites import the shared one; task test:ui passes unchanged.","status":"open","priority":3,"issue_type":"task","owner":"sam@catlow.tech","created_at":"2026-09-02T18:43:54Z","created_by":"Sam Catlow","updated_at":"2026-09-02T18:43:54Z","dependency_count":0,"dependent_count":0,"comment_count":0} +{"_type":"issue","id":"archie-core-mlro","title":"ui: extract duplicated Pill component to ui/src/base/","description":"organisation.md's frontend rule says extract to ui/src/base/ on the second distinct consumer. Pill (a 3-line status-badge component) is already independently duplicated verbatim across 11 files: tasks.jsx, logs.jsx, mapping-editor.jsx, capture-row.jsx, settings.jsx, update-status.jsx, skills.jsx, dashboard.jsx, memory.jsx, channels.jsx, curators.jsx. Pre-existing debt, not introduced by any single feature -- found while building the bindings UI (archie-core-t2db.8), which would have been a 12th copy.","design":"Extract to ui/src/base/pill.jsx, export Pill, update all 11+ call sites to import from there instead of defining locally. Mechanical refactor -- no behavior change, verify with task test:ui.","acceptance_criteria":"ui/src/base/pill.jsx exists and exports Pill; all prior local definitions removed, all call sites import the shared one; task test:ui passes unchanged.","status":"closed","priority":3,"issue_type":"task","owner":"sam@catlow.tech","created_at":"2026-09-02T18:43:54Z","created_by":"Sam Catlow","updated_at":"2026-09-02T20:25:30Z","closed_at":"2026-09-02T20:25:30Z","close_reason":"Extracted to ui/src/base/pill.jsx, all 12 call sites updated (11 pre-existing + bindings). Verified via task test:ui (120/120) and real browser re-check across all pages given this touches the same rendering path as the earlier Preact regression fix. Commit 2abccf3.","dependency_count":0,"dependent_count":0,"comment_count":0} {"_type":"issue","id":"archie-core-uhtz","title":"skillcurator: nilerr finding at skillcurator.go:110 (pre-existing, unrelated to EDA work)","description":"task check's newly-added lint step (chore(taskfile) 60dde24) surfaced internal/infrastructure/skillcurator/skillcurator.go:110 -- returns nil despite a non-nil error at line 108 (nilerr). This is pre-existing debt, unrelated to any EDA/playbook engine work this session -- different subsystem entirely. Filed separately per this session's established pattern (see archie-core-e7bo) of not drive-by fixing unrelated findings inside an in-progress feature's tickets.","design":"Read the actual code at skillcurator.go:108-110 before fixing -- determine whether swallowing the error there was ever intentional (check git blame/history) or a genuine bug, and fix at the producer per AGENTS.md's Root-Cause Fixes rule rather than just propagating the error blindly if the surrounding contract expects a specific degrade-gracefully shape.","acceptance_criteria":"golangci-lint run ./... reports zero nilerr findings in internal/infrastructure/skillcurator/. Existing skillcurator tests pass; add a test covering the error path if none currently exercises it. task check passes.","status":"closed","priority":3,"issue_type":"bug","owner":"sam@catlow.tech","created_at":"2026-09-02T18:10:22Z","created_by":"Sam Catlow","updated_at":"2026-09-02T18:17:08Z","closed_at":"2026-09-02T18:17:08Z","close_reason":"Investigated per design notes: intentional behavior, not a bug -- confirmed against existing test coverage (skillcurator_test.go's parse-failure-doesn't-abort-batch test). Documented with a scoped nolint explaining why, not a behavior change. Commit pushed to main.","dependency_count":0,"dependent_count":0,"comment_count":0} {"_type":"issue","id":"archie-core-1y6y","title":"Adapt internal/tools/minimax to ai-sdk's video.Provider interface","description":"internal/tools/minimax (the generate_video tool) is a hand-rolled HTTP client (Config/Client/GenerateAndWait against MiniMax's video-generation API) that duplicates functionality ai-sdk already provides generically: video.Provider (Name/GenerateVideo(ctx,req)(resp,error)), core.GenerateVideo, and registry.RegisterVideo/.Video(name) -- the same registration shape chat models and the new image capability use. MiniMax's async submit-then-poll GenerateAndWait fits behind video.Provider's single blocking call fine; nothing about the interface forces synchronous-only backends.\n\nCurrently: not extensible (a second video backend would have to duplicate all the HTTP/poll scaffolding instead of just implementing video.Provider) and not reusable (can't be registered/discovered alongside a future video provider the way chat models and image providers can).\n\nFix: wrap minimax.Client behind an adapter implementing ai-sdk's video.Provider, register it via registry.RegisterVideo instead of the tool holding a bespoke *minimax.Client directly. Keep minimax.Client itself as the low-level HTTP/poll implementation -- only the tool-facing seam changes.","design":"Mirrors the note left on archie-core-1786748942169-3-ae7cfaea for the hosted image provider: adapt ai-sdk's existing provider-agnostic facility instead of a bespoke client. Adapter should preserve GenerateAndWait's polling behavior internally -- video.Provider's synchronous call shape does not require changing MiniMax's async job semantics, only where the polling loop is invoked from.","acceptance_criteria":"minimax.Client (or a thin adapter) implements ai-sdk/video.Provider; the generate_video tool obtains it through the ai-sdk provider registry, not a bespoke config-to-client wiring; existing tests (minimax_test.go, tool_test.go) still pass or are updated for the new seam; task check passes.","status":"open","priority":3,"issue_type":"task","owner":"sam@catlow.tech","created_at":"2026-09-02T10:36:12Z","created_by":"Sam Catlow","updated_at":"2026-09-02T11:03:52Z","external_ref":"https://github.com/samcharles93/archie-core/issues/681","dependency_count":0,"dependent_count":0,"comment_count":0} {"_type":"issue","id":"archie-core-jkmu","title":"send_file confinement is symlink-blind and re-opens the file after checking it","description":"internal/tools/builtin/confinement.go ResolveReadable applies exactly the read tool's policy (resolvePath + isReadConfined), which is purely lexical: filepath.Abs/Rel, never EvalSymlinks. A symlink inside the workspace pointing at /etc/shadow passes the check, and the telegram sender then opens att.Path with no confinement check of its own, in a different goroutine after the turn. There is also a real TOCTOU window -- prepare stats/opens/closes, SendMedia re-stats and re-opens later.\n\nThe policy is unchanged from the read tool, so this is not a new hole; what changed is the consequence. The read tool caps at 5MB into the operator's own context; send_file ships up to 50MB OUT to a chat. The shell tool has never been confined either, so a model that wants the bytes already has them.\n\nDecide: either resolve symlinks in ResolveReadable (which changes read-tool behaviour too, and may break legitimate symlinked workspaces), or document the caveat explicitly and stop claiming 'sending cannot reach what reading cannot' without it.\n\nFound by adversarial review of 9a45fbb.\n\n## Acceptance Criteria\nEither the symlink case is closed at the resolver, or the limitation is written down where the claim is made (confinement.go doc comment and sendfile package doc).","status":"open","priority":3,"issue_type":"task","owner":"sam@catlow.tech","created_at":"2026-08-24T15:54:43Z","created_by":"Sam Catlow","updated_at":"2026-08-24T19:49:55Z","external_ref":"https://github.com/samcharles93/archie-core/issues/647","dependency_count":0,"dependent_count":0,"comment_count":0}