chore(beads): wp9s phase-1 notes, file archie-core-mxls (/agents dead wiring)
This commit is contained in:
1 parent
9b9539fe81
commit
238aba8d81
1 file changed
+2
-1
+2
-1
@@ -95,6 +95,7 @@
|
||||
{"_type":"issue","id":"archie-core-g7tm","title":"telegram: finalize the reply through a live context, matching the error branch","description":"The success path calls live.finalize(turnCtx, reply) with the raw cancellable turn context (telegram.go:582), while the error branch two lines above deliberately uses context.WithoutCancel(turnCtx). If /stop lands during finalize, the rich edit, the plain-text retry, and the split-send fallback all abort with context.Canceled (go-telegram/bot builds requests with NewRequestWithContext), so the authoritative reply is never delivered and the live message keeps the ▌ cursor forever. The reply is persisted to the ledger, so the loss is delivery-level — but the user sees a frozen half-answer.\n\nFailure: a long tool-using turn is /stop-ped as it completes; turnCtx is cancelled mid-finalize; every send fails on the dead context; the chat shows the last live frame with a blinking cursor and no final answer.\n\nFound by code-review of PR #476 (feat/467, merged 98e8dda).","design":"live.finalize(context.WithoutCancel(turnCtx), reply) — the one-liner the error branch already uses. Consider making finalize take a live context internally rather than trusting each caller to remember.","acceptance_criteria":"A /stop landing mid-finalize still delivers the authoritative reply and drops the cursor; a test covers the cancellable-context finalize path.","status":"closed","priority":1,"issue_type":"bug","assignee":"Sam Catlow","owner":"sam@catlow.tech","created_at":"2026-08-14T14:43:08Z","created_by":"Sam Catlow","updated_at":"2026-08-14T15:07:36Z","started_at":"2026-08-14T14:53:28Z","closed_at":"2026-08-14T15:03:28Z","close_reason":"Fixed in internal/channels/telegram/live.go and telegram.go: finalize/abandon strip context cancellation before sending (mirroring each other), ToolCall escapes Markdown metacharacters via bot.EscapeMarkdown, splitLongMessage splits on rune boundaries. All new/changed tests verified red-then-green; task check clean; adversarial review pass found no blocking issues.","external_ref":"https://github.com/samcharles93/archie-core/issues/484","labels":["code-review","streaming","telegram"],"dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-tb3a","title":"Fix streaming review blockers for inline tool calls","description":"Resolve the four evidence-gated findings in merged inline tool-call streaming: preserve the authoritative Telegram reply when final edits fail; keep Telegram network I/O off the model FullStream consumer and cancellable; correlate tool inputs with results and render a bounded redacted parameter summary; snapshot show_tool_calls per live reply to avoid reload races. Add regression tests for every path and run task check plus lint/race validation.","acceptance_criteria":"Regression tests fail on the merged implementation and pass after the fix. Final edit failure falls back to normal split delivery. Delta and ToolCall callbacks do not wait on Telegram HTTP and stop cancels in-flight rendering. Completed tool events include bounded redacted parameters correlated by tool-call ID. Reload cannot race an in-flight reply's show_tool_calls setting. task check passes, golangci-lint reports no new findings, and focused race tests pass.","notes":"Implemented in worktree /tmp/archie-core-tb3a on branch fix/archie-core-tb3a. Added cancellable async Telegram rendering, final edit failure fallback through normal split delivery, call-ID-correlated bounded conservative parameter summaries, atomic per-reply show_tool_calls snapshots, SSE/UI parameter rendering, rebuilt ui/dist, and regression tests. Validation: GOFLAGS=-buildvcs=false task check passed; golangci-lint --new-from-rev=HEAD ./... reported 0 issues; focused race suite passed; fresh adversarial reviewer reported PASS with zero findings. Plain task check is blocked in linked worktrees by Go VCS stamping exit 128, hence buildvcs override.\n2026-08-24 reconciliation: the close reason's 'worktree left uncommitted' is stale. The work did land on main via ba33527 (Merge pull request #477 from samcharles93/fix/archie-core-tb3a); verified on main: gateway/stream.go sensitiveParameterKey+redactToolParameters, telegram/live.go per-reply showToolCalls snapshot, webui/api_chat.go gating. The /tmp/archie-core-tb3a worktree and its branch are gone, as expected.\n","status":"closed","priority":1,"issue_type":"bug","assignee":"Sam Catlow","owner":"sam@catlow.tech","created_at":"2026-08-13T18:05:35Z","created_by":"Sam Catlow","updated_at":"2026-08-24T07:29:09Z","started_at":"2026-08-13T18:05:39Z","closed_at":"2026-08-13T18:35:26Z","close_reason":"Completed and independently reviewed; worktree left uncommitted per conservative repository policy.","external_ref":"https://github.com/samcharles93/archie-core/issues/485","dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-dzx","title":"Remove duplicate archie-agent safe.directory setup","description":"## Problem\\ncmd/archie-agent/main.go configures git safe.directory inline and then calls markWorktreeSafe, so startup writes the same global git configuration twice.\\n\\n## Scope\\nKeep markWorktreeSafe as the single tested production path and remove the older inline exec.Command block/import. Add regression coverage proving startup wiring has exactly one authoritative safe-directory call.\\n\\n## Acceptance\\n- archie-agent startup invokes markWorktreeSafe exactly once\\n- no second inline safe.directory command remains in main.go\\n- cmd/archie-agent tests and repository quality gate pass","acceptance_criteria":"Single tested safe.directory setup path remains; duplicate inline command is removed; tests and task check pass","notes":"Red proof: TestMainConfiguresWorktreeSafetyOnce failed with 2 setup paths before implementation. Green proof: go test/vet/build ./cmd/archie-agent/... passed; golangci-lint --new-from-rev=HEAD reported 0 issues. Fresh adversarial review found no blockers. Full task check was not run because the working tree contains unrelated in-progress changes and task check rewrites files; scoped package gate used per repository protocol.","status":"closed","priority":1,"issue_type":"bug","assignee":"Sam Catlow","owner":"sam@catlow.tech","created_at":"2026-08-13T16:10:09Z","created_by":"Sam Catlow","updated_at":"2026-08-13T16:13:48Z","started_at":"2026-08-13T16:10:24Z","closed_at":"2026-08-13T16:13:48Z","close_reason":"Removed duplicate inline safe.directory setup; markWorktreeSafe is now the single tested production path","external_ref":"https://github.com/samcharles93/archie-core/issues/470","dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-mxls","title":"chat: /agents command is permanently unconfigured in production","description":"internal/gateway.Router.Agents (AgentReader interface, AgentInfo{ID,Title,Status,Identity}) backs the /agents command (handleAgents, gateway.go:1127), and /agents is registered and advertised: in gateway.go's localCommands/localCommandSpecs (description: 'List tasks currently being worked'), and in internal/channels/telegram/commands.go's gatewayCommandSpecs (same description, published to Telegram's command menu and /help).\n\nVerified via grep across internal/: Router.Agents is NEVER assigned outside of gateway_test.go's fakeAgentReader. None of the four composition-root call sites that build a Router (bootstrap.go's web/email/webhook routers, telegram_setup.go's buildTelegramRouter) ever set router.Agents. So in every real deployment, typing /agents in any channel returns the hardcoded fallback: 'Agent listing is not configured.' -- despite Telegram advertising it in its command menu with a description implying it works.\n\nFound while implementing archie-core-wp9s (the /status vs /tasks split): the new /tasks command (gateway.ChatTaskLister-backed) covers almost exactly what /agents' AgentInfo{ID,Title,Status,Identity} shape was meant to show, just fuller (adds workflow/stage/age/park-reason). AgentReader/AgentInfo appear to be an earlier, abandoned attempt at the same feature that was never connected during wiring.\n\nSam's call, not resolved here: (a) wire AgentReader to a real implementation (e.g. an adapter over the same ListChatTasks path /tasks now uses, if /agents is meant to mean something distinct from /tasks -- e.g. actively-executing containers rather than all non-terminal store tasks), (b) delete /agents (AgentReader, AgentInfo, handleAgents, both command-spec registrations, and their tests) now that /tasks exists and covers the same ground, or (c) something else entirely if 'agents' was meant to be a different concept than 'tasks'. See docs/prds/status-health-surface.md's note on this for the /tasks cross-reference.","acceptance_criteria":"A decision is recorded (wire, delete, or redefine) and /agents' advertised behavior in Telegram's menu/help matches what it actually does when invoked -- no command may be discoverable and described as functional while permanently returning a not-configured placeholder.","status":"open","priority":2,"issue_type":"bug","owner":"sam@catlow.tech","created_at":"2026-09-02T21:17:31Z","created_by":"Sam Catlow","updated_at":"2026-09-02T21:17:31Z","dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-t2db.20","title":"eda: LSP/serve mode for cmd/archie-playbooks","description":"Second entrypoint of the gopls-shaped standalone binary from t2db.12 (lint mode already shipped). Sam explicitly kept this in scope, not deferred, because it's the same schema source as the linter, just a different consumer -- the design doc's shared-package, thin-consumer principle.\n\nGrounded by a crew investigation pass (2026-09-03): the loader decodes with yaml.Unmarshal into a plain map, which discards line numbers -- today's lint findings are file-granular only. A useful LSP (hover/completion/inline errors) needs real positions, so the yaml.Node decoding upgrade is a practical prerequisite, not a nice-to-have. internal/domain/eda/expr's Compile/Eval already return structured errors that should map cleanly to diagnostics -- confirm this rather than re-deriving error shapes.","design":"Two-part scope, decide whether to split into two tickets or do both together once you've read the code:\n1. yaml.Node decoding upgrade: replace the plain-map yaml.Unmarshal decode path (internal/domain/workflow/routing.go -- three call sites at time of writing, all doing 'var raw map[string]string; yaml.Unmarshal(data, \u0026raw)') with yaml.Node-based decoding that retains line/column info, without changing any existing collision-detection behavior.\n\nVERIFIED FEASIBLE, concrete shape (2026-09-03): gopkg.in/yaml.v3's Node type has Line/Column fields populated directly by the decoder (confirmed in the vendored source). For a mapping node (Kind == MappingNode), Content is a flat []*Node alternating key-node, value-node pairs -- so decoding into *yaml.Node instead of map[string]string gives Content[i].Line for the i-th key's line number directly, no manual line-counting needed. The upgrade is: yaml.Unmarshal(data, \u0026node) into a *yaml.Node instead of the map, then walk node.Content in pairs extracting key.Value/value.Value (same strings as today) plus key.Line (new). This is a pure additive capability -- existing collision error MESSAGES should stay byte-identical where line info isn't yet surfaced in them, add line numbers to the error format once available. Do not change collision-detection LOGIC, only the decode representation.\n\n2. serve/lsp command: add a new entry to cmd/archie-playbooks's existing command table (do not restructure -- t2db.12 built it explicitly to take this addition without restructuring, confirmed by reading cmd/archie-playbooks/main.go's commands map). Scope: a minimal LSP surface (diagnostics at minimum; hover/completion if straightforward) over the same compile/validate path the lint command already uses. Weigh a tiny hand-rolled LSP protocol implementation (fits organisation.md's thin cmd/ rule and the narrow-capability-family principle) against pulling in an LSP library -- vet any new dependency via the vetting-dependencies skill before adding it, same rigor as the CEL decision (docs/prds/eda-playbook-engine.md's resolved open question 1) -- this is a real, undecided choice, not preempted here.","acceptance_criteria":"cmd/archie-playbooks gains a serve (or lsp) subcommand alongside lint, using the same underlying compile/validate calls -- no second validation path. Diagnostics report file:line where the yaml.Node upgrade provides it. Existing lint-mode tests and behavior are unchanged (regression-tested). task check passes.","notes":"Full vetting record for sourcegraph/jsonrpc2, 2026-09-03 (same rigor as the approved cel.dev/cel-go decision):\n\n- Security: zero advisories on record (GitHub Advisory Database, queried directly). License: MIT (compatible).\n- Maintenance: genuinely active -- commits within the last month (Aug 2026), real CI hygiene work (not a dead repo with a stale README). Not archived (unlike sourcegraph/go-lsp, the other candidate, which IS archived and was ruled out).\n- Dependency footprint: measured directly (not assumed) -- importing only the jsonrpc2.Conn surface pulls in exactly ONE dependency, no gorilla/websocket at all (go.sum showed a single entry). websocket is a lazy/optional dependency of the library, only pulled in if its WS-transport-specific APIs are actually called -- a stdio-only LSP transport never touches it.\n- Binary size cost: measured directly, same baseline methodology as the CEL vetting -- a minimal Go binary baseline was 2,343,283 bytes; adding jsonrpc2 (importing Conn) measured 2,715,265 bytes. Cost: +371,982 bytes (~0.36MB). Far lighter than CEL's +13MB, as expected for a narrow JSON-RPC engine vs. a full expression-language runtime.\n\nVerdict: sourcegraph/jsonrpc2 clears vetting cleanly -- safe, cheap, active, correctness-sensitive-and-worth-depending-on (same reasoning as CEL: reimplementing JSON-RPC request/response ID correlation by hand is a real correctness surface, not free). This is a complete, ready-to-approve recommendation, not yet approved -- do not add the dependency or start implementation until Sam signs off, miLine truncated
|
||||
{"_type":"issue","id":"archie-core-t2db.19","title":"eda: scope Channel and Forge action positions (investigation, blocked on execution-time gaps)","description":"Investigation ticket -- decide the typed-contract shape for the two remaining named action positions (Channel, Forge) before implementing either. Blocked on archie-core-t2db.17 (idempotency) since both are naturally side-effecting positions; investigation/scoping can proceed now, implementation cannot land before .17 resolves.\n\nGrounded by a crew investigation pass (2026-09-03): Channel already exists as internal/channels.Channel (embeds gateway.Gateway + ConfigSchema/ValidateConfig, telegram/email/webhook implementations registered at daemon startup). Forge already exists as internal/forge.Forge = IssueForge + PullRequestForge + RepoForge, with New(...) switching on github/gitea/none; the daemon poller currently special-cases forge operations directly rather than through any addressable position.","design":"See docs/prds/channel-forge-positions.md (committed 2026-09-03). Forge is fully scoped and ready to implement once t2db.17 lands: native-Go-by-name (not Module-kind) over the existing internal/forge.Forge interface, close-issue/link-branch as the safe first operations, create-pr deferred. Channel is NOT resolved -- the crew investigation's assumption that channels.Channel has an addressable send capability is FALSE (verified: only Name/Start/Stop + config validation exist, no Send method anywhere in internal/channels or internal/gateway). This is now an open product/architecture decision for Sam: whether 'Channel action' means (1) a new playbook-scoped notification capability distinct from the interactive chat channels, or (2) reusing the interactive channels with some new conversation-scoping mechanism for a non-chat trigger. Do not implement a Channel position until Sam decides which.","acceptance_criteria":"A design-doc addition (new docs/prds/ file or a section in eda-playbook-engine.md, your call which fits better -- state why) resolving: typed-contract shape for each position, Args/Result shapes, and the host-access/resolution mechanism. No implementation in this ticket.","status":"open","priority":2,"issue_type":"task","owner":"sam@catlow.tech","created_at":"2026-09-02T18:12:40Z","created_by":"Sam Catlow","updated_at":"2026-09-02T18:15:31Z","dependencies":[{"issue_id":"archie-core-t2db.19","depends_on_id":"archie-core-t2db","type":"parent-child","created_at":"2026-09-02T18:12:40Z","created_by":"Sam Catlow","metadata":"{}"},{"issue_id":"archie-core-t2db.19","depends_on_id":"archie-core-t2db.17","type":"blocks","created_at":"2026-09-02T18:12:40Z","created_by":"Sam Catlow","metadata":"{}"}],"dependency_count":1,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-t2db.16","title":"eda: reduce complexity in bootstrap.go loadWorkflows and routing.go LoadPlaybookDirs","description":"task check now runs golangci-lint (Sam's explicit requirement, 2026-09-03 -- catch lint regressions as part of the definitive gate, not just fmt/vet/build/test). First run surfaced two real findings, both accumulated debt from this session's own EDA slices, not pre-existing:\n\n1. internal/app/archied/bootstrap.go:647 loadWorkflows -- cyclomatic complexity 17, max 15 (cyclop). Grew incrementally across t2db.9 (kindWorkflows), t2db.10 (labelWorkflows), t2db.11 (PlaybookDirs merge), t2db.15 (EDAPlaybookDir) -- each addition was small, the function as a whole crossed the threshold.\n2. internal/domain/workflow/routing.go:103 LoadPlaybookDirs -- cognitive complexity 52, max 30 (gocognit), from t2db.11's directory-merge loader (kind-vs-label detection, per-file and cross-file collision checks all inline).\n\nRoot-cause fix required, not suppression: no //nolint. Extract cohesive sub-steps into named helper functions -- this is exactly the kind of case AGENTS.md's Architectural Simplicity rule describes (prefer a clean extraction over papering past a threshold).","design":"For loadWorkflows: extract the four independent load-and-set steps (kind-file load, label-file load, playbook-dirs load+merge, EDAPlaybookDir load) into named helpers the top-level function calls in sequence, each returning its own error for the existing log-and-abort pattern. Do not change the log-and-abort error-handling shape or field names.\n\nFor LoadPlaybookDirs: split the per-file parsing loop's kind-detection-vs-label-detection-vs-collision-check logic into a couple of named helpers (e.g. classifyBinding, checkCollision) called from the main loop, keeping the existing collision error messages and behavior byte-identical -- this is a pure refactor, not a behavior change.","acceptance_criteria":"golangci-lint run ./... reports zero cyclop/gocognit findings on these two functions. All existing tests for workflow.LoadPlaybookDirs, kindWorkflows, labelWorkflows, and bootstrap's loadWorkflows-adjacent behavior pass unchanged (byte-identical collision error messages -- diff the exact strings, do not just check err != nil). task check (now including lint) passes fully.","status":"closed","priority":2,"issue_type":"task","owner":"sam@catlow.tech","created_at":"2026-09-02T18:10:21Z","created_by":"Sam Catlow","updated_at":"2026-09-02T20:42:32Z","closed_at":"2026-09-02T20:42:32Z","close_reason":"Both cyclop/gocognit findings resolved via pure extraction; golangci-lint run ./... reports 0 issues; go test ./... and task test:ui pass unchanged; task check green.","dependencies":[{"issue_id":"archie-core-t2db.16","depends_on_id":"archie-core-t2db","type":"parent-child","created_at":"2026-09-02T18:10:21Z","created_by":"Sam Catlow","metadata":"{}"}],"dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
@@ -145,7 +146,7 @@
|
||||
{"_type":"issue","id":"archie-core-atv2","title":"liveReply fallback lines appended after finalize are never rendered","description":"A media delivery that fails AFTER doFinalize has run appends its fallback line to l.toolLines and calls requestRender(), but stopRendering() has already closed renderDone and the renderer goroutine has exited. requestRender is a non-blocking send into a cap-1 channel with no consumer, so the line is dropped and the finalized Telegram message stands unchanged.\n\nMedia is fire-and-forget with a 30s budget while the turn's text finishes far earlier, so this is the NORMAL case for a large upload: a 40MB document that 400s or times out reports 'could not send x' into a slice nothing reads. Pre-dates the local-file work (URL fallbacks have the same hole) but archie-core-absb's guarantee that non-delivery is always visible depends on it.\n\nFound by adversarial review of 9a45fbb. internal/channels/telegram/live.go:419-437 with :498-532.\n\n## Acceptance Criteria\nA media failure occurring after the live reply has finalized still reaches the user -- e.g. as its own follow-up message rather than an edit to a message nothing re-renders. Covered by a test that finalizes first and fails the send second.","status":"closed","priority":2,"issue_type":"bug","owner":"sam@catlow.tech","created_at":"2026-08-24T15:54:42Z","created_by":"Sam Catlow","updated_at":"2026-09-01T15:18:56Z","closed_at":"2026-09-01T15:18:56Z","close_reason":"Fixed: stopRendering now marks the reply finalized, and appendFallbackLine sends a standalone follow-up message instead of writing into a dead render buffer. Covered by TestLiveReplyMediaFallbackAfterFinalizeSendsFollowUp.","external_ref":"https://github.com/samcharles93/archie-core/issues/646","dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-h3lg","title":"Dashboard swallows failed operator actions, showing nothing in the UI","description":"When an operator action fails, the dashboard surfaces nothing. Pressing Stop on a running task issued POST /api/tasks/3/action, received 403, and the only evidence anywhere was a browser console line: \"Failed to load resource: the server responded with a status of 403\". The page itself showed no error, no toast, no change of state -- the button simply appeared to do nothing.\n\nThis is how archie-core-440c (every dashboard mutation 403s behind a TLS-terminating reverse proxy) went unnoticed: the operator pressed Stop, saw nothing happen, and reasonably concluded the task was unstoppable rather than that the request had been refused. The bug was only found by opening devtools.\n\nConfirmed live 2026-08-25 while signed in to the production dashboard.\n\n## Why this is its own bead\n\n440c fixes the 403. This bead fixes the fact that ANY failed action is invisible -- a 500, a store failure, a refused state transition, an expired session -- and each of those has its own way of going wrong. Fixing only 440c leaves the next failure equally silent.\n\nNote internal/webui/api_tasks.go already returns distinguishable, human-readable failures (\"missing CSRF header\", \"cross-origin mutation refused\", \"runtime task control is unavailable\"). The server side is doing its job; the client discards it.\n\n## What is needed\n\n- A failed action tells the operator it failed, in the UI, with the server's reason where one is given.\n- The distinction that matters most: refused (403, bad state, not permitted) versus broken (5xx, network). The operator's next move differs -- the first is \"you cannot do that\", the second is \"try again or check the daemon\".\n- A 401 or an expired forward-auth session should prompt re-authentication rather than reading as a generic failure, since the deployment sits behind Authelia.\n- The optimistic UI must not show an action as applied when it was refused.\n\nPer CLAUDE.md the frontend is one folder per feature under ui/src/\u003cfeature\u003e with shared primitives in ui/src/base -- error surfacing used by more than one feature belongs in base, extracted on the SECOND real consumer, not in anticipation. Remember ui/dist is committed: run `task ui` and commit the rebuilt output in the same change.\n\n## Steps to Reproduce\n\n1. Load the dashboard in a deployment where mutations fail (any 440c-affected proxied deployment reproduces it directly).\n2. Press Stop, Retry, Abandon or Archive on a task.\n3. Observe the request fails in devtools while the page reports nothing.\n\n## Acceptance Criteria\n\nA failed operator action is reported in the dashboard with the server's reason where supplied; refused and broken failures are distinguishable to the operator; an authentication failure prompts re-auth rather than a generic error; no optimistic state change survives a failed request; dashboard tests cover a refused action, a server error and a network failure; ui/dist is rebuilt and committed.\n","status":"open","priority":2,"issue_type":"bug","owner":"sam@catlow.tech","created_at":"2026-08-24T15:49:18Z","created_by":"Sam Catlow","updated_at":"2026-08-24T15:50:15Z","external_ref":"https://github.com/samcharles93/archie-core/issues/629","dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-kkeg","title":"No byte-for-byte conversation replay: transcripts cannot be exported or examined","description":"Asked to save a complete transcript -- \"everything. My messages, yours, tools everything. Also save the agents logs\" -- the agent could not. It produced a summary archive and honestly documented the limitation: no chat export exists, and the task-log responses were clipped at the tool's 50 KB cap.\n\nSam's requirement: \"we should be able to receive and view and examine byte-for-byte replays of an entire transcript. exactly the commands run, the results received for those commands, the user messages, agent responses, EVERYTHING.\"\n\n## What exists and what does not\n\ninternal/gateway has session tooling -- session_list, session_resume, session_title, session_delete -- so sessions are already first-class and persisted (the turn ledger backs /gateway's replay of completed-duplicate turns, and archie-core-ippu made tool activity part of that record). What is missing is retrieval: nothing exposes a session's full contents for export or examination.\n\nEstablish first exactly what is persisted per turn today, because the answer determines whether this is an export feature or a capture feature. If tool ARGUMENTS and full tool RESULTS are not currently retained -- only rendered summaries -- then byte-for-byte replay requires changing what is written, not just adding a reader. That distinction is the main open question and should be settled before design.\n\n## Requirements\n\n- Fidelity: user messages, agent responses, every tool call with its arguments, and every tool result, in order, with timestamps. Not a rendered summary, and not the truncated preview the chat UI shows.\n- Retrieval: usable for a whole session, not capped at a tool-result size limit. Bulk delivery almost certainly belongs on the send_file path (archie-core-absb) rather than in a tool result -- write the file, deliver the file.\n- Examination, not just download: an operator should be able to inspect a replay in the dashboard, which is where the event inspector already lives.\n- Honesty: if anything is unavailable (rotated, compacted, never captured), the export must say so explicitly rather than presenting a partial record as complete. The agent got this right by hand; the mechanism should guarantee it.\n\n## Constraints\n\n- Transcripts contain secrets by nature -- tool arguments carry tokens, results carry file contents. internal/memory/scrubber and gateway/stream.go's sensitiveParameterKey are existing prior art for redaction and should be reused rather than reimplemented. Decide explicitly whether an export is redacted, raw, or offers both, and who may request one.\n- Retention: a full-fidelity record is large. Decide what is kept and for how long, consistent with the 7-day payload retention already decided for captured events.\n\n## Acceptance Criteria\n\nAn operator can export a complete session transcript containing user messages, agent responses, tool calls with arguments and tool results with content, in order and timestamped; the export is delivered as a file rather than clipped into a tool result; a replay can be examined in the dashboard; anything missing from the record is stated explicitly in the export; redaction policy is decided, documented and applied; tests cover a session larger than any tool-result cap and assert no gaps or reordering.\n","status":"open","priority":2,"issue_type":"feature","owner":"sam@catlow.tech","created_at":"2026-08-24T15:48:56Z","created_by":"Sam Catlow","updated_at":"2026-08-24T15:50:16Z","external_ref":"https://github.com/samcharles93/archie-core/issues/630","dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-wp9s","title":"/status and /tasks have the wrong division of labour","description":"Sam's words: \"/status is fucking annoying. I'm invoking an actual status update, receiving minor information as well as shit I can get elsewhere. What's worse is that the /tasks command is meant to be for viewing the running agents, not /status.\"\n\nObserved 2026-08-24, the entire output of /status was:\n\n Tasks Parked: 2\n Runtime Provider: OpenAI Model: openai/gpt-5.6-luna\n\nTwo problems in one screen. It answers the question /tasks should own (what work is in flight), and it answers it thinly -- a count, with no task identity, no stage, no age, nothing actionable. Everything else it shows is static configuration available elsewhere. Later in the same session /status reported \"Running: 1\" for a task that was stuck in a failure loop and going nowhere, which is the specific case where a bare count actively misleads.\n\n## The division of labour to restore\n\n- `/tasks` owns WORK: what is running, what is parked and why, what needs the operator. This is the live view of the agents, and it is where task identity, workflow, stage, attempt and age belong.\n- `/status` owns HEALTH: is the daemon well. Broker connectivity, provider reachability, channel state, container pool, queue depth, last poll, version. The things an operator checks when something feels wrong and which are NOT visible elsewhere in chat.\n\nNeither should be a thin duplicate of the other, and neither should pad itself with static config the operator already knows.\n\n## Related, decide together\n\narchie-core-624 (task_action chat tool) adds operator verbs for tasks. /tasks is the natural surface for discovering the ids those verbs act on, so the two should be designed as one flow: see the work, then act on it. Check what internal/gateway/task_tools.go already returns before adding a new query path -- ChatTaskSummary may already carry most of what /tasks should show.\n\n## Steps to Reproduce\n\n1. Run /status in chat with tasks parked and one running.\n2. Observe a parked/running COUNT plus provider and model, with no way to identify or act on any task.\n3. Run /tasks and observe the overlap.\n\n## Acceptance Criteria\n\n/tasks shows the live work with enough identity and state to act on it (id, title, status, workflow/stage, age) and is the documented way to view running agents; /status reports daemon health that is not obtainable elsewhere in chat and does not duplicate the task list; a task that is running but not progressing is distinguishable from one making progress; the command descriptions registered with the platform match what each actually does.\n","status":"open","priority":2,"issue_type":"bug","owner":"sam@catlow.tech","created_at":"2026-08-24T15:48:33Z","created_by":"Sam Catlow","updated_at":"2026-08-24T15:50:17Z","external_ref":"https://github.com/samcharles93/archie-core/issues/631","dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-wp9s","title":"/status and /tasks have the wrong division of labour","description":"Sam's words: \"/status is fucking annoying. I'm invoking an actual status update, receiving minor information as well as shit I can get elsewhere. What's worse is that the /tasks command is meant to be for viewing the running agents, not /status.\"\n\nObserved 2026-08-24, the entire output of /status was:\n\n Tasks Parked: 2\n Runtime Provider: OpenAI Model: openai/gpt-5.6-luna\n\nTwo problems in one screen. It answers the question /tasks should own (what work is in flight), and it answers it thinly -- a count, with no task identity, no stage, no age, nothing actionable. Everything else it shows is static configuration available elsewhere. Later in the same session /status reported \"Running: 1\" for a task that was stuck in a failure loop and going nowhere, which is the specific case where a bare count actively misleads.\n\n## The division of labour to restore\n\n- `/tasks` owns WORK: what is running, what is parked and why, what needs the operator. This is the live view of the agents, and it is where task identity, workflow, stage, attempt and age belong.\n- `/status` owns HEALTH: is the daemon well. Broker connectivity, provider reachability, channel state, container pool, queue depth, last poll, version. The things an operator checks when something feels wrong and which are NOT visible elsewhere in chat.\n\nNeither should be a thin duplicate of the other, and neither should pad itself with static config the operator already knows.\n\n## Related, decide together\n\narchie-core-624 (task_action chat tool) adds operator verbs for tasks. /tasks is the natural surface for discovering the ids those verbs act on, so the two should be designed as one flow: see the work, then act on it. Check what internal/gateway/task_tools.go already returns before adding a new query path -- ChatTaskSummary may already carry most of what /tasks should show.\n\n## Steps to Reproduce\n\n1. Run /status in chat with tasks parked and one running.\n2. Observe a parked/running COUNT plus provider and model, with no way to identify or act on any task.\n3. Run /tasks and observe the overlap.\n\n## Acceptance Criteria\n\n/tasks shows the live work with enough identity and state to act on it (id, title, status, workflow/stage, age) and is the documented way to view running agents; /status reports daemon health that is not obtainable elsewhere in chat and does not duplicate the task list; a task that is running but not progressing is distinguishable from one making progress; the command descriptions registered with the platform match what each actually does.\n","notes":"Phase 1 shipped 2026-09-03 (commit 370b0ee): /tasks is a new command (identity, title, status, workflow/stage, age via UpdatedAt, attempt once retried, parked reason), sorted actionable-first; /status's itemized per-status task counts replaced with one aggregate 'Queue: N in flight (...)' line (running/waiting/parked only). Runtime (provider/model) left in place for now -- open question below.\n\nPhase 2 (broker connectivity, provider reachability, channel state, container pool, last poll) is NOT implemented -- proposed resolution in docs/prds/status-health-surface.md, verified against the real tree and split into cheap (broker connectivity via nats.Conn.Status(), container pool's already-tracked active count, a new last-poll timestamp) vs needs-a-decision (provider reachability: live probe vs last-known-outcome; channel state: likely via the existing ChannelManager). Awaiting Sam's sign-off before implementing Phase 2 -- do not close this bead until Phase 2 lands or is explicitly descoped.\n\nAlso found while doing this (filed separately, not folded in): archie-core-mxls -- /agents is registered and advertised (Telegram command menu + /help) but Router.Agents is never wired by any composition-root call site, so it always answers 'not configured' in production. /tasks now covers most of what /agents' shape was for; Sam's call whether to wire/delete/redefine /agents.","status":"in_progress","priority":2,"issue_type":"bug","assignee":"Sam Catlow","owner":"sam@catlow.tech","created_at":"2026-08-24T15:48:33Z","created_by":"Sam Catlow","updated_at":"2026-09-02T21:17:49Z","started_at":"2026-09-02T21:15:40Z","lease_expires_at":"2026-09-02T21:20:40Z","heartbeat_at":"2026-09-02T21:15:40Z","external_ref":"https://github.com/samcharles93/archie-core/issues/631","dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-8qpa","title":"Chat agent does not know its own repository or workspace, wasting turns rediscovering them","description":"Asked to raise a GitHub issue, the agent spent roughly eight tool calls working out where it lives: `pwd`, a `find` over /home/sam/projects returning 139 lines, `git remote -v`, a grep over RELEASING.md returning 92 lines, and a failed `read` of a README that does not exist. It eventually located the repository and filed the issue correctly, but every one of those calls was rediscovering a fact the daemon already knows.\n\nSam's words: \"Yep, thats frustrating AF!\"\n\n## Why this is worth fixing structurally\n\nIt is not only slow and expensive. It is a correctness risk: an agent that has to guess which checkout it is looking at can act on the wrong one, and on this host more than one archie-core checkout exists. It also degrades every task that begins with orientation rather than work.\n\n## What to do\n\ninternal/gateway/BuildSystemPrompt renders templates/archie.md.tpl, which already carries an `\u003cenv\u003e` block. Per CLAUDE.md that template is the single place instruction precedence, core rules and the `\u003ctools\u003e`/`\u003cenv\u003e` blocks live -- personas are the STYLE layer only, so this belongs in the template, never in a persona string.\n\nPut the facts the daemon already holds into `\u003cenv\u003e`: the configured workspace path, the repositories under management with their forge and default branch, and the identity in use. Configuration is the source of truth ([repos] entries, chat.workspace); do not have the prompt claim anything the daemon cannot confirm, and do not hardcode paths.\n\nNote the same rule that governs `\u003ctools\u003e` applies here: the block must be built from what the daemon actually has, because a prompt that names a repository the agent cannot reach is worse than silence -- the model will confidently act on it.\n\n## Acceptance Criteria\n\nThe chat agent knows its workspace path, managed repositories and identity without probing the filesystem; the block is rendered from live configuration rather than hardcoded; an empty or unconfigured value renders as explicitly unknown rather than as a plausible-looking default; a task that previously required filesystem archaeology to orient completes without it; tests assert the block reflects configuration and omits nothing the daemon knows.\n","status":"open","priority":2,"issue_type":"feature","assignee":"samcharles93","owner":"sam@catlow.tech","created_at":"2026-08-24T15:48:15Z","created_by":"Sam Catlow","updated_at":"2026-08-24T19:49:30Z","external_ref":"https://github.com/samcharles93/archie-core/issues/632","metadata":null,"labels":["agent"],"dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-8s7v","title":"[EPIC] Intercom: let the chat agent talk to running agents, the curator, and peers","description":"Today the chat agent can only observe autonomous work -- list tasks, read logs -- and act on it as an outsider through coarse verbs (spawn, stop). It cannot TALK to a running agent. An operator who can see a task going wrong has no way to say \"stop guessing, the config lives at X\" without killing the task and starting over, losing everything the agent had already worked out. Archie should behave like a living system whose parts can address each other, not a set of isolated processes with a dashboard bolted on.\n\n## Prior art: pi-intercom\n\nPi ships `pi-intercom`, which solves this shape for Pi sessions on one machine and is worth reading before designing (/home/sam/.pi/agent/npm/node_modules/pi-intercom; skills/pi-intercom/SKILL.md is the usage guide). Its model:\n\n- Sessions take names (`/name planner`, `/name worker-backend`) and address each other by name.\n- `send` -- fire-and-forget notification. Task assignment, status, notice.\n- `ask` -- BLOCKS until the target replies, with a timeout. The blocking form is the interesting one: it lets a worker stop and get a decision instead of guessing.\n- `reply` -- answers an inbound ask, threaded automatically.\n- `pending` -- lists unresolved inbound asks, i.e. who is waiting on you.\n- `list` -- connected sessions and their state (idle / thinking / tool), for discovering targets.\n- Its use cases map directly onto archie: planner-to-worker delegation, context and findings handoff, blocking clarification, subagent escalation (`need_decision`, `interview_request`), cross-project coordination.\n\n## What is genuinely different here\n\nDo NOT copy pi-intercom's transport. It ships its own local IPC broker (broker/broker.ts, a socket server with framing, spawn and runtime-claim logic) because Pi has no message bus. **Archie already has one**: NATS, with per-task subjects already defined in internal/agentexec/subjects.go (archie.agent.\u003cid\u003e.system and .events) and a request/reply pattern already used by taskrun, forgerpc, storerpc and worktreerpc. Building a second broker alongside it would be the \"two parallel abstractions\" mistake this repo already made once with gateway.BasePlatformAdapter.\n\nSo the real design questions are:\n1. Does agent-directed messaging ride the existing per-task subjects, or does it need its own contract and subject family? Note CLAUDE.md's recorded NATS traps -- work-queue retention forbids overlapping consumers, and reply inboxes are core-NATS-only and are not stream subjects.\n2. What is addressable? Running tasks have ids. The curator, channels and the daemon itself do not have a uniform identity for this purpose. An address space has to be decided before verbs are.\n3. How does a BLOCKING ask work against an agent that is mid-model-call? A worker is not sitting in a receive loop; it is inside an agentloop turn. Delivering a message it will actually notice, without corrupting the turn, is the hard part -- and is where this stops being a transport problem.\n4. Authorization: an operator messaging their own task is fine. Cross-identity messaging is not, and multi-identity deployments are supported (deployments/multi-forge-github-gitea.toml). Whatever the gateway's task tools enforce for identity scoping, this must enforce too.\n5. Does an inbound operator message become part of the agent's context permanently, or a one-shot injection? This decides whether it can be used to steer a task or only to interrupt it.\n\n## Relationship to existing work\n\n- Overlaps archie-core-absb (agent cannot send local files) only in spirit: both are about the agent being able to communicate outward.\n- The curator (internal/domain/curator) is a natural second participant after running tasks.\n- Any design here should be checked against docs/architecture/organisation.md: the domain declares the contract it needs; the transport implements it.\n\n## Success Criteria\n\nAn operator can address a running agent from chat and have it receive the message without the task being killed and restarted; a blocking ask returns the agent's answer or times out cleanly; participants are discoverable with their current state; messaging is identity-scoped so one identity cannot address another's work; the mechanism reuses the existing NATS transport rather than introducing a second broker; a design decision is recorded in docs/prds/ before implementation, per CLAUDE.md's scope discipline.\n","notes":"Provenance correction 2026-08-25: this bead's description says 'Pi ships pi-intercom'. That is WRONG and Sam corrected it -- pi-intercom is a THIRD-PARTY PLUGIN written by a different developer solving their own problem, not a Pi feature and not endorsed by Pi. Weigh it accordingly: it is one developer's solution worth reading for its verb vocabulary (send/ask/reply/pending/list) and for the blocking-ask idea, notLine truncated
|
||||
{"_type":"issue","id":"archie-core-absb","title":"Agent cannot send local files: Telegram delivery is URL-fetch only","description":"The agent can produce a file on the host -- a log dump, a screenshot, a written archive, a diff -- and has no way to deliver it to the operator. Asked to send a saved transcript, it replied with a \"Download the archive\" link twice; nothing arrived either time, and it had no signal that anything had failed.\n\n## Why video works and files do not\n\n`telegramMediaSender.dispatch` (internal/channels/telegram/media.go:97) builds every attachment as:\n\n file := \u0026models.InputFileString{Data: att.URL}\n\n`InputFileString` tells Telegram to FETCH the given URL itself. That works for the existing media path because those attachments are remote-hosted -- MiniMax returns a public URL for a generated video, which is what `MultimodalResult.URLs` was added for. It cannot work for anything produced locally: a daemon-host path like /home/sam/archive.md is not a URL Telegram can fetch, so the send silently does nothing useful.\n\nThe `case \"document\"` branch (media.go:124-127) already calls `bot.SendDocument`, so the routing exists. Only the file SOURCE is wrong.\n\n## What is needed\n\nA way for the agent to send a LOCAL file as an attachment -- documents, logs, screenshots, images, any media -- not a link. The go-telegram/bot SDK supports upload via a reader (`models.InputFileUpload` with an io.Reader) as an alternative to `InputFileString`; the sender needs to choose between fetch-by-URL and upload-by-reader based on whether the attachment is remote or local.\n\nExplicitly NOT the fix: exposing an external/public URL for local files. That trades a missing feature for a hosting and access-control problem.\n\n## Constraints to respect\n\n- Telegram enforces upload size limits (50 MB for documents via the Bot API at time of writing); exceeding them must produce a clear error to the operator, not a silent drop.\n- The file tools are workspace-confined unless `[chat] unrestricted_filesystem = true`. Sending must not become a way around whatever confinement is configured -- resolve and check the path under the same policy the read tool applies.\n- A failed send must surface as a failure the agent can see and report. The current defect is not that the agent lied; it is that success and silent non-delivery are indistinguishable to it.\n\n## Acceptance Criteria\n\nThe agent can send a local file through Telegram and the operator receives it as an attachment; local and remote attachments both work, choosing upload-by-reader or fetch-by-URL as appropriate; a send that fails (too large, unreadable, outside the configured confinement) returns an error the agent surfaces rather than reporting success; existing remote-URL media delivery is unchanged and still covered by tests.\n","status":"closed","priority":2,"issue_type":"feature","owner":"sam@catlow.tech","created_at":"2026-08-24T15:32:07Z","created_by":"Sam Catlow","updated_at":"2026-08-24T15:50:19Z","closed_at":"2026-08-24T15:43:20Z","close_reason":"send_file tool plus upload-by-reader delivery; commit 9a45fbb","external_ref":"https://github.com/samcharles93/archie-core/issues/634","dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
|
||||
Reference in new issue
Block a user