|
|
|
@@ -1,4 +1,8 @@
|
|
|
|
|
{"_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-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":"open","priority":1,"issue_type":"bug","owner":"sam@catlow.tech","created_at":"2026-08-22T11:01:44Z","created_by":"Sam Catlow","updated_at":"2026-08-22T11:01:44Z","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-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}
|
|
|
|
@@ -36,6 +40,12 @@
|
|
|
|
|
{"_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-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":"open","priority":2,"issue_type":"bug","owner":"sam@catlow.tech","created_at":"2026-08-22T11:09:58Z","created_by":"Sam Catlow","updated_at":"2026-08-22T11:09:58Z","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":"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.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":"open","priority":2,"issue_type":"bug","owner":"sam@catlow.tech","created_at":"2026-08-22T11:01:45Z","created_by":"Sam Catlow","updated_at":"2026-08-22T11:01:45Z","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-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}
|
|
|
|
@@ -43,7 +53,7 @@
|
|
|
|
|
{"_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":"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-21T11:57:53Z","external_ref":"https://github.com/samcharles93/archie-core/issues/532","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-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}
|
|
|
|
@@ -505,5 +515,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-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}
|