fix(webui): give dashboard-initiated updates a phase-2 report
handleChatUpdateInstall called Install with InstallMeta{Channel:
"webui"} and no ReportPath, so the update watchdog's write_report()
silently returned without ever persisting a phase-2 outcome
(restart/health-check/version verification). Telegram had this via
reportPendingUpdate/SendPendingReport; the dashboard had nothing --
an operator who approved an update from the webui only ever saw the
synchronous phase-1 install result, never whether the daemon came
back up on the version it claimed.
Give webui its own report path (updateReportPath(cfg.WorkDir,
"webui"), hashed the same way as Telegram's per-identity path so the
two can never collide) and a boot-time reportPendingUpdate, mirroring
Telegram's but emitting a structured events.KindUpdateReport onto the
existing SSE/activity stream instead of a chat message -- the
dashboard has no session-scoped recipient to route text to the way a
chat ID gives Telegram one. Report.Verify's Confirmed/Drift/Unverified
partition (c25799e) is reused as-is; only the surface differs.
Closes archie-core-nln7 / GH#531.
This commit is contained in:
1 parent
15d66785ee
commit
8809d44505
8 files changed
+363
-34
No files matched your search
+48
-25
@@ -1,10 +1,27 @@
|
||||
{"_type":"issue","id":"archie-core-mzok","title":"Make ClaimTurn insert-race regression deterministic under CI","description":"GitHub deploy run 32587841233 failed after the gateway compile fix because TestClaimTurnConcurrentInsertRaceNeverReturnsAnError launched 200 concurrent SQLite claims and exhausted its immediate retry loop with SQLITE_BUSY. The test's stated target is the two-connection same-turn insert race, not unrelated global write-lock saturation.","acceptance_criteria":"The regression still races two independent stores over the same turn ID; unrelated cross-trial SQLite contention cannot exhaust retries; repeated focused runs, task check, and diff-scoped lint pass; fresh adversarial review has zero surviving findings.","status":"closed","priority":0,"issue_type":"bug","assignee":"Sam Catlow","owner":"sam@catlow.tech","created_at":"2026-08-22T17:34:07Z","created_by":"Sam Catlow","updated_at":"2026-08-22T18:14:28Z","started_at":"2026-08-22T17:34:11Z","closed_at":"2026-08-22T18:14:28Z","close_reason":"Release blockers fixed and pushed to main: ea76432 restored the media delivery result without reviving BasePlatformAdapter; ef2abd1 and bf72384 made the ClaimTurn regression isolate its intended race and yield between bounded SQLITE_BUSY retries. Full task check and fresh adversarial reviews passed.","dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-bia3","title":"Fix merged gateway capability contract blocking GitHub deploy","description":"PR #560 removed the dead BasePlatformAdapter while PR #561 independently added adapter_capabilities.go and tests that still depend on it. Both branches passed alone, but merged main no longer compiles, so deploy.yml cannot publish the intended video-generation release.","acceptance_criteria":"internal/gateway compiles without BasePlatformAdapter; live Telegram media delivery and capability reporting remain covered; task check and lint pass; a fresh adversarial review has zero surviving findings.","status":"closed","priority":0,"issue_type":"bug","assignee":"Sam Catlow","owner":"sam@catlow.tech","created_at":"2026-08-22T17:15:14Z","created_by":"Sam Catlow","updated_at":"2026-08-22T18:14:28Z","started_at":"2026-08-22T17:15:22Z","closed_at":"2026-08-22T18:14:28Z","close_reason":"Release blockers fixed and pushed to main: ea76432 restored the media delivery result without reviving BasePlatformAdapter; ef2abd1 and bf72384 made the ClaimTurn regression isolate its intended race and yield between bounded SQLITE_BUSY retries. Full task check and fresh adversarial reviews passed.","dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-1ysw.1","title":"Bind worktree RPC operations to the dispatched task","description":"The sandboxed agent can currently choose owner, repo, issue, base, and branch on worktree RPC requests. The daemon then performs host deletion and credentialed forge operations without correlating the request to the dispatched task or enforcing WorkDir containment.","acceptance_criteria":"Reject traversal and unconfigured or task-mismatched coordinates before any filesystem or forge side effect; derive or validate the permitted branch; regression tests fail on the old behavior and pass on the fix.","status":"closed","priority":0,"issue_type":"bug","assignee":"Sam Catlow","owner":"sam@catlow.tech","created_at":"2026-08-22T11:01:43Z","created_by":"Sam Catlow","updated_at":"2026-08-22T11:47:02Z","started_at":"2026-08-22T11:02:03Z","closed_at":"2026-08-22T11:47:02Z","close_reason":"Implemented per-dispatch publication grants, removed sandbox-selected prepare/path authority, made repository worktree keys collision-free, and added fail-closed legacy migration/cleanup coverage.","dependencies":[{"issue_id":"archie-core-1ysw.1","depends_on_id":"archie-core-1ysw","type":"parent-child","created_at":"2026-08-22T21:01:42Z","created_by":"Sam Catlow","metadata":"{}"}],"dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-1ysw","title":"Repair internal/worktree correctness and trust-boundary defects","description":"Track the concrete worktree-package defects proven by the 2026-08-22 evidence-gated review. Child bugs cover RPC authority/path containment, repository-key isolation, retry/base/diff correctness, push lifecycle, terminal cleanup, cancellation, and branch naming. This epic groups implementation only; each child has its own observable acceptance criteria.","acceptance_criteria":"All child bugs are closed with red-green regression tests, scoped lint passes, and the repository quality gate is clean.","status":"open","priority":0,"issue_type":"epic","owner":"sam@catlow.tech","created_at":"2026-08-22T11:01:18Z","created_by":"Sam Catlow","updated_at":"2026-08-22T11:01:18Z","dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-1787489595430-1-8f81afa3","title":"Security: an unauthenticated endpoint must not be able to run an agent","description":"P0 within this epic because the feature's own pitch is the threat model: a public intake surface whose output is an agent with tool access and a repo. Get this wrong and a webhook URL is remote code execution with extra steps.\n\nNon-negotiables to design:\n\n- Per-source authentication. A source registers with a secret (HMAC, as internal/channels/webhook already does per route) before its events can trigger anything. Capture-only for unknown senders is acceptable; triggering is not.\n- Human approval before a binding goes live. An operator authoring a binding is a deliberate act; an event arriving is not. Nothing should self-arm.\n- Rate and volume limits per source, so capture cannot be used to exhaust disk or drown the inspector.\n- Payload content is untrusted input flowing into an agent prompt. Treat prompt injection as expected, not exceptional -- the sender controls that text, and the agent has tools. Bound what a playbook-triggered workflow may do.\n- Captured payloads may contain secrets from the sending system. Decide retention, redaction and who can view them; internal/memory/scrubber may already have applicable prior art.\n\nArchie's own principle applies: environmental enforcement over prompt rules. 'The agent should ignore instructions in the payload' is not a control.","status":"in_progress","priority":0,"issue_type":"feature","created_at":"2026-08-23T12:22:08Z","updated_at":"2026-08-23T12:22:08Z","external_ref":"https://github.com/samcharles93/archie-core/issues/564","source_system":"github:https://github.com/samcharles93/archie-core/issues/564:564","metadata":null,"dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-mzok","title":"Make ClaimTurn insert-race regression deterministic under CI","description":"GitHub deploy run 32587841233 failed after the gateway compile fix because TestClaimTurnConcurrentInsertRaceNeverReturnsAnError launched 200 concurrent SQLite claims and exhausted its immediate retry loop with SQLITE_BUSY. The test's stated target is the two-connection same-turn insert race, not unrelated global write-lock saturation.","acceptance_criteria":"The regression still races two independent stores over the same turn ID; unrelated cross-trial SQLite contention cannot exhaust retries; repeated focused runs, task check, and diff-scoped lint pass; fresh adversarial review has zero surviving findings.","status":"closed","priority":0,"issue_type":"bug","assignee":"Sam Catlow","owner":"sam@catlow.tech","created_at":"2026-08-22T17:34:07Z","created_by":"Sam Catlow","updated_at":"2026-08-23T12:53:19Z","started_at":"2026-08-22T17:34:11Z","closed_at":"2026-08-22T18:14:28Z","close_reason":"Release blockers fixed and pushed to main: ea76432 restored the media delivery result without reviving BasePlatformAdapter; ef2abd1 and bf72384 made the ClaimTurn regression isolate its intended race and yield between bounded SQLITE_BUSY retries. Full task check and fresh adversarial reviews passed.","external_ref":"https://github.com/samcharles93/archie-core/issues/587","dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-bia3","title":"Fix merged gateway capability contract blocking GitHub deploy","description":"PR #560 removed the dead BasePlatformAdapter while PR #561 independently added adapter_capabilities.go and tests that still depend on it. Both branches passed alone, but merged main no longer compiles, so deploy.yml cannot publish the intended video-generation release.","acceptance_criteria":"internal/gateway compiles without BasePlatformAdapter; live Telegram media delivery and capability reporting remain covered; task check and lint pass; a fresh adversarial review has zero surviving findings.","status":"closed","priority":0,"issue_type":"bug","assignee":"Sam Catlow","owner":"sam@catlow.tech","created_at":"2026-08-22T17:15:14Z","created_by":"Sam Catlow","updated_at":"2026-08-23T12:53:20Z","started_at":"2026-08-22T17:15:22Z","closed_at":"2026-08-22T18:14:28Z","close_reason":"Release blockers fixed and pushed to main: ea76432 restored the media delivery result without reviving BasePlatformAdapter; ef2abd1 and bf72384 made the ClaimTurn regression isolate its intended race and yield between bounded SQLITE_BUSY retries. Full task check and fresh adversarial reviews passed.","external_ref":"https://github.com/samcharles93/archie-core/issues/588","dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-1ysw.1","title":"Bind worktree RPC operations to the dispatched task","description":"The sandboxed agent can currently choose owner, repo, issue, base, and branch on worktree RPC requests. The daemon then performs host deletion and credentialed forge operations without correlating the request to the dispatched task or enforcing WorkDir containment.","acceptance_criteria":"Reject traversal and unconfigured or task-mismatched coordinates before any filesystem or forge side effect; derive or validate the permitted branch; regression tests fail on the old behavior and pass on the fix.","status":"closed","priority":0,"issue_type":"bug","assignee":"Sam Catlow","owner":"sam@catlow.tech","created_at":"2026-08-22T11:01:43Z","created_by":"Sam Catlow","updated_at":"2026-08-23T12:53:20Z","started_at":"2026-08-22T11:02:03Z","closed_at":"2026-08-22T11:47:02Z","close_reason":"Implemented per-dispatch publication grants, removed sandbox-selected prepare/path authority, made repository worktree keys collision-free, and added fail-closed legacy migration/cleanup coverage.","external_ref":"https://github.com/samcharles93/archie-core/issues/589","dependencies":[{"issue_id":"archie-core-1ysw.1","depends_on_id":"archie-core-1ysw","type":"parent-child","created_at":"2026-08-22T21:01:42Z","created_by":"Sam Catlow","metadata":"{}"}],"dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-1ysw","title":"Repair internal/worktree correctness and trust-boundary defects","description":"Track the concrete worktree-package defects proven by the 2026-08-22 evidence-gated review. Child bugs cover RPC authority/path containment, repository-key isolation, retry/base/diff correctness, push lifecycle, terminal cleanup, cancellation, and branch naming. This epic groups implementation only; each child has its own observable acceptance criteria.","acceptance_criteria":"All child bugs are closed with red-green regression tests, scoped lint passes, and the repository quality gate is clean.","status":"open","priority":0,"issue_type":"epic","owner":"sam@catlow.tech","created_at":"2026-08-22T11:01:18Z","created_by":"Sam Catlow","updated_at":"2026-08-23T12:53:21Z","external_ref":"https://github.com/samcharles93/archie-core/issues/590","dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-t2db.5","title":"Security: an unauthenticated endpoint must not be able to run an agent","description":"P0 within this epic because the feature's own pitch is the threat model: a public intake surface whose output is an agent with tool access and a repo. Get this wrong and a webhook URL is remote code execution with extra steps.\n\nNon-negotiables to design:\n\n- Per-source authentication. A source registers with a secret (HMAC, as internal/channels/webhook already does per route) before its events can trigger anything. Capture-only for unknown senders is acceptable; triggering is not.\n- Human approval before a binding goes live. An operator authoring a binding is a deliberate act; an event arriving is not. Nothing should self-arm.\n- Rate and volume limits per source, so capture cannot be used to exhaust disk or drown the inspector.\n- Payload content is untrusted input flowing into an agent prompt. Treat prompt injection as expected, not exceptional -- the sender controls that text, and the agent has tools. Bound what a playbook-triggered workflow may do.\n- Captured payloads may contain secrets from the sending system. Decide retention, redaction and who can view them; internal/memory/scrubber may already have applicable prior art.\n\nArchie's own principle applies: environmental enforcement over prompt rules. 'The agent should ignore instructions in the payload' is not a control.","acceptance_criteria":"An event from an unauthenticated source can be captured but cannot trigger a workflow; a new binding requires explicit human approval before it arms; per-source rate limits exist; the blast radius of a playbook-triggered workflow is bounded by code rather than by prompt text; retention and visibility of captured payloads is decided and documented.","notes":"2026-08-22: security design decided and documented in docs/prds/webhook-intake-security.md, covering all five non-negotiables from this bead's description:\n1. Per-source auth reuses internal/channels/webhook's existing HMAC-SHA256 scheme; capture accepts unsigned events (visible, marked unauthenticated), only authenticated events can ever match a binding.\n2. Bindings gain a draft -\u003e pending_approval -\u003e armed state machine; any edit to an armed binding drops it back to pending_approval so approval can't be bypassed by editing. Modeled on telegram's existing dangerousAction/pendingApproval flow (dangerous.go/approval.go).\n3. Per-source token-bucket rate limiting (precedent: pairing/store.go's MaxPendingPerPlatform); limit-exceeded is an observable 429, not a silent drop.\n4. Blast radius bounded by the SAME code-level controls every task already gets -- gate, diff_cap_lines, sandboxed container, worktree isolation -- no new relaxation for playbook-triggered work, and payload text is ordinary untrusted prompt input, never a trusted instruction.\n5. 7-day configurable retention on captured payloads; best-effort redaction reusing gateway/stream.go's sensitiveParameterKey heuristic before persisting; visibility gated by the same dashboard auth as every other webui surface.\n\nThis bead's code-level acceptance criteria (capture-can't-trigger, rate limits exist, blast-radius bounded, approval gate) cannot be implemented yet: they constrain t2db.1 (capture), 7d5u.3 (intake family) and t2db.4 (binding), none of which have landed. This document is the contract those beads build against -- do not build any of them without satisfying it. Leaving this bead in_progress rather than closing it; it closes when t2db.1/7d5u.3/t2db.4 land and demonstrably satisfy points 1-5, not before.","status":"in_progress","priority":0,"issue_type":"feature","assignee":"Sam Catlow","owner":"sam@catlow.tech","created_at":"2026-08-21T13:45:46Z","created_by":"Sam Catlow","updated_at":"2026-08-22T09:25:01Z","started_at":"2026-08-21T14:51:26Z","external_ref":"https://github.com/samcharles93/archie-core/issues/536","dependencies":[{"issue_id":"archie-core-t2db.5","depends_on_id":"archie-core-t2db","type":"parent-child","created_at":"2026-08-21T23:45:45Z","created_by":"Sam Catlow","metadata":"{}"}],"dependency_count":0,"dependent_count":1,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-1ysw.3","title":"Clean abandoned untracked files on retry","description":"Prepare refresh hard-resets tracked files but retains untracked files; CommitAll later stages and publishes them during the next attempt.","acceptance_criteria":"A regression test proves an untracked file left by an interrupted attempt is absent after retry and cannot appear in ChangedFiles or the next commit; deliberate .git control files remain intact.","status":"closed","priority":1,"issue_type":"bug","assignee":"Sam Catlow","owner":"sam@catlow.tech","created_at":"2026-08-22T11:01:44Z","created_by":"Sam Catlow","updated_at":"2026-08-22T11:55:20Z","started_at":"2026-08-22T11:47:47Z","closed_at":"2026-08-22T11:55:20Z","close_reason":"Retry refresh now removes all non-HEAD worktree content including ignored output while preserving .git, tracked symlinks, and gitlinks; missing bases fail closed.","dependencies":[{"issue_id":"archie-core-1ysw.3","depends_on_id":"archie-core-1ysw","type":"parent-child","created_at":"2026-08-22T21:01:44Z","created_by":"Sam Catlow","metadata":"{}"}],"dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-1ysw.2","title":"Make worktree directory keys collision-free","description":"Manager.Dir flattens owner and repo with a hyphen, so distinct repositories such as a-b/c and a/b-c share a task directory for equal issue numbers.","acceptance_criteria":"Distinct owner/repo tuples always map to distinct contained paths; sequential and concurrent collision regressions cannot reuse, delete, reset, or push the other repository's clone.","status":"closed","priority":1,"issue_type":"bug","assignee":"Sam Catlow","owner":"sam@catlow.tech","created_at":"2026-08-22T11:01:43Z","created_by":"Sam Catlow","updated_at":"2026-08-22T11:47:03Z","started_at":"2026-08-22T11:44:35Z","closed_at":"2026-08-22T11:47:03Z","close_reason":"Implemented per-dispatch publication grants, removed sandbox-selected prepare/path authority, made repository worktree keys collision-free, and added fail-closed legacy migration/cleanup coverage.","dependencies":[{"issue_id":"archie-core-1ysw.2","depends_on_id":"archie-core-1ysw","type":"parent-child","created_at":"2026-08-22T21:01:43Z","created_by":"Sam Catlow","metadata":"{}"}],"dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-1787489596754-17-3b1639d9","title":"[EPIC] Adversarial self-review before archie opens a PR","description":"Archie enforces gates on every PR it opens, but it does not run the adversarial review CLAUDE.md makes mandatory for every change in this repo: a fresh reviewer that did not write the code, told to assume every line is wrong, working a defined checklist, where a surviving finding blocks the work. It is the one discipline the project requires of its contributors and exempts itself from.\n\nWhy it matters, with evidence rather than assertion: on 2026-08-20/21 the update-verification change (PR #530) passed task check at every checkpoint -- exit 0, golangci-lint 0 issues, gofumpt clean -- and three adversarial passes still found six real defects, two of them blocking. A 'dev' version placeholder would have reported healthy updates as failures, and an 'unknown' install claim was still being worded as confirmed success. The gates were green throughout and would have stayed green. This is CLAUDE.md's own recorded lesson: tests catch behaviour that breaks, not behaviour that quietly starts meaning something else.\n\nArchie is unusually well placed to do this. It already runs each task in an isolated container and worktree, so it can spawn a reviewer that genuinely never saw the implementation -- not a second opinion from the same context pretending to be fresh, which is the failure mode of every single-context tool. The isolation boundary built for safety is what makes honest self-review possible.\n\nWhat the operator gets: a PR that arrives with a findings section -- what was checked, what was found, what was fixed, what survived. A surviving finding parks the task as waiting_human instead of opening a PR that looks ready and is not. Review shifts from hunting for bugs to adjudicating findings.\n\nThe risk that kills the feature is a reviewer that cries wolf. Findings must be adversarially confirmed before they surface, and the reviewer must be able to report zero findings on properties it checked and cleared. Calibration is the feature, not the finding count.","status":"open","priority":1,"issue_type":"epic","created_at":"2026-08-23T12:22:20Z","updated_at":"2026-08-23T12:22:20Z","external_ref":"https://github.com/samcharles93/archie-core/issues/580","source_system":"github:https://github.com/samcharles93/archie-core/issues/580:580","metadata":null,"dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-1787489596587-15-fdd1dcbd","title":"Findings contract: a structured review result the workflow can act on","description":"The reviewer's output must be data the workflow can branch on, not prose a human has to read to find out whether the PR is safe to open. Prose is what makes a review advisory; structure is what lets a finding block.\n\nDefine the finding type in the workflow domain (the domain declares the contract it needs; it never names who implements it). At minimum a finding carries: file and line, a one-sentence defect, a concrete failure scenario (inputs/state -\u003e wrong output), a verdict distinguishing CONFIRMED from PLAUSIBLE, and a disposition once acted on (fixed / skipped / no_change_needed).\n\nThe CONFIRMED/PLAUSIBLE split is load-bearing and must not be collapsed into a single boolean: only confirmed findings may block, or the feature degrades into crying wolf and the operator learns to skim past it.","status":"open","priority":1,"issue_type":"feature","created_at":"2026-08-23T12:22:19Z","updated_at":"2026-08-23T12:22:19Z","external_ref":"https://github.com/samcharles93/archie-core/issues/579","source_system":"github:https://github.com/samcharles93/archie-core/issues/579:579","metadata":null,"dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-1787489596676-16-d40037d5","title":"Design: adversarial self-review stage (one-page decision in docs/prds/)","description":"No settled design exists for this in docs/architecture/, so under the scope-discipline rule merged as PR #533 the design comes first -- briefly and decisively -- and is not finished until a diff follows it.\n\nDecide and record, in one page under docs/prds/: where the reviewer runs (reuse the per-task container pool, or a separate short-lived container); what it is given (diff plus originating issue, and explicitly what it must NOT be given); the findings contract and who owns the type; what a surviving finding does to the task lifecycle; and how the reviewer's model/effort is configured.\n\nConstraints from the repo that the design must respect: dependency direction is cmd -\u003e app -\u003e {domain, infrastructure}, so the reviewer contract belongs to the workflow domain and the execution to infrastructure/app. Agent execution is a data boundary. The model never runs git. Prefer environmental enforcement over prompt rules -- 'the reviewer cannot see the implementation' must be a property of how it is launched, not an instruction in its prompt.\n\nDo not write an architecture document, migration plan or review campaign. One page that decides.","status":"open","priority":1,"issue_type":"decision","created_at":"2026-08-23T12:22:19Z","updated_at":"2026-08-23T12:22:19Z","external_ref":"https://github.com/samcharles93/archie-core/issues/578","source_system":"github:https://github.com/samcharles93/archie-core/issues/578:578","metadata":null,"dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-1787489596505-14-5b6c5494","title":"Wire review as an implement-workflow stage: after gates, before PR open","description":"Sequence matters. The review runs after gates pass -- there is no point reviewing code that does not build or test -- and before the PR is opened, because the point is to not spend the operator's attention on a PR that is not ready.\n\nA surviving CONFIRMED finding must not open a PR. It parks the task as waiting_human with the findings attached, which is the existing lifecycle state for 'a human needs to look at this' and needs no new state. Per CLAUDE.md, a finding that survives blocks closing the work; it does not get waved through.\n\nScope to the implement workflow first. Routing to tdd/bootstrap/feasibility is a later decision -- feasibility in particular produces a document rather than a diff, so 'review the diff' may not even apply.","status":"open","priority":1,"issue_type":"feature","created_at":"2026-08-23T12:22:18Z","updated_at":"2026-08-23T12:22:18Z","external_ref":"https://github.com/samcharles93/archie-core/issues/577","source_system":"github:https://github.com/samcharles93/archie-core/issues/577:577","metadata":null,"dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-1787489596341-12-bf9443bb","title":"Reviewer runs in a context that provably never saw the implementation","description":"This is the whole feature. A reviewer that shares the implementer's context is a second opinion from the same mind, and it will rationalise the same mistakes -- which is exactly the failure mode CLAUDE.md's 'never self-certified by the implementer' rule exists to prevent.\n\nArchie already has the machinery: each task runs in an isolated container against its own worktree. Launch the reviewer the same way, seeded only with the diff and the originating issue. It must not receive the implementer's conversation, its notes, its reasoning, or its own claims about what it did.\n\nPer 'environmental enforcement over prompt rules', isolation must be a property of construction, not a sentence in the prompt. The agent cannot talk its way out of a context it was never given. Assert it in a test rather than assuming it: a test that would fail if implementer context were threaded through.","status":"open","priority":1,"issue_type":"feature","created_at":"2026-08-23T12:22:17Z","updated_at":"2026-08-23T12:22:17Z","external_ref":"https://github.com/samcharles93/archie-core/issues/576","source_system":"github:https://github.com/samcharles93/archie-core/issues/576:576","metadata":null,"dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-1787489596426-13-e24a2c83","title":"[EPIC] Event sources and typed reactions: archie as an extensible platform","description":"Goal: let archie react to things happening -- forge activity, inbound callers, schedules -- and let extensions hook those reactions, without a generic untyped event bus.\n\nTwo findings shape this, both verified in the tree on 2026-08-21.\n\n1. ARCHIE HAS TWO EVENT NEEDS AND ONE BUS. internal/events is documented as 'archied's in-process observability stream' with 'bounded per-subscriber buffers that DROP on overflow, so a stalled dashboard connection can never apply backpressure to the task engine'. Publish is fire-and-forget; subscribers get a read-only channel and cannot influence anything. Correct for the dashboard, wrong for reactions: a hook that silently misses events under load and cannot affect an outcome is worse than no hook, because it looks like it ran. Reactions need at-least-once delivery and the ability to change what happens. Do not bolt reactions onto events.Bus.\n\n2. THE OBVIOUS DESIGN IS PROHIBITED, DELIBERATELY. The tau model this is drawn from dispatches generically: DispatchEvent(ctx, eventName string, sessionID, ...) to out-of-process gRPC plugins. archie's approved foundation (docs/architecture/plugins-and-extensions.md) forbids that shape -- the generic plugin contract stays metadata-only and MUST NOT expose untyped hooks. plugin.Plugin is Name()/Version() only, enforced by internal/plugin/architecture_test.go and by the plugin engine rule in ARCHITECTURE.md. tau already carries the scar the rule avoids: TestUnload_DoesNotWaitForInFlightDispatch exists because a stuck plugin blocked plugin unload.\n\nThe reconciliation, and why this is an epic rather than a feature: separate INBOUND (callers push work in -- forge webhook, chat webhook, cron, channel) from REACTION (extensions respond to something that happened). Inbound becomes a typed source/intake capability family with an owning registry. Reactions become typed capability families owned by the domain whose semantics they affect. 'Webhooks aligned to types of callers' is exactly the typed-family model applied to intake: the instinct is right, the generic bus is what has to go.\n\nNear-term payoff: archie reacts to an issue being labelled the moment it happens, instead of up to poll_interval later.","status":"open","priority":1,"issue_type":"epic","created_at":"2026-08-23T12:22:17Z","updated_at":"2026-08-23T12:22:17Z","external_ref":"https://github.com/samcharles93/archie-core/issues/575","source_system":"github:https://github.com/samcharles93/archie-core/issues/575:575","metadata":null,"dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-1787489596259-11-317f7079","title":"Shared webhook mechanics: HMAC verification, per-source rate limiting, payload redaction","description":"NARROWED 2026-08-22 from this bead's prior scope, which bundled capture-storage and an approval state machine into a single 'shared mechanics' package. On reflection those are not genuinely shared yet:\n\n- Capture STORAGE is t2db.1's job -- it depends on the NATS-vs-SQLite decision 7d5u.2 owns, and building a storage engine here would either duplicate or contradict that. This package may be USED by t2db.1's capture path, but does not own persistence.\n- The draft/pending_approval/armed state machine belongs to the entity that has that state -- t2db.4's binding -- not a generic package. There is exactly one consumer (bindings) today; per 'extract into a shared primitive on the second real consumer, never in anticipation of one,' building it here now would be speculative.\n\nWhat remains, and is genuinely storage-agnostic and reusable by any inbound HTTP source regardless of what consumes it:\n\n1. HMAC-SHA256 verification -- generalize internal/channels/webhook/webhook.go's existing unexported validateHMAC into an exported function here, and have that package call into it instead of keeping its own copy. One implementation of signature checking, not two that can drift.\n2. Per-source rate limiting -- a token bucket keyed by source ID (not global), so one noisy sender cannot exhaust another's budget. Limit-exceeded is an observable rejection, not a silent drop, per t2db.5's decision.\n3. Payload redaction -- generalize internal/gateway/stream.go's unexported sensitiveParameterKey/redactToolParameters heuristic (matches token/secret/password/passwd/api_key/apikey/authorization/credential/cookie/private_key against normalized JSON keys) into a reusable, storage-agnostic transform any capture path can apply before persisting.","status":"open","priority":1,"issue_type":"feature","created_at":"2026-08-23T12:22:16Z","updated_at":"2026-08-23T12:22:16Z","external_ref":"https://github.com/samcharles93/archie-core/issues/574","source_system":"github:https://github.com/samcharles93/archie-core/issues/574:574","metadata":null,"dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-1787489596182-10-d1e59e32","title":"Reaction delivery via embedded NATS, no external server required","description":"Reactions need at-least-once delivery distinct from the lossy events.Bus (see epic description). The delivery mechanism is NATS -- that part is settled, not a design question. What's open is deployment shape.\n\nVERIFIED 2026-08-22: config.NATSConfig.URL empty currently means 'no NATS, use SQLite ClaimNext' (internal/config/config.go:573-582). That fallback was designed for task distribution working without a broker at all. It was never meant to generalise to 'archie has no NATS' as a permanent architectural stance -- the intended second deployment shape alongside an external NATS server was always NATS EMBEDDED (in-process), not a different eventbus.\n\ngithub.com/nats-io/nats-server/v2 is already a direct dependency and is proven to work in this codebase: internal/infrastructure/agenttransport/nats/transport_test.go and others already start a real embedded server via nats-server/v2/test for tests. It has just never been wired into production startup -- cmd/archied only knows 'external URL configured' vs 'fall back to SQLite'. No new library, no new bus, no architectural gap to design around: this is 'wire the dependency we already have and already test against into the daemon's own startup path.'\n\nDesign questions that remain, now correctly scoped: does an embedded NATS instance replace the SQLite fallback outright for single-process deployments, or run alongside it; what config controls embedded vs external vs disabled; does the daemon own the embedded server's lifecycle the same way it owns everything else (start/stop paired with daemon start/stop, per the shutdown-ordering rules in ARCHITECTURE.md).","status":"open","priority":1,"issue_type":"feature","created_at":"2026-08-23T12:22:15Z","updated_at":"2026-08-23T12:22:15Z","external_ref":"https://github.com/samcharles93/archie-core/issues/573","source_system":"github:https://github.com/samcharles93/archie-core/issues/573:573","metadata":null,"dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-1787489596025-8-afa6f721","title":"Design: event sources, reaction delivery, and how extensions hook them","description":"No settled design covers this. docs/architecture/plugins-and-extensions.md settles the PLUGIN FRAMEWORK (metadata-only contract, typed capability families, owning registries) but says nothing about event sources, reaction delivery, or intake. Under the scope-discipline rule merged as PR #533, that means design first -- one page, decisive -- then a diff.\n\nDecide and record in docs/prds/:\n\n1. THE HEADLINE QUESTION, which changes everything downstream: do extensions react in-process through typed capability families (what the approved rule mandates), or out-of-process like tau's generic DispatchEvent? If out-of-process generic dispatch is genuinely wanted, docs/architecture/plugins-and-extensions.md is an APPROVED document and must be amended first -- CLAUDE.md's organisation rule is explicit that you change the doc before the rule it states. Do not quietly work around it.\n\n2. Reaction delivery. events.Bus drops on overflow by design and must stay that way for the dashboard. Decide whether reactions get a second in-process bus with at-least-once delivery, or ride the existing NATS eventbus (internal/infrastructure/eventbus), which already has durable semantics and the work-queue traps documented in CLAUDE.md.\n\n3. Whether a reaction may INFLUENCE an outcome (veto, mutate, add work) or only observe. This is the difference between a hook and a subscriber, and it determines whether ordering and failure semantics matter. If a reaction can block, decide what a slow or crashed extension does -- tau's answer was a dispatch timeout, and it still deadlocked unload once.\n\n4. The typed source/intake family: its interface, its owning registry, and how a source declares what it produces.\n\nRespect dependency direction: cmd -\u003e app -\u003e {domain, infrastructure}. A domain declares the contract; app wires implementations. Cross-cutting packages may be imported by any layer and import none.","status":"open","priority":1,"issue_type":"decision","created_at":"2026-08-23T12:22:14Z","updated_at":"2026-08-23T12:22:14Z","external_ref":"https://github.com/samcharles93/archie-core/issues/572","source_system":"github:https://github.com/samcharles93/archie-core/issues/572:572","metadata":null,"dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-1787489596102-9-3ec24fcd","title":"Idempotency and poll/webhook parity: never double-dispatch, never lose work","description":"Webhooks deliver at-least-once, out of order, and sometimes not at all. Polling is the opposite: slow but eventually consistent. Running both (intake='both') is the honest production configuration, and it is also where the two failure modes meet.\n\nTwo things must hold. A single issue event must not start two tasks because the webhook and the next poll both saw it. And a webhook outage must not silently stop work -- if the receiver is wedged or the ingress is down, polling has to pick the work up, which is the entire argument for keeping it.\n\nNote archie-core-...-286 (WebhookAdapter: idempotency cache) already exists for the chat adapter. Decide whether that mechanism generalises to intake or whether forge dispatch needs its own key; do not build a second one by accident.\n\nThe silent-failure shape to design against is the one this codebase keeps hitting: a path that looks like it is working because nothing errors. A webhook receiver that has silently stopped delivering looks identical to a repo with no activity.","status":"open","priority":1,"issue_type":"feature","created_at":"2026-08-23T12:22:14Z","updated_at":"2026-08-23T12:22:14Z","external_ref":"https://github.com/samcharles93/archie-core/issues/571","source_system":"github:https://github.com/samcharles93/archie-core/issues/571:571","metadata":null,"dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-1787489595942-7-3ec33776","title":"GitHub forge webhook receiver behind a feature flag","description":"The concrete autonomy win: react to an issue being assigned or labelled the moment it happens, instead of up to poll_interval (default 60s) later.\n\nVerified absent on 2026-08-21: internal/forge/ and internal/daemon/ contain zero webhook references, and no bead tracked forge-event intake before this epic. internal/channels/webhook exists but is a CHAT channel -- it routes inbound text through gateway.Router for LLM processing, a peer of Telegram and email. It is not forge intake and should not be bent into it.\n\nShip as a source in the typed intake family, off by default: [forge] intake = 'poll' (default) | 'webhook' | 'both'. Verify GitHub's HMAC signature. Reuse the label/assignee dispatch predicate the poller already uses -- do NOT reimplement it, since it just took a fix (3209a1f, refusing to poll on an empty label match) and two implementations will drift.\n\nDeployment reality from CLAUDE.md: archied may run on a host, in a container, or behind no public ingress at all. A webhook receiver that assumes a reachable public URL will not fit every profile, which is exactly why polling has to remain a first-class option rather than a legacy fallback.","status":"open","priority":1,"issue_type":"feature","created_at":"2026-08-23T12:22:13Z","updated_at":"2026-08-23T12:22:13Z","external_ref":"https://github.com/samcharles93/archie-core/issues/570","source_system":"github:https://github.com/samcharles93/archie-core/issues/570:570","metadata":null,"dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-1787489595853-6-50e11603","title":"[EPIC] Event capture and no-code playbooks: turn any inbound webhook into an agentic workflow","description":"The pitch, in the operator's words: point any app's outgoing webhook at archie, open archie, SEE the event that just arrived with its real payload, map the fields you care about, bind them to an agentic workflow, save. No code change, no redeploy, no restart. Adding a new integration stops being a development task.\n\nWhy this is different from n8n or Power Automate rather than a copy of them: their terminal node is a deterministic connector. Archie's is an AGENT with a repo, a worktree, tools and a gate. 'When Sentry reports a new issue in this project, open a PR that fixes it' is one binding here and an entire product elsewhere.\n\nThe design insight that makes it buildable: you cannot write a payload mapper against a payload you have not seen. Schema-by-example requires real recent events to map against, which means archie must CAPTURE events it does not yet understand -- including ones with no binding at all -- and retain them long enough to design against. That is also the strongest argument for putting inbound events on NATS JetStream rather than the lossy in-process bus: durable, replayable, retention-bounded, and already deployed. The capture requirement and the transport choice are the same decision.\n\nSequence: capture unrecognised events -\u003e inspect real payloads in the UI -\u003e map fields by example -\u003e bind matcher+mapping to a workflow -\u003e the next matching event runs it.\n\nThis is a public, unauthenticated-by-default intake surface whose output is an agent with tool access. Security is not a later hardening pass; it is a first-class child of this epic.","status":"open","priority":1,"issue_type":"epic","created_at":"2026-08-23T12:22:12Z","updated_at":"2026-08-23T12:22:12Z","external_ref":"https://github.com/samcharles93/archie-core/issues/569","source_system":"github:https://github.com/samcharles93/archie-core/issues/569:569","metadata":null,"dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-1787489595684-4-92ed3d8c","title":"Map payload fields by example, from a real captured event","description":"Pick a captured event, click through its payload, and bind JSON paths to named fields the workflow will receive. Schema by example, not schema by specification.\n\nThe hard part is not the happy path, it is drift. A mapping authored against one payload will eventually meet a payload where the path is missing, null, or a different type -- the sending app shipped a change nobody told you about. That must fail LOUDLY and land somewhere the operator sees, not silently pass an empty string into an agent prompt. An agent handed a blank field will confabulate around it, which turns a schema change into an agent doing confident nonsense in a repo.\n\nSupport a preview: given this mapping and this captured event, show exactly what the workflow would receive. Never ship a mapping the operator has not seen resolve against real data.","status":"in_progress","priority":1,"issue_type":"feature","created_at":"2026-08-23T12:22:11Z","updated_at":"2026-08-23T12:22:11Z","external_ref":"https://github.com/samcharles93/archie-core/issues/568","source_system":"github:https://github.com/samcharles93/archie-core/issues/568:568","metadata":null,"dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-1787489595777-5-bc238550","title":"Event inspector: see real inbound payloads in the dashboard","description":"The operator-facing half of capture. A live view of recent inbound events: source, arrival time, and the actual payload, pretty-printed and explorable.\n\nThis is the screen that makes the feature feel like magic: you hit 'send test webhook' in the other app, alt-tab to archie, and the event is sitting there. Latency from arrival to visible matters more than it looks -- it is the difference between a design loop and a guessing game.\n\nShow unbound events prominently. An event nothing is listening to is not noise here, it is the queue of integrations waiting to be built.","status":"open","priority":1,"issue_type":"feature","created_at":"2026-08-23T12:22:11Z","updated_at":"2026-08-23T12:22:11Z","external_ref":"https://github.com/samcharles93/archie-core/issues/567","source_system":"github:https://github.com/samcharles93/archie-core/issues/567:567","metadata":null,"dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-1787489595596-3-e2c56185","title":"Capture inbound events archie does not yet understand","description":"The precondition for everything else. Today an unrecognised inbound request is rejected; for schema-by-example it must be RECORDED, because you cannot map a payload you have never seen.\n\nAccept, store and retain inbound events with no binding: raw body, headers, source, arrival time, and the identity that sent it. Retention must be bounded -- an open capture endpoint is an unbounded disk write, and this is exactly the kind of surface an attacker fills.\n\nStrong argument for NATS JetStream as the store rather than the in-process events.Bus: durable, replayable, retention-bounded natively, already deployed. Note the constraint though -- internal/infrastructure/eventbus/nats/doc.go states 'when no NATS URL is configured the daemon uses its local SQLite claim flow instead; nothing here is required for single-process operation'. NATS is currently OPTIONAL. Decide deliberately whether capture requires it (making this feature unavailable in single-process deployments) or degrades to SQLite, and record which -- do not let it become a hard dependency by accident.","status":"open","priority":1,"issue_type":"feature","created_at":"2026-08-23T12:22:10Z","updated_at":"2026-08-23T12:22:10Z","external_ref":"https://github.com/samcharles93/archie-core/issues/566","source_system":"github:https://github.com/samcharles93/archie-core/issues/566:566","metadata":null,"dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-1787489595508-2-98c4b849","title":"Playbook binding: matcher + mapping + workflow, editable at runtime","description":"The object that ties it together. A binding is: a matcher (which inbound events does this apply to), a mapping (which fields the workflow receives), and a target agentic workflow.\n\nRuntime-editable is the whole point -- creating or changing a binding must not require a redeploy or a daemon restart. That has real consequences the design must face:\n\n- Bindings are persisted state, not config. They live in the store, not config.toml, because operators create them from the UI while the daemon runs.\n- They need versioning. A binding that starts a task should record WHICH version ran, or a later edit makes historical task provenance a lie.\n- Matcher ambiguity needs a defined resolution: two bindings matching one event either both run, or the more specific wins, or it is an error. Pick one and say so.\n- A binding referencing a workflow that no longer exists must fail visibly at bind time, not at 3am when the event arrives.","status":"open","priority":1,"issue_type":"feature","created_at":"2026-08-23T12:22:09Z","updated_at":"2026-08-23T12:22:09Z","external_ref":"https://github.com/samcharles93/archie-core/issues/565","source_system":"github:https://github.com/samcharles93/archie-core/issues/565:565","metadata":null,"dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-1ysw.3","title":"Clean abandoned untracked files on retry","description":"Prepare refresh hard-resets tracked files but retains untracked files; CommitAll later stages and publishes them during the next attempt.","acceptance_criteria":"A regression test proves an untracked file left by an interrupted attempt is absent after retry and cannot appear in ChangedFiles or the next commit; deliberate .git control files remain intact.","status":"closed","priority":1,"issue_type":"bug","assignee":"Sam Catlow","owner":"sam@catlow.tech","created_at":"2026-08-22T11:01:44Z","created_by":"Sam Catlow","updated_at":"2026-08-23T12:53:22Z","started_at":"2026-08-22T11:47:47Z","closed_at":"2026-08-22T11:55:20Z","close_reason":"Retry refresh now removes all non-HEAD worktree content including ignored output while preserving .git, tracked symlinks, and gitlinks; missing bases fail closed.","external_ref":"https://github.com/samcharles93/archie-core/issues/591","dependencies":[{"issue_id":"archie-core-1ysw.3","depends_on_id":"archie-core-1ysw","type":"parent-child","created_at":"2026-08-22T21:01:44Z","created_by":"Sam Catlow","metadata":"{}"}],"dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-1ysw.2","title":"Make worktree directory keys collision-free","description":"Manager.Dir flattens owner and repo with a hyphen, so distinct repositories such as a-b/c and a/b-c share a task directory for equal issue numbers.","acceptance_criteria":"Distinct owner/repo tuples always map to distinct contained paths; sequential and concurrent collision regressions cannot reuse, delete, reset, or push the other repository's clone.","status":"closed","priority":1,"issue_type":"bug","assignee":"Sam Catlow","owner":"sam@catlow.tech","created_at":"2026-08-22T11:01:43Z","created_by":"Sam Catlow","updated_at":"2026-08-23T12:53:22Z","started_at":"2026-08-22T11:44:35Z","closed_at":"2026-08-22T11:47:03Z","close_reason":"Implemented per-dispatch publication grants, removed sandbox-selected prepare/path authority, made repository worktree keys collision-free, and added fail-closed legacy migration/cleanup coverage.","external_ref":"https://github.com/samcharles93/archie-core/issues/592","dependencies":[{"issue_id":"archie-core-1ysw.2","depends_on_id":"archie-core-1ysw","type":"parent-child","created_at":"2026-08-22T21:01:43Z","created_by":"Sam Catlow","metadata":"{}"}],"dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-t2db.4","title":"Playbook binding: matcher + mapping + workflow, editable at runtime","description":"The object that ties it together. A binding is: a matcher (which inbound events does this apply to), a mapping (which fields the workflow receives), and a target agentic workflow.\n\nRuntime-editable is the whole point -- creating or changing a binding must not require a redeploy or a daemon restart. That has real consequences the design must face:\n\n- Bindings are persisted state, not config. They live in the store, not config.toml, because operators create them from the UI while the daemon runs.\n- They need versioning. A binding that starts a task should record WHICH version ran, or a later edit makes historical task provenance a lie.\n- Matcher ambiguity needs a defined resolution: two bindings matching one event either both run, or the more specific wins, or it is an error. Pick one and say so.\n- A binding referencing a workflow that no longer exists must fail visibly at bind time, not at 3am when the event arrives.","acceptance_criteria":"A binding can be created, edited and disabled from the UI while the daemon runs; a task records the binding version that started it; overlapping matchers resolve by a defined and documented rule; a binding naming a missing workflow is rejected when saved.","notes":"2026-08-22: the draft -\u003e pending_approval -\u003e armed state machine from t2db.5's decision belongs to the binding entity this bead defines, not to a shared package -- 7d5u.3 was narrowed to exclude it since there is exactly one consumer today. Implement the state transitions here.","status":"open","priority":1,"issue_type":"feature","owner":"sam@catlow.tech","created_at":"2026-08-21T13:45:45Z","created_by":"Sam Catlow","updated_at":"2026-08-22T09:25:02Z","external_ref":"https://github.com/samcharles93/archie-core/issues/537","dependencies":[{"issue_id":"archie-core-t2db.4","depends_on_id":"archie-core-t2db.5","type":"blocks","created_at":"2026-08-21T23:45:53Z","created_by":"Sam Catlow","metadata":"{}"},{"issue_id":"archie-core-t2db.4","depends_on_id":"archie-core-t2db.3","type":"blocks","created_at":"2026-08-21T23:45:53Z","created_by":"Sam Catlow","metadata":"{}"},{"issue_id":"archie-core-t2db.4","depends_on_id":"archie-core-t2db","type":"parent-child","created_at":"2026-08-21T23:45:45Z","created_by":"Sam Catlow","metadata":"{}"}],"dependency_count":2,"dependent_count":1,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-t2db.1","title":"Capture inbound events archie does not yet understand","description":"The precondition for everything else. Today an unrecognised inbound request is rejected; for schema-by-example it must be RECORDED, because you cannot map a payload you have never seen.\n\nAccept, store and retain inbound events with no binding: raw body, headers, source, arrival time, and the identity that sent it. Retention must be bounded -- an open capture endpoint is an unbounded disk write, and this is exactly the kind of surface an attacker fills.\n\nStrong argument for NATS JetStream as the store rather than the in-process events.Bus: durable, replayable, retention-bounded natively, already deployed. Note the constraint though -- internal/infrastructure/eventbus/nats/doc.go states 'when no NATS URL is configured the daemon uses its local SQLite claim flow instead; nothing here is required for single-process operation'. NATS is currently OPTIONAL. Decide deliberately whether capture requires it (making this feature unavailable in single-process deployments) or degrades to SQLite, and record which -- do not let it become a hard dependency by accident.","acceptance_criteria":"An unbound webhook POST is captured and visible rather than rejected; capture is retention-bounded with a documented limit; the single-process (no NATS) behaviour is a deliberate, recorded decision; capture cannot exhaust disk.","notes":"2026-08-22: capture-storage ownership confirmed here (not in 7d5u.3, which was narrowed to storage-agnostic HMAC/rate-limit/redaction mechanics only). This bead's capture path should call webhookguard's redaction before persisting and its rate limiter at the HTTP boundary, but owns its own storage engine and the NATS-vs-SQLite decision.","status":"closed","priority":1,"issue_type":"feature","assignee":"Sam Catlow","owner":"sam@catlow.tech","created_at":"2026-08-21T13:45:18Z","created_by":"Sam Catlow","updated_at":"2026-08-22T09:25:03Z","started_at":"2026-08-21T16:18:24Z","closed_at":"2026-08-21T18:51:09Z","close_reason":"Built capture storage + endpoint: docs/prds/event-capture-storage.md decides SQLite over NATS JetStream (NATS not unconditionally available pre-7d5u.2, capture's single-writer/single-reader access pattern doesn't need JetStream fan-out/replay). internal/store/captures.go adds captured_events table + InsertCapture (prune-on-write by retention age and row count) + ListCaptures. internal/webui/api_capture.go adds POST /webhooks/capture/{source}, unauthenticated (bypasses requireToken like /healthz), applying webhookguard redaction before persisting and a per-remote-address rate limit + hard body-size cap before that. New [capture] config section with documented defaults. Adversarial self-review (the usual fresh subagent pass hit a session API limit mid-run, so this was a manual re-read with the same checklist) caught and fixed three real bugs before landing: (1) body-size cap silently unenforced when unset -- added a hardcoded fallback floor since it's the only bound on a SINGLE payload's size; (2) rate limiter was keyed by the request's own unregistered source path segment, violating webhookguard.RateLimiter's documented bounded-key-space assumption -- an attacker could rotate the segment to bypass the limit and grow the bucket map unbounded; rekeyed to remote address; (3) retention prune used time.RFC3339Nano, whose variable-width trimmed fractional seconds break lexicographic string comparison in `WHERE received_at \u003c ?` (an exact-second timestamp can sort after a later fractional one) -- switched to fixed-width RFC3339. All three have regression tests verified to fail against the pre-fix code. task check clean, golangci-lint zero new findings repo-wide.","external_ref":"https://github.com/samcharles93/archie-core/issues/538","dependencies":[{"issue_id":"archie-core-t2db.1","depends_on_id":"archie-core-7d5u.4","type":"relates-to","created_at":"2026-08-22T01:01:02Z","created_by":"Sam Catlow","metadata":"{}"},{"issue_id":"archie-core-t2db.1","depends_on_id":"archie-core-t2db","type":"parent-child","created_at":"2026-08-21T23:45:17Z","created_by":"Sam Catlow","metadata":"{}"}],"dependency_count":0,"dependent_count":2,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-t2db.2","title":"Event inspector: see real inbound payloads in the dashboard","description":"The operator-facing half of capture. A live view of recent inbound events: source, arrival time, and the actual payload, pretty-printed and explorable.\n\nThis is the screen that makes the feature feel like magic: you hit 'send test webhook' in the other app, alt-tab to archie, and the event is sitting there. Latency from arrival to visible matters more than it looks -- it is the difference between a design loop and a guessing game.\n\nShow unbound events prominently. An event nothing is listening to is not noise here, it is the queue of integrations waiting to be built.","acceptance_criteria":"Recent inbound events are listed with source, time and full payload; unbound events are distinguishable from bound ones; a newly arrived event appears without a manual refresh; payloads are explorable rather than a wall of text.","status":"closed","priority":1,"issue_type":"feature","assignee":"Sam Catlow","owner":"sam@catlow.tech","created_at":"2026-08-21T13:45:18Z","created_by":"Sam Catlow","updated_at":"2026-08-22T09:25:04Z","started_at":"2026-08-21T18:57:52Z","closed_at":"2026-08-21T19:17:03Z","close_reason":"GET /api/captures (token-gated, memory/skills-style enabled:false-not-an-error when Captures is nil) plus a new /captures dashboard page: recent captures newest-first, expandable per-row to explore redacted payload/headers pretty-printed. Live updates reuse the existing operator-activity event pipeline (Server.emit -\u003e Events.Publish -\u003e the /events SSE stream) as an invalidation signal, refetching the list rather than merging partial event data. Every row shows an 'Unbound' pill today since no binding model exists yet (t2db.4 wires the real distinction). Frontend follows the tasks/task-row.js precedent: row rendering split into capture-row.js for unit testing without the page's fetch/SSE wiring. Adversarial review (fresh subagent, full pass) found one real severe bug before merge: the live SSE event was embedding the full (up to 256KiB) redacted body/headers into the events table, which has no retention/row-count prune anywhere in the codebase -- silently defeating t2db.1's disk-bound guarantee for an unauthenticated, only-rate-limited endpoint. Fixed: the live event now carries just {id, source} as a pure invalidation signal; the dashboard refetches the authoritative list. Two smaller findings (untested Data[\"id\"] field the frontend's dedup depended on; a received_at precision mismatch between live and REST-fetched copies) were resolved as a side effect of that fix. task check clean, golangci-lint zero new findings.","external_ref":"https://github.com/samcharles93/archie-core/issues/539","dependencies":[{"issue_id":"archie-core-t2db.2","depends_on_id":"archie-core-t2db.1","type":"blocks","created_at":"2026-08-21T23:45:53Z","created_by":"Sam Catlow","metadata":"{}"},{"issue_id":"archie-core-t2db.2","depends_on_id":"archie-core-t2db","type":"parent-child","created_at":"2026-08-21T23:45:17Z","created_by":"Sam Catlow","metadata":"{}"}],"dependency_count":1,"dependent_count":0,"comment_count":0}
|
||||
@@ -42,28 +59,34 @@
|
||||
{"_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.","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-14T15:07:36Z","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-w35v","title":"Workflows page 'Start work' form inputs unstyled (white boxes in dark theme)","description":"The Start work card on the Workflows dashboard page (ui/src/workflows/workflows.js renderStartWork) creates raw \u003cinput\u003e/\u003cselect\u003e/\u003ctextarea\u003e elements with no CSS class, so they fall back to browser default styling -- white background, black text -- against the rest of the dark-themed app. Every other form control in the app (e.g. Configuration's .kv-input in ui/src/settings/config-row.js) uses a themed class. Fix: style these form controls to match the app theme, either by reusing an existing input class or adding scoped rules in ui/src/workflows/workflows.css.","status":"closed","priority":2,"issue_type":"bug","owner":"sam@catlow.tech","created_at":"2026-08-23T12:22:59Z","created_by":"Sam Catlow","updated_at":"2026-08-23T12:23:14Z","closed_at":"2026-08-23T12:23:14Z","close_reason":"Fixed: themed .wf-form input/select/textarea in workflows.css to match the dark theme.","dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-3ghy","title":"Wire generate_video (MiniMax) tool end-to-end","description":"Implemented the MiniMax text-to-video generation tool and wired it through the media-delivery pipeline built for this: tool -\u003e tools.MultimodalResult -\u003e drainChatStream detection -\u003e gateway.TurnStream.Media -\u003e gateway.MediaSender (Telegram delivers inline; webui falls back to a link).\n\n## What shipped\n- internal/tools/minimax: API client (create+poll against MiniMax's v2/video_generation and v2/query/video_generation/{id}), a builtin tools.ToolEntry (generate_video), fully test-first with an injected-clock poll loop (no real sleep in tests).\n- internal/tools: extended tools.MultimodalResult with a URLs []MediaRef field, for tool results whose media lives at a remote hosted URL rather than local bytes (the existing Files field).\n- cmd/archied/telegram_setup.go: drainChatStream now detects a MultimodalResult in a tool result's Output and calls turn.Media(...) per URL, alongside the existing turn.ToolCall(...) reporting.\n- internal/config: MinimaxConfig (off by default, unlike web_fetch -- this spends real API credits per call), api_key via the existing secret.SecretRef pattern.\n- cmd/archied/bootstrap.go: registerMinimaxTool -- only registers the tool once an API key actually resolves, matching the 'do not advertise a broken capability' pattern web_fetch already uses.\n- config.example.toml: documented [tools.minimax].\n\n## Scope deliberately left out (by explicit instruction: URL-only, get it working first)\n- Image-to-video (image_url content items) -- text-to-video only.\n- Local byte/file upload delivery path -- URL-only, matches gateway.MediaSender's current URL-only design.\n- Email/webhook channel delivery -- only Telegram implements gateway.MediaSender today; other channels have no inline media path, and webui falls back to a text link (see archie-core-1786748942243-6-f109697e for the still-open 'deliver generated images through channel and web abstractions' work).\n- No OpenAI video provider -- only MiniMax implemented, per this issue's scope. A second provider should follow the same tool-package shape (internal/tools/\u003cprovider\u003e) if wanted.\n- No spend guard / approval gate on the tool despite it costing real credits per call (classified ClassMutating, not RequiresApproval) -- flagged in tool.go's doc comment as a candidate follow-up if usage shows it's needed.","acceptance_criteria":"task check passes; go test ./... green except the pre-existing unrelated internal/app/agentworker architecture-test failure; golangci-lint clean on every touched package; config.example.toml documents [tools.minimax].","status":"closed","priority":2,"issue_type":"feature","owner":"sam@catlow.tech","created_at":"2026-08-22T15:34:24Z","created_by":"Sam Catlow","updated_at":"2026-08-22T15:34:29Z","closed_at":"2026-08-22T15:34:29Z","close_reason":"Shipped and verified: task check equivalent (fmt/vet/build/test/lint) is clean across every touched package, red-then-green throughout. See the issue description for what's in scope and what's explicitly deferred.","dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-azbo","title":"Remove dead BasePlatformAdapter interface from internal/gateway","description":"`gateway.BasePlatformAdapter` (internal/gateway/adapter.go, Connect/Disconnect/Send/ChatInfo) is implemented by nothing outside its own test stub. It landed in commit bc1caf6 alongside the Session types and was never wired.\n\nEvery live channel instead implements `channels.Channel` (= `gateway.Gateway`: Name/Start/Stop, plus ConfigSchema/ValidateConfig) -- asserted at internal/channels/telegram/telegram.go:1229, internal/channels/email/email.go:389, internal/channels/webhook/webhook.go:224. So the repo carries two parallel channel abstractions and the newer one is inert.\n\nIt also has an internal contradiction that is likely why it was never implemented: the doc comment says the daemon instantiates 'one adapter per active bot identity x platform' (adapter.go:59) but `ChatInfo(ctx) (ChatInfo, error)` is documented as 'static metadata about the conversation a platform adapter is connected to' (adapter.go:36-38) with no chat argument. Telegram's Gateway is a single instance serving many chats, so ChatInfo(ctx) has no single answer. Send(ctx, MessageEvent) is fine for both models since MessageEvent carries ChannelID; ChatInfo is the part that only makes sense per-conversation.\n\nOutbound delivery is assigned to the not-yet-built `internal/domain/messaging` by docs/architecture/migration-decisions.md section 2, so this interface should not be revived in place -- it should be deleted and its intent re-expressed there.\n\n## Scope\n\n- Delete BasePlatformAdapter and its test stub from internal/gateway/adapter.go / adapter_test.go.\n- Keep SendResult and ChatInfo structs if domain/messaging or the media work still wants them; they are separable from the interface.\n- Decouple gateway.CapabilitiesOf from BasePlatformAdapter (it currently takes one) so the capability mechanism survives the removal.\n\n## Acceptance criteria\n\n- BasePlatformAdapter no longer exists; `task check` passes.\n- No behaviour change: nothing implemented it, so nothing should need rewiring.\n- Any type retained from adapter.go has at least one live consumer, or is removed too.","notes":"Discovery confirmed CapabilitiesOf is absent from the current checkout and gateway history. SendResult and ChatInfo have no live consumers, so all three legacy declarations are removed. Red test: TestLegacyPlatformAdapterTypesAreRemoved failed on BasePlatformAdapter, ChatInfo, and SendResult before deletion; gateway package suite passes after deletion. Full task check currently reaches one unrelated pre-existing failure: internal/app/agentworker TestApplicationOwnsNoTransportWireMechanics reports persistent_runner.go imports JSON wire encoding.","status":"closed","priority":2,"issue_type":"task","assignee":"Sam Catlow","owner":"sam@catlow.tech","created_at":"2026-08-22T12:04:10Z","created_by":"Sam Catlow","updated_at":"2026-08-22T12:16:02Z","started_at":"2026-08-22T12:08:39Z","closed_at":"2026-08-22T12:16:02Z","close_reason":"Removed the unwired BasePlatformAdapter, SendResult, ChatInfo, and their test-only stub. CapabilitiesOf is absent from the current checkout/history. Gateway and worktree tests pass. task check passes all packages except the pre-existing tracked agentworker architecture failure archie-core-hqst.","dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-hqst","title":"TestApplicationOwnsNoTransportWireMechanics fails: persistent_runner.go imports encoding/json","description":"internal/app/agentworker/architecture_test.go's TestApplicationOwnsNoTransportWireMechanics fails on main (pre-existing, unrelated to archie-core-qk8m): persistent_runner.go imports encoding/json, tripping the check that agentworker's app layer owns no transport wire mechanics. Introduced by e351581 (feat(storage): persist agent project state). Confirmed via git stash that this fails identically with none of the mcp-npm-cache changes applied.","status":"in_progress","priority":2,"issue_type":"bug","assignee":"Sam Catlow","owner":"sam@catlow.tech","created_at":"2026-08-22T11:09:58Z","created_by":"Sam Catlow","updated_at":"2026-08-22T12:16:11Z","started_at":"2026-08-22T12:16:11Z","dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-1ysw.9","title":"Align branch naming behavior, API, tests, and documentation","description":"branchPrefix ignores title and body despite the documented title-prefix contract, contains a checked-in lint-failing FIXME and a no-op, and branchSlug documents 40 characters while implementing 60.","acceptance_criteria":"The chosen title/label precedence is explicit and tested for unlabeled and conflicting inputs; dead parameters and no-op residue are removed; slug documentation and boundary tests agree with 60; scoped lint passes.","status":"open","priority":2,"issue_type":"bug","owner":"sam@catlow.tech","created_at":"2026-08-22T11:01:48Z","created_by":"Sam Catlow","updated_at":"2026-08-22T11:01:48Z","dependencies":[{"issue_id":"archie-core-1ysw.9","depends_on_id":"archie-core-1ysw","type":"parent-child","created_at":"2026-08-22T21:01:48Z","created_by":"Sam Catlow","metadata":"{}"}],"dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-1ysw.7","title":"Clean no-change worktrees at terminal completion","description":"BuildNoChanges transitions directly to merged without a PR, bypassing the only production worktree cleanup path and leaking a full clone.","acceptance_criteria":"Both direct and container no-change completion remove the identity-correct worktree while parked worktrees remain available; lifecycle regression tests cover the terminal path.","status":"open","priority":2,"issue_type":"bug","owner":"sam@catlow.tech","created_at":"2026-08-22T11:01:47Z","created_by":"Sam Catlow","updated_at":"2026-08-22T11:01:47Z","dependencies":[{"issue_id":"archie-core-1ysw.7","depends_on_id":"archie-core-1ysw","type":"parent-child","created_at":"2026-08-22T21:01:46Z","created_by":"Sam Catlow","metadata":"{}"}],"dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-1ysw.5","title":"Preserve three-dot failure semantics without a merge base","description":"patch silently computes a direct tree diff when base and HEAD have no merge base, contradicting its three-dot contract and corrupting diff-cap and gate inputs.","acceptance_criteria":"Unrelated histories return a clear error from Diff, ChangedFiles, and ChangedLines; shared-history merge-base behavior remains covered.","status":"closed","priority":2,"issue_type":"bug","assignee":"Sam Catlow","owner":"sam@catlow.tech","created_at":"2026-08-22T11:01:46Z","created_by":"Sam Catlow","updated_at":"2026-08-22T11:59:37Z","started_at":"2026-08-22T11:55:44Z","closed_at":"2026-08-22T11:59:37Z","close_reason":"Three-dot diff operations now fail closed when base and HEAD have no common ancestor; regression covers Diff, ChangedFiles, and ChangedLines.","dependencies":[{"issue_id":"archie-core-1ysw.5","depends_on_id":"archie-core-1ysw","type":"parent-child","created_at":"2026-08-22T21:01:45Z","created_by":"Sam Catlow","metadata":"{}"}],"dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-1ysw.6","title":"Do not report push failure after successful publication","description":"Push publishes the remote ref before writing unused local upstream metadata, then returns local config errors as if publication failed.","acceptance_criteria":"A post-publication metadata failure cannot park the task as an unsuccessful push; tests verify the remote ref and returned result remain consistent.","status":"open","priority":2,"issue_type":"bug","owner":"sam@catlow.tech","created_at":"2026-08-22T11:01:46Z","created_by":"Sam Catlow","updated_at":"2026-08-22T11:01:46Z","dependencies":[{"issue_id":"archie-core-1ysw.6","depends_on_id":"archie-core-1ysw","type":"parent-child","created_at":"2026-08-22T21:01:46Z","created_by":"Sam Catlow","metadata":"{}"}],"dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-1ysw.4","title":"Fail refresh when the configured base cannot resolve","description":"Prepared worktrees currently swallow every resolveBase error and report successful refresh against stale history.","acceptance_criteria":"Prepared-worktree refresh returns a contextual error for a missing, renamed, or invalid base; fresh and reused Prepare paths have consistent tests.","status":"closed","priority":2,"issue_type":"bug","assignee":"Sam Catlow","owner":"sam@catlow.tech","created_at":"2026-08-22T11:01:45Z","created_by":"Sam Catlow","updated_at":"2026-08-22T11:55:20Z","started_at":"2026-08-22T11:52:19Z","closed_at":"2026-08-22T11:55:20Z","close_reason":"Retry refresh now removes all non-HEAD worktree content including ignored output while preserving .git, tracked symlinks, and gitlinks; missing bases fail closed.","dependencies":[{"issue_id":"archie-core-1ysw.4","depends_on_id":"archie-core-1ysw","type":"parent-child","created_at":"2026-08-22T21:01:44Z","created_by":"Sam Catlow","metadata":"{}"}],"dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-j8b4","title":"Implement persistent session memory and plugin storage","description":"Replace the PRD section 3 placeholder in internal/storage/storage.go with the specified persistent storage behavior for session.jsonl, memory.jsonl, and plugins.","status":"closed","priority":2,"issue_type":"task","assignee":"Sam Catlow","owner":"sam@catlow.tech","created_at":"2026-08-22T10:32:31Z","created_by":"Sam Catlow","updated_at":"2026-08-22T10:56:59Z","started_at":"2026-08-22T10:32:37Z","closed_at":"2026-08-22T10:56:59Z","close_reason":"Implemented persistent session transcript, cross-session memory, and staged plugin storage","dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-w35v","title":"Workflows page 'Start work' form inputs unstyled (white boxes in dark theme)","description":"The Start work card on the Workflows dashboard page (ui/src/workflows/workflows.js renderStartWork) creates raw \u003cinput\u003e/\u003cselect\u003e/\u003ctextarea\u003e elements with no CSS class, so they fall back to browser default styling -- white background, black text -- against the rest of the dark-themed app. Every other form control in the app (e.g. Configuration's .kv-input in ui/src/settings/config-row.js) uses a themed class. Fix: style these form controls to match the app theme, either by reusing an existing input class or adding scoped rules in ui/src/workflows/workflows.css.","status":"closed","priority":2,"issue_type":"bug","owner":"sam@catlow.tech","created_at":"2026-08-23T12:22:59Z","created_by":"Sam Catlow","updated_at":"2026-08-23T12:53:38Z","closed_at":"2026-08-23T12:23:14Z","close_reason":"Fixed: themed .wf-form input/select/textarea in workflows.css to match the dark theme.","external_ref":"https://github.com/samcharles93/archie-core/issues/593","dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-1787489597262-23-f61d8b1b","title":"Docs: promote the shipped review stage into docs/architecture and reconcile CLAUDE.md","description":"Under the scope-discipline rule merged as PR #533, a design is promoted into docs/architecture/ only once it is built and true. This is that promotion, and it is deliberately a separate bead so it is not lost when the feature lands and attention moves on.\n\nDo three things once the stage ships:\n\n1. Promote the docs/prds/ decision into docs/architecture/, describing the review stage as it actually works -- not as designed. Cut anything a reader could learn from the code.\n2. Update ARCHITECTURE.md's task lifecycle: queued -\u003e running(workflow:stage) -\u003e pr_open -\u003e merged|rejected gains a review stage that can divert to waiting_human before pr_open. The current text does not mention it.\n3. Reconcile CLAUDE.md's Development Protocol. It currently tells a human or agent contributor to run the adversarial pass by hand. Once archied does this for the PRs it opens, that section needs to say which path applies to whom, or it will read as describing a manual step that is now automatic.\n\nCLAUDE.md's own rule: a comment or doc that contradicts its code is worse than none, because the next reader trusts it.","status":"open","priority":2,"issue_type":"task","created_at":"2026-08-23T12:22:29Z","updated_at":"2026-08-23T12:22:29Z","external_ref":"https://github.com/samcharles93/archie-core/issues/586","source_system":"github:https://github.com/samcharles93/archie-core/issues/586:586","metadata":null,"dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-1787489597173-22-c7110160","title":"Surface findings on the PR body and the dashboard","description":"The output has to land where the operator already looks, or the review is invisible work.\n\nOn the PR archie opens: a findings section stating what was checked, what was found, what was fixed, and what survived. A PR with zero findings should say the review ran and found nothing -- silence is indistinguishable from the review not running, which is the same unverified-claim problem the update-verification work (PR #530) was about.\n\nOn the dashboard and /api/tasks: a parked-for-findings task must show why, the same way a park reason is already surfaced today. An operator seeing waiting_human needs the findings without digging through logs.","status":"open","priority":2,"issue_type":"feature","created_at":"2026-08-23T12:22:28Z","updated_at":"2026-08-23T12:22:28Z","external_ref":"https://github.com/samcharles93/archie-core/issues/585","source_system":"github:https://github.com/samcharles93/archie-core/issues/585:585","metadata":null,"dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-1787489597088-21-878229b4","title":"Calibration: confirm findings adversarially before surfacing them","description":"The risk that kills this feature is a reviewer that cries wolf. A findings list padded with speculation trains the operator to skim past it, and then the feature is worse than nothing because it consumes attention while lowering trust.\n\nBefore a finding is surfaced, it must be independently checked and marked CONFIRMED or PLAUSIBLE, with only CONFIRMED able to block. The reviewer must also be able to return zero findings, and to state which properties it checked and cleared -- a review that reports nothing is a valid and welcome result, and saying so explicitly is what distinguishes 'I checked and it is fine' from 'I did not look'.\n\nPrior art from the 2026-08-20/21 sessions on PR #530: three passes each separated confirmed from plausible, one explicitly listed properties it had verified clean, and the confirmed findings were reproduced by mutation before being trusted. That calibration is the feature, not the finding count.","status":"open","priority":2,"issue_type":"feature","created_at":"2026-08-23T12:22:27Z","updated_at":"2026-08-23T12:22:27Z","external_ref":"https://github.com/samcharles93/archie-core/issues/584","source_system":"github:https://github.com/samcharles93/archie-core/issues/584:584","metadata":null,"dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-1787489596921-19-cf6351d9","title":"Docs: reconcile plugins-and-extensions.md and ARCHITECTURE.md with the shipped event model","description":"Separate bead so it is not lost once the feature lands.\n\n1. docs/architecture/plugins-and-extensions.md is an APPROVED foundation dated 2026-07-28 and currently describes only the plugin framework. If the design bead concluded that extensions may react to events, this doc has to say how -- and if it concluded that generic untyped dispatch is allowed after all, this doc must be amended deliberately rather than contradicted by code.\n\n2. ARCHITECTURE.md describes work intake as polling. Once webhook intake ships, that is no longer the whole picture, and the task lifecycle section needs the new entry path.\n\n3. CLAUDE.md's per-package traps section should gain whatever trap this work creates -- HMAC verification, replay windows, the poll/webhook double-dispatch hazard. That section exists precisely for things an agent will otherwise break.\n\n4. config.example.toml needs the intake flag documented with its default, alongside poll_interval.\n\nCLAUDE.md's own rule: a doc that contradicts its code is worse than none, because the next reader trusts it.","status":"open","priority":2,"issue_type":"task","created_at":"2026-08-23T12:22:26Z","updated_at":"2026-08-23T12:22:26Z","external_ref":"https://github.com/samcharles93/archie-core/issues/583","source_system":"github:https://github.com/samcharles93/archie-core/issues/583:583","metadata":null,"dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-1787489597001-20-4a13bb0b","title":"Docs: document playbooks, bindings and the intake threat model","description":"Separate so it is not lost when the feature lands.\n\n- The playbook/binding model in docs/architecture/: what a binding is, where it is persisted, how matchers resolve, how versioning works.\n- The threat model, written down plainly: this is a public intake surface that can start agents. Record what protects it and what does not.\n- ARCHITECTURE.md task lifecycle: a task started by a playbook binding has a different provenance from a forge-issue task, and the lifecycle section should say so.\n- Operator docs: how to point an external app at archie and build a first playbook, end to end.\n\nCLAUDE.md's rule: a doc that contradicts its code is worse than none.","status":"open","priority":2,"issue_type":"task","created_at":"2026-08-23T12:22:26Z","updated_at":"2026-08-23T12:22:26Z","external_ref":"https://github.com/samcharles93/archie-core/issues/582","source_system":"github:https://github.com/samcharles93/archie-core/issues/582:582","metadata":null,"dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-1787489596831-18-366fdec1","title":"Acknowledge inbound messages and tasks before starting work","description":"Archie should acknowledge an inbound user message or tracked task before beginning substantive work. The acknowledgement should be sent promptly and make it clear that Archie has received the request and is starting or queued to work on it. It should not duplicate the eventual result or create misleading acknowledgements when intake fails.","status":"open","priority":2,"issue_type":"task","created_at":"2026-08-23T12:22:25Z","updated_at":"2026-08-23T12:22:25Z","external_ref":"https://github.com/samcharles93/archie-core/issues/581","source_system":"github:https://github.com/samcharles93/archie-core/issues/581:581","metadata":null,"labels":["telegram","ux"],"dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-3ghy","title":"Wire generate_video (MiniMax) tool end-to-end","description":"Implemented the MiniMax text-to-video generation tool and wired it through the media-delivery pipeline built for this: tool -\u003e tools.MultimodalResult -\u003e drainChatStream detection -\u003e gateway.TurnStream.Media -\u003e gateway.MediaSender (Telegram delivers inline; webui falls back to a link).\n\n## What shipped\n- internal/tools/minimax: API client (create+poll against MiniMax's v2/video_generation and v2/query/video_generation/{id}), a builtin tools.ToolEntry (generate_video), fully test-first with an injected-clock poll loop (no real sleep in tests).\n- internal/tools: extended tools.MultimodalResult with a URLs []MediaRef field, for tool results whose media lives at a remote hosted URL rather than local bytes (the existing Files field).\n- cmd/archied/telegram_setup.go: drainChatStream now detects a MultimodalResult in a tool result's Output and calls turn.Media(...) per URL, alongside the existing turn.ToolCall(...) reporting.\n- internal/config: MinimaxConfig (off by default, unlike web_fetch -- this spends real API credits per call), api_key via the existing secret.SecretRef pattern.\n- cmd/archied/bootstrap.go: registerMinimaxTool -- only registers the tool once an API key actually resolves, matching the 'do not advertise a broken capability' pattern web_fetch already uses.\n- config.example.toml: documented [tools.minimax].\n\n## Scope deliberately left out (by explicit instruction: URL-only, get it working first)\n- Image-to-video (image_url content items) -- text-to-video only.\n- Local byte/file upload delivery path -- URL-only, matches gateway.MediaSender's current URL-only design.\n- Email/webhook channel delivery -- only Telegram implements gateway.MediaSender today; other channels have no inline media path, and webui falls back to a text link (see archie-core-1786748942243-6-f109697e for the still-open 'deliver generated images through channel and web abstractions' work).\n- No OpenAI video provider -- only MiniMax implemented, per this issue's scope. A second provider should follow the same tool-package shape (internal/tools/\u003cprovider\u003e) if wanted.\n- No spend guard / approval gate on the tool despite it costing real credits per call (classified ClassMutating, not RequiresApproval) -- flagged in tool.go's doc comment as a candidate follow-up if usage shows it's needed.","acceptance_criteria":"task check passes; go test ./... green except the pre-existing unrelated internal/app/agentworker architecture-test failure; golangci-lint clean on every touched package; config.example.toml documents [tools.minimax].","status":"closed","priority":2,"issue_type":"feature","owner":"sam@catlow.tech","created_at":"2026-08-22T15:34:24Z","created_by":"Sam Catlow","updated_at":"2026-08-23T12:53:39Z","closed_at":"2026-08-22T15:34:29Z","close_reason":"Shipped and verified: task check equivalent (fmt/vet/build/test/lint) is clean across every touched package, red-then-green throughout. See the issue description for what's in scope and what's explicitly deferred.","external_ref":"https://github.com/samcharles93/archie-core/issues/594","dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-azbo","title":"Remove dead BasePlatformAdapter interface from internal/gateway","description":"`gateway.BasePlatformAdapter` (internal/gateway/adapter.go, Connect/Disconnect/Send/ChatInfo) is implemented by nothing outside its own test stub. It landed in commit bc1caf6 alongside the Session types and was never wired.\n\nEvery live channel instead implements `channels.Channel` (= `gateway.Gateway`: Name/Start/Stop, plus ConfigSchema/ValidateConfig) -- asserted at internal/channels/telegram/telegram.go:1229, internal/channels/email/email.go:389, internal/channels/webhook/webhook.go:224. So the repo carries two parallel channel abstractions and the newer one is inert.\n\nIt also has an internal contradiction that is likely why it was never implemented: the doc comment says the daemon instantiates 'one adapter per active bot identity x platform' (adapter.go:59) but `ChatInfo(ctx) (ChatInfo, error)` is documented as 'static metadata about the conversation a platform adapter is connected to' (adapter.go:36-38) with no chat argument. Telegram's Gateway is a single instance serving many chats, so ChatInfo(ctx) has no single answer. Send(ctx, MessageEvent) is fine for both models since MessageEvent carries ChannelID; ChatInfo is the part that only makes sense per-conversation.\n\nOutbound delivery is assigned to the not-yet-built `internal/domain/messaging` by docs/architecture/migration-decisions.md section 2, so this interface should not be revived in place -- it should be deleted and its intent re-expressed there.\n\n## Scope\n\n- Delete BasePlatformAdapter and its test stub from internal/gateway/adapter.go / adapter_test.go.\n- Keep SendResult and ChatInfo structs if domain/messaging or the media work still wants them; they are separable from the interface.\n- Decouple gateway.CapabilitiesOf from BasePlatformAdapter (it currently takes one) so the capability mechanism survives the removal.\n\n## Acceptance criteria\n\n- BasePlatformAdapter no longer exists; `task check` passes.\n- No behaviour change: nothing implemented it, so nothing should need rewiring.\n- Any type retained from adapter.go has at least one live consumer, or is removed too.","notes":"Discovery confirmed CapabilitiesOf is absent from the current checkout and gateway history. SendResult and ChatInfo have no live consumers, so all three legacy declarations are removed. Red test: TestLegacyPlatformAdapterTypesAreRemoved failed on BasePlatformAdapter, ChatInfo, and SendResult before deletion; gateway package suite passes after deletion. Full task check currently reaches one unrelated pre-existing failure: internal/app/agentworker TestApplicationOwnsNoTransportWireMechanics reports persistent_runner.go imports JSON wire encoding.","status":"closed","priority":2,"issue_type":"task","assignee":"Sam Catlow","owner":"sam@catlow.tech","created_at":"2026-08-22T12:04:10Z","created_by":"Sam Catlow","updated_at":"2026-08-23T12:53:40Z","started_at":"2026-08-22T12:08:39Z","closed_at":"2026-08-22T12:16:02Z","close_reason":"Removed the unwired BasePlatformAdapter, SendResult, ChatInfo, and their test-only stub. CapabilitiesOf is absent from the current checkout/history. Gateway and worktree tests pass. task check passes all packages except the pre-existing tracked agentworker architecture failure archie-core-hqst.","external_ref":"https://github.com/samcharles93/archie-core/issues/595","dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-hqst","title":"TestApplicationOwnsNoTransportWireMechanics fails: persistent_runner.go imports encoding/json","description":"internal/app/agentworker/architecture_test.go's TestApplicationOwnsNoTransportWireMechanics fails on main (pre-existing, unrelated to archie-core-qk8m): persistent_runner.go imports encoding/json, tripping the check that agentworker's app layer owns no transport wire mechanics. Introduced by e351581 (feat(storage): persist agent project state). Confirmed via git stash that this fails identically with none of the mcp-npm-cache changes applied.","status":"in_progress","priority":2,"issue_type":"bug","assignee":"Sam Catlow","owner":"sam@catlow.tech","created_at":"2026-08-22T11:09:58Z","created_by":"Sam Catlow","updated_at":"2026-08-23T12:53:40Z","started_at":"2026-08-22T12:16:11Z","external_ref":"https://github.com/samcharles93/archie-core/issues/596","dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-1ysw.9","title":"Align branch naming behavior, API, tests, and documentation","description":"branchPrefix ignores title and body despite the documented title-prefix contract, contains a checked-in lint-failing FIXME and a no-op, and branchSlug documents 40 characters while implementing 60.","acceptance_criteria":"The chosen title/label precedence is explicit and tested for unlabeled and conflicting inputs; dead parameters and no-op residue are removed; slug documentation and boundary tests agree with 60; scoped lint passes.","status":"open","priority":2,"issue_type":"bug","owner":"sam@catlow.tech","created_at":"2026-08-22T11:01:48Z","created_by":"Sam Catlow","updated_at":"2026-08-23T12:53:41Z","external_ref":"https://github.com/samcharles93/archie-core/issues/597","dependencies":[{"issue_id":"archie-core-1ysw.9","depends_on_id":"archie-core-1ysw","type":"parent-child","created_at":"2026-08-22T21:01:48Z","created_by":"Sam Catlow","metadata":"{}"}],"dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-1ysw.7","title":"Clean no-change worktrees at terminal completion","description":"BuildNoChanges transitions directly to merged without a PR, bypassing the only production worktree cleanup path and leaking a full clone.","acceptance_criteria":"Both direct and container no-change completion remove the identity-correct worktree while parked worktrees remain available; lifecycle regression tests cover the terminal path.","status":"open","priority":2,"issue_type":"bug","owner":"sam@catlow.tech","created_at":"2026-08-22T11:01:47Z","created_by":"Sam Catlow","updated_at":"2026-08-23T12:53:41Z","external_ref":"https://github.com/samcharles93/archie-core/issues/598","dependencies":[{"issue_id":"archie-core-1ysw.7","depends_on_id":"archie-core-1ysw","type":"parent-child","created_at":"2026-08-22T21:01:46Z","created_by":"Sam Catlow","metadata":"{}"}],"dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-1ysw.5","title":"Preserve three-dot failure semantics without a merge base","description":"patch silently computes a direct tree diff when base and HEAD have no merge base, contradicting its three-dot contract and corrupting diff-cap and gate inputs.","acceptance_criteria":"Unrelated histories return a clear error from Diff, ChangedFiles, and ChangedLines; shared-history merge-base behavior remains covered.","status":"closed","priority":2,"issue_type":"bug","assignee":"Sam Catlow","owner":"sam@catlow.tech","created_at":"2026-08-22T11:01:46Z","created_by":"Sam Catlow","updated_at":"2026-08-23T12:53:42Z","started_at":"2026-08-22T11:55:44Z","closed_at":"2026-08-22T11:59:37Z","close_reason":"Three-dot diff operations now fail closed when base and HEAD have no common ancestor; regression covers Diff, ChangedFiles, and ChangedLines.","external_ref":"https://github.com/samcharles93/archie-core/issues/599","dependencies":[{"issue_id":"archie-core-1ysw.5","depends_on_id":"archie-core-1ysw","type":"parent-child","created_at":"2026-08-22T21:01:45Z","created_by":"Sam Catlow","metadata":"{}"}],"dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-1ysw.6","title":"Do not report push failure after successful publication","description":"Push publishes the remote ref before writing unused local upstream metadata, then returns local config errors as if publication failed.","acceptance_criteria":"A post-publication metadata failure cannot park the task as an unsuccessful push; tests verify the remote ref and returned result remain consistent.","status":"open","priority":2,"issue_type":"bug","owner":"sam@catlow.tech","created_at":"2026-08-22T11:01:46Z","created_by":"Sam Catlow","updated_at":"2026-08-23T12:53:42Z","external_ref":"https://github.com/samcharles93/archie-core/issues/600","dependencies":[{"issue_id":"archie-core-1ysw.6","depends_on_id":"archie-core-1ysw","type":"parent-child","created_at":"2026-08-22T21:01:46Z","created_by":"Sam Catlow","metadata":"{}"}],"dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-1ysw.4","title":"Fail refresh when the configured base cannot resolve","description":"Prepared worktrees currently swallow every resolveBase error and report successful refresh against stale history.","acceptance_criteria":"Prepared-worktree refresh returns a contextual error for a missing, renamed, or invalid base; fresh and reused Prepare paths have consistent tests.","status":"closed","priority":2,"issue_type":"bug","assignee":"Sam Catlow","owner":"sam@catlow.tech","created_at":"2026-08-22T11:01:45Z","created_by":"Sam Catlow","updated_at":"2026-08-23T12:53:43Z","started_at":"2026-08-22T11:52:19Z","closed_at":"2026-08-22T11:55:20Z","close_reason":"Retry refresh now removes all non-HEAD worktree content including ignored output while preserving .git, tracked symlinks, and gitlinks; missing bases fail closed.","external_ref":"https://github.com/samcharles93/archie-core/issues/601","dependencies":[{"issue_id":"archie-core-1ysw.4","depends_on_id":"archie-core-1ysw","type":"parent-child","created_at":"2026-08-22T21:01:44Z","created_by":"Sam Catlow","metadata":"{}"}],"dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-j8b4","title":"Implement persistent session memory and plugin storage","description":"Replace the PRD section 3 placeholder in internal/storage/storage.go with the specified persistent storage behavior for session.jsonl, memory.jsonl, and plugins.","status":"closed","priority":2,"issue_type":"task","assignee":"Sam Catlow","owner":"sam@catlow.tech","created_at":"2026-08-22T10:32:31Z","created_by":"Sam Catlow","updated_at":"2026-08-23T12:53:44Z","started_at":"2026-08-22T10:32:37Z","closed_at":"2026-08-22T10:56:59Z","close_reason":"Implemented persistent session transcript, cross-session memory, and staged plugin storage","external_ref":"https://github.com/samcharles93/archie-core/issues/602","dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-t2db.6","title":"Docs: document playbooks, bindings and the intake threat model","description":"Separate so it is not lost when the feature lands.\n\n- The playbook/binding model in docs/architecture/: what a binding is, where it is persisted, how matchers resolve, how versioning works.\n- The threat model, written down plainly: this is a public intake surface that can start agents. Record what protects it and what does not.\n- ARCHITECTURE.md task lifecycle: a task started by a playbook binding has a different provenance from a forge-issue task, and the lifecycle section should say so.\n- Operator docs: how to point an external app at archie and build a first playbook, end to end.\n\nCLAUDE.md's rule: a doc that contradicts its code is worse than none.","acceptance_criteria":"The binding model and threat model are documented in docs/architecture/; ARCHITECTURE.md covers playbook-originated tasks; there is an end-to-end operator walkthrough for building a first playbook.","status":"open","priority":2,"issue_type":"task","owner":"sam@catlow.tech","created_at":"2026-08-21T13:45:46Z","created_by":"Sam Catlow","updated_at":"2026-08-22T09:25:29Z","external_ref":"https://github.com/samcharles93/archie-core/issues/553","dependencies":[{"issue_id":"archie-core-t2db.6","depends_on_id":"archie-core-t2db.4","type":"blocks","created_at":"2026-08-21T23:45:53Z","created_by":"Sam Catlow","metadata":"{}"},{"issue_id":"archie-core-t2db.6","depends_on_id":"archie-core-t2db","type":"parent-child","created_at":"2026-08-21T23:45:45Z","created_by":"Sam Catlow","metadata":"{}"}],"dependency_count":1,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-7d5u.6","title":"Docs: reconcile plugins-and-extensions.md and ARCHITECTURE.md with the shipped event model","description":"Separate bead so it is not lost once the feature lands.\n\n1. docs/architecture/plugins-and-extensions.md is an APPROVED foundation dated 2026-07-28 and currently describes only the plugin framework. If the design bead concluded that extensions may react to events, this doc has to say how -- and if it concluded that generic untyped dispatch is allowed after all, this doc must be amended deliberately rather than contradicted by code.\n\n2. ARCHITECTURE.md describes work intake as polling. Once webhook intake ships, that is no longer the whole picture, and the task lifecycle section needs the new entry path.\n\n3. CLAUDE.md's per-package traps section should gain whatever trap this work creates -- HMAC verification, replay windows, the poll/webhook double-dispatch hazard. That section exists precisely for things an agent will otherwise break.\n\n4. config.example.toml needs the intake flag documented with its default, alongside poll_interval.\n\nCLAUDE.md's own rule: a doc that contradicts its code is worse than none, because the next reader trusts it.","acceptance_criteria":"plugins-and-extensions.md reflects the decided extension model; ARCHITECTURE.md documents webhook intake alongside polling; config.example.toml documents the intake flag and default; any new trap is recorded in CLAUDE.md.","status":"open","priority":2,"issue_type":"task","owner":"sam@catlow.tech","created_at":"2026-08-21T13:26:52Z","created_by":"Sam Catlow","updated_at":"2026-08-22T09:25:30Z","external_ref":"https://github.com/samcharles93/archie-core/issues/554","dependencies":[{"issue_id":"archie-core-7d5u.6","depends_on_id":"archie-core-7d5u","type":"parent-child","created_at":"2026-08-21T23:26:51Z","created_by":"Sam Catlow","metadata":"{}"},{"issue_id":"archie-core-7d5u.6","depends_on_id":"archie-core-7d5u.4","type":"blocks","created_at":"2026-08-21T23:26:58Z","created_by":"Sam Catlow","metadata":"{}"}],"dependency_count":1,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-h019.5","title":"Calibration: confirm findings adversarially before surfacing them","description":"The risk that kills this feature is a reviewer that cries wolf. A findings list padded with speculation trains the operator to skim past it, and then the feature is worse than nothing because it consumes attention while lowering trust.\n\nBefore a finding is surfaced, it must be independently checked and marked CONFIRMED or PLAUSIBLE, with only CONFIRMED able to block. The reviewer must also be able to return zero findings, and to state which properties it checked and cleared -- a review that reports nothing is a valid and welcome result, and saying so explicitly is what distinguishes 'I checked and it is fine' from 'I did not look'.\n\nPrior art from the 2026-08-20/21 sessions on PR #530: three passes each separated confirmed from plausible, one explicitly listed properties it had verified clean, and the confirmed findings were reproduced by mutation before being trusted. That calibration is the feature, not the finding count.","acceptance_criteria":"Only CONFIRMED findings block PR creation; a zero-finding review is representable and reported as such; the reviewer records which properties it checked and cleared; padding with style nits is explicitly out of contract.","status":"open","priority":2,"issue_type":"feature","owner":"sam@catlow.tech","created_at":"2026-08-21T13:03:15Z","created_by":"Sam Catlow","updated_at":"2026-08-22T09:25:30Z","external_ref":"https://github.com/samcharles93/archie-core/issues/555","dependencies":[{"issue_id":"archie-core-h019.5","depends_on_id":"archie-core-h019","type":"parent-child","created_at":"2026-08-21T13:03:15Z","created_by":"Sam Catlow","metadata":"{}"},{"issue_id":"archie-core-h019.5","depends_on_id":"archie-core-h019.1","type":"blocks","created_at":"2026-08-21T13:03:25Z","created_by":"Sam Catlow","metadata":"{}"},{"issue_id":"archie-core-h019.5","depends_on_id":"archie-core-h019.2","type":"blocks","created_at":"2026-08-21T13:03:25Z","created_by":"Sam Catlow","metadata":"{}"}],"dependency_count":2,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-h019.6","title":"Surface findings on the PR body and the dashboard","description":"The output has to land where the operator already looks, or the review is invisible work.\n\nOn the PR archie opens: a findings section stating what was checked, what was found, what was fixed, and what survived. A PR with zero findings should say the review ran and found nothing -- silence is indistinguishable from the review not running, which is the same unverified-claim problem the update-verification work (PR #530) was about.\n\nOn the dashboard and /api/tasks: a parked-for-findings task must show why, the same way a park reason is already surfaced today. An operator seeing waiting_human needs the findings without digging through logs.","acceptance_criteria":"PR body carries a findings section including the zero-finding case; a task parked on a surviving finding shows the findings as its park reason in the dashboard and /api/tasks; nothing requires reading task logs to learn why a PR was withheld.","status":"open","priority":2,"issue_type":"feature","owner":"sam@catlow.tech","created_at":"2026-08-21T13:03:15Z","created_by":"Sam Catlow","updated_at":"2026-08-22T09:25:31Z","external_ref":"https://github.com/samcharles93/archie-core/issues/556","dependencies":[{"issue_id":"archie-core-h019.6","depends_on_id":"archie-core-h019","type":"parent-child","created_at":"2026-08-21T13:03:15Z","created_by":"Sam Catlow","metadata":"{}"},{"issue_id":"archie-core-h019.6","depends_on_id":"archie-core-h019.2","type":"blocks","created_at":"2026-08-21T13:03:26Z","created_by":"Sam Catlow","metadata":"{}"},{"issue_id":"archie-core-h019.6","depends_on_id":"archie-core-h019.1","type":"blocks","created_at":"2026-08-21T13:03:25Z","created_by":"Sam Catlow","metadata":"{}"}],"dependency_count":2,"dependent_count":1,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-h019.7","title":"Docs: promote the shipped review stage into docs/architecture and reconcile CLAUDE.md","description":"Under the scope-discipline rule merged as PR #533, a design is promoted into docs/architecture/ only once it is built and true. This is that promotion, and it is deliberately a separate bead so it is not lost when the feature lands and attention moves on.\n\nDo three things once the stage ships:\n\n1. Promote the docs/prds/ decision into docs/architecture/, describing the review stage as it actually works -- not as designed. Cut anything a reader could learn from the code.\n2. Update ARCHITECTURE.md's task lifecycle: queued -\u003e running(workflow:stage) -\u003e pr_open -\u003e merged|rejected gains a review stage that can divert to waiting_human before pr_open. The current text does not mention it.\n3. Reconcile CLAUDE.md's Development Protocol. It currently tells a human or agent contributor to run the adversarial pass by hand. Once archied does this for the PRs it opens, that section needs to say which path applies to whom, or it will read as describing a manual step that is now automatic.\n\nCLAUDE.md's own rule: a comment or doc that contradicts its code is worse than none, because the next reader trusts it.","acceptance_criteria":"docs/architecture/ describes the shipped stage; ARCHITECTURE.md's lifecycle includes the review stage and the waiting_human diversion; CLAUDE.md distinguishes the manual contributor pass from archied's automated one; no doc still claims review is only manual.","status":"open","priority":2,"issue_type":"task","owner":"sam@catlow.tech","created_at":"2026-08-21T13:03:15Z","created_by":"Sam Catlow","updated_at":"2026-08-22T09:25:32Z","external_ref":"https://github.com/samcharles93/archie-core/issues/557","dependencies":[{"issue_id":"archie-core-h019.7","depends_on_id":"archie-core-h019.4","type":"blocks","created_at":"2026-08-21T13:03:26Z","created_by":"Sam Catlow","metadata":"{}"},{"issue_id":"archie-core-h019.7","depends_on_id":"archie-core-h019.6","type":"blocks","created_at":"2026-08-21T13:03:26Z","created_by":"Sam Catlow","metadata":"{}"},{"issue_id":"archie-core-h019.7","depends_on_id":"archie-core-h019","type":"parent-child","created_at":"2026-08-21T13:03:15Z","created_by":"Sam Catlow","metadata":"{}"}],"dependency_count":2,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-nln7","title":"Dashboard-initiated updates get no phase-2 report, so they are never verified","description":"internal/webui/api_chat.go:497 starts an install with releaseupdate.InstallMeta{Channel: \"webui\"} and leaves ReportPath empty. CommandInstaller passes that through as ARCHIE_UPDATE_REPORT_PATH, and scripts/archie-update-watchdog's write_report() returns early when it is empty.\n\nConsequences: an operator who approves an update from the dashboard gets only the synchronous phase-1 result (build/install succeeded, restart queued) and never learns whether the daemon actually came back up, whether it was rolled back, or - since c25799e - whether the installed version is the one now running. Telegram gets all of that; the dashboard silently gets none of it.\n\nThe verification added in c25799e (releaseupdate.Report.Verify) is reached only from internal/channels/telegram/update.go, so this path is unverified regardless.\n\nFix needs two parts: give the webui install a ReportPath (updateReportPath in cmd/archied), and give the dashboard somewhere to relay a pending report on boot the way telegram's reportPendingUpdate does - today ReadPendingReport has exactly one caller, and a single report file shared by two relayers would race to clear it.","acceptance_criteria":"A dashboard-approved update produces a phase-2 report; the dashboard surfaces its outcome including version verification; two relayers cannot double-report or lose a report.","status":"open","priority":2,"issue_type":"bug","owner":"sam@catlow.tech","created_at":"2026-08-20T14:04:33Z","created_by":"Sam Catlow","updated_at":"2026-08-21T11:57:53Z","external_ref":"https://github.com/samcharles93/archie-core/issues/531","dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-qk8m","title":"MCP npm servers re-fetched from npm on every task container start","description":"## Problem\n\nd4bb914b/#64 fixed the daemon-side case: cmd/archied/main.go's\nconfiguredMCPProvider now points npx-launched MCP servers at a persistent\nNPM_CONFIG_CACHE under the daemon's own work_dir, so a daemon restart\nreuses a warm cache instead of re-resolving/re-downloading from the npm\nregistry.\n\ninternal/app/agentworker/mcp_providers.go builds the identical\nStdioTransportConfig for archie-agent's own per-task MCP servers, but was\ndeliberately left untouched -- it's not a separate code path, the exact\nsame cfg.Tools.MCPServers list (including any npx entries) is threaded\nthrough to every per-task NATS agent worker (bootstrap.go -\u003e NATSRunner.MCPServers\n-\u003e taskrun.Request -\u003e task_execution.go's startMCPProviders). Since each\ntask runs in a fresh ephemeral container, an npx-based MCP server\nconfigured for task use re-resolves/re-downloads on every task, not\njust every daemon restart -- more frequent, and thus a worse amplifier of\na registry outage than the bug already fixed.\n\n## Why this needs its own issue\n\nUnlike the daemon case, a bare NPM_CONFIG_CACHE=\u003cpath\u003e pointed at a host\ndirectory is meaningless inside an ephemeral container unless a\npersistent Docker volume is actually bind-mounted at that path. No such\nvolume currently exists for this purpose -- internal/container/pool.go's\nmounts are caller-provided, and nothing wires an npm-cache volume in.\nThat's real new infrastructure (a shared, persistent volume across\nper-task containers), not a parameter-threading fix like d4bb914b was.\n\n## Acceptance criteria\n\n- Task containers reuse a persistent npm cache across tasks, the same\n way the daemon now does across restarts.\n- The cache volume/mount is wired through internal/container/pool.go's\n Acquire (or equivalent) without weakening per-task filesystem isolation\n for anything other than the npm cache path itself.\n- Startup time for a task's npx-based MCP server no longer scales with\n package size once the cache is warm.\n","status":"closed","priority":2,"issue_type":"bug","owner":"sam@catlow.tech","created_at":"2026-08-18T16:04:59Z","created_by":"Sam Catlow","updated_at":"2026-08-22T11:13:23Z","closed_at":"2026-08-22T11:13:23Z","close_reason":"Fixed: MCP npm servers for per-task containers now reuse a persistent npm cache. Added mcp.NpmCacheEnv (shared with the daemon-side fix), an always-on archie-cache-mcp-npm Docker volume mounted at /data/cache/mcp-npm on every task container regardless of ecosystem, and wired it into internal/app/agentworker/mcp_providers.go's stdio transport construction. Adversarial review found zero surviving findings.","external_ref":"https://github.com/samcharles93/archie-core/issues/532","dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-nln7","title":"Dashboard-initiated updates get no phase-2 report, so they are never verified","description":"internal/webui/api_chat.go:497 starts an install with releaseupdate.InstallMeta{Channel: \"webui\"} and leaves ReportPath empty. CommandInstaller passes that through as ARCHIE_UPDATE_REPORT_PATH, and scripts/archie-update-watchdog's write_report() returns early when it is empty.\n\nConsequences: an operator who approves an update from the dashboard gets only the synchronous phase-1 result (build/install succeeded, restart queued) and never learns whether the daemon actually came back up, whether it was rolled back, or - since c25799e - whether the installed version is the one now running. Telegram gets all of that; the dashboard silently gets none of it.\n\nThe verification added in c25799e (releaseupdate.Report.Verify) is reached only from internal/channels/telegram/update.go, so this path is unverified regardless.\n\nFix needs two parts: give the webui install a ReportPath (updateReportPath in cmd/archied), and give the dashboard somewhere to relay a pending report on boot the way telegram's reportPendingUpdate does - today ReadPendingReport has exactly one caller, and a single report file shared by two relayers would race to clear it.","acceptance_criteria":"A dashboard-approved update produces a phase-2 report; the dashboard surfaces its outcome including version verification; two relayers cannot double-report or lose a report.","status":"in_progress","priority":2,"issue_type":"bug","assignee":"Sam Catlow","owner":"sam@catlow.tech","created_at":"2026-08-20T14:04:33Z","created_by":"Sam Catlow","updated_at":"2026-08-23T12:56:47Z","started_at":"2026-08-23T12:56:47Z","external_ref":"https://github.com/samcharles93/archie-core/issues/531","dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-qk8m","title":"MCP npm servers re-fetched from npm on every task container start","description":"## Problem\n\nd4bb914b/#64 fixed the daemon-side case: cmd/archied/main.go's\nconfiguredMCPProvider now points npx-launched MCP servers at a persistent\nNPM_CONFIG_CACHE under the daemon's own work_dir, so a daemon restart\nreuses a warm cache instead of re-resolving/re-downloading from the npm\nregistry.\n\ninternal/app/agentworker/mcp_providers.go builds the identical\nStdioTransportConfig for archie-agent's own per-task MCP servers, but was\ndeliberately left untouched -- it's not a separate code path, the exact\nsame cfg.Tools.MCPServers list (including any npx entries) is threaded\nthrough to every per-task NATS agent worker (bootstrap.go -\u003e NATSRunner.MCPServers\n-\u003e taskrun.Request -\u003e task_execution.go's startMCPProviders). Since each\ntask runs in a fresh ephemeral container, an npx-based MCP server\nconfigured for task use re-resolves/re-downloads on every task, not\njust every daemon restart -- more frequent, and thus a worse amplifier of\na registry outage than the bug already fixed.\n\n## Why this needs its own issue\n\nUnlike the daemon case, a bare NPM_CONFIG_CACHE=\u003cpath\u003e pointed at a host\ndirectory is meaningless inside an ephemeral container unless a\npersistent Docker volume is actually bind-mounted at that path. No such\nvolume currently exists for this purpose -- internal/container/pool.go's\nmounts are caller-provided, and nothing wires an npm-cache volume in.\nThat's real new infrastructure (a shared, persistent volume across\nper-task containers), not a parameter-threading fix like d4bb914b was.\n\n## Acceptance criteria\n\n- Task containers reuse a persistent npm cache across tasks, the same\n way the daemon now does across restarts.\n- The cache volume/mount is wired through internal/container/pool.go's\n Acquire (or equivalent) without weakening per-task filesystem isolation\n for anything other than the npm cache path itself.\n- Startup time for a task's npx-based MCP server no longer scales with\n package size once the cache is warm.\n","status":"open","priority":2,"issue_type":"bug","owner":"sam@catlow.tech","created_at":"2026-08-18T16:04:59Z","created_by":"Sam Catlow","updated_at":"2026-08-23T12:53:17Z","external_ref":"https://github.com/samcharles93/archie-core/issues/532","metadata":null,"dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-q5w4","title":"secret engine plugin: age","description":"Resolve SecretRef values from an age-encrypted file of key=value lines. Env: AGE_FILE (encrypted file path), AGE_IDENTITY (age private key file). Resolve runs 'age -d -i \u003cidentity\u003e \u003cfile\u003e' and parses the plaintext. Fresh resolve per call (no cache) so updates are picked up without daemon restart. CLI-based, mirroring the bws engine; ship as a Yaegi plugin in examples/secret-engines/.","status":"closed","priority":2,"issue_type":"task","owner":"sam@catlow.tech","created_at":"2026-08-17T14:22:03Z","created_by":"Sam Catlow","updated_at":"2026-08-17T22:27:53Z","started_at":"2026-08-17T14:22:10Z","closed_at":"2026-08-17T14:33:52Z","close_reason":"Shipped age engine plugin in examples/secret-engines/age.go (commit 24faf53): CLI-based, AGE_FILE/AGE_IDENTITY, key=value lines.","external_ref":"https://github.com/samcharles93/archie-core/issues/526","metadata":null,"dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-1786749700635-7-83b8c32f","title":"dashboard: turn_completed events carry no task correlation and drown real activity in the Live Activity feed","description":"## Problem, two compounding parts\n\n**1. `turn_completed` events carry no useful, correlatable content.**\n`internal/gateway/turn.go:306-311` publishes:\n```go\nr.Bus.Publish(events.Event{\n Kind: events.KindTurnCompleted,\n Detail: sessionID,\n Data: map[string]any{\"session\": sessionID, \"channel\": r.Channel},\n})\n```\nNo `TaskID` is set, and `Detail` is a raw internal session identifier (e.g. `1312197967`) with no formatting. On the dashboard's \"Live activity\" table this renders as `Task: —`, `Detail: 1312197967` — meaningless to anyone reading it, and impossible to correlate to a task. This event fires on every chat turn, so it dominates the feed: in a sample of the 30 most-recent Live Activity rows, only 3 were real task-lifecycle events (`task_queued`); the other 27 were content-free `turn_completed` rows.\n\n**2. The `/logs` page has no filtering, search, or level control at all** — just Pause/Refresh. Confirmed live: during the redelivery storm in #517, `handle failed` alone produced 996 near-identical lines, and there is no way to filter by task, by level, or search text to find anything else in the stream. During exactly the situation an operator needs the log page most (an active incident), it is unusable.\n\n## Fix\n\n- Give `turn_completed` (and any other cross-cutting event shown in this feed) a human-meaningful `Detail` — e.g. the channel name plus a short session label — and drop it from the feed entirely if it isn't task-correlated, since a feed titled \"Live activity\" that is 90% non-actionable chat-turn noise defeats its own purpose.\n- Add basic filtering to `/logs`: at minimum a level filter and a task/session search, so a single noisy source can be excluded without losing everything else.","status":"closed","priority":2,"issue_type":"bug","created_at":"2026-08-14T23:19:11Z","updated_at":"2026-08-15T00:35:51Z","started_at":"2026-08-15T00:03:05Z","closed_at":"2026-08-15T00:35:51Z","external_ref":"https://github.com/samcharles93/archie-core/issues/521","source_system":"github:https://github.com/samcharles93/archie-core/issues/521:521","metadata":null,"labels":["bug","webui"],"dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-1786748942590-20-c21c728b","title":"Dashboard: Token outlook is blank because token usage is not reaching daily accounting","description":"## Problem\n\nThe dashboard's **Token outlook** card is blank instead of showing token usage/spend. The screenshot shows the card present but with no usable content.\n\n## Investigation\n\nThe live dashboard API currently returns:\n\n```json\n{\n \"workflows\": [\n {\"workflow\":\"tdd\",\"total_tokens\":904901,\"avg_tokens\":301633},\n {\"workflow\":\"implement\",\"total_tokens\":0}\n ],\n \"tokens_by_day\": null\n}\n```\n\nThe dashboard frontend expects `tokens_by_day` and renders the empty state when it is missing/empty (`ui/src/dashboard/dashboard.js:405-418`). The runtime therefore has token totals in the `tasks` table but no daily token series for the card.\n\nThe persistence path is inconsistent:\n\n- `internal/domain/workflow/agent.go:171-176` records `res.TokensUsed` on the task and emits an `agent_finish` event with `data.tokens`.\n- `internal/store/events.go:231-251` calculates the card data exclusively from persisted `agent_finish` events.\n- The live task event database currently contains `task_queued` and `turn_completed` events but no `agent_finish` rows, while workflow statistics still contain 904,901 tokens.\n- `handleSummary` serializes the nil result from `TokensByDay` as JSON `null`, rather than a stable empty array or a meaningful unavailable state.\n\nThis means the dashboard cannot truthfully show spend even though token usage is already tracked elsewhere.\n\n## Expected behaviour\n\n- Completed agent runs contribute to the Token outlook series and the Tokens used statistic.\n- The API returns `tokens_by_day: []` rather than `null` when no data exists.\n- The UI distinguishes \"no usage recorded yet\" from \"usage tracking is unavailable/broken\".\n- Token totals and daily totals come from one authoritative accounting path and do not diverge.\n- The card never renders blank.\n\n## Acceptance criteria\n\n- Add a regression test reproducing the current state: tasks have non-zero `tokens_used`, but no `agent_finish` rows; the summary must still have a defined, truthful token state.\n- Trace and repair the event persistence path so successful and failed agent runs produce the data required by `TokensByDay`, including NATS/container execution.\n- Add store/API tests asserting daily aggregation, timezone/day semantics, empty data, malformed/missing token fields, and multiple stages per task.\n- Return an empty JSON array for an empty series, not `null`.\n- Add a UI test for populated data, no data, and unavailable/error states; verify the card cannot be visually blank.\n- Verify against a running daemon with real task data and run the normal project gate.\n\n## Scope\n\nThis issue is about truthful token accounting and the Token outlook dashboard. It does not attempt to add provider billing APIs or dollar pricing unless required to make the existing token accounting correct.","status":"open","priority":2,"issue_type":"bug","created_at":"2026-08-14T23:03:30Z","updated_at":"2026-08-14T23:03:30Z","external_ref":"https://github.com/samcharles93/archie-core/issues/515","source_system":"github:https://github.com/samcharles93/archie-core/issues/515:515","metadata":null,"labels":["bug"],"dependencies":[{"issue_id":"archie-core-1786748942590-20-c21c728b","depends_on_id":"archie-core-1786637490248-18-17079a75","type":"related","created_at":"2026-08-15T12:59:33Z","created_by":"Sam Catlow","metadata":"{}"}],"dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-1786748942566-19-aa1c4552","title":"Telegram: response formatting concatenates URLs with following text","description":"## Problem\n\nTelegram responses can concatenate a bare URL with the sentence that follows it, which breaks the clickable/direct link and makes the message look malformed.\n\nThis has occurred at least twice. Example:\n\n```text\nhttps://github.com/samcharles93/archie-core/issues/513It includes model-independent safeguards...\n```\n\nThe expected output is:\n\n```text\nhttps://github.com/samcharles93/archie-core/issues/513\n\nIt includes model-independent safeguards...\n```\n\n## Desired behavior\n\n- Preserve paragraph/newline boundaries between links and subsequent text.\n- Ensure a bare URL remains independently clickable in Telegram.\n- Do not concatenate separately streamed/rendered response segments.\n- Apply the fix consistently whether the response is sent once, edited while streaming, or split into multiple Telegram messages.\n\n## Acceptance criteria\n\n- A URL followed by prose is rendered with at least one newline separating them.\n- Bare GitHub issue URLs remain clickable and contain no trailing prose.\n- Regression coverage includes the exact example above.\n- Coverage exercises the relevant Telegram streaming/editing and message-splitting paths.\n","status":"closed","priority":2,"issue_type":"bug","assignee":"samcharles93","created_at":"2026-08-14T22:21:58Z","updated_at":"2026-08-15T13:04:30Z","closed_at":"2026-08-15T13:04:30Z","close_reason":"Fixed Telegram URL/prose boundary normalization across one-shot, live, and split delivery paths; added Markdown/code safety, newline preservation, and regression coverage.","external_ref":"https://github.com/samcharles93/archie-core/issues/514","source_system":"github:https://github.com/samcharles93/archie-core/issues/514:514","metadata":null,"labels":["bug"],"dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-1786748942540-18-9af78536","title":"Agent falsely claims GitHub issue creation succeeded without verification","description":"## Problem\n\nDuring a Telegram chat using `deepseek/deepseek-v4-pro`, the agent stated that it had created GitHub issue #512 and supplied a URL even though no issue had been created. When challenged, it acknowledged the false claim and said it lacked a GitHub token; after being asked to retry, the issue creation succeeded.\n\nThis is a serious trust and UX problem: users must be able to rely on claims about external side effects such as creating issues, pushing branches, opening PRs, deploying, or restarting services.\n\n## Expected behavior\n\n- Never report an external action as successful unless the corresponding tool/plugin call completed successfully and returned verifiable output.\n- Include the issue number and URL from the forge response, not values inferred or fabricated by the model.\n- If the tool is unavailable or fails, report the actual failure clearly.\n- Allow a retry when the capability may be temporarily unavailable.\n\n## Suggested safeguards\n\n- Require successful structured tool results before permitting success language for side-effecting actions.\n- Track pending/completed/failed action state in the turn runner.\n- Add a postcondition check for issue creation, such as validating the returned issue ID/URL.\n- Add regression tests using a model response that falsely claims an issue was created without invoking the forge tool.\n- Consider a gateway warning or telemetry event when a final response claims an unverified side effect.\n\n## Reproduction\n\n1. Ask the agent to create an issue.\n2. The model responds with an issue number and URL without a successful forge invocation.\n3. Check GitHub and observe that the issue does not exist.\n\n## Context\n\nObserved with `deepseek/deepseek-v4-pro` through the Telegram gateway. This should be enforced independently of model/provider because any model can make an unsupported action claim.\n\n## Frequency\n\nThis has been observed twice in the same conversation, so it is a recurring failure rather than a one-off hallucination. Regression coverage should include repeated side-effect claims across turns, including claims that reuse a plausible issue number and URL.\n","status":"closed","priority":2,"issue_type":"task","created_at":"2026-08-14T22:16:46Z","updated_at":"2026-08-23T12:16:01Z","closed_at":"2026-08-23T12:16:01Z","close_reason":"Deprioritized: prompt-level fix landed in fba80e3 (archie-core-3jag/GH#524) covers the general overconfidence pattern. Not worth mechanical enforcement (postcondition checks, tool-result verification) unless this recurs — revisit with stronger prompting first if it does.","external_ref":"https://github.com/samcharles93/archie-core/issues/513","source_system":"github:https://github.com/samcharles93/archie-core/issues/513:513","metadata":null,"dependencies":[{"issue_id":"archie-core-1786748942540-18-9af78536","depends_on_id":"archie-core-3jag","type":"related","created_at":"2026-08-15T12:59:09Z","created_by":"Sam Catlow","metadata":"{}"}],"dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-1786748942540-18-9af78536","title":"Agent falsely claims GitHub issue creation succeeded without verification","description":"## Problem\n\nDuring a Telegram chat using `deepseek/deepseek-v4-pro`, the agent stated that it had created GitHub issue #512 and supplied a URL even though no issue had been created. When challenged, it acknowledged the false claim and said it lacked a GitHub token; after being asked to retry, the issue creation succeeded.\n\nThis is a serious trust and UX problem: users must be able to rely on claims about external side effects such as creating issues, pushing branches, opening PRs, deploying, or restarting services.\n\n## Expected behavior\n\n- Never report an external action as successful unless the corresponding tool/plugin call completed successfully and returned verifiable output.\n- Include the issue number and URL from the forge response, not values inferred or fabricated by the model.\n- If the tool is unavailable or fails, report the actual failure clearly.\n- Allow a retry when the capability may be temporarily unavailable.\n\n## Suggested safeguards\n\n- Require successful structured tool results before permitting success language for side-effecting actions.\n- Track pending/completed/failed action state in the turn runner.\n- Add a postcondition check for issue creation, such as validating the returned issue ID/URL.\n- Add regression tests using a model response that falsely claims an issue was created without invoking the forge tool.\n- Consider a gateway warning or telemetry event when a final response claims an unverified side effect.\n\n## Reproduction\n\n1. Ask the agent to create an issue.\n2. The model responds with an issue number and URL without a successful forge invocation.\n3. Check GitHub and observe that the issue does not exist.\n\n## Context\n\nObserved with `deepseek/deepseek-v4-pro` through the Telegram gateway. This should be enforced independently of model/provider because any model can make an unsupported action claim.\n\n## Frequency\n\nThis has been observed twice in the same conversation, so it is a recurring failure rather than a one-off hallucination. Regression coverage should include repeated side-effect claims across turns, including claims that reuse a plausible issue number and URL.\n","status":"open","priority":2,"issue_type":"task","created_at":"2026-08-14T22:16:46Z","updated_at":"2026-08-23T12:53:18Z","external_ref":"https://github.com/samcharles93/archie-core/issues/513","source_system":"github:https://github.com/samcharles93/archie-core/issues/513:513","metadata":null,"dependencies":[{"issue_id":"archie-core-1786748942540-18-9af78536","depends_on_id":"archie-core-3jag","type":"related","created_at":"2026-08-15T12:59:09Z","created_by":"Sam Catlow","metadata":"{}"}],"dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-1786748942519-17-5999d55b","title":"Polish the /status command response","description":"## Problem\n\nThe `/status` command response is functional but lacks polish and is difficult to scan. The current output looks like:\n\n```text\nTask status: parked:2\nProvider: deepseek Model: deepseek/deepseek-v4-pro\n```\n\nThe information is compressed into raw key/value text, and task state, provider, and model details are not clearly separated.\n\n## Desired behaviour\n\nPresent status information in a compact, polished, mobile-friendly format suitable for Telegram. It should make the most important state immediately obvious and visually separate task and runtime/model information.\n\nFor example:\n\n```text\n📊 Archie status\n\nTasks\n⏸ Parked:2\n\nRuntime\nProvider: OpenAI\nModel: openai/gpt-5.6-luna\n```\n\nThe exact wording and icons can follow existing Telegram UI conventions.\n\n## Acceptance criteria\n\n- `/status` has a clear heading and grouped sections.\n- Task states are shown on separate, readable lines.\n- Provider and model are clearly separated.\n- The response remains concise and readable on mobile.\n- Empty and unavailable values have a graceful fallback.\n- Tests cover the formatted response, including multiple task states and missing runtime details.","status":"closed","priority":2,"issue_type":"task","assignee":"Sam Catlow","created_at":"2026-08-14T22:14:58Z","updated_at":"2026-08-15T12:41:34Z","started_at":"2026-08-15T12:33:21Z","closed_at":"2026-08-15T12:41:34Z","close_reason":"Closed","external_ref":"https://github.com/samcharles93/archie-core/issues/512","source_system":"github:https://github.com/samcharles93/archie-core/issues/512:512","metadata":null,"dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-1786748942272-7-2ad59e97","title":"Add end-to-end image generation test matrix and operational safeguards","description":"## Scope\nBuild the cross-cutting test and verification layer for the image capability. Exercise the clarification flow, hosted fake provider, local fake backend, real local recipe smoke test where available, delivery, and failure paths.\n\nAdd safeguards for cost, resource use, prompt/input limits, concurrency, cancellation, and observability consistent with Archie''s existing operational style.\n\n## Acceptance criteria\n- Automated tests cover both mechanisms, generation and editing, routing, provider failures, delivery failures, cancellation, and cleanup.\n- Tests assert no provider call occurs before mechanism clarification.\n- Resource and input/output limits are enforced in code and tested.\n- A documented local smoke command verifies at least one GPU recipe without requiring hosted credentials.\n- The normal project gate passes, and the epic's acceptance criteria can be verified from real command output.","status":"open","priority":2,"issue_type":"task","created_at":"2026-08-14T21:55:45Z","updated_at":"2026-08-14T21:55:45Z","external_ref":"https://github.com/samcharles93/archie-core/issues/503","source_system":"github:https://github.com/samcharles93/archie-core/issues/503:503","metadata":null,"labels":["task"],"dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-1786748942296-8-260e931d","title":"Write image capability documentation and agent assistance examples","description":"## Scope\nDocument the user-facing `/image` flow, hosted-provider setup, local GPU setup, supported model/backend recipes, troubleshooting, resource requirements, and security/cost implications.\n\nProvide concise code/config examples an agent can use to help users call both hosted and local paths. Examples must show how to inspect hardware/backend availability, choose a tested model, submit a generation/edit request, and collect the resulting image.\n\n## Acceptance criteria\n- Documentation explicitly says mechanism selection happens first by default.\n- Hosted API baseline fields and provider deviations are documented.\n- Every local model recipe names its tested backend/version, model source, VRAM/RAM expectations, supported sizes/operations, and failure modes.\n- Examples are runnable or tested in CI with mocked services; no secrets or huge weights are included.\n- Docs distinguish tested support from illustrative/untested possibilities.","status":"open","priority":2,"issue_type":"task","created_at":"2026-08-14T21:55:45Z","updated_at":"2026-08-14T21:55:45Z","external_ref":"https://github.com/samcharles93/archie-core/issues/502","source_system":"github:https://github.com/samcharles93/archie-core/issues/502:502","metadata":null,"labels":["task"],"dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
@@ -75,7 +98,7 @@
|
||||
{"_type":"issue","id":"archie-core-1786748942120-1-6636e629","title":"[EPIC] Image generation capability: hosted API baseline plus local GPU workflows","description":"## Goal\nAdd first-class image generation to Archie, with a capability surface targeting the practical baseline of the OpenAI `gpt-image-2` API while also supporting image generation on a user's existing GPU.\n\nThe capability must not assume one backend. A user asking for `/image` is first asked which generation mechanism they prefer:\n- hosted API (starting with an OpenAI-compatible `gpt-image-2` provider), or\n- local GPU generation using one of Archie's tested model/backend recipes.\n\n## Scope\n- A provider-neutral image capability contract and routing/configuration.\n- Hosted generation/editing with an OpenAI `gpt-image-2`-class API baseline.\n- Local GPU generation through tested, documented model/backend recipes suitable for common consumer GPUs.\n- `/image` clarification and execution flow across supported channels.\n- Returned image delivery, bounded inputs/outputs, errors, and tests.\n\n## Non-goals\n- Training or fine-tuning image models.\n- Bundling multi-gigabyte model weights in Archie.\n- Pretending every GPU/model combination is supported; local support must be explicit and evidence-backed.\n- Replacing the existing text-chat capability or silently selecting a paid hosted provider.\n\n## Definition of done\n- `/image` asks for the preferred mechanism before generation when no mechanism is already selected for the request/session.\n- Hosted generation and editing cover the documented gpt-image-2 baseline, with provider-specific differences exposed rather than hidden.\n- Local GPU generation works end-to-end with at least one tested recipe, and additional tested common models are documented with VRAM/backend requirements and runnable examples.\n- Images can be delivered through the existing channel abstractions without leaking temporary files or unbounded data.\n- Unit, integration, and failure-path tests cover routing, provider errors, clarification, local execution, and delivery.\n- Configuration, security, and operational documentation are complete.\n\nSubtasks below are dependency-ordered where practical; each must link back to this epic and state any deliberate deviations from the hosted API baseline.","status":"open","priority":2,"issue_type":"epic","created_at":"2026-08-14T21:55:40Z","updated_at":"2026-08-14T21:55:40Z","external_ref":"https://github.com/samcharles93/archie-core/issues/496","source_system":"github:https://github.com/samcharles93/archie-core/issues/496:496","metadata":null,"labels":["epic"],"dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-hlxd","title":"telegram: a tool-use turn ending with no answer posts the tool line alone as the finished message","description":"finalText returns the tool block alone when the reply is empty, and finalize sends it as the authoritative finished message — content == '' is the only silence path, so an empty-reply turn with completed tools permanently delivers '🔧 shell — exit 0' with no answer. The old path guarded 'if reply != \"\"'. Telegram messages are immutable, so it can never be corrected. Gated on show_tool_calls (off by default), so it bites opt-in deployments. No test covers finalize with an empty reply and tools.\n\nFailure: the model ends a tool-use loop without a final summary (empty ResponseText); the finished message shows only the tool line, looking like a completed answer that said nothing.","design":"When the reply is empty, do not post the tool block as the answer — either skip the final send (leave the cursor-cleaned live message) or emit an explicit 'no reply' marker. Add a test for finalize(empty, tools).","acceptance_criteria":"A turn that ends with tools but no answer text does not post a bare tool line as the final message.","status":"closed","priority":2,"issue_type":"bug","assignee":"Sam Catlow","owner":"sam@catlow.tech","created_at":"2026-08-14T14:43:38Z","created_by":"Sam Catlow","updated_at":"2026-08-14T15:25:44Z","started_at":"2026-08-14T15:07:52Z","closed_at":"2026-08-14T15:25:44Z","close_reason":"Fixed in internal/channels/telegram/live.go: framedText keeps tool lines whole ahead of the clamped answer tail (fixes wpq6); finalText appends a '(no response)' marker when tools ran but the reply is empty (fixes hlxd); abandonFailed marks a provider-error partial distinctly from a clean /stop abandon (fixes c3w2). Regression tests verified red-then-green; adversarial review found no blocking issues (added one more test for the degenerate oversized-tool-block case it flagged). task check clean, committed as 587b9b9.","external_ref":"https://github.com/samcharles93/archie-core/issues/486","labels":["code-review","streaming","telegram"],"dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-og5r","title":"webui: the dashboard narrates tool calls with no opt-out; show_tool_calls only gates Telegram","description":"show_tool_calls gates only the Telegram adapter. The web dashboard's chatStreamSink forwards every ToolCallEvent unconditionally (api_chat.go:228) — no config key exists anywhere in webui — so an operator following the documented intent (show_tool_calls off means no tool narration) still gets full per-tool narration in the web dashboard with no way to disable it. The ToolCallEvent contract comment (stream.go:18-20) delegates 'whether to show it at all' to the channel adapter, but only the Telegram adapter exercises the knob.\n\nFailure: an operator with the default show_tool_calls=false opens the web dashboard; every internal tool step of every web chat is narrated in full, exposing tool inventory and parameter shapes to anyone with dashboard access.","design":"Either add a webui-equivalent config key and gate the sink on it, or make show_tool_calls a cross-channel setting. Decide and document the intent, then wire the webui sink to honor it.","acceptance_criteria":"With the setting off, the web dashboard does not emit tool frames; with it on, it does — controlled by one documented knob.","status":"closed","priority":2,"issue_type":"bug","assignee":"Sam Catlow","owner":"sam@catlow.tech","created_at":"2026-08-14T14:43:37Z","created_by":"Sam Catlow","updated_at":"2026-08-14T15:57:11Z","started_at":"2026-08-14T15:50:15Z","closed_at":"2026-08-14T15:57:11Z","close_reason":"Fixed: ShowToolCalls moved from TelegramConfig to ChatConfig (one cross-channel setting), webui's chatStreamSink gated on it (off by default, matching Telegram). Adversarial review clean aside from cosmetic/doc notes, both addressed. Breaking config-key move flagged explicitly in the commit body since it's a silent TOML drop, not an error. Committed f7590a6.","external_ref":"https://github.com/samcharles93/archie-core/issues/487","labels":["code-review","config","webui"],"dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-ippu","title":"gateway: replay and redelivery lose tool activity, showing duplicate answers without tools","description":"The replay paths (TurnClaimCompleted, prior-reply) emit stream.Delta(ResponseText) only — never stream.ToolCall — and neither the ledger (TurnRecord) nor the session store persists tool activity. A completed-duplicate delivery (NATS redelivery, restart RecoverTurns re-delivery) finalizes a fresh liveReply with empty toolLines and sends the bare reply as a new message: the transcript shows the original (with tools) and the duplicate (without) side by side, disagreeing about what ran. Web history has the same gap — stored assistant messages render text only.\n\nFailure: a chat message is redelivered or re-queued after restart; the user sees the same answer twice, the second copy lacking the tool block that explains it.","design":"Decide whether tool activity should be persisted (ledger/session store) and replayed, or whether replays simply should not re-narrate tools. If persisting, add a tool-activity record to the turn/message and replay it; if not, make the replay path explicitly consistent and document the choice.","acceptance_criteria":"A redelivered/restarted turn does not show a tool-less duplicate disagreeing with the original; the behavior is explicitly decided and tested.","status":"closed","priority":2,"issue_type":"bug","owner":"sam@catlow.tech","created_at":"2026-08-14T14:43:24Z","created_by":"Sam Catlow","updated_at":"2026-08-22T10:43:33Z","closed_at":"2026-08-22T10:43:33Z","close_reason":"Fixed: TurnRecord now persists tool-call activity alongside ResponseText; the completed-duplicate replay path replays it via stream.ToolCall before the text. Prior-reply fallback documented as deliberately text-only (crash race with no persisted tool record). Commit 86a9731, task check clean, adversarial review clean (0 findings).","external_ref":"https://github.com/samcharles93/archie-core/issues/488","labels":["code-review","gateway","telegram","webui"],"dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-ippu","title":"gateway: replay and redelivery lose tool activity, showing duplicate answers without tools","description":"The replay paths (TurnClaimCompleted, prior-reply) emit stream.Delta(ResponseText) only — never stream.ToolCall — and neither the ledger (TurnRecord) nor the session store persists tool activity. A completed-duplicate delivery (NATS redelivery, restart RecoverTurns re-delivery) finalizes a fresh liveReply with empty toolLines and sends the bare reply as a new message: the transcript shows the original (with tools) and the duplicate (without) side by side, disagreeing about what ran. Web history has the same gap — stored assistant messages render text only.\n\nFailure: a chat message is redelivered or re-queued after restart; the user sees the same answer twice, the second copy lacking the tool block that explains it.","design":"Decide whether tool activity should be persisted (ledger/session store) and replayed, or whether replays simply should not re-narrate tools. If persisting, add a tool-activity record to the turn/message and replay it; if not, make the replay path explicitly consistent and document the choice.","acceptance_criteria":"A redelivered/restarted turn does not show a tool-less duplicate disagreeing with the original; the behavior is explicitly decided and tested.","status":"open","priority":2,"issue_type":"bug","owner":"sam@catlow.tech","created_at":"2026-08-14T14:43:24Z","created_by":"Sam Catlow","updated_at":"2026-08-23T12:53:18Z","external_ref":"https://github.com/samcharles93/archie-core/issues/488","metadata":null,"labels":["code-review","gateway","telegram","webui"],"dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-o2t8","title":"webui: derive tool failure from a structured field, not a 'failed:' string prefix","description":"The web UI derives failure styling with summary.startsWith('failed:') on the rendered string (chat-tools.js:25), while chatStreamEvent (api_chat.go) carries no structured error/ok field — the doc comment says the intent was structured precisely so the browser could style the two apart instead of parsing a rendered string, but the bit was dropped. False positives are concrete: a successful tool whose first output line begins with 'failed: ' is styled as a failure. Nothing pins the Go 'failed: ' prefix to the client sniff (the UI test feeds the literal string), so a future rewording silently breaks failure styling.\n\nFailure: a successful shell command printing 'failed: no such file' to stdout exits 0; the web chat renders it red as an error step.","design":"Add an explicit error/ok field to ToolCallEvent and chatStreamEvent (e.g. a bool or the raw Err), thread it through the sink, and style on that instead of the rendered string. Update the UI test to feed the structured field.","acceptance_criteria":"A successful tool printing 'failed: …' is not styled as a failure; failure styling is driven by a structured signal, not string matching.","status":"closed","priority":2,"issue_type":"bug","assignee":"Sam Catlow","owner":"sam@catlow.tech","created_at":"2026-08-14T14:43:24Z","created_by":"Sam Catlow","updated_at":"2026-08-14T15:48:45Z","started_at":"2026-08-14T15:44:20Z","closed_at":"2026-08-14T15:48:45Z","close_reason":"Fixed in internal/webui/api_chat.go + ui/src/chat/chat-tools.js: chatStreamEvent now carries a structured Failed bool (from ToolCallEvent.Err != \"\"); JS reads event.failed instead of sniffing the summary text. Adversarial review found zero issues. Committed a99a770.","external_ref":"https://github.com/samcharles93/archie-core/issues/489","labels":["code-review","webui"],"dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-wpq6","title":"telegram: tool lines disappear from the live frame once the answer exceeds ~3900 runes","description":"Mid-turn frames keep only the tail (clampToOneMessage keeps the last 3900 runes with a leading ellipsis). Tool lines are written inline near the start of the buffer — before the answer, since tools run before the answer in agentic turns — so once the answer exceeds ~3900 runes, every early tool line vanishes from the live frame (the buffer only grows; nothing re-inserts them mid-turn). They reappear at the top at finalize. The visible message changes shape three times (tool-inline, gone behind the ellipsis, tools-on-top) and the user watching mid-turn sees the tool activity silently disappear.\n\nFailure: a turn with an early web_fetch followed by a 4000-rune answer shows only '...' + tail with no tool line for the bulk of the turn.","design":"Keep tool lines outside the clamped tail — render the tool block above the truncated answer tail in the live frame — so tool activity stays visible for the whole turn.","acceptance_criteria":"In a turn with an early tool call and a \u003e3900-rune answer, the live frame still shows the tool line(s) at the top rather than hiding them behind the ellipsis.","status":"closed","priority":2,"issue_type":"bug","assignee":"Sam Catlow","owner":"sam@catlow.tech","created_at":"2026-08-14T14:43:23Z","created_by":"Sam Catlow","updated_at":"2026-08-14T15:25:44Z","started_at":"2026-08-14T15:07:52Z","closed_at":"2026-08-14T15:25:44Z","close_reason":"Fixed in internal/channels/telegram/live.go: framedText keeps tool lines whole ahead of the clamped answer tail (fixes wpq6); finalText appends a '(no response)' marker when tools ran but the reply is empty (fixes hlxd); abandonFailed marks a provider-error partial distinctly from a clean /stop abandon (fixes c3w2). Regression tests verified red-then-green; adversarial review found no blocking issues (added one more test for the degenerate oversized-tool-block case it flagged). task check clean, committed as 587b9b9.","external_ref":"https://github.com/samcharles93/archie-core/issues/490","labels":["code-review","streaming","telegram"],"dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-9zoa","title":"telegram: a restart mid-turn strands a permanent message ending in the ▌ cursor","description":"The live reply is a real, permanent Telegram message (SendRichMessage) whose messageID lives only in the in-memory liveReply struct. No shutdown path — supervisor restart in Start, daemon stop, launch() rebuilding Turns — edits or deletes it. A restart mid-turn strands a permanent message ending in ▌ that nothing will ever finish. The old draft path self-deleted (ephemeral 30-second previews); this is a new class of leftover introduced by the live-edit design.\n\nFailure: the operator restarts the daemon or deploys a new build while a turn is streaming; the partial reply with the cursor persists in the chat indefinitely, implying the bot is still writing.","design":"On gateway Stop/restart, track in-flight liveReply instances (a registry keyed by chat/thread) and edit them to drop the cursor and/or append a cancelled/restarted marker — or delete them. Decide the desired end state for an interrupted turn.","acceptance_criteria":"A daemon restart during a streamed turn leaves no ▌-terminated message; the partial reply is either completed, marked, or removed.","status":"closed","priority":2,"issue_type":"bug","assignee":"Sam Catlow","owner":"sam@catlow.tech","created_at":"2026-08-14T14:43:09Z","created_by":"Sam Catlow","updated_at":"2026-08-14T16:20:04Z","started_at":"2026-08-14T15:58:25Z","closed_at":"2026-08-14T16:20:04Z","close_reason":"Fixed: Gateway tracks in-flight liveReply instances in a registry Stop drains, marking each interrupted. Adversarial review found a critical race (concurrent finalize/abandon on the same reply could corrupt the message) plus two lesser issues (unbounded blocking Stop, a narrow post-snapshot registration gap) -- all three fixed: sync.Once serializes finalize/abandon, the drain is time-bounded (default 5s, entries left running in background past that), and registerLive checks a stopped flag to immediately abandon a straggler. Re-reviewed via targeted regression tests including a 20-iteration concurrent race test. task check clean, -race clean across repeated runs. Committed 09ea210.","external_ref":"https://github.com/samcharles93/archie-core/issues/491","labels":["code-review","streaming","telegram"],"dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
@@ -382,14 +405,14 @@
|
||||
{"_type":"issue","id":"archie-core-1786637493467-141-ffb91b17","title":"ToolEntry data type definition","description":"Design and implement the ToolEntry data type carrying: name, toolset (which tool group this belongs to), schema (JSON Schema for invocation), handler (function ref), check_fn (availability predicate), requires_env (env vars needed), is_async (async/sync distinction), description, emoji, max_result_size_chars (per-tool result cap), and dynamic_schema_overrides (runtime schema mutations). This is the foundational type that everything in the tools subsystem builds upon.","status":"closed","priority":2,"issue_type":"task","created_at":"2026-08-08T14:38:14Z","updated_at":"2026-08-08T14:38:16Z","closed_at":"2026-08-08T14:38:17Z","external_ref":"https://github.com/samcharles93/archie-core/issues/162","source_system":"github:https://github.com/samcharles93/archie-core/issues/162:162","metadata":null,"labels":["task"],"dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-1786637493439-140-2cee2e9b","title":"[EPIC] Tools: central registry, MCP client, guardrails","description":"Central tool infrastructure to match Hermes parity:\n\n1. **Tool registry**: A central registry where tool modules register themselves with name, schema, handler, toolset membership, and availability check. Dynamic discovery of built-in tools. This replaces the current pattern of manually constructing core.ToolSet maps per invocation.\n\n2. **MCP client**: Connect to external MCP servers via stdio, HTTP/StreamableHTTP, or SSE transport. Discover their tools and register them into the tool registry. Support automatic reconnection with backoff, configurable timeouts, per-server parallel tool call opt-in.\n\n3. **Guardrails**: Tool-call loop detection (repeated calls, repeated failures, no-progress loops). Idempotent/mutating tool classification. Warning vs hard-stop decisions.\n\n4. **Progressive disclosure**: When tool schemas exceed a context-window threshold, replace them with bridge tools (tool_search/tool_describe/tool_call) and surface on demand. Core tools are always visible.\n\nRef: docs/prds/hermes-gap-analysis.md section 3\n\n### Acceptance Criteria\n\nMCP servers can be configured with a TOML block and their tools appear alongside built-ins. The agent loop is protected against tool-call loops. Tool schemas stay within context budget.\n","notes":"docs/prds/hermes-gap-analysis.md (referenced above) was intentionally deleted in commit 65aa5b4 ('chore: cleanup', 2026-07-28) after it had already spawned this and ~14 sibling beads issues from its 60 identified gaps — it is not a broken link to restore. This issue's description is the surviving record of its slice of that analysis.","status":"open","priority":2,"issue_type":"epic","created_at":"2026-08-08T14:38:11Z","updated_at":"2026-08-15T12:47:30Z","external_ref":"https://github.com/samcharles93/archie-core/issues/161","source_system":"github:https://github.com/samcharles93/archie-core/issues/161:161","metadata":null,"labels":["epic"],"dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-1786637493413-139-d157cc71","title":"SessionSource struct for platform identity","status":"closed","priority":2,"issue_type":"task","created_at":"2026-08-08T14:38:06Z","updated_at":"2026-08-08T14:38:08Z","closed_at":"2026-08-08T14:38:09Z","external_ref":"https://github.com/samcharles93/archie-core/issues/160","source_system":"github:https://github.com/samcharles93/archie-core/issues/160:160","metadata":null,"labels":["task"],"dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-1786637493387-138-cad8e7a7","title":"Platform capability flags for adapters","description":"A capability-flag mechanism so callers can ask an adapter which optional features it supports (typing indicator, edit, delete, media send, clarify/approval/picker UI) instead of discovering support by a failed type assertion or a runtime error.\n\n### Context for implementers\n\nThis depends on the optional-method interfaces this issue is meant to describe: `archie-core-1786637493329-136-49b39c78` (typing/edit/delete/media) and `archie-core-1786637493357-137-35af7083` (clarify/approval/pickers). Implement after (or in close coordination with) those two, since the flag set should mirror whatever optional interfaces they land — don't invent a flag taxonomy ahead of the methods it describes.\n\n### Acceptance Criteria\n\n`BasePlatformAdapter` (`internal/gateway/adapter.go`) or a wrapping type exposes a capability query (e.g. `Capabilities() AdapterCapabilities`) that reports which optional methods an adapter implements. Every existing adapter's reported capabilities match its actual method set (a regression test should fail if an adapter claims a capability it doesn't implement, or vice versa).\n","notes":"Partial: the mechanism itself (gateway.CapabilityReporter, CapabilitiesOf, AdapterCapabilities) is built and covered by a regression test, scoped to Media only -- see archie-core-1786637493329-136-49b39c78 (closed, media portion). Still blocked on archie-core-1786637493357-137-35af7083 (clarify/approval/pickers) since AdapterCapabilities needs those flags added too before this is fully done.","status":"in_progress","priority":2,"issue_type":"task","assignee":"Sam Catlow","created_at":"2026-08-08T14:38:02Z","updated_at":"2026-08-22T15:03:49Z","started_at":"2026-08-22T11:53:10Z","external_ref":"https://github.com/samcharles93/archie-core/issues/159","source_system":"github:https://github.com/samcharles93/archie-core/issues/159:159","metadata":null,"labels":["task"],"dependencies":[{"issue_id":"archie-core-1786637493387-138-cad8e7a7","depends_on_id":"archie-core-1786637493357-137-35af7083","type":"blocks","created_at":"2026-08-15T12:46:57Z","created_by":"Sam Catlow","metadata":"{}"},{"issue_id":"archie-core-1786637493387-138-cad8e7a7","depends_on_id":"archie-core-1786637493329-136-49b39c78","type":"blocks","created_at":"2026-08-15T12:46:57Z","created_by":"Sam Catlow","metadata":"{}"}],"dependency_count":2,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-1786637493387-138-cad8e7a7","title":"Platform capability flags for adapters","description":"A capability-flag mechanism so callers can ask an adapter which optional features it supports (typing indicator, edit, delete, media send, clarify/approval/picker UI) instead of discovering support by a failed type assertion or a runtime error.\n\n### Context for implementers\n\nThis depends on the optional-method interfaces this issue is meant to describe: `archie-core-1786637493329-136-49b39c78` (typing/edit/delete/media) and `archie-core-1786637493357-137-35af7083` (clarify/approval/pickers). Implement after (or in close coordination with) those two, since the flag set should mirror whatever optional interfaces they land — don't invent a flag taxonomy ahead of the methods it describes.\n\n### Acceptance Criteria\n\n`BasePlatformAdapter` (`internal/gateway/adapter.go`) or a wrapping type exposes a capability query (e.g. `Capabilities() AdapterCapabilities`) that reports which optional methods an adapter implements. Every existing adapter's reported capabilities match its actual method set (a regression test should fail if an adapter claims a capability it doesn't implement, or vice versa).\n","notes":"Partial: the mechanism itself (gateway.CapabilityReporter, CapabilitiesOf, AdapterCapabilities) is built and covered by a regression test, scoped to Media only -- see archie-core-1786637493329-136-49b39c78 (closed, media portion). Still blocked on archie-core-1786637493357-137-35af7083 (clarify/approval/pickers) since AdapterCapabilities needs those flags added too before this is fully done.","status":"open","priority":2,"issue_type":"task","created_at":"2026-08-08T14:38:02Z","updated_at":"2026-08-23T12:53:18Z","started_at":"2026-08-22T11:53:10Z","external_ref":"https://github.com/samcharles93/archie-core/issues/159","source_system":"github:https://github.com/samcharles93/archie-core/issues/159:159","metadata":null,"labels":["task"],"dependencies":[{"issue_id":"archie-core-1786637493387-138-cad8e7a7","depends_on_id":"archie-core-1786637493357-137-35af7083","type":"blocks","created_at":"2026-08-15T12:46:57Z","created_by":"Sam Catlow","metadata":"{}"},{"issue_id":"archie-core-1786637493387-138-cad8e7a7","depends_on_id":"archie-core-1786637493329-136-49b39c78","type":"blocks","created_at":"2026-08-15T12:46:57Z","created_by":"Sam Catlow","metadata":"{}"}],"dependency_count":2,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-1786637493357-137-35af7083","title":"BasePlatformAdapter interactive UX methods (clarify, approval, pickers)","description":"Add adapter-facing methods for interactive UX: presenting a clarifying question, an approval prompt, and a picker (multi-choice selection) natively on the platform, rather than as plain text the user has to reply to by hand.\n\n### Context for implementers\n\nThe approval *decision* plumbing already exists — `internal/tools/approval.go`, re-exported through `internal/gateway/approval.go` (`ApprovalRequester`, `ApprovalDecision`, `WithApprovalRequester`/`ApprovalFromContext`). What's missing is the adapter-side rendering: `BasePlatformAdapter` (`internal/gateway/adapter.go`) has no method for an adapter to display an approval/clarify/picker UI and report back a decision through that existing plumbing. This issue wires a new adapter method (or interface) into the existing `ApprovalRequester` flow — it should not duplicate or replace the decision model in `internal/tools/approval.go`. Sibling of `archie-core-1786637493329-136-49b39c78` (typing/edit/delete/media) — same \"optional adapter capability\" shape, different capability set.\n\n### Acceptance Criteria\n\nAn adapter can render a clarify/approval/picker prompt and the user's response is delivered back through the existing `ApprovalRequester`/`ApprovalDecision` flow in `internal/tools/approval.go`, not a parallel mechanism. Platforms without native UI (e.g. plain text-only channels) degrade to a text-based fallback rather than failing. Covered by a test double adapter, not a live platform.\n","status":"open","priority":2,"issue_type":"task","created_at":"2026-08-08T14:37:59Z","updated_at":"2026-08-15T12:46:48Z","external_ref":"https://github.com/samcharles93/archie-core/issues/158","source_system":"github:https://github.com/samcharles93/archie-core/issues/158:158","metadata":null,"labels":["task"],"dependency_count":0,"dependent_count":1,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-1786637493329-136-49b39c78","title":"BasePlatformAdapter optional methods (typing, edit, delete, media)","description":"Extend adapter capability beyond the four required `BasePlatformAdapter` methods with optional per-platform methods: typing indicator, message edit, message delete, and media-specific send.\n\n### Context for implementers\n\n`internal/gateway/adapter.go` today defines `BasePlatformAdapter` with exactly four methods: `Connect`, `Disconnect`, `Send`, `ChatInfo` (see full listing — the file is 80 lines). Not every platform supports typing/edit/delete/media uniformly, so these should be a separate optional interface(s) that callers type-assert for, not additions to the required interface (that would break every existing adapter implementation). Pairs with `archie-core-1786637493387-138-cad8e7a7` (platform capability flags) — callers need a way to know *ahead of a type assertion* whether an adapter supports a given optional method, rather than probing via failed assertions at call time.\n\n### Acceptance Criteria\n\nOptional methods are defined on a separate interface (or interfaces) from `BasePlatformAdapter`, so existing adapters keep compiling unchanged. At least one adapter implementation exercises each optional method in a test. Callers that invoke an optional method on an adapter that doesn't implement it get a defined, non-panicking behavior.\n","status":"closed","priority":2,"issue_type":"task","assignee":"Sam Catlow","created_at":"2026-08-08T14:37:57Z","updated_at":"2026-08-22T15:03:39Z","started_at":"2026-08-22T11:53:09Z","closed_at":"2026-08-22T15:03:39Z","close_reason":"Media portion delivered: gateway.MediaSender + telegramMediaSender + TurnStream.Media wiring in Telegram's liveReply. Typing/edit/delete indicators from this issue's original scope are NOT done -- splitting them out if still wanted, since they're unrelated to the video-gen work that drove this.","external_ref":"https://github.com/samcharles93/archie-core/issues/157","source_system":"github:https://github.com/samcharles93/archie-core/issues/157:157","metadata":null,"labels":["task"],"dependency_count":0,"dependent_count":1,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-1786637493329-136-49b39c78","title":"BasePlatformAdapter optional methods (typing, edit, delete, media)","description":"Extend adapter capability beyond the four required `BasePlatformAdapter` methods with optional per-platform methods: typing indicator, message edit, message delete, and media-specific send.\n\n### Context for implementers\n\n`internal/gateway/adapter.go` today defines `BasePlatformAdapter` with exactly four methods: `Connect`, `Disconnect`, `Send`, `ChatInfo` (see full listing — the file is 80 lines). Not every platform supports typing/edit/delete/media uniformly, so these should be a separate optional interface(s) that callers type-assert for, not additions to the required interface (that would break every existing adapter implementation). Pairs with `archie-core-1786637493387-138-cad8e7a7` (platform capability flags) — callers need a way to know *ahead of a type assertion* whether an adapter supports a given optional method, rather than probing via failed assertions at call time.\n\n### Acceptance Criteria\n\nOptional methods are defined on a separate interface (or interfaces) from `BasePlatformAdapter`, so existing adapters keep compiling unchanged. At least one adapter implementation exercises each optional method in a test. Callers that invoke an optional method on an adapter that doesn't implement it get a defined, non-panicking behavior.\n","status":"open","priority":2,"issue_type":"task","created_at":"2026-08-08T14:37:57Z","updated_at":"2026-08-23T12:53:18Z","started_at":"2026-08-22T11:53:09Z","external_ref":"https://github.com/samcharles93/archie-core/issues/157","source_system":"github:https://github.com/samcharles93/archie-core/issues/157:157","metadata":null,"labels":["task"],"dependency_count":0,"dependent_count":1,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-1786637493304-135-95070200","title":"BasePlatformAdapter interface with required methods","status":"closed","priority":2,"issue_type":"task","created_at":"2026-08-08T14:37:51Z","updated_at":"2026-08-08T14:37:54Z","closed_at":"2026-08-08T14:37:55Z","external_ref":"https://github.com/samcharles93/archie-core/issues/156","source_system":"github:https://github.com/samcharles93/archie-core/issues/156:156","metadata":null,"labels":["task"],"dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-1786637493282-134-cf46838e","title":"EphemeralReply type with auto-delete TTL","description":"An `EphemeralReply` type for messages the gateway sends that should self-delete after a TTL — status/progress placeholders (\"thinking…\", \"running tool X…\") that shouldn't linger in the chat history once superseded.\n\n### Context for implementers\n\nNo ephemeral-reply file exists yet in `internal/gateway`. Deletion requires adapter support: `BasePlatformAdapter` (`internal/gateway/adapter.go`) currently exposes only `Connect`/`Disconnect`/`Send`/`ChatInfo` — no delete method. This depends on (or should land alongside) `archie-core-1786637493329-136-49b39c78` (BasePlatformAdapter optional methods, which includes delete) — an adapter without a delete method can't honor the TTL.\n\n### Acceptance Criteria\n\nAn `EphemeralReply` carries a TTL after which the gateway issues a delete against the originating adapter. Adapters without delete support degrade gracefully (e.g. leave the message, log once) rather than erroring the turn. TTL firing is covered by a test using an injected clock, not a real sleep.\n","status":"open","priority":2,"issue_type":"task","created_at":"2026-08-08T14:37:48Z","updated_at":"2026-08-15T12:46:47Z","external_ref":"https://github.com/samcharles93/archie-core/issues/155","source_system":"github:https://github.com/samcharles93/archie-core/issues/155:155","metadata":null,"labels":["task"],"dependencies":[{"issue_id":"archie-core-1786637493282-134-cf46838e","depends_on_id":"archie-core-1786637493329-136-49b39c78","type":"related","created_at":"2026-08-15T12:46:57Z","created_by":"Sam Catlow","metadata":"{}"}],"dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-1786637493254-133-444ec94e","title":"Telegram: interactive /model selector","description":"When /model is invoked without an argument, present Telegram-native interactive controls rather than only plain text usage. Use the pinned go-telegram/bot SDK inline keyboard and callback query APIs; preserve /model provider/model for typed selection and enforce the existing sender allowlist on callbacks.\n\n### Acceptance Criteria\n\nAn allowlisted user invoking /model receives an inline keyboard of configured models with the active model marked; tapping a model switches it through gateway.ModelManager, acknowledges the callback, and updates the message; unauthorized or malformed callbacks cannot switch models; empty model catalogs degrade safely.","status":"closed","priority":2,"issue_type":"feature","created_at":"2026-08-08T14:37:45Z","updated_at":"2026-08-15T02:48:49Z","closed_at":"2026-08-15T02:48:49Z","external_ref":"https://github.com/samcharles93/archie-core/issues/154","source_system":"github:https://github.com/samcharles93/archie-core/issues/154:154","metadata":null,"labels":["enhancement"],"dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-1786637493230-132-7ab58e77","title":"Telegram: comprehensive truthful /help output","description":"The live /help response lists only /status and /help and still says LLM chat is not wired, despite the gateway supporting model, task, restart, and free-text chat paths. Replace the stale hardcoded copy with a complete, maintainable command guide that matches the registered menu and actual router behavior.\n\n### Acceptance Criteria\n\n/help describes every published command with accurate usage, includes free-text chat behavior, no longer claims chat is unwired, and a regression test fails if the published command menu and help surface drift.","status":"open","priority":2,"issue_type":"feature","created_at":"2026-08-08T14:37:42Z","updated_at":"2026-08-08T15:34:31Z","external_ref":"https://github.com/samcharles93/archie-core/issues/153","source_system":"github:https://github.com/samcharles93/archie-core/issues/153:153","metadata":null,"labels":["enhancement","in-progress"],"dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-1786637493205-131-a3dd2b53","title":"Telegram: /restore to revert the last change","description":"Operator escape hatch requested alongside /restart: revert the last change from chat when an agent-authored change breaks something, without needing shell access to the host. Gateway-scoped.\n\n### Acceptance Criteria\n\nAdmin-only (allowlisted sender). Reverts the last change and reports what was reverted. Safe to run when there is nothing to revert.","status":"closed","priority":2,"issue_type":"feature","created_at":"2026-08-08T14:37:39Z","updated_at":"2026-08-22T10:51:28Z","closed_at":"2026-08-22T10:51:28Z","close_reason":"Closed","external_ref":"https://github.com/samcharles93/archie-core/issues/152","source_system":"github:https://github.com/samcharles93/archie-core/issues/152:152","metadata":null,"labels":["enhancement","in-progress"],"dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-1786637493205-131-a3dd2b53","title":"Telegram: /restore to revert the last change","description":"Operator escape hatch requested alongside /restart: revert the last change from chat when an agent-authored change breaks something, without needing shell access to the host. Gateway-scoped.\n\n### Acceptance Criteria\n\nAdmin-only (allowlisted sender). Reverts the last change and reports what was reverted. Safe to run when there is nothing to revert.","status":"open","priority":2,"issue_type":"feature","created_at":"2026-08-08T14:37:39Z","updated_at":"2026-08-23T12:53:18Z","external_ref":"https://github.com/samcharles93/archie-core/issues/152","source_system":"github:https://github.com/samcharles93/archie-core/issues/152:152","metadata":null,"labels":["enhancement","in-progress"],"dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-1786637493175-130-d2de1e70","title":"Telegram: /restart command to reload gateway config","description":"Operator escape hatch: restart the chat gateway from chat to pick up config changes (notably the allowlist) or recover from a wedged adapter, without shell access to the host.\n\n### Acceptance Criteria\n\n/restart is admin-only (allowlisted sender). Re-reads config and restarts the gateway. Replies with the outcome. In-flight agent tasks are not killed.","status":"closed","priority":2,"issue_type":"feature","created_at":"2026-08-08T14:37:34Z","updated_at":"2026-08-08T15:34:35Z","closed_at":"2026-08-08T15:34:36Z","external_ref":"https://github.com/samcharles93/archie-core/issues/151","source_system":"github:https://github.com/samcharles93/archie-core/issues/151:151","metadata":null,"labels":["enhancement"],"dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-1786637493149-129-8a9ae7dc","title":"Telegram: register command menu via SetMyCommands","description":"The bot never calls SetMyCommands, so Telegram shows no command menu and the commands the Router implements (/status, /help, /models, /model, /spawn, /approve, /cancel) are undiscoverable. Asking the bot for /commands makes the LLM answer that it has none, which is wrong.\n\n### Acceptance Criteria\n\nSetMyCommands is called at startup with the commands the Router actually handles. Failure is logged, not fatal.","status":"closed","priority":2,"issue_type":"task","created_at":"2026-08-08T14:37:29Z","updated_at":"2026-08-08T14:37:31Z","closed_at":"2026-08-08T14:37:32Z","external_ref":"https://github.com/samcharles93/archie-core/issues/150","source_system":"github:https://github.com/samcharles93/archie-core/issues/150:150","metadata":null,"labels":["task"],"dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-1786637493121-128-2acad290","title":"Telegram: allowlist senders, fail closed when unset","description":"telegram.New is called with a nil allowlist and isChatAllowed returns true when the allowlist is empty, so any Telegram user who finds the bot can talk to it. AllowedChatIDs is not plumbed into config at all. This gates exposing any real tools to the chat agent: with an MCP shell/filesystem server wired, allow-all becomes RCE for arbitrary senders.\n\n### Acceptance Criteria\n\nAllowlist is configurable via config.toml. Unset means deny, not allow. Sender identity (user id) is checked, not just chat id, so a group chat cannot be used to bypass it. Rejections are logged with the sender id. Startup logs loudly when the chat gateway is enabled with an empty allowlist.","status":"closed","priority":2,"issue_type":"task","created_at":"2026-08-08T14:37:23Z","updated_at":"2026-08-08T14:37:26Z","closed_at":"2026-08-08T14:37:27Z","external_ref":"https://github.com/samcharles93/archie-core/issues/149","source_system":"github:https://github.com/samcharles93/archie-core/issues/149:149","metadata":null,"labels":["task"],"dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
@@ -414,7 +437,7 @@
|
||||
{"_type":"issue","id":"archie-core-1786637492640-109-820d4da3","title":"Verify: MessageType enum for gateway messages","description":"### Acceptance Criteria\n\nIndependent adversarial review by fresh agent. Verify: no dead code paths, no lint issues (golangci-lint run clean), tests pass (go test ./...), code is formatted (gofmt), no hardcoded values in tests. Review the implementation against the original acceptance criteria. Report findings or confirm clean.","status":"closed","priority":2,"issue_type":"task","created_at":"2026-08-08T14:35:47Z","updated_at":"2026-08-08T14:35:48Z","closed_at":"2026-08-08T14:35:49Z","external_ref":"https://github.com/samcharles93/archie-core/issues/130","source_system":"github:https://github.com/samcharles93/archie-core/issues/130:130","metadata":null,"labels":["task"],"dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-1786637492617-108-33718282","title":"TEST Verify: MessageType enum for gateway messages","description":"### Acceptance Criteria\n\nTEST TASK, DELETE ME","status":"closed","priority":2,"issue_type":"task","created_at":"2026-08-08T14:35:43Z","updated_at":"2026-08-08T14:35:45Z","closed_at":"2026-08-08T14:35:46Z","external_ref":"https://github.com/samcharles93/archie-core/issues/129","source_system":"github:https://github.com/samcharles93/archie-core/issues/129:129","metadata":null,"labels":["task"],"dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-1786637492590-107-92482ef1","title":"Media utilities: cache, validate, deliver images/audio/video/documents","description":"Shared media utilities for handling images/audio/video/documents across platform adapters: download from the platform, validate (MIME type, size ceiling), cache to avoid re-fetching, and hand back a normalized reference the gateway can attach to a `MessageEvent` or deliver outbound.\n\n### Context for implementers\n\nNo media file exists yet in `internal/gateway`. `MessageEvent` (`internal/gateway/messageevent.go`) is the shared event model this should plug into — check its current field set before adding a parallel media type. This is infrastructure other Gateway epic items depend on conceptually (any adapter method that sends/receives media, e.g. `archie-core-1786637493329-136-49b39c78` BasePlatformAdapter optional methods) but there is no formal `bd dep` between them yet.\n\n### Acceptance Criteria\n\nA shared utility validates MIME type and size before accepting media, caches downloaded media keyed by platform + media ID with TTL/size-bounded eviction, and exposes a normalized reference type usable from any adapter. Oversized or disallowed-MIME media is rejected with a caller-visible error, not silently dropped.\n","status":"open","priority":2,"issue_type":"task","created_at":"2026-08-08T14:35:41Z","updated_at":"2026-08-15T12:46:47Z","external_ref":"https://github.com/samcharles93/archie-core/issues/128","source_system":"github:https://github.com/samcharles93/archie-core/issues/128:128","metadata":null,"labels":["task"],"dependencies":[{"issue_id":"archie-core-1786637492590-107-92482ef1","depends_on_id":"archie-core-1786637493329-136-49b39c78","type":"related","created_at":"2026-08-15T12:46:57Z","created_by":"Sam Catlow","metadata":"{}"}],"dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-1786637492559-106-5ea2315d","title":"Code-fence-aware message truncation","description":"Truncate outbound messages to a platform's length limit (e.g. Telegram's 4096 chars) without ever cutting inside a ``` code fence — a truncation mid-fence leaves the rest of the message rendered as broken/unclosed markdown on the client.\n\n### Context for implementers\n\nNo truncation helper exists yet in `internal/gateway`. This is distinct from the Markdown→HTML conversion trap documented in `CLAUDE.md` (\"`EscapeMarkdown` does the *inverse* of formatting\" / `go-telegram/bot`'s `SendRichMessage`) — that trap is about format conversion, this issue is about length-based cropping. Keep the two concerns separate: this helper should decide *where* to cut; rendering is a separate step.\n\n### Acceptance Criteria\n\nA message longer than the platform limit is truncated at a safe boundary: never inside an open code fence, preferring a paragraph/sentence boundary before the limit. If truncation would land inside a fence, the cut point backs up to before the fence opens (or the fence is closed and reopened on continuation, if multi-part delivery is in scope — confirm with the maintainer which behavior is wanted before implementing). Covered by a table-driven test with fenced and unfenced inputs at/over the limit.\n","status":"closed","priority":2,"issue_type":"task","created_at":"2026-08-08T14:35:39Z","updated_at":"2026-08-22T10:27:03Z","started_at":"2026-08-22T09:32:18Z","closed_at":"2026-08-22T10:27:03Z","close_reason":"Implemented code-fence-aware Telegram message splitting with bounded continuation handling and regression coverage","external_ref":"https://github.com/samcharles93/archie-core/issues/127","source_system":"github:https://github.com/samcharles93/archie-core/issues/127:127","metadata":null,"labels":["task"],"dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-1786637492559-106-5ea2315d","title":"Code-fence-aware message truncation","description":"Truncate outbound messages to a platform's length limit (e.g. Telegram's 4096 chars) without ever cutting inside a ``` code fence — a truncation mid-fence leaves the rest of the message rendered as broken/unclosed markdown on the client.\n\n### Context for implementers\n\nNo truncation helper exists yet in `internal/gateway`. This is distinct from the Markdown→HTML conversion trap documented in `CLAUDE.md` (\"`EscapeMarkdown` does the *inverse* of formatting\" / `go-telegram/bot`'s `SendRichMessage`) — that trap is about format conversion, this issue is about length-based cropping. Keep the two concerns separate: this helper should decide *where* to cut; rendering is a separate step.\n\n### Acceptance Criteria\n\nA message longer than the platform limit is truncated at a safe boundary: never inside an open code fence, preferring a paragraph/sentence boundary before the limit. If truncation would land inside a fence, the cut point backs up to before the fence opens (or the fence is closed and reopened on continuation, if multi-part delivery is in scope — confirm with the maintainer which behavior is wanted before implementing). Covered by a table-driven test with fenced and unfenced inputs at/over the limit.\n","status":"open","priority":2,"issue_type":"task","created_at":"2026-08-08T14:35:39Z","updated_at":"2026-08-23T12:53:18Z","started_at":"2026-08-22T09:32:18Z","external_ref":"https://github.com/samcharles93/archie-core/issues/127","source_system":"github:https://github.com/samcharles93/archie-core/issues/127:127","metadata":null,"labels":["task"],"dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-1786637492528-105-c2b3caab","title":"TextBatchAggregator for rapid-fire text events","description":"Batch rapid-fire inbound text events from the same sender/channel into a single dispatch instead of invoking the agent loop once per fragment. Chat clients (Telegram in particular) often split a user's thought across several quick messages; dispatching each separately wastes a full agent turn per fragment and can interleave responses oddly.\n\n### Context for implementers\n\nNo aggregator exists yet in `internal/gateway`. This sits upstream of the agent-loop dispatch, after platform adapters normalize events into `MessageEvent` (`internal/gateway/messageevent.go`) but before a turn is started (see `internal/gateway/turn.go`, `turns.go`).\n\n### Acceptance Criteria\n\nText events from the same channel arriving within a short configurable window are coalesced into one aggregated event before dispatch. A single non-batched message is not delayed by more than the window. Aggregation window is configurable, not hardcoded. Covered by a test using an injected clock.\n","status":"open","priority":2,"issue_type":"task","created_at":"2026-08-08T14:35:37Z","updated_at":"2026-08-15T12:46:47Z","external_ref":"https://github.com/samcharles93/archie-core/issues/126","source_system":"github:https://github.com/samcharles93/archie-core/issues/126:126","metadata":null,"labels":["task"],"dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-1786637492498-104-1bde76ae","title":"MessageDeduplicator with TTL-based dedup cache","description":"Prevent duplicate processing of the same platform message. At-least-once delivery (webhook retries, Telegram long-poll re-fetch after a slow ack, forge redelivery) can hand the gateway the same `MessageEvent` more than once; without a dedup layer it gets answered twice.\n\n### Context for implementers\n\n`internal/gateway/messageevent.go` already carries a platform-assigned `ID` field (`MessageEvent.ID`, see line ~59) suitable as a dedup key alongside `ChannelID`/`Platform`. There is currently no dedup file in `internal/gateway` — this is new code, not a rename. Related but distinct: `archie-core-ippu` (gateway: replay and redelivery lose tool activity) covers a different symptom — a replayed *turn* losing its tool-call history in the transcript, not a duplicate inbound message being processed twice. Fix this one first; it may reduce (but won't eliminate) triggers for the other.\n\n### Acceptance Criteria\n\nA `MessageDeduplicator` (or equivalent) keyed on platform + channel + message ID rejects a second delivery of the same message within a configurable TTL window. TTL expiry is covered by a test using an injected clock, not a real sleep. Memory use is bounded (LRU or TTL sweep), not an unbounded map.\n","status":"open","priority":2,"issue_type":"task","created_at":"2026-08-08T14:35:35Z","updated_at":"2026-08-15T12:46:47Z","external_ref":"https://github.com/samcharles93/archie-core/issues/125","source_system":"github:https://github.com/samcharles93/archie-core/issues/125:125","metadata":null,"labels":["task"],"dependencies":[{"issue_id":"archie-core-1786637492498-104-1bde76ae","depends_on_id":"archie-core-ippu","type":"related","created_at":"2026-08-15T12:46:57Z","created_by":"Sam Catlow","metadata":"{}"}],"dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-1786637492468-103-72e44236","title":"SessionStore interface and implementation","status":"closed","priority":2,"issue_type":"task","created_at":"2026-08-08T14:35:31Z","updated_at":"2026-08-08T14:35:33Z","closed_at":"2026-08-08T14:35:34Z","external_ref":"https://github.com/samcharles93/archie-core/issues/124","source_system":"github:https://github.com/samcharles93/archie-core/issues/124:124","metadata":null,"labels":["task"],"dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
@@ -520,6 +543,6 @@
|
||||
{"_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"],"dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-1ysw.8","title":"Honor cancellation before local worktree commits","description":"CommitAll discards its context and can stage and commit after task cancellation.","acceptance_criteria":"A pre-canceled context causes no index or HEAD mutation; cancellation is checked between non-context-aware go-git phases where possible, with regression tests.","status":"open","priority":3,"issue_type":"bug","owner":"sam@catlow.tech","created_at":"2026-08-22T11:01:48Z","created_by":"Sam Catlow","updated_at":"2026-08-22T11:01:48Z","dependencies":[{"issue_id":"archie-core-1ysw.8","depends_on_id":"archie-core-1ysw","type":"parent-child","created_at":"2026-08-22T21:01:47Z","created_by":"Sam Catlow","metadata":"{}"}],"dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-1ysw.8","title":"Honor cancellation before local worktree commits","description":"CommitAll discards its context and can stage and commit after task cancellation.","acceptance_criteria":"A pre-canceled context causes no index or HEAD mutation; cancellation is checked between non-context-aware go-git phases where possible, with regression tests.","status":"open","priority":3,"issue_type":"bug","owner":"sam@catlow.tech","created_at":"2026-08-22T11:01:48Z","created_by":"Sam Catlow","updated_at":"2026-08-23T12:56:41Z","external_ref":"https://github.com/samcharles93/archie-core/issues/603","dependencies":[{"issue_id":"archie-core-1ysw.8","depends_on_id":"archie-core-1ysw","type":"parent-child","created_at":"2026-08-22T21:01:47Z","created_by":"Sam Catlow","metadata":"{}"}],"dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-0y4v","title":"agent: markWorktreeSafe checks existence, not mount-ness, so a stale dir writes to the operator's gitconfig","description":"markWorktreeSafe gates on os.Stat (existence and dir-ness), not mount-ness, despite the doc comment claiming a 'mount' check so host-mode agents don't write to the operator's own ~/.gitconfig for a path that was never mounted (commit 6b46ea1's stated purpose). A directory that merely exists at /data/worktree (a stale leftover) satisfies the guard and appends safe.directory=/data/worktree to the operator's gitconfig. Low severity — the entry is inert unless a repo exists at that exact path — but the guard's behavior does not match its documented contract, and the exists-but-not-a-mount case is untested.\n\nFailure: a host-mode agent (local-ollama-standalone.toml) on a machine with a leftover /data directory: an extra safe.directory line appears in the operator's ~/.gitconfig, exactly what the guard claims to prevent.","design":"Either implement a real mount check (e.g. /proc/self/mountinfo on Linux) or correct the doc comment to say the guard is existence-based and accept the (inert) entry. Decide which contract is intended.","acceptance_criteria":"Behavior matches the documented contract; the exists-but-not-mounted case is covered by a test, or the doc is corrected.","status":"closed","priority":3,"issue_type":"bug","assignee":"Sam Catlow","owner":"sam@catlow.tech","created_at":"2026-08-14T14:43:38Z","created_by":"Sam Catlow","updated_at":"2026-08-14T15:48:45Z","started_at":"2026-08-14T15:47:55Z","closed_at":"2026-08-14T15:48:45Z","close_reason":"Corrected markSafe's doc comment to match its actual existence-based (not mount-based) check; pinned the exists-but-unmounted case with a new test rather than adding platform-specific mount detection for an inert failure mode. Committed f1d74ab.","external_ref":"https://github.com/samcharles93/archie-core/issues/494","labels":["agent","code-review"],"dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-52f7","title":"telegram: the live-edit answer keeps its turn-start timestamp and can sort before the conversation","description":"The final reply is delivered by editing the message created at the first streamed frame, and editMessageText does not change the message date — so a long tool-using turn's answer is timestamped at turn start, can predate messages sent during the turn, and sorts before the conversation that produced it. Cosmetic and inherent to the watch-the-answer-being-written design (delete-and-resend would flicker and reorder), but it is a visible consequence nothing documents or tests.\n\nFailure: a turn with a two-minute tool phase produces an answer whose timestamp precedes a follow-up user message that references it; chat history ordering places the answer before the conversation that produced it.","design":"Either accept and document the limitation (a comment on liveReply/finalize), or investigate a delete-and-resend on finalize for turns that cross a meaningful time gap. Low priority; a documentation note may be the right fix.","acceptance_criteria":"The timestamp behavior is at least documented (or changed and tested), so it is a known trade-off rather than a surprise.","status":"closed","priority":4,"issue_type":"task","assignee":"Sam Catlow","owner":"sam@catlow.tech","created_at":"2026-08-14T14:43:38Z","created_by":"Sam Catlow","updated_at":"2026-08-14T15:48:45Z","started_at":"2026-08-14T15:46:50Z","closed_at":"2026-08-14T15:48:45Z","close_reason":"Documented the accepted trade-off on liveReply's doc comment per the design note's preferred option; no behavior change. Committed ed18bfb.","external_ref":"https://github.com/samcharles93/archie-core/issues/495","labels":["code-review","streaming","telegram"],"dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
@@ -306,6 +306,8 @@ func (b *boot) setupObservability() {
|
||||
})
|
||||
}
|
||||
b.web = &webui.Server{Store: b.st, Log: log, LogFeed: b.logFeed, TaskLogs: b.taskLogs, Cfg: config.NewHolder(cfg), Channels: b.channelManager, Events: bus}
|
||||
b.web.UpdateReportPath = updateReportPath(cfg.WorkDir, "webui")
|
||||
b.web.RunningVersions = daemonRunningVersions
|
||||
b.web.SetProvenance(configProvenance)
|
||||
b.web.ReloadChannel = func(ctx context.Context, id string) error {
|
||||
if id != "telegram" || b.restartTelegram == nil {
|
||||
|
||||
@@ -53,6 +53,13 @@ const (
|
||||
// never produces this kind, so derived work cannot feed its own
|
||||
// trigger. data: session, channel.
|
||||
KindTurnCompleted = "turn_completed"
|
||||
|
||||
// KindUpdateReport carries the phase-2 outcome of a dashboard-initiated
|
||||
// update -- whether the restarted daemon came back up healthy and on
|
||||
// the version it claimed, relayed once on the boot that finds the
|
||||
// pending report left by the update watchdog (archie-core-nln7).
|
||||
// data: health_check, rolled_back, confirmed, drift, unverified.
|
||||
KindUpdateReport = "update_report"
|
||||
)
|
||||
|
||||
// Event is the single wire type: task lifecycle, stage progress, agent
|
||||
|
||||
@@ -509,7 +509,8 @@ func (s *Server) handleChatUpdateInstall(w http.ResponseWriter, r *http.Request)
|
||||
}()
|
||||
|
||||
progress := make([]string, 0, 4)
|
||||
result, err := chat.Updates.Install(r.Context(), releaseupdate.InstallMeta{Channel: "webui"}, func(message string) { progress = append(progress, message) })
|
||||
meta := releaseupdate.InstallMeta{Channel: "webui", ReportPath: s.UpdateReportPath}
|
||||
result, err := chat.Updates.Install(r.Context(), meta, func(message string) { progress = append(progress, message) })
|
||||
if err != nil {
|
||||
http.Error(w, err.Error(), http.StatusBadGateway)
|
||||
return
|
||||
|
||||
@@ -57,9 +57,10 @@ func (s *chatProviderModelStub) ModelsForProvider(provider string) []string {
|
||||
func (*chatProviderModelStub) SetActiveProvider(context.Context, string) error { return nil }
|
||||
|
||||
type chatUpdateStub struct {
|
||||
snapshot releaseupdate.Snapshot
|
||||
deferred releaseupdate.Snapshot
|
||||
installed bool
|
||||
snapshot releaseupdate.Snapshot
|
||||
deferred releaseupdate.Snapshot
|
||||
installed bool
|
||||
installedMeta releaseupdate.InstallMeta
|
||||
}
|
||||
|
||||
type webDangerousStub struct {
|
||||
@@ -90,8 +91,9 @@ func (s *chatUpdateStub) Defer(_ context.Context, _ int64, snapshot releaseupdat
|
||||
return nil
|
||||
}
|
||||
|
||||
func (s *chatUpdateStub) Install(_ context.Context, _ releaseupdate.InstallMeta, progress func(string)) (releaseupdate.Result, error) {
|
||||
func (s *chatUpdateStub) Install(_ context.Context, meta releaseupdate.InstallMeta, progress func(string)) (releaseupdate.Result, error) {
|
||||
s.installed = true
|
||||
s.installedMeta = meta
|
||||
progress("install started")
|
||||
return releaseupdate.Result{}, nil
|
||||
}
|
||||
@@ -706,14 +708,14 @@ func TestChatStreamRendersMediaAsALinkFallback(t *testing.T) {
|
||||
t.Fatalf("status = %d, body = %s", res.Code, res.Body)
|
||||
}
|
||||
|
||||
var joined string
|
||||
var joined strings.Builder
|
||||
for _, ev := range parseChatSSE(t, res.Body.String()) {
|
||||
if ev.Type == "delta" {
|
||||
joined += ev.Text
|
||||
joined.WriteString(ev.Text)
|
||||
}
|
||||
}
|
||||
if !strings.Contains(joined, "https://example.com/v.mp4") {
|
||||
t.Fatalf("delta stream = %q, want it to contain the asset URL", joined)
|
||||
if !strings.Contains(joined.String(), "https://example.com/v.mp4") {
|
||||
t.Fatalf("delta stream = %q, want it to contain the asset URL", joined.String())
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -154,6 +154,21 @@ type Server struct {
|
||||
// the dashboard failing to start.
|
||||
Mappings store.MappingStore
|
||||
|
||||
// UpdateReportPath is where the update watchdog leaves the phase-2
|
||||
// outcome of a dashboard-initiated install for this process to relay on
|
||||
// its next boot -- the webui counterpart of
|
||||
// channels/telegram.Gateway.UpdateReportPath. Empty (the default unless
|
||||
// composition wires it) means dashboard-initiated updates get no
|
||||
// phase-2 report (archie-core-nln7): the operator only sees the
|
||||
// synchronous install result, never restart/health/version outcome.
|
||||
UpdateReportPath string
|
||||
|
||||
// RunningVersions reports, per component ID (see releaseupdate.Report.Verify),
|
||||
// the version that component reports for itself right now. Optional:
|
||||
// nil leaves every claim in a relayed update report Unverified rather
|
||||
// than Confirmed.
|
||||
RunningVersions func() map[string]string
|
||||
|
||||
mu sync.Mutex
|
||||
conns map[chan events.Event]struct{}
|
||||
}
|
||||
@@ -291,6 +306,7 @@ func trimLeadingSlash(p string) string {
|
||||
|
||||
// Run serves until ctx ends.
|
||||
func (s *Server) Run(ctx context.Context, listen string) error {
|
||||
s.reportPendingUpdate(ctx)
|
||||
srv := &http.Server{Addr: listen, Handler: s.Handler(), ReadHeaderTimeout: 5 * time.Second}
|
||||
go func() {
|
||||
<-ctx.Done()
|
||||
|
||||
@@ -0,0 +1,117 @@
|
||||
package webui
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"sort"
|
||||
"strings"
|
||||
|
||||
"github.com/samcharles93/archie-core/internal/events"
|
||||
"github.com/samcharles93/archie-core/internal/releaseupdate"
|
||||
)
|
||||
|
||||
// reportPendingUpdate checks for a phase-2 outcome left by the update
|
||||
// watchdog for a dashboard-initiated install and relays it onto the
|
||||
// activity stream, mirroring internal/channels/telegram/update.go's
|
||||
// reportPendingUpdate for the Telegram channel. Called once on every daemon
|
||||
// boot (Server.Run), so it fires whether this is the restart the update
|
||||
// itself triggered or a later, unrelated restart.
|
||||
//
|
||||
// A report is cleared as soon as it's handled -- relayed, or found
|
||||
// unreadable -- so a later boot never retries it and two boots never race
|
||||
// to relay the same outcome.
|
||||
func (s *Server) reportPendingUpdate(ctx context.Context) {
|
||||
if s.UpdateReportPath == "" {
|
||||
return
|
||||
}
|
||||
report, found, err := releaseupdate.ReadPendingReport(s.UpdateReportPath)
|
||||
if err != nil {
|
||||
s.logf("read pending update report failed; discarding it", "err", err)
|
||||
if clearErr := releaseupdate.ClearPendingReport(s.UpdateReportPath); clearErr != nil {
|
||||
s.logf("clear unreadable update report failed", "err", clearErr)
|
||||
}
|
||||
return
|
||||
}
|
||||
if !found {
|
||||
return
|
||||
}
|
||||
s.emit(ctx, updateReportEvent(report, s.runningVersions()))
|
||||
if err := releaseupdate.ClearPendingReport(s.UpdateReportPath); err != nil {
|
||||
s.logf("clear pending update report failed", "err", err)
|
||||
}
|
||||
}
|
||||
|
||||
// runningVersions returns the versions components report for themselves, or
|
||||
// nil when the composition root wired none -- see the identical seam on
|
||||
// internal/channels/telegram.Gateway. Nil is not a no-op: with nothing to
|
||||
// check against, every claim comes back Unverified rather than Confirmed.
|
||||
func (s *Server) runningVersions() map[string]string {
|
||||
if s.RunningVersions == nil {
|
||||
return nil
|
||||
}
|
||||
return s.RunningVersions()
|
||||
}
|
||||
|
||||
// updateReportEvent turns a phase-2 Report, plus its verification against
|
||||
// the versions actually running, into the activity-stream event the
|
||||
// dashboard renders. Unlike Telegram's formatPendingReport, this ships the
|
||||
// structured Verification rather than pre-rendered prose, so the frontend
|
||||
// controls presentation -- the two channels' operators read the same facts
|
||||
// through different UIs, not necessarily the same sentence.
|
||||
func updateReportEvent(report releaseupdate.Report, running map[string]string) events.Event {
|
||||
verification := report.Verify(running)
|
||||
drift := make([]map[string]any, 0, len(verification.Drift))
|
||||
for _, d := range verification.Drift {
|
||||
drift = append(drift, map[string]any{
|
||||
"id": d.ID,
|
||||
"claimed": d.Claimed,
|
||||
"running": d.Running,
|
||||
"running_is_previous": d.RunningIsPrevious,
|
||||
})
|
||||
}
|
||||
return events.Event{
|
||||
Kind: events.KindUpdateReport,
|
||||
Detail: summarizeUpdateReport(report, verification),
|
||||
Data: map[string]any{
|
||||
"health_check": report.HealthCheck,
|
||||
"rolled_back": report.RolledBack,
|
||||
"previous": report.Previous,
|
||||
"installed": report.Installed,
|
||||
"confirmed": verification.Confirmed,
|
||||
"drift": drift,
|
||||
"unverified": verification.Unverified,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
// summarizeUpdateReport is the one-line summary shown in the dashboard's
|
||||
// activity feed, which renders event.Detail generically for every event
|
||||
// kind (see ui/src/dashboard/dashboard.js activityRow). It condenses the
|
||||
// same facts internal/channels/telegram/update.go's formatPendingReport
|
||||
// spells out at length -- not a byte-identical wording, since the two
|
||||
// surfaces render differently, but the same four outcomes: confirmed,
|
||||
// drifted, unverified, or rolled back.
|
||||
func summarizeUpdateReport(report releaseupdate.Report, verification releaseupdate.Verification) string {
|
||||
if report.RolledBack {
|
||||
return "Update failed its health check and was rolled back to the previous version."
|
||||
}
|
||||
if report.HealthCheck != "passed" {
|
||||
return "Update failed its health check and could NOT be rolled back automatically -- manual intervention required."
|
||||
}
|
||||
if len(verification.Drift) > 0 {
|
||||
ids := make([]string, 0, len(verification.Drift))
|
||||
for _, d := range verification.Drift {
|
||||
ids = append(ids, fmt.Sprintf("%s reports %s, not the installed %s", d.ID, d.Running, d.Claimed))
|
||||
}
|
||||
sort.Strings(ids)
|
||||
return "Update did NOT take effect: " + strings.Join(ids, "; ") + "."
|
||||
}
|
||||
if len(verification.Confirmed) == 0 {
|
||||
return "Update complete. Health check passed, but no version could be confirmed running."
|
||||
}
|
||||
text := "Update complete. Health check passed -- confirmed running on the new version (" + strings.Join(verification.Confirmed, ", ") + ")."
|
||||
if len(verification.Unverified) > 0 {
|
||||
text += " Not independently checked: " + strings.Join(verification.Unverified, ", ") + "."
|
||||
}
|
||||
return text
|
||||
}
|
||||
@@ -0,0 +1,161 @@
|
||||
package webui
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"context"
|
||||
"encoding/json"
|
||||
"net/http"
|
||||
"net/http/httptest"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"github.com/samcharles93/archie-core/internal/events"
|
||||
"github.com/samcharles93/archie-core/internal/gateway"
|
||||
"github.com/samcharles93/archie-core/internal/releaseupdate"
|
||||
)
|
||||
|
||||
// TestReportPendingUpdateEmitsAndClearsReport is the webui counterpart of
|
||||
// telegram's TestReportPendingUpdateSendsAndClearsReport: a dashboard-
|
||||
// initiated install must produce a phase-2 report that reaches the
|
||||
// dashboard, and must never be relayed twice (archie-core-nln7).
|
||||
func TestReportPendingUpdateEmitsAndClearsReport(t *testing.T) {
|
||||
s := newTestServer(t)
|
||||
path := filepath.Join(t.TempDir(), "update-report.json")
|
||||
report := releaseupdate.Report{
|
||||
Channel: "webui",
|
||||
Previous: map[string]string{releaseupdate.ComponentDaemon: "1.0.0"},
|
||||
Installed: map[string]string{releaseupdate.ComponentDaemon: "1.1.0"},
|
||||
HealthCheck: "passed",
|
||||
}
|
||||
if err := releaseupdate.WritePendingReport(path, report); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
s.UpdateReportPath = path
|
||||
s.RunningVersions = func() map[string]string {
|
||||
return map[string]string{releaseupdate.ComponentDaemon: "1.1.0"}
|
||||
}
|
||||
|
||||
ctx := context.Background()
|
||||
s.reportPendingUpdate(ctx)
|
||||
|
||||
evs, err := s.Store.EventsSince(ctx, 0, 10)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if len(evs) != 1 {
|
||||
t.Fatalf("events = %#v, want exactly one", evs)
|
||||
}
|
||||
if evs[0].Kind != events.KindUpdateReport {
|
||||
t.Errorf("kind = %q, want %q", evs[0].Kind, events.KindUpdateReport)
|
||||
}
|
||||
confirmed, _ := evs[0].Data["confirmed"].([]any)
|
||||
if len(confirmed) != 1 || confirmed[0] != releaseupdate.ComponentDaemon {
|
||||
t.Errorf("confirmed = %#v, want [%q]", evs[0].Data["confirmed"], releaseupdate.ComponentDaemon)
|
||||
}
|
||||
if !strings.Contains(evs[0].Detail, "confirmed running") {
|
||||
t.Errorf("Detail = %q, want it to say confirmed running", evs[0].Detail)
|
||||
}
|
||||
|
||||
if _, found, err := releaseupdate.ReadPendingReport(path); err != nil || found {
|
||||
t.Errorf("report still present after reportPendingUpdate: found=%v err=%v", found, err)
|
||||
}
|
||||
}
|
||||
|
||||
// TestReportPendingUpdateClearsUnreadableReport mirrors the telegram
|
||||
// behaviour: a corrupt report must not jam every future boot.
|
||||
func TestReportPendingUpdateClearsUnreadableReport(t *testing.T) {
|
||||
s := newTestServer(t)
|
||||
path := filepath.Join(t.TempDir(), "update-report.json")
|
||||
if err := os.WriteFile(path, []byte("{not valid json"), 0o600); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
s.UpdateReportPath = path
|
||||
|
||||
s.reportPendingUpdate(context.Background())
|
||||
|
||||
if _, err := os.Stat(path); !os.IsNotExist(err) {
|
||||
t.Fatalf("corrupt report file still exists after reportPendingUpdate: err = %v", err)
|
||||
}
|
||||
}
|
||||
|
||||
func TestReportPendingUpdateNoFileIsNoop(t *testing.T) {
|
||||
s := newTestServer(t)
|
||||
s.UpdateReportPath = filepath.Join(t.TempDir(), "does-not-exist.json")
|
||||
|
||||
s.reportPendingUpdate(context.Background())
|
||||
|
||||
evs, err := s.Store.EventsSince(context.Background(), 0, 10)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if len(evs) != 0 {
|
||||
t.Fatalf("events = %#v, want none", evs)
|
||||
}
|
||||
}
|
||||
|
||||
func TestReportPendingUpdateDisabledWhenPathEmpty(t *testing.T) {
|
||||
s := newTestServer(t)
|
||||
|
||||
s.reportPendingUpdate(context.Background())
|
||||
|
||||
evs, err := s.Store.EventsSince(context.Background(), 0, 10)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if len(evs) != 0 {
|
||||
t.Fatalf("events = %#v, want none", evs)
|
||||
}
|
||||
}
|
||||
|
||||
// TestSummarizeUpdateReportDistinguishesDriftFromConfirmed is the false-
|
||||
// success regression the whole verification mechanism (c25799e,
|
||||
// archie-core-3jag's sibling) exists to catch: a passed health probe alone
|
||||
// must never be worded as a confirmed version.
|
||||
func TestSummarizeUpdateReportDistinguishesDriftFromConfirmed(t *testing.T) {
|
||||
report := releaseupdate.Report{
|
||||
HealthCheck: "passed",
|
||||
Previous: map[string]string{releaseupdate.ComponentDaemon: "1.0.0"},
|
||||
Installed: map[string]string{releaseupdate.ComponentDaemon: "1.1.0"},
|
||||
}
|
||||
running := map[string]string{releaseupdate.ComponentDaemon: "1.0.0"}
|
||||
verification := report.Verify(running)
|
||||
|
||||
got := summarizeUpdateReport(report, verification)
|
||||
if !strings.Contains(got, "did NOT take effect") {
|
||||
t.Errorf("summary = %q, want it to flag drift rather than claim success", got)
|
||||
}
|
||||
if strings.Contains(got, "confirmed running") {
|
||||
t.Errorf("summary = %q, must not claim confirmed running when drift was detected", got)
|
||||
}
|
||||
}
|
||||
|
||||
// TestHandleChatUpdateInstallSetsReportPath is the regression proof: before
|
||||
// this fix, the webui install handler passed
|
||||
// releaseupdate.InstallMeta{Channel: "webui"} with no ReportPath, so the
|
||||
// watchdog's write_report() (scripts/archie-update-watchdog) silently
|
||||
// returned without ever writing a phase-2 report.
|
||||
func TestHandleChatUpdateInstallSetsReportPath(t *testing.T) {
|
||||
reportPath := filepath.Join(t.TempDir(), "update-report.json")
|
||||
updates := &chatUpdateStub{snapshot: releaseupdate.Snapshot{
|
||||
Components: []releaseupdate.Component{{ID: "gateway", Label: "Gateway", Installed: "1.0", Available: "1.1"}},
|
||||
}}
|
||||
sessions := gateway.NewSessionStoreMemory()
|
||||
t.Cleanup(func() { _ = sessions.Close() })
|
||||
router := gateway.NewRouter(chatStatusStub{}, nil, "web")
|
||||
server := &Server{Chat: &ChatService{Router: router, Sessions: sessions, Updates: updates}, UpdateReportPath: reportPath}
|
||||
|
||||
body, err := json.Marshal(chatUpdateRequest{Snapshot: updates.snapshot})
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
res := httptest.NewRecorder()
|
||||
server.Handler().ServeHTTP(res, httptest.NewRequestWithContext(context.Background(), http.MethodPost, "/api/chat/update/install", bytes.NewReader(body)))
|
||||
if res.Code != http.StatusOK || !updates.installed {
|
||||
t.Fatalf("update install = %d, body = %s", res.Code, res.Body.String())
|
||||
}
|
||||
if updates.installedMeta.ReportPath != reportPath {
|
||||
t.Errorf("ReportPath = %q, want %q", updates.installedMeta.ReportPath, reportPath)
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user